public class Model
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
void |
addModelLink(ModelLink link)
Add link to the model
|
void |
addModelStep(ModelStep step) |
protected int |
computeSchedule(ModelStep sinkStep)
Compute internal step scheduling from the sink node specified in
parameter, the internal orderedScheduleStep define then the executed time
schedule
|
protected void |
createNewOrderedCollection() |
java.lang.String |
dump()
Dump the model steps and the links of the model (useful for debugging)
|
ModelLink |
findLinkById(java.lang.String id) |
ModelStep |
findModelStepById(java.lang.String id) |
AbstractParameter |
findParameterById(java.lang.String id)
find a parameter by id
|
java.util.Set<ModelLink> |
getAllLinksAssociatedTo(ModelStep step)
List links associated to a step (origin or destination)
|
java.util.Set<ModelLink> |
getFollowingLinksAssociatedTo(ModelStep step) |
TerminalParameterModelStep |
getInTerminalByName(java.lang.String name) |
java.util.Set<ModelLink> |
getLinksConnectedToParameter(ModelParameter param,
boolean source) |
TerminalParameterModelStep |
getOutTerminalByName(java.lang.String name) |
java.util.Set<ModelLink> |
getPrecedingLinksAssociatedTo(ModelStep step)
Get all the link that are linked to the destination step "step". this
does not depend on the kind of parameter
|
java.util.Set<ModelParameter> |
getRequiredModelParameter(ModelStep step)
List requiered parameters associated to a step
|
java.util.ArrayList<TerminalParameterModelStep> |
getTerminalModelStep(boolean filterOutParameters)
Find all terminalmodelstep
|
void |
hydrateContext(java.util.Map<java.lang.String,java.lang.Object> context) |
boolean |
isScheduled()
Is the schedule done ?
|
protected void |
razSchedule()
reset to -1 modelstep schedule
|
void |
removeLink(ModelLink link)
Remove link, this method invalidate the schedule
|
void |
removeLinkById(java.lang.String id)
Remove link by its id
|
void |
removeStepAndDisconnectLinks(ModelStep step)
Remove the step and disconnect from existing links
|
java.util.Set<ModelStep> |
schedule()
Compute the schedule for all terminate elements
|
void |
visit(ModelVisitor visitor)
Visit the model, on all steps
|
protected void |
visit(java.util.Set<ModelStep> elements,
ModelVisitor visitor)
Visit the model elements, ordered by the elements passed in parameters
|
void |
visitBySchedule(ModelVisitor visitor)
Visit on scheduled model, on scheduled steps
|
public void addModelStep(ModelStep step) throws java.lang.Exception
step
- java.lang.Exception
public void addModelLink(ModelLink link) throws java.lang.Exception
link
- java.lang.Exception
- if the link is not properly associated to the modelpublic void removeStepAndDisconnectLinks(ModelStep step) throws java.lang.Exception
step
- java.lang.Exception
public void removeLink(ModelLink link)
link
- public void removeLinkById(java.lang.String id)
id
- public java.util.Set<ModelLink> getAllLinksAssociatedTo(ModelStep step)
public java.util.Set<ModelLink> getLinksConnectedToParameter(ModelParameter param, boolean source)
param
- public java.util.Set<ModelLink> getPrecedingLinksAssociatedTo(ModelStep step)
step
- public java.util.Set<ModelLink> getFollowingLinksAssociatedTo(ModelStep step)
step
- public boolean isScheduled()
protected int computeSchedule(ModelStep sinkStep)
sinkStep
- the sink stepprotected void createNewOrderedCollection()
protected void razSchedule()
public java.util.Set<ModelParameter> getRequiredModelParameter(ModelStep step)
step
- public ModelStep findModelStepById(java.lang.String id)
public ModelLink findLinkById(java.lang.String id)
public AbstractParameter findParameterById(java.lang.String id)
id
- public java.util.ArrayList<TerminalParameterModelStep> getTerminalModelStep(boolean filterOutParameters)
filterOutParameters
- only terminalmodelstep that have out parameterspublic TerminalParameterModelStep getOutTerminalByName(java.lang.String name)
public TerminalParameterModelStep getInTerminalByName(java.lang.String name)
public java.util.Set<ModelStep> schedule()
public java.lang.String dump()
public void visitBySchedule(ModelVisitor visitor) throws java.lang.Exception
visitor
- java.lang.Exception
- raise exception if the model is not scheduled or if the visit
raise exceptionpublic void visit(ModelVisitor visitor)
protected void visit(java.util.Set<ModelStep> elements, ModelVisitor visitor)
elements
- visitor
- public void hydrateContext(java.util.Map<java.lang.String,java.lang.Object> context)
context
-