ar.edu.unr.fceia.bottallo
Class Sistema

java.lang.Object
  extended by ar.edu.unr.fceia.bottallo.Sistema
All Implemented Interfaces:
java.lang.Cloneable

public class Sistema
extends java.lang.Object
implements java.lang.Cloneable

Construct the system: define inclusions, set elements types and check errors


Constructor Summary
Sistema()
          Creates a new instance of Sistema
 
Method Summary
protected  void addActiveState(State s)
          Add a state to the list of active states
protected  void addConnector(Connector c)
          Add a connector to the system
protected  void addRing(Ring r)
          Add a ring to the system
protected  void addState(State s)
          Add a state from the system
protected  void addTransition(Transition t)
          Add a transition to the system
protected  void checkConnectors()
          Check the arity of the different connectors
protected  void checkReferences()
          Check references for validity
 java.lang.Object clone()
           
protected  java.util.List<State> getActiveStates()
          Return the list of active states
protected  java.util.List<java.lang.String> getActiveStatesIds()
          Get the list of the ids of the active states
protected  java.util.List<java.lang.String> getActiveStatesNames()
          Get the list of the names of the active states
protected  State getRootState()
          Get the root state
protected  State getStateById(java.lang.String sId)
          Get a state by id
protected  State getStateByName(java.lang.String sName, java.util.List<State> states)
          Get a state by id
protected  java.util.List<State> getStates()
          Return the states of the system
protected  boolean isActiveState(State s)
          Check if a state is an active state
protected  boolean isSubstate(State s, State t)
          Chech if a state is a direct or indirect substate of other
protected  void removeActiveState(State s)
          Remove a state from the list of active sates
protected  void removeState(State s)
          Remove a state from the system
protected  void removeTransitions(java.util.List<Transition> ts)
          Remove a transition from the system
protected  void setConnections()
          Sets the transitions between states, default transitions and connectors
protected  void setInclusions()
          Set element inclusions in the system
protected  void setRootState(State s)
          Set the root state
protected  void showActiveStates()
          Show the active states
protected  void simplify()
          Apply a serie of functions to simplify the system structure, replace connectors, parmetrized states and references
protected  void statesRelations()
          Categorize the relations between states and check errors
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sistema

public Sistema()
Creates a new instance of Sistema

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

addState

protected void addState(State s)
Add a state from the system


removeState

protected void removeState(State s)
Remove a state from the system


getStates

protected java.util.List<State> getStates()
Return the states of the system


addActiveState

protected void addActiveState(State s)
Add a state to the list of active states


removeActiveState

protected void removeActiveState(State s)
Remove a state from the list of active sates


isActiveState

protected boolean isActiveState(State s)
Check if a state is an active state


getActiveStatesNames

protected java.util.List<java.lang.String> getActiveStatesNames()
Get the list of the names of the active states


getActiveStatesIds

protected java.util.List<java.lang.String> getActiveStatesIds()
Get the list of the ids of the active states


getActiveStates

protected java.util.List<State> getActiveStates()
Return the list of active states


showActiveStates

protected void showActiveStates()
Show the active states


setRootState

protected void setRootState(State s)
Set the root state


getRootState

protected State getRootState()
Get the root state


addTransition

protected void addTransition(Transition t)
Add a transition to the system


removeTransitions

protected void removeTransitions(java.util.List<Transition> ts)
Remove a transition from the system


addRing

protected void addRing(Ring r)
Add a ring to the system


getStateByName

protected State getStateByName(java.lang.String sName,
                               java.util.List<State> states)
Get a state by id


getStateById

protected State getStateById(java.lang.String sId)
Get a state by id


addConnector

protected void addConnector(Connector c)
Add a connector to the system


checkReferences

protected void checkReferences()
Check references for validity


isSubstate

protected boolean isSubstate(State s,
                             State t)
Chech if a state is a direct or indirect substate of other

Parameters:
s - state checked for "included in"
t - state checked for "include
Returns:
true if the fist state is included in the second one

checkConnectors

protected void checkConnectors()
Check the arity of the different connectors


setInclusions

protected void setInclusions()
Set element inclusions in the system


setConnections

protected void setConnections()
Sets the transitions between states, default transitions and connectors


statesRelations

protected void statesRelations()
Categorize the relations between states and check errors


simplify

protected void simplify()
                 throws java.lang.CloneNotSupportedException
Apply a serie of functions to simplify the system structure, replace connectors, parmetrized states and references

Throws:
java.lang.CloneNotSupportedException