|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gridsystems.nextgrid.api.builder.AbstractBuilder<T>
T
- The type of models to buildpublic abstract class AbstractBuilder<T>
Base class for POMBuilder implementations.
Field Summary | |
---|---|
protected nextgrid.api.pom.ProcessFactory |
factory
Factory used for creating Process instances. |
protected static org.apache.commons.logging.Log |
LOG
Class logger. |
protected static java.lang.String |
NS_PROFILE
Namespace used for attributes storing profile (semantic) information. |
Constructor Summary | |
---|---|
AbstractBuilder(java.lang.Class<T> modelType,
java.lang.String uri)
Creates a new instance. |
Method Summary | |
---|---|
protected void |
addMissingRefs(nextgrid.api.pom.Process p)
Finds out missing references and creates them. |
protected void |
bindInputInput(nextgrid.api.pom.Process src,
nextgrid.api.pom.Process dst,
java.lang.String srcParamId,
java.lang.String dstParamId)
Binds a process input to another process input through a mapping. |
protected void |
bindOutputInput(nextgrid.api.pom.Process src,
nextgrid.api.pom.Process dst,
java.lang.String srcParamId,
java.lang.String dstParamId)
Binds a process output to another process input through a reference. |
protected void |
bindOutputOutput(nextgrid.api.pom.Process src,
nextgrid.api.pom.Process dst,
java.lang.String srcParamId,
java.lang.String dstParamId)
Binds a process output to another process output through a mapping. |
protected nextgrid.api.pom.Reference<?> |
createRef(java.lang.Class<?> type)
Creates a reference of the specified type. |
protected java.lang.String |
findMappedInputName(nextgrid.api.pom.Process p,
java.lang.String name)
Searches for a given input name into a process ascendants input mappings. |
java.lang.Class<T> |
getModelType()
|
java.net.URI |
getURI()
|
java.util.Collection<nextgrid.api.pom.Process> |
importAllFrom(java.io.InputStream is)
|
java.util.Collection<nextgrid.api.pom.Process> |
importAllFrom(java.net.URI src)
|
nextgrid.api.pom.Process |
importFrom(java.io.File src)
|
nextgrid.api.pom.Process |
importFrom(java.io.InputStream is)
|
nextgrid.api.pom.Process |
importFrom(java.net.URI src)
|
nextgrid.api.pom.Process |
importFrom(java.net.URL src)
|
protected abstract java.util.List<T> |
loadFrom(java.io.InputStream src)
Loads a workflow file. |
protected abstract java.util.List<T> |
loadFrom(java.net.URI src)
Loads a workflow file. |
protected void |
setProfileAttribute(nextgrid.api.pom.Process p,
java.lang.String name,
java.lang.Object value)
Sets a process attribute within the "profile" namespace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nextgrid.api.builder.POMBuilder |
---|
fromPOM, toPOM |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
protected static final java.lang.String NS_PROFILE
protected final nextgrid.api.pom.ProcessFactory factory
Constructor Detail |
---|
public AbstractBuilder(java.lang.Class<T> modelType, java.lang.String uri)
modelType
- The model typeuri
- The implementation URIMethod Detail |
---|
public final java.lang.Class<T> getModelType()
getModelType
in interface nextgrid.api.builder.POMBuilder<T>
public final java.net.URI getURI()
getURI
in interface nextgrid.api.builder.POMBuilder<T>
public final nextgrid.api.pom.Process importFrom(java.io.File src) throws java.io.IOException, nextgrid.api.builder.BuildException
importFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
public final nextgrid.api.pom.Process importFrom(java.net.URL src) throws java.io.IOException, nextgrid.api.builder.BuildException
importFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
public final nextgrid.api.pom.Process importFrom(java.net.URI src) throws java.io.IOException, nextgrid.api.builder.BuildException
importFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
public final nextgrid.api.pom.Process importFrom(java.io.InputStream is) throws java.io.IOException, nextgrid.api.builder.BuildException
importFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
public final java.util.Collection<nextgrid.api.pom.Process> importAllFrom(java.net.URI src) throws java.io.IOException, nextgrid.api.builder.BuildException
importAllFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
public final java.util.Collection<nextgrid.api.pom.Process> importAllFrom(java.io.InputStream is) throws java.io.IOException, nextgrid.api.builder.BuildException
importAllFrom
in interface nextgrid.api.builder.POMBuilder<T>
java.io.IOException
nextgrid.api.builder.BuildException
protected abstract java.util.List<T> loadFrom(java.net.URI src) throws java.io.IOException
src
- The file to import
java.io.IOException
- If an error occursprotected abstract java.util.List<T> loadFrom(java.io.InputStream src) throws java.io.IOException
src
- A stream to read from
java.io.IOException
- If an error occursprotected final nextgrid.api.pom.Reference<?> createRef(java.lang.Class<?> type)
type
- The reference type
protected final java.lang.String findMappedInputName(nextgrid.api.pom.Process p, java.lang.String name)
p
- The process where the search startsname
- The input name
protected final void addMissingRefs(nextgrid.api.pom.Process p)
p
- The process to searchprotected final void bindOutputInput(nextgrid.api.pom.Process src, nextgrid.api.pom.Process dst, java.lang.String srcParamId, java.lang.String dstParamId)
src
- The source processdst
- The destination processsrcParamId
- The source outputdstParamId
- The destination inputprotected final void bindInputInput(nextgrid.api.pom.Process src, nextgrid.api.pom.Process dst, java.lang.String srcParamId, java.lang.String dstParamId)
This method is used to map child process inputs to parent process ones.
src
- The source processdst
- The destination processsrcParamId
- The source outputdstParamId
- The destination inputprotected final void bindOutputOutput(nextgrid.api.pom.Process src, nextgrid.api.pom.Process dst, java.lang.String srcParamId, java.lang.String dstParamId)
This method is used to map child process outputs to parent process ones.
src
- The source processdst
- The destination processsrcParamId
- The source outputdstParamId
- The destination inputprotected final void setProfileAttribute(nextgrid.api.pom.Process p, java.lang.String name, java.lang.Object value)
p
- A Processname
- The attribute local namevalue
- The attribute value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |