xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.messages
Interface IRuleSpecification

All Superinterfaces:
IXArchElement
All Known Implementing Classes:
RuleSpecificationImpl

public interface IRuleSpecification
extends IXArchElement

Interface for accessing objects of the RuleSpecification xsi:type in the messages namespace.

Author:
Automatically generated by xArch apigen

Field Summary
static XArchTypeMetadata TYPE_METADATA
           
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
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()
          Remove the id attribute from this RuleSpecification.
 void clearRules()
          Remove all rules from this RuleSpecification.
 Collection getAllRules()
          Get all the rules from this RuleSpecification.
 IDescription getDescription()
          Get the description from this RuleSpecification.
 String getId()
          Get the id attribute from this RuleSpecification.
 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.
 boolean hasAllRules(Collection rulesToCheck)
          Determine if this RuleSpecification contains each element in the given set of rules.
 boolean hasDescription(IDescription descriptionToCheck)
          Determine if this RuleSpecification has the given description
 boolean hasId(String id)
          Determine if the id attribute on this RuleSpecification 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 RuleSpecificationToCheck)
          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 setId(String id)
          Set the id attribute on this RuleSpecification.
 
Methods inherited from interface edu.uci.isr.xarch.IXArchElement
cloneElement, getInstanceMetadata, getTypeMetadata, getXArch, setXArch
 

Field Detail

TYPE_METADATA

public static final XArchTypeMetadata TYPE_METADATA
Method Detail

setId

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

Parameters:
id - id
Throws:
FixedValueException - if the attribute has a fixed value and the value passed is not the fixed value.

clearId

public void clearId()
Remove the id attribute from this RuleSpecification.


getId

public String getId()
Get the id attribute from this RuleSpecification. if the attribute has a fixed value, this function will return that fixed value, even if it is not actually present in the XML document.

Returns:
id on this RuleSpecification

hasId

public boolean hasId(String id)
Determine if the id attribute on this RuleSpecification has the given value.

Parameters:
id - Attribute value to compare
Returns:
true if they match; false otherwise.

setDescription

public void setDescription(IDescription value)
Set the description for this RuleSpecification.

Parameters:
value - new description

clearDescription

public void clearDescription()
Clear the description from this RuleSpecification.


getDescription

public IDescription getDescription()
Get the description from this RuleSpecification.

Returns:
description

hasDescription

public boolean hasDescription(IDescription descriptionToCheck)
Determine if this RuleSpecification has the given description

Parameters:
descriptionToCheck - description to compare
Returns:
true if the descriptions are equivalent, false otherwise

addRule

public void addRule(IProductionRule newRule)
Add a rule to this RuleSpecification.

Parameters:
newRule - rule to add.

addRules

public void addRules(Collection rules)
Add a collection of rules to this RuleSpecification.

Parameters:
rules - rules to add.

clearRules

public void clearRules()
Remove all rules from this RuleSpecification.


removeRule

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

Parameters:
ruleToRemove - rule to remove.

removeRules

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

Parameters:
rules - rule to remove.

getAllRules

public Collection getAllRules()
Get all the rules from this RuleSpecification.

Returns:
all rules in this RuleSpecification.

hasRule

public boolean hasRule(IProductionRule ruleToCheck)
Determine if this RuleSpecification contains a given rule.

Returns:
true if this RuleSpecification contains the given ruleToCheck, false otherwise.

hasRules

public Collection hasRules(Collection rulesToCheck)
Determine if this RuleSpecification contains the given set of rules.

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)
Determine if this RuleSpecification contains each element in the given set of rules.

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)
Gets the rule from this RuleSpecification with the given id.

Parameters:
id - ID to look for.
Returns:
rule with the given ID, or null if not found.

getRules

public Collection getRules(Collection ids)
Gets the rules from this RuleSpecification with the given ids.

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)
Determine if another RuleSpecification has the same id as this one.

Parameters:
RuleSpecificationToCheck - RuleSpecification to compare with this one.

isEquivalent

public boolean isEquivalent(IRuleSpecification RuleSpecificationToCheck)
Determine if another RuleSpecification is equivalent to this one, ignoring ID's.

Parameters:
RuleSpecificationToCheck - 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