org.scribble.protocol.model
Class Protocol

java.lang.Object
  extended by org.scribble.protocol.model.ModelObject
      extended by org.scribble.protocol.model.Protocol

public class Protocol
extends ModelObject

This class represents the protocol notation.


Constructor Summary
Protocol()
          The default constructor.
 
Method Summary
 Block getBlock()
          This method returns the block of activities associated with the definition.
 Protocol getEnclosingProtocol()
          This method returns the protocol in which this activity is contained.
 Role getLocatedRole()
          This method returns the located role.
 ProtocolModel getModel()
          This method returns the model in which this definition is contained.
 String getName()
          This method returns the name.
 Protocol getNestedProtocol(String name)
          This method returns the nested-protocol associated with the supplied name.
 List<Protocol> getNestedProtocols()
          This method returns the list of nested protocols.
 ParameterDefinition getParameterDefinition(String name)
          This method returns the parameter definition associated with the supplied name.
 List<ParameterDefinition> getParameterDefinitions()
          This method returns the parameters associated with the protocol.
 List<Role> getRoles()
          This method returns the list of roles defined within the protocol definition.
 Protocol getTopLevelProtocol()
          This method returns the top level protocol.
 void setBlock(Block block)
          This method sets the block of activities associated with the definition.
 void setLocatedRole(Role role)
          This method sets the located role.
 void setName(String name)
          This method sets the name.
 void visit(Visitor visitor)
          This method visits the model object using the supplied visitor.
 
Methods inherited from class org.scribble.protocol.model.ModelObject
derivedFrom, getAnnotations, getParent, getProperties, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protocol

public Protocol()
The default constructor.

Method Detail

getName

public String getName()
This method returns the name.

Returns:
The name

setName

public void setName(String name)
This method sets the name.

Parameters:
name - The name

getLocatedRole

public Role getLocatedRole()
This method returns the located role. This field is set when the protocol represents a local model.

Returns:
The located role

setLocatedRole

public void setLocatedRole(Role role)
This method sets the located role. This field is set when the protocol represents a local model.

Parameters:
role - The located role

getParameterDefinitions

public List<ParameterDefinition> getParameterDefinitions()
This method returns the parameters associated with the protocol.

Returns:
The parameter definitions

getParameterDefinition

public ParameterDefinition getParameterDefinition(String name)
This method returns the parameter definition associated with the supplied name.

Parameters:
name - The name
Returns:
The parameter definition, or null if not found

getBlock

public Block getBlock()
This method returns the block of activities associated with the definition.

Returns:
The block of activities

setBlock

public void setBlock(Block block)
This method sets the block of activities associated with the definition.

Parameters:
block - The block of activities

getNestedProtocols

public List<Protocol> getNestedProtocols()
This method returns the list of nested protocols.

Returns:
The nested protocols

getModel

public ProtocolModel getModel()
This method returns the model in which this definition is contained.

Overrides:
getModel in class ModelObject
Returns:
The model, or null if not contained within a model

getEnclosingProtocol

public Protocol getEnclosingProtocol()
This method returns the protocol in which this activity is contained.

Returns:
The protocol, or null if not found

getTopLevelProtocol

public Protocol getTopLevelProtocol()
This method returns the top level protocol.

Returns:
The top level protocol

getNestedProtocol

public Protocol getNestedProtocol(String name)
This method returns the nested-protocol associated with the supplied name.

Parameters:
name - The name
Returns:
The nested-protocol for the supplied name, or null if not found

getRoles

public List<Role> getRoles()
This method returns the list of roles defined within the protocol definition.

Returns:
The list of roles

visit

public void visit(Visitor visitor)
This method visits the model object using the supplied visitor.

Specified by:
visit in class ModelObject
Parameters:
visitor - The visitor


Copyright © 2008-Present Scribble.org. All Rights Reserved.