public abstract class Script_Model extends Script_Element
| Modifier and Type | Field and Description |
|---|---|
java.util.HashMap<java.lang.String,Script_Source> |
sources
List of sources.
|
id, internalID, keyLong, name, namespace, objType, parentElement, value| Constructor and Description |
|---|
Script_Model(org.licas_xml.abs.Element autoXml)
Create a new instance of Script_Model and add the xml-based description of the
element values.
|
Script_Model(java.lang.String scriptType,
java.lang.String elemID)
Create a new instance of Script_Model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(Script_Event theEvent)
Add an event to the model.
|
boolean |
addReflection(Script_Reflection theReflection)
Add a reflection instance to the model.
|
boolean |
addSource(Script_Source theSource)
Add a source to the model.
|
boolean |
addVariable(Script_Variable theVariable)
Add a variable to the model.
|
boolean |
addVariableInstance(Script_VariableInstance theVariableInstance)
Add a variable instance to the model.
|
java.util.ArrayList<Script_Event> |
getEvents()
Get the model events.
|
java.util.HashMap<java.lang.String,Script_Reflection> |
getReflection()
Get the model reflection instances.
|
Script_Reflection |
getReflection(java.lang.String variableName)
Get the model reflection instance.
|
Script_Element |
getScriptWithID(java.lang.String scriptID)
Get the script element with the specified id.
|
Script_Source |
getSource(java.lang.String sourceName)
Get the model source.
|
java.util.HashMap<java.lang.String,Script_Source> |
getSources()
Get the model sources.
|
Script_Variable |
getVariable(java.lang.String variableName)
Get the model variable.
|
Script_VariableInstance |
getVariableInstance(java.lang.String variableName)
Get the model variable instance.
|
java.util.HashMap<java.lang.String,Script_VariableInstance> |
getVariableInstances()
Get the model variable instances.
|
java.util.HashMap<java.lang.String,Script_Variable> |
getVariables()
Get the model variables.
|
void |
setEvents(java.util.ArrayList<Script_Event> theEvents)
Set the model events.
|
java.util.HashMap<java.lang.String,Script_Element> |
setForUse()
Initialise the script model to be used.
|
void |
setReflection(java.util.HashMap<java.lang.String,Script_Reflection> theReflection)
Set the model reflection set.
|
void |
setSources(java.util.HashMap<java.lang.String,Script_Source> theSources)
Set the model variables.
|
void |
setVariableInstances(java.util.HashMap<java.lang.String,Script_VariableInstance> theVariableInstances)
Set the model variable instances.
|
void |
setVariables(java.util.HashMap<java.lang.String,Script_Variable> theVariables)
Set the model variables.
|
org.licas_xml.abs.Element |
toXml()
Convert the contents of this Script_Element into an XML-only format.
|
getID, getInternalID, getName, getNamespace, getObjType, getParent, getScriptUuid, getValue, processThis, setNamespace, setObjType, setParent, setValue, setValue, usesSubEventspublic java.util.HashMap<java.lang.String,Script_Source> sources
public Script_Model(java.lang.String scriptType,
java.lang.String elemID)
scriptType - the script element type. This is also the element tag name
and should not be null.elemID - this is the external id used to identify this element specifically. The
element is also stored under this value and so it cannot be null.public Script_Model(org.licas_xml.abs.Element autoXml)
throws java.lang.Exception
autoXml - the xml-based description of values to add.java.lang.Exception - any error.public java.util.HashMap<java.lang.String,Script_Element> setForUse()
setForUse in class Script_Elementpublic void setEvents(java.util.ArrayList<Script_Event> theEvents)
theEvents - the events. Of type Script_Event.public void addEvent(Script_Event theEvent)
theEvent - the event to add.public java.util.ArrayList<Script_Event> getEvents()
public void setSources(java.util.HashMap<java.lang.String,Script_Source> theSources)
theSources - the model sources.
Keys are the variable names while values are of type Script_Source.public boolean addSource(Script_Source theSource)
theSource - the variable to add.public Script_Source getSource(java.lang.String sourceName)
sourceName - the name of the variable to return.public java.util.HashMap<java.lang.String,Script_Source> getSources()
public void setVariables(java.util.HashMap<java.lang.String,Script_Variable> theVariables)
theVariables - the model variables.
Keys are the variable names while values are of type Script_Variable.public boolean addVariable(Script_Variable theVariable)
theVariable - the variable to add.public Script_Variable getVariable(java.lang.String variableName)
variableName - the name of the variable to return.public java.util.HashMap<java.lang.String,Script_Variable> getVariables()
public void setVariableInstances(java.util.HashMap<java.lang.String,Script_VariableInstance> theVariableInstances)
theVariableInstances - the model variables.
Keys are the variable names while values are of type Script_VariableInstance.public boolean addVariableInstance(Script_VariableInstance theVariableInstance)
theVariableInstance - the variable instance to add.public Script_VariableInstance getVariableInstance(java.lang.String variableName)
variableName - the name of the variable to return.public java.util.HashMap<java.lang.String,Script_VariableInstance> getVariableInstances()
public void setReflection(java.util.HashMap<java.lang.String,Script_Reflection> theReflection)
theReflection - the list of reflection descriptions.
Keys are the variable/method ids/names while values are of type Script_Reflection.public boolean addReflection(Script_Reflection theReflection)
theReflection - the reflection instance to add.public Script_Reflection getReflection(java.lang.String variableName)
variableName - the name of the variable to return.public java.util.HashMap<java.lang.String,Script_Reflection> getReflection()
public Script_Element getScriptWithID(java.lang.String scriptID)
scriptID - the id of the element to look for. Retrieve from the entity map.public org.licas_xml.abs.Element toXml()
throws java.lang.Exception
toXml in class Script_Elementjava.lang.Exception - any error.