biouml.model.dynamics
Class EModel

java.lang.Object
  extended bycom.beanexplorer.beans.Option
      extended bybiouml.model.dynamics.EModelRoleSupport
          extended bybiouml.model.dynamics.EModel
All Implemented Interfaces:
DataCollectionListener, EModelRole, java.util.EventListener, ParserContext, java.beans.PropertyChangeListener, Role

public class EModel
extends EModelRoleSupport
implements DataCollectionListener, java.beans.PropertyChangeListener, ParserContext

Genrally this role should be assotiated with Diagram.

Pendung:
high - parameters update

Nested Class Summary
static class EModel.VariableFilter
           
 
Field Summary
static int ALGEBRAIC_TYPE
           
protected  double completionTime
           
protected  java.util.HashMap constantsMap
           
protected  DataElement elementToRemove
           
static int EVENT_TYPE
           
protected  java.util.HashMap functionsMap
           
protected  double initialTime
           
static int ODE_DELAY_TYPE
           
static int ODE_TYPE
           
protected  DataCollection parameters
           
protected  Role parsedRole
           
protected  Parser parser
           
static int STATE_TRANSITION_TYPE
           
static int STATIC_EQUATIONS_TYPE
           
static int STATIC_TYPE
           
protected  DataCollection variableRoles
           
protected  DataCollection variables
           
 
Fields inherited from class biouml.model.dynamics.EModelRoleSupport
comment
 
Fields inherited from class com.beanexplorer.beans.Option
notificationEnabled, propagationEnabled
 
Constructor Summary
EModel(DiagramElement de)
           
 
Method Summary
 Role clone(DiagramElement de)
          Unsupported yet.
 boolean containsConstant(java.lang.String name)
           
 boolean containsVariable(java.lang.String name)
           
 void declareConstant(java.lang.String name, java.lang.Object value)
          Declares the constant.
 void declareFunction(Function function)
          Declares the function.
 void declareVariable(java.lang.String name, java.lang.Object value)
          Declares the variable (parameter).
 void elementAdded(DataCollectionEvent e)
          Called after data element was added.
 void elementChanged(DataCollectionEvent e)
          Called after data element was changed.
 void elementRemoved(DataCollectionEvent e)
          Called after data element was removed.
 void elementWillAdd(DataCollectionEvent e)
          Called before data element will be added.
 void elementWillChange(DataCollectionEvent e)
          Called before data element will be changed.
 void elementWillRemove(DataCollectionEvent e)
          Called before data element will be removed.
 void fillList(Compartment compartment, java.util.List list, java.lang.Class role)
           
 double getCompletionTime()
           
 java.lang.Object getConstantValue(java.lang.String name)
          Returns the constant value or null if constant not declared.
protected  java.lang.String getEdgeQualifiedName(java.lang.String name, Edge edge)
           
 Equation[] getEquations()
           
 Event[] getEvents()
           
 Function getFunction(java.lang.String name)
          Returns function or operator with the specified name or null if function is not declared.
 Function[] getFunctions()
           
 State getInitialState()
           
 double getInitialTime()
           
 Variable[] getInvolvedVariables(java.lang.String equationType)
           
 int getModelType()
           
 java.lang.String getModelTypeName()
           
 DataCollection getParameters()
           
 java.lang.String getQualifiedName(java.lang.String name, DiagramElement de)
          Resolves brief variable name to fully qualified variable name, using information from corresponding DiagramElement.
 State[] getStates()
           
 Transition[] getTransitions()
           
 Variable getVariable(java.lang.String name)
           
 DataCollection getVariableRoles()
           
 DataCollection getVariables()
           
 java.lang.Object getVariableValue(java.lang.String name)
          Returns value of variable with the specified name or null if variable is not declared.
protected  void initParser()
           
static boolean isOfType(int type, int suggestedType)
           
 java.util.Iterator parameterIterator()
           
 void propertyChange(java.beans.PropertyChangeEvent pce)
           
 void put(Variable variable)
          Adds variable or parameter to the context.
protected  void readMath(Compartment compartment)
           
protected  void readMath(java.lang.String[] math, Role role)
           
 AstStart readMath(java.lang.String math, Role role)
           
 ParserContext removeNotUsedParameters()
           
 void setCompletionTime(double completionTime)
           
 void setInitialState(State initialState)
           
 void setInitialTime(double initialTime)
           
 java.util.Iterator variableRoleIterator()
           
 
Methods inherited from class biouml.model.dynamics.EModelRoleSupport
getComment, getDiagramElement, setComment
 
Methods inherited from class com.beanexplorer.beans.Option
addPropertyChangeListener, copyListenersTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getParent, isNotificationEnabled, isPropagationEnabled, removePropertyChangeListener, setNotificationEnabled, setParent, setPropagationEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialTime

protected double initialTime

completionTime

protected double completionTime

constantsMap

protected java.util.HashMap constantsMap

functionsMap

protected java.util.HashMap functionsMap

variables

protected DataCollection variables

variableRoles

protected DataCollection variableRoles

parameters

protected DataCollection parameters

STATIC_TYPE

public static final int STATIC_TYPE
See Also:
Constant Field Values

STATIC_EQUATIONS_TYPE

public static final int STATIC_EQUATIONS_TYPE
See Also:
Constant Field Values

ODE_TYPE

public static final int ODE_TYPE
See Also:
Constant Field Values

ODE_DELAY_TYPE

public static final int ODE_DELAY_TYPE
See Also:
Constant Field Values

ALGEBRAIC_TYPE

public static final int ALGEBRAIC_TYPE
See Also:
Constant Field Values

EVENT_TYPE

public static final int EVENT_TYPE
See Also:
Constant Field Values

STATE_TRANSITION_TYPE

public static final int STATE_TRANSITION_TYPE
See Also:
Constant Field Values

parser

protected Parser parser

parsedRole

protected Role parsedRole

elementToRemove

protected DataElement elementToRemove
Constructor Detail

EModel

public EModel(DiagramElement de)
Method Detail

clone

public Role clone(DiagramElement de)
Unsupported yet.

Specified by:
clone in interface Role
Overrides:
clone in class EModelRoleSupport

getInitialTime

public double getInitialTime()

setInitialTime

public void setInitialTime(double initialTime)

getCompletionTime

public double getCompletionTime()

setCompletionTime

public void setCompletionTime(double completionTime)

containsConstant

public boolean containsConstant(java.lang.String name)
Specified by:
containsConstant in interface ParserContext

getConstantValue

public java.lang.Object getConstantValue(java.lang.String name)
Description copied from interface: ParserContext
Returns the constant value or null if constant not declared.

Specified by:
getConstantValue in interface ParserContext

declareConstant

public void declareConstant(java.lang.String name,
                            java.lang.Object value)
Description copied from interface: ParserContext
Declares the constant.

Specified by:
declareConstant in interface ParserContext

getFunction

public Function getFunction(java.lang.String name)
Description copied from interface: ParserContext
Returns function or operator with the specified name or null if function is not declared.

Specified by:
getFunction in interface ParserContext

declareFunction

public void declareFunction(Function function)
Description copied from interface: ParserContext
Declares the function.

Specified by:
declareFunction in interface ParserContext

getVariables

public DataCollection getVariables()

containsVariable

public boolean containsVariable(java.lang.String name)
Specified by:
containsVariable in interface ParserContext

getVariableValue

public java.lang.Object getVariableValue(java.lang.String name)
Returns value of variable with the specified name or null if variable is not declared.

Specified by:
getVariableValue in interface ParserContext

declareVariable

public void declareVariable(java.lang.String name,
                            java.lang.Object value)
Declares the variable (parameter).

Specified by:
declareVariable in interface ParserContext
Parameters:
name - - parameter name
value - - parameter value, should be instance of Double.

put

public void put(Variable variable)
Adds variable or parameter to the context.


getVariable

public Variable getVariable(java.lang.String name)

getVariableRoles

public DataCollection getVariableRoles()

variableRoleIterator

public java.util.Iterator variableRoleIterator()

getParameters

public DataCollection getParameters()

parameterIterator

public java.util.Iterator parameterIterator()

getEquations

public Equation[] getEquations()

getEvents

public Event[] getEvents()

getStates

public State[] getStates()

getTransitions

public Transition[] getTransitions()

getInvolvedVariables

public Variable[] getInvolvedVariables(java.lang.String equationType)

fillList

public void fillList(Compartment compartment,
                     java.util.List list,
                     java.lang.Class role)

getFunctions

public Function[] getFunctions()

getModelType

public int getModelType()

getModelTypeName

public java.lang.String getModelTypeName()

isOfType

public static boolean isOfType(int type,
                               int suggestedType)

getQualifiedName

public java.lang.String getQualifiedName(java.lang.String name,
                                         DiagramElement de)
                                  throws java.lang.IllegalArgumentException
Resolves brief variable name to fully qualified variable name, using information from corresponding DiagramElement.

Throws:
java.lang.IllegalArgumentException - if variable name is ambiguous.
To do:
high

getEdgeQualifiedName

protected java.lang.String getEdgeQualifiedName(java.lang.String name,
                                                Edge edge)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Pendung:
role update

initParser

protected void initParser()

readMath

protected void readMath(java.lang.String[] math,
                        Role role)

readMath

public AstStart readMath(java.lang.String math,
                         Role role)

removeNotUsedParameters

public ParserContext removeNotUsedParameters()

readMath

protected void readMath(Compartment compartment)

elementWillAdd

public void elementWillAdd(DataCollectionEvent e)
                    throws DataCollectionVetoException,
                           java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be added.

Specified by:
elementWillAdd in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about will added data element.
Throws:
DataCollectionVetoException - If listener cancel adding of data element.
java.lang.Exception - If error occured.

elementAdded

public void elementAdded(DataCollectionEvent e)
                  throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was added.

Specified by:
elementAdded in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about added data element.
Throws:
java.lang.Exception - If error occured.

elementWillRemove

public void elementWillRemove(DataCollectionEvent e)
                       throws DataCollectionVetoException,
                              java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be removed.

Specified by:
elementWillRemove in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about will removed data element.
Throws:
DataCollectionVetoException - If listener cancel removing of data element.
java.lang.Exception - If error occured.

elementRemoved

public void elementRemoved(DataCollectionEvent e)
                    throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was removed.

Specified by:
elementRemoved in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about removed data element.
Throws:
java.lang.Exception - If error occured.

elementWillChange

public void elementWillChange(DataCollectionEvent e)
                       throws DataCollectionVetoException,
                              java.lang.Exception
Description copied from interface: DataCollectionListener
Called before data element will be changed. e contains old data element (which will be changed).

Specified by:
elementWillChange in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about will change data element.
Throws:
DataCollectionVetoException - If listener cancel changing of data element.
java.lang.Exception - If error occured.

elementChanged

public void elementChanged(DataCollectionEvent e)
                    throws java.lang.Exception
Description copied from interface: DataCollectionListener
Called after data element was changed. e contains old data element (which already changed).

Specified by:
elementChanged in interface DataCollectionListener
Parameters:
e - DataCollectionEvent information about changed data element.
Throws:
java.lang.Exception - If error occured.

getInitialState

public State getInitialState()

setInitialState

public void setInitialState(State initialState)


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.