xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.messages
Class ProductionRuleImpl

java.lang.Object
  extended byedu.uci.isr.xarch.messages.ProductionRuleImpl
All Implemented Interfaces:
DOMBased, IProductionRule, IXArchElement

public class ProductionRuleImpl
extends Object
implements IProductionRule, DOMBased

DOM-Based implementation of the IProductionRule interface.

Author:
Automatically generated by xArch apigen.

Field Summary
static String CAUSE_TIME_ELT_NAME
          Tag name for causeTimes in this object.
static String DESCRIPTION_ELT_NAME
          Tag name for descriptions in this object.
protected  Element elt
           
static String ID_ATTR_NAME
          Tag name for ids in this object.
static String RECEIVE_MESSAGE_ELT_NAME
          Tag name for receiveMessages in this object.
static String SEND_MESSAGE_ELT_NAME
          Tag name for sendMessages in this object.
protected  IXArch xArch
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.messages.IProductionRule
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
ProductionRuleImpl(Element elt)
           
 
Method Summary
 void addReceiveMessage(IGenericMessage newReceiveMessage)
          Add a receiveMessage to this ProductionRule.
 void addReceiveMessages(Collection receiveMessages)
          Add a collection of receiveMessages to this ProductionRule.
 void addSendMessage(IGenericMessage newSendMessage)
          Add a sendMessage to this ProductionRule.
 void addSendMessages(Collection sendMessages)
          Add a collection of sendMessages to this ProductionRule.
 void clearCauseTime()
          Clear the causeTime from this ProductionRule.
 void clearDescription()
          Clear the description from this ProductionRule.
 void clearId()
          Removes the id attribute from this object.
 void clearReceiveMessages()
          Remove all receiveMessages from this ProductionRule.
 void clearSendMessages()
          Remove all sendMessages from this ProductionRule.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllReceiveMessages()
          Get all the receiveMessages from this ProductionRule.
 Collection getAllSendMessages()
          Get all the sendMessages from this ProductionRule.
 ICauseTime getCauseTime()
          Get the causeTime from this ProductionRule.
 IDescription getDescription()
          Get the description from this ProductionRule.
 Node getDOMNode()
          Gets the DOM node on which this implementation is based.
 String getId()
          Gets the value of the id attribute on this object.
 XArchInstanceMetadata getInstanceMetadata()
          Gets metadata describing the instance of this element.
 IGenericMessage getReceiveMessage(String id)
          Gets the receiveMessage from this ProductionRule with the given id.
 Collection getReceiveMessages(Collection ids)
          Gets the receiveMessages from this ProductionRule with the given ids.
 IGenericMessage getSendMessage(String id)
          Gets the sendMessage from this ProductionRule with the given id.
 Collection getSendMessages(Collection ids)
          Gets the sendMessages from this ProductionRule with the given ids.
protected static SequenceOrder getSequenceOrder()
           
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IXArch getXArch()
           
 boolean hasAllReceiveMessages(Collection receiveMessagesToCheck)
          Determine if this ProductionRule contains each element in the given set of receiveMessages.
 boolean hasAllSendMessages(Collection sendMessagesToCheck)
          Determine if this ProductionRule contains each element in the given set of sendMessages.
 boolean hasCauseTime(ICauseTime value)
          Determine if this ProductionRule has the given causeTime
 boolean hasDescription(IDescription value)
          Determine if this ProductionRule has the given description
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasReceiveMessage(IGenericMessage receiveMessageToCheck)
          Determine if this ProductionRule contains a given receiveMessage.
 Collection hasReceiveMessages(Collection receiveMessagesToCheck)
          Determine if this ProductionRule contains the given set of receiveMessages.
 boolean hasSendMessage(IGenericMessage sendMessageToCheck)
          Determine if this ProductionRule contains a given sendMessage.
 Collection hasSendMessages(Collection sendMessagesToCheck)
          Determine if this ProductionRule contains the given set of sendMessages.
 boolean isEqual(IProductionRule ProductionRuleToCheck)
          Determine if another ProductionRule has the same id as this one.
 boolean isEquivalent(IProductionRule c)
          Determine if another ProductionRule is equivalent to this one, ignoring ID's.
 void removeReceiveMessage(IGenericMessage receiveMessageToRemove)
          Remove the given receiveMessage from this ProductionRule.
 void removeReceiveMessages(Collection receiveMessages)
          Remove all the given receiveMessages from this ProductionRule.
 void removeSendMessage(IGenericMessage sendMessageToRemove)
          Remove the given sendMessage from this ProductionRule.
 void removeSendMessages(Collection sendMessages)
          Remove all the given sendMessages from this ProductionRule.
 void setCauseTime(ICauseTime value)
          Set the causeTime for this ProductionRule.
 void setDescription(IDescription value)
          Set the description for this ProductionRule.
 void setDOMNode(Node node)
          Sets the DOM node on which this implementation is based.
 void setId(String id)
          Set the id attribute on this object.
 void setXArch(IXArch xArch)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_TYPE_NSURI

public static final String XSD_TYPE_NSURI
See Also:
Constant Field Values

XSD_TYPE_NAME

public static final String XSD_TYPE_NAME
See Also:
Constant Field Values

xArch

protected IXArch xArch

ID_ATTR_NAME

public static final String ID_ATTR_NAME
Tag name for ids in this object.

See Also:
Constant Field Values

DESCRIPTION_ELT_NAME

public static final String DESCRIPTION_ELT_NAME
Tag name for descriptions in this object.

See Also:
Constant Field Values

RECEIVE_MESSAGE_ELT_NAME

public static final String RECEIVE_MESSAGE_ELT_NAME
Tag name for receiveMessages in this object.

See Also:
Constant Field Values

SEND_MESSAGE_ELT_NAME

public static final String SEND_MESSAGE_ELT_NAME
Tag name for sendMessages in this object.

See Also:
Constant Field Values

CAUSE_TIME_ELT_NAME

public static final String CAUSE_TIME_ELT_NAME
Tag name for causeTimes in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

ProductionRuleImpl

public ProductionRuleImpl(Element elt)
Method Detail

getDOMNode

public Node getDOMNode()
Description copied from interface: DOMBased
Gets the DOM node on which this implementation is based.

Specified by:
getDOMNode in interface DOMBased
Returns:
DOM node

setDOMNode

public void setDOMNode(Node node)
Description copied from interface: DOMBased
Sets the DOM node on which this implementation is based.

Specified by:
setDOMNode in interface DOMBased
Parameters:
node - DOM node

getSequenceOrder

protected static SequenceOrder getSequenceOrder()

setXArch

public void setXArch(IXArch xArch)
Specified by:
setXArch in interface IXArchElement

getXArch

public IXArch getXArch()
Specified by:
getXArch in interface IXArchElement

cloneElement

public IXArchElement cloneElement(int depth)
Specified by:
cloneElement in interface IXArchElement

equals

public boolean equals(Object o)

hashCode

public int hashCode()

getTypeMetadata

public XArchTypeMetadata getTypeMetadata()
Description copied from interface: IXArchElement
Gets metadata describing the xsi:type of this element.

Specified by:
getTypeMetadata in interface IXArchElement
Returns:
metadata describing the xsi:type of this element.

getInstanceMetadata

public XArchInstanceMetadata getInstanceMetadata()
Description copied from interface: IXArchElement
Gets metadata describing the instance of this element.

Specified by:
getInstanceMetadata in interface IXArchElement
Returns:
metadata describing the instance of this element.

setId

public void setId(String id)
Set the id attribute on this object.

Specified by:
setId in interface IProductionRule
Parameters:
id - attribute value.

clearId

public void clearId()
Removes the id attribute from this object.

Specified by:
clearId in interface IProductionRule

getId

public String getId()
Gets the value of the id attribute on this object.

Specified by:
getId in interface IProductionRule
Returns:
id attribute's value or null if that attribute is not set.

hasId

public boolean hasId(String id)
Determines if this object's id attribute has the given value.

Specified by:
hasId in interface IProductionRule
Parameters:
id - value to test.
Returns:
true if the values match, false otherwise. Matching is done by string-matching.

setDescription

public void setDescription(IDescription value)
Description copied from interface: IProductionRule
Set the description for this ProductionRule.

Specified by:
setDescription in interface IProductionRule
Parameters:
value - new description

clearDescription

public void clearDescription()
Description copied from interface: IProductionRule
Clear the description from this ProductionRule.

Specified by:
clearDescription in interface IProductionRule

getDescription

public IDescription getDescription()
Description copied from interface: IProductionRule
Get the description from this ProductionRule.

Specified by:
getDescription in interface IProductionRule
Returns:
description

hasDescription

public boolean hasDescription(IDescription value)
Description copied from interface: IProductionRule
Determine if this ProductionRule has the given description

Specified by:
hasDescription in interface IProductionRule
Parameters:
value - description to compare
Returns:
true if the descriptions are equivalent, false otherwise

addReceiveMessage

public void addReceiveMessage(IGenericMessage newReceiveMessage)
Description copied from interface: IProductionRule
Add a receiveMessage to this ProductionRule.

Specified by:
addReceiveMessage in interface IProductionRule
Parameters:
newReceiveMessage - receiveMessage to add.

addReceiveMessages

public void addReceiveMessages(Collection receiveMessages)
Description copied from interface: IProductionRule
Add a collection of receiveMessages to this ProductionRule.

Specified by:
addReceiveMessages in interface IProductionRule
Parameters:
receiveMessages - receiveMessages to add.

clearReceiveMessages

public void clearReceiveMessages()
Description copied from interface: IProductionRule
Remove all receiveMessages from this ProductionRule.

Specified by:
clearReceiveMessages in interface IProductionRule

removeReceiveMessage

public void removeReceiveMessage(IGenericMessage receiveMessageToRemove)
Description copied from interface: IProductionRule
Remove the given receiveMessage from this ProductionRule. Matching is done by the isEquivalent(...) function.

Specified by:
removeReceiveMessage in interface IProductionRule
Parameters:
receiveMessageToRemove - receiveMessage to remove.

removeReceiveMessages

public void removeReceiveMessages(Collection receiveMessages)
Description copied from interface: IProductionRule
Remove all the given receiveMessages from this ProductionRule. Matching is done by the isEquivalent(...) function.

Specified by:
removeReceiveMessages in interface IProductionRule
Parameters:
receiveMessages - receiveMessage to remove.

getAllReceiveMessages

public Collection getAllReceiveMessages()
Description copied from interface: IProductionRule
Get all the receiveMessages from this ProductionRule.

Specified by:
getAllReceiveMessages in interface IProductionRule
Returns:
all receiveMessages in this ProductionRule.

hasReceiveMessage

public boolean hasReceiveMessage(IGenericMessage receiveMessageToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains a given receiveMessage.

Specified by:
hasReceiveMessage in interface IProductionRule
Returns:
true if this ProductionRule contains the given receiveMessageToCheck, false otherwise.

hasReceiveMessages

public Collection hasReceiveMessages(Collection receiveMessagesToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains the given set of receiveMessages.

Specified by:
hasReceiveMessages in interface IProductionRule
Parameters:
receiveMessagesToCheck - receiveMessages to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in receiveMessages was found, then the ith element of the collection will be set to true, otherwise it will be set to false. Matching is done with the isEquivalent(...) method.

hasAllReceiveMessages

public boolean hasAllReceiveMessages(Collection receiveMessagesToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains each element in the given set of receiveMessages.

Specified by:
hasAllReceiveMessages in interface IProductionRule
Parameters:
receiveMessagesToCheck - receiveMessages to check for.
Returns:
true if every element in receiveMessages is found in this ProductionRule, false otherwise.

getReceiveMessage

public IGenericMessage getReceiveMessage(String id)
Description copied from interface: IProductionRule
Gets the receiveMessage from this ProductionRule with the given id.

Specified by:
getReceiveMessage in interface IProductionRule
Parameters:
id - ID to look for.
Returns:
receiveMessage with the given ID, or null if not found.

getReceiveMessages

public Collection getReceiveMessages(Collection ids)
Description copied from interface: IProductionRule
Gets the receiveMessages from this ProductionRule with the given ids.

Specified by:
getReceiveMessages in interface IProductionRule
Parameters:
ids - ID to look for.
Returns:
receiveMessages with the given IDs. If an element with a given ID was not found, that ID is ignored.

addSendMessage

public void addSendMessage(IGenericMessage newSendMessage)
Description copied from interface: IProductionRule
Add a sendMessage to this ProductionRule.

Specified by:
addSendMessage in interface IProductionRule
Parameters:
newSendMessage - sendMessage to add.

addSendMessages

public void addSendMessages(Collection sendMessages)
Description copied from interface: IProductionRule
Add a collection of sendMessages to this ProductionRule.

Specified by:
addSendMessages in interface IProductionRule
Parameters:
sendMessages - sendMessages to add.

clearSendMessages

public void clearSendMessages()
Description copied from interface: IProductionRule
Remove all sendMessages from this ProductionRule.

Specified by:
clearSendMessages in interface IProductionRule

removeSendMessage

public void removeSendMessage(IGenericMessage sendMessageToRemove)
Description copied from interface: IProductionRule
Remove the given sendMessage from this ProductionRule. Matching is done by the isEquivalent(...) function.

Specified by:
removeSendMessage in interface IProductionRule
Parameters:
sendMessageToRemove - sendMessage to remove.

removeSendMessages

public void removeSendMessages(Collection sendMessages)
Description copied from interface: IProductionRule
Remove all the given sendMessages from this ProductionRule. Matching is done by the isEquivalent(...) function.

Specified by:
removeSendMessages in interface IProductionRule
Parameters:
sendMessages - sendMessage to remove.

getAllSendMessages

public Collection getAllSendMessages()
Description copied from interface: IProductionRule
Get all the sendMessages from this ProductionRule.

Specified by:
getAllSendMessages in interface IProductionRule
Returns:
all sendMessages in this ProductionRule.

hasSendMessage

public boolean hasSendMessage(IGenericMessage sendMessageToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains a given sendMessage.

Specified by:
hasSendMessage in interface IProductionRule
Returns:
true if this ProductionRule contains the given sendMessageToCheck, false otherwise.

hasSendMessages

public Collection hasSendMessages(Collection sendMessagesToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains the given set of sendMessages.

Specified by:
hasSendMessages in interface IProductionRule
Parameters:
sendMessagesToCheck - sendMessages to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in sendMessages was found, then the ith element of the collection will be set to true, otherwise it will be set to false. Matching is done with the isEquivalent(...) method.

hasAllSendMessages

public boolean hasAllSendMessages(Collection sendMessagesToCheck)
Description copied from interface: IProductionRule
Determine if this ProductionRule contains each element in the given set of sendMessages.

Specified by:
hasAllSendMessages in interface IProductionRule
Parameters:
sendMessagesToCheck - sendMessages to check for.
Returns:
true if every element in sendMessages is found in this ProductionRule, false otherwise.

getSendMessage

public IGenericMessage getSendMessage(String id)
Description copied from interface: IProductionRule
Gets the sendMessage from this ProductionRule with the given id.

Specified by:
getSendMessage in interface IProductionRule
Parameters:
id - ID to look for.
Returns:
sendMessage with the given ID, or null if not found.

getSendMessages

public Collection getSendMessages(Collection ids)
Description copied from interface: IProductionRule
Gets the sendMessages from this ProductionRule with the given ids.

Specified by:
getSendMessages in interface IProductionRule
Parameters:
ids - ID to look for.
Returns:
sendMessages with the given IDs. If an element with a given ID was not found, that ID is ignored.

setCauseTime

public void setCauseTime(ICauseTime value)
Description copied from interface: IProductionRule
Set the causeTime for this ProductionRule.

Specified by:
setCauseTime in interface IProductionRule
Parameters:
value - new causeTime

clearCauseTime

public void clearCauseTime()
Description copied from interface: IProductionRule
Clear the causeTime from this ProductionRule.

Specified by:
clearCauseTime in interface IProductionRule

getCauseTime

public ICauseTime getCauseTime()
Description copied from interface: IProductionRule
Get the causeTime from this ProductionRule.

Specified by:
getCauseTime in interface IProductionRule
Returns:
causeTime

hasCauseTime

public boolean hasCauseTime(ICauseTime value)
Description copied from interface: IProductionRule
Determine if this ProductionRule has the given causeTime

Specified by:
hasCauseTime in interface IProductionRule
Parameters:
value - causeTime to compare
Returns:
true if the causeTimes are equivalent, false otherwise

isEqual

public boolean isEqual(IProductionRule ProductionRuleToCheck)
Description copied from interface: IProductionRule
Determine if another ProductionRule has the same id as this one.

Specified by:
isEqual in interface IProductionRule
Parameters:
ProductionRuleToCheck - ProductionRule to compare with this one.

isEquivalent

public boolean isEquivalent(IProductionRule c)
Description copied from interface: IProductionRule
Determine if another ProductionRule is equivalent to this one, ignoring ID's.

Specified by:
isEquivalent in interface IProductionRule
Parameters:
c - ProductionRule to compare to this one.
Returns:
true if all the child elements of this ProductionRule are equivalent, false otherwise.

xArch/xADL 2.0 Data Binding Library