xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.messages
Class RuleSpecificationImpl

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

public class RuleSpecificationImpl
extends Object
implements IRuleSpecification, DOMBased

DOM-Based implementation of the IRuleSpecification interface.

Author:
Automatically generated by xArch apigen.

Field Summary
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 RULE_ELT_NAME
          Tag name for rules 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.IRuleSpecification
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
RuleSpecificationImpl(Element elt)
           
 
Method Summary
 void addRule(IProductionRule newRule)
          Add a rule to this RuleSpecification.
 void addRules(Collection rules)
          Add a collection of rules to this RuleSpecification.
 void clearDescription()
          Clear the description from this RuleSpecification.
 void clearId()
          Removes the id attribute from this object.
 void clearRules()
          Remove all rules from this RuleSpecification.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllRules()
          Get all the rules from this RuleSpecification.
 IDescription getDescription()
          Get the description from this RuleSpecification.
 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.
 IProductionRule getRule(String id)
          Gets the rule from this RuleSpecification with the given id.
 Collection getRules(Collection ids)
          Gets the rules from this RuleSpecification with the given ids.
protected static SequenceOrder getSequenceOrder()
           
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IXArch getXArch()
           
 boolean hasAllRules(Collection rulesToCheck)
          Determine if this RuleSpecification contains each element in the given set of rules.
 boolean hasDescription(IDescription value)
          Determine if this RuleSpecification has the given description
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasRule(IProductionRule ruleToCheck)
          Determine if this RuleSpecification contains a given rule.
 Collection hasRules(Collection rulesToCheck)
          Determine if this RuleSpecification contains the given set of rules.
 boolean isEqual(IRuleSpecification RuleSpecificationToCheck)
          Determine if another RuleSpecification has the same id as this one.
 boolean isEquivalent(IRuleSpecification c)
          Determine if another RuleSpecification is equivalent to this one, ignoring ID's.
 void removeRule(IProductionRule ruleToRemove)
          Remove the given rule from this RuleSpecification.
 void removeRules(Collection rules)
          Remove all the given rules from this RuleSpecification.
 void setDescription(IDescription value)
          Set the description for this RuleSpecification.
 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

RULE_ELT_NAME

public static final String RULE_ELT_NAME
Tag name for rules in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

RuleSpecificationImpl

public RuleSpecificationImpl(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 IRuleSpecification
Parameters:
id - attribute value.

clearId

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

Specified by:
clearId in interface IRuleSpecification

getId

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

Specified by:
getId in interface IRuleSpecification
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 IRuleSpecification
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: IRuleSpecification
Set the description for this RuleSpecification.

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

clearDescription

public void clearDescription()
Description copied from interface: IRuleSpecification
Clear the description from this RuleSpecification.

Specified by:
clearDescription in interface IRuleSpecification

getDescription

public IDescription getDescription()
Description copied from interface: IRuleSpecification
Get the description from this RuleSpecification.

Specified by:
getDescription in interface IRuleSpecification
Returns:
description

hasDescription

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

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

addRule

public void addRule(IProductionRule newRule)
Description copied from interface: IRuleSpecification
Add a rule to this RuleSpecification.

Specified by:
addRule in interface IRuleSpecification
Parameters:
newRule - rule to add.

addRules

public void addRules(Collection rules)
Description copied from interface: IRuleSpecification
Add a collection of rules to this RuleSpecification.

Specified by:
addRules in interface IRuleSpecification
Parameters:
rules - rules to add.

clearRules

public void clearRules()
Description copied from interface: IRuleSpecification
Remove all rules from this RuleSpecification.

Specified by:
clearRules in interface IRuleSpecification

removeRule

public void removeRule(IProductionRule ruleToRemove)
Description copied from interface: IRuleSpecification
Remove the given rule from this RuleSpecification. Matching is done by the isEquivalent(...) function.

Specified by:
removeRule in interface IRuleSpecification
Parameters:
ruleToRemove - rule to remove.

removeRules

public void removeRules(Collection rules)
Description copied from interface: IRuleSpecification
Remove all the given rules from this RuleSpecification. Matching is done by the isEquivalent(...) function.

Specified by:
removeRules in interface IRuleSpecification
Parameters:
rules - rule to remove.

getAllRules

public Collection getAllRules()
Description copied from interface: IRuleSpecification
Get all the rules from this RuleSpecification.

Specified by:
getAllRules in interface IRuleSpecification
Returns:
all rules in this RuleSpecification.

hasRule

public boolean hasRule(IProductionRule ruleToCheck)
Description copied from interface: IRuleSpecification
Determine if this RuleSpecification contains a given rule.

Specified by:
hasRule in interface IRuleSpecification
Returns:
true if this RuleSpecification contains the given ruleToCheck, false otherwise.

hasRules

public Collection hasRules(Collection rulesToCheck)
Description copied from interface: IRuleSpecification
Determine if this RuleSpecification contains the given set of rules.

Specified by:
hasRules in interface IRuleSpecification
Parameters:
rulesToCheck - rules to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in rules 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.

hasAllRules

public boolean hasAllRules(Collection rulesToCheck)
Description copied from interface: IRuleSpecification
Determine if this RuleSpecification contains each element in the given set of rules.

Specified by:
hasAllRules in interface IRuleSpecification
Parameters:
rulesToCheck - rules to check for.
Returns:
true if every element in rules is found in this RuleSpecification, false otherwise.

getRule

public IProductionRule getRule(String id)
Description copied from interface: IRuleSpecification
Gets the rule from this RuleSpecification with the given id.

Specified by:
getRule in interface IRuleSpecification
Parameters:
id - ID to look for.
Returns:
rule with the given ID, or null if not found.

getRules

public Collection getRules(Collection ids)
Description copied from interface: IRuleSpecification
Gets the rules from this RuleSpecification with the given ids.

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

isEqual

public boolean isEqual(IRuleSpecification RuleSpecificationToCheck)
Description copied from interface: IRuleSpecification
Determine if another RuleSpecification has the same id as this one.

Specified by:
isEqual in interface IRuleSpecification
Parameters:
RuleSpecificationToCheck - RuleSpecification to compare with this one.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library