|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.uml.statemachine.StateMachineFactory
StateVertex from the UML State_Machines package.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
protected org.opencyc.uml.core.Namespace |
namespace
the namespace for this state machine and its components |
protected StateMachine |
stateMachine
the state machine being assembled |
Constructor Summary | |
StateMachineFactory()
Constructs a new StateMachineFactory object. |
Method Summary | |
InputPin |
addInputPinToProcedure(java.lang.String name,
java.lang.String commentString,
org.opencyc.uml.core.Procedure procedure,
java.lang.Class type)
Adds an input pin (variable) to the given procedure. |
OutputPin |
addOutputPinToProcedure(java.lang.String name,
java.lang.String commentString,
org.opencyc.uml.core.Procedure procedure,
java.lang.Class type)
Adds an output pin (variable) to the given procedure. |
org.opencyc.uml.core.Parameter |
addParameterToEvent(java.lang.String name,
java.lang.String commentString,
Event event,
java.lang.Class type)
Adds a parameter to the given event. |
void |
destroyComment(org.opencyc.uml.core.Comment comment)
Destroys the given comment by unlinking it from its associations. |
void |
destroyEvent(Event event)
Destroys the given event, its parameters and its comment by unlinking them from their associations. |
void |
destroyParameter(org.opencyc.uml.core.Parameter parameter)
Destroys the given parameter by unlinking it from its associations. |
CallEvent |
makeCallEvent(java.lang.String name,
java.lang.String commentString,
java.lang.String specification)
Makes a new CallEvent object. |
ChangeEvent |
makeChangeEvent(java.lang.String name,
java.lang.String commentString,
java.lang.String language,
java.lang.String body)
Makes a new ChangeEvent object. |
CompletionEvent |
makeCompletionEvent(java.lang.String name,
java.lang.String commentString,
State state)
Makes a new CompletionEvent object. |
CompositeState |
makeCompositeState(java.lang.String name,
java.lang.String commentString,
CompositeState container,
org.opencyc.uml.core.Procedure entry,
org.opencyc.uml.core.Procedure exit,
org.opencyc.uml.core.Procedure doActivity,
boolean isConcurrent)
Makes a new composite state object. |
Event |
makeEvent(java.lang.String name,
java.lang.String commentString)
Makes a new Event object. |
FinalState |
makeFinalState(java.lang.String name,
java.lang.String commentString,
CompositeState container,
org.opencyc.uml.core.Procedure entry,
org.opencyc.uml.core.Procedure exit,
org.opencyc.uml.core.Procedure doActivity)
Makes a new final state object. |
org.opencyc.uml.core.Procedure |
makeProcedure(java.lang.String name,
java.lang.String commentString,
java.lang.String language,
java.lang.String body,
boolean isList)
Makes a new procedure object. |
PseudoState |
makePseudoState(java.lang.String name,
java.lang.String commentString,
CompositeState container,
int kind)
Makes a new pseudo state object. |
SignalEvent |
makeSignalEvent(java.lang.String name,
java.lang.String commentString,
Signal signal)
Makes a new SignalEvent object. |
SimpleState |
makeSimpleState(java.lang.String name,
java.lang.String commentString,
CompositeState container,
org.opencyc.uml.core.Procedure entry,
org.opencyc.uml.core.Procedure exit,
org.opencyc.uml.core.Procedure doActivity)
Makes a new simple state object. |
StateMachine |
makeStateMachine(java.lang.String namespaceName,
java.lang.String name,
java.lang.String commentString,
java.lang.Object context)
Makes a new state machine object. |
StateVertex |
makeStateVertex(java.lang.String name,
java.lang.String commentString,
CompositeState container)
Makes a new state vertex object. |
TimeEvent |
makeTimeEvent(java.lang.String name,
java.lang.String commentString,
java.lang.String language,
java.lang.String body)
Makes a new TimeEvent object. |
Transition |
makeTransition(java.lang.String name,
java.lang.String commentString,
java.lang.String guardExpressionLanguage,
java.lang.String guardExpressionBody,
org.opencyc.uml.core.Procedure effect,
Event trigger,
StateVertex source,
StateVertex target)
Makes a new transition object. |
void |
setNamespace(org.opencyc.uml.core.Namespace namespace)
Sets the namespace for this state machine factory in the case where the state machine already exists. |
protected void |
setNamespaceNameComment(org.opencyc.uml.core.ModelElement modelElement,
java.lang.String name,
java.lang.String commentString)
Sets the namespace, name and comment string for the new model element. |
void |
setStateMachine(StateMachine stateMachine)
Sets the state machine for this state machine factory in the case where the state machine already exists. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.opencyc.uml.core.Namespace namespace
protected StateMachine stateMachine
Constructor Detail |
public StateMachineFactory()
Method Detail |
public StateMachine makeStateMachine(java.lang.String namespaceName, java.lang.String name, java.lang.String commentString, java.lang.Object context)
namespaceName
- the state machine namespace namename
- the identifier for the state machine within its containing
namespacecommentString
- the comment for this state machinecontext
- the context Classifier of this state machine, which contains the
variables that distinguish the state, and the operations which
can be performed during state transitions.public org.opencyc.uml.core.Procedure makeProcedure(java.lang.String name, java.lang.String commentString, java.lang.String language, java.lang.String body, boolean isList)
name
- the identifier for the procedure within its containing
namespacecommentString
- the comment for this procedurelanguage
- the name of the language in which the body attribute is writtenbody
- the text of the procedure written in the given languageisList
- true when the arguments to the procedure are passed as
attributes of a single object, or false when passed separatelyexpression
- the text of the procedure written in the given languagemethod
- a method which is performed by the procedurepublic InputPin addInputPinToProcedure(java.lang.String name, java.lang.String commentString, org.opencyc.uml.core.Procedure procedure, java.lang.Class type)
name
- the name of the input pin (variable)commentString
- the comment for this input pinprocedure
- the given procedure to which the input pin is to
be addedtype
- the Class of the input pin (variable)public OutputPin addOutputPinToProcedure(java.lang.String name, java.lang.String commentString, org.opencyc.uml.core.Procedure procedure, java.lang.Class type)
name
- the name of the output pin (variable)commentString
- the comment for this output pinprocedure
- the given procedure to which the output pin is to
be addedtype
- the Class of the output pin (variable)public Event makeEvent(java.lang.String name, java.lang.String commentString)
name
- the identifier for the event within its containing
namespacecommentString
- the comment for this eventpublic CallEvent makeCallEvent(java.lang.String name, java.lang.String commentString, java.lang.String specification)
name
- the identifier for the call event within its containing
namespacecommentString
- the comment for this call eventspecification
- the specification of the operation called by this eventpublic ChangeEvent makeChangeEvent(java.lang.String name, java.lang.String commentString, java.lang.String language, java.lang.String body)
name
- the identifier for the change event within its containing
namespacecommentString
- the comment for this change eventlanguage
- the language of the boolean change expressionbody
- the body of the boolean change expressionpublic CompletionEvent makeCompletionEvent(java.lang.String name, java.lang.String commentString, State state)
name
- the identifier for the completion event within its containing
namespacecommentString
- the comment for this completion eventstate
- the state issuing this completion expressionpublic SignalEvent makeSignalEvent(java.lang.String name, java.lang.String commentString, Signal signal)
name
- the identifier for the signal event within its containing
namespacecommentString
- the comment for this signal eventsignal
- the signal causing this eventpublic TimeEvent makeTimeEvent(java.lang.String name, java.lang.String commentString, java.lang.String language, java.lang.String body)
name
- the identifier for the change event within its containing
namespacecommentString
- the comment for this change eventlanguage
- the language of the boolean change expressionbody
- the body of the boolean change expressionpublic org.opencyc.uml.core.Parameter addParameterToEvent(java.lang.String name, java.lang.String commentString, Event event, java.lang.Class type)
name
- the name of parametercommentString
- the comment for this parameterevent
- the given event to which the parameter is to
be addedtype
- the Class of the parameterpublic void destroyEvent(Event event)
event
- the given event to be destroyedpublic void destroyComment(org.opencyc.uml.core.Comment comment)
comment
- the given comment to destroypublic void destroyParameter(org.opencyc.uml.core.Parameter parameter)
parameter
- the given parameter to destroypublic SimpleState makeSimpleState(java.lang.String name, java.lang.String commentString, CompositeState container, org.opencyc.uml.core.Procedure entry, org.opencyc.uml.core.Procedure exit, org.opencyc.uml.core.Procedure doActivity)
name
- the identifier for the simple state within its containing
namespacecommentString
- the comment for this simple statecontainer
- the container (parent) of this simple state, or null if top stateentry
- the entry action for this simple state, or null if noneexit
- the exit action for this simple state, or null if nonedoActivity
- the do activity for this simple state, or null if nonepublic FinalState makeFinalState(java.lang.String name, java.lang.String commentString, CompositeState container, org.opencyc.uml.core.Procedure entry, org.opencyc.uml.core.Procedure exit, org.opencyc.uml.core.Procedure doActivity)
name
- the identifier for the final state within its containing
namespacecommentString
- the comment for this final statecontainer
- the container (parent) of this final state, or null if top stateentry
- the entry action for this final state, or null if noneexit
- the exit action for this final state, or null if nonedoActivity
- the do activity for this final state, or null if nonepublic CompositeState makeCompositeState(java.lang.String name, java.lang.String commentString, CompositeState container, org.opencyc.uml.core.Procedure entry, org.opencyc.uml.core.Procedure exit, org.opencyc.uml.core.Procedure doActivity, boolean isConcurrent)
name
- the identifier for the composite state within its containing
namespacecommentString
- the comment for this composite statecontainer
- the container of this composite state, or null if top stateentry
- the entry action for this composite state, or null if noneexit
- the exit action for this composite state, or null if nonedoActivity
- the do activity for this composite state, or null if noneisConcurrent
- true if concurrent processes, otherwise falsepublic PseudoState makePseudoState(java.lang.String name, java.lang.String commentString, CompositeState container, int kind)
name
- the identifier for the pseudo state within its containing
namespacecommentString
- the comment for this pseudo statecontainer
- the container of this pseudo statekind
- the kind of PseudoStatepublic StateVertex makeStateVertex(java.lang.String name, java.lang.String commentString, CompositeState container)
name
- the identifier for the state vertex within its containing
namespacecommentString
- the comment for this state vertexcontainer
- the container of this state vertexprotected void setNamespaceNameComment(org.opencyc.uml.core.ModelElement modelElement, java.lang.String name, java.lang.String commentString)
modelElement
- the given model elementname
- the identifier for the state machine within its containing
namespacecommentString
- the comment for this state machinepublic Transition makeTransition(java.lang.String name, java.lang.String commentString, java.lang.String guardExpressionLanguage, java.lang.String guardExpressionBody, org.opencyc.uml.core.Procedure effect, Event trigger, StateVertex source, StateVertex target)
name
- the identifier for the transition within its containing
namespacecommentString
- the comment for this transitionguardExpressionLanguage
- the language in which the guard
expression is writtenguardExpressionBody
- the body of the guard expression, or null
if no guardeffect
- the procedure which is the effect of this transition, or
null if no effecttrigger
- the event which triggers this transitionsource
- the source state of this transitiontarget
- the target state of this transitionpublic void setStateMachine(StateMachine stateMachine)
stateMachine
- the state machine to extend or modifypublic void setNamespace(org.opencyc.uml.core.Namespace namespace)
namespace
- the namespace for the state machine model elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |