|
xArch/xADL 2.0 Data Binding Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.isr.xarch.messages.RuleSpecificationImpl
DOM-Based implementation of the IRuleSpecification interface.
| 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 |
public static final String XSD_TYPE_NSURI
public static final String XSD_TYPE_NAME
protected IXArch xArch
public static final String ID_ATTR_NAME
public static final String DESCRIPTION_ELT_NAME
public static final String RULE_ELT_NAME
protected Element elt
| Constructor Detail |
public RuleSpecificationImpl(Element elt)
| Method Detail |
public Node getDOMNode()
DOMBased
getDOMNode in interface DOMBasedpublic void setDOMNode(Node node)
DOMBased
setDOMNode in interface DOMBasednode - DOM nodeprotected static SequenceOrder getSequenceOrder()
public void setXArch(IXArch xArch)
setXArch in interface IXArchElementpublic IXArch getXArch()
getXArch in interface IXArchElementpublic IXArchElement cloneElement(int depth)
cloneElement in interface IXArchElementpublic boolean equals(Object o)
public int hashCode()
public XArchTypeMetadata getTypeMetadata()
IXArchElementxsi:type of this element.
getTypeMetadata in interface IXArchElementxsi:type of this element.public XArchInstanceMetadata getInstanceMetadata()
IXArchElement
getInstanceMetadata in interface IXArchElementpublic void setId(String id)
setId in interface IRuleSpecificationid - attribute value.public void clearId()
clearId in interface IRuleSpecificationpublic String getId()
getId in interface IRuleSpecificationnull if that
attribute is not set.public boolean hasId(String id)
hasId in interface IRuleSpecificationid - value to test.
true if the values match, false otherwise.
Matching is done by string-matching.public void setDescription(IDescription value)
IRuleSpecification
setDescription in interface IRuleSpecificationvalue - new descriptionpublic void clearDescription()
IRuleSpecification
clearDescription in interface IRuleSpecificationpublic IDescription getDescription()
IRuleSpecification
getDescription in interface IRuleSpecificationpublic boolean hasDescription(IDescription value)
IRuleSpecification
hasDescription in interface IRuleSpecificationvalue - description to compare
true if the descriptions are equivalent,
false otherwisepublic void addRule(IProductionRule newRule)
IRuleSpecification
addRule in interface IRuleSpecificationnewRule - rule to add.public void addRules(Collection rules)
IRuleSpecification
addRules in interface IRuleSpecificationrules - rules to add.public void clearRules()
IRuleSpecification
clearRules in interface IRuleSpecificationpublic void removeRule(IProductionRule ruleToRemove)
IRuleSpecificationisEquivalent(...) function.
removeRule in interface IRuleSpecificationruleToRemove - rule to remove.public void removeRules(Collection rules)
IRuleSpecificationisEquivalent(...) function.
removeRules in interface IRuleSpecificationrules - rule to remove.public Collection getAllRules()
IRuleSpecification
getAllRules in interface IRuleSpecificationpublic boolean hasRule(IProductionRule ruleToCheck)
IRuleSpecification
hasRule in interface IRuleSpecificationtrue if this RuleSpecification contains the given
ruleToCheck, false otherwise.public Collection hasRules(Collection rulesToCheck)
IRuleSpecification
hasRules in interface IRuleSpecificationrulesToCheck - rules to check for.
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.public boolean hasAllRules(Collection rulesToCheck)
IRuleSpecification
hasAllRules in interface IRuleSpecificationrulesToCheck - rules to check for.
true if every element in
rules is found in this RuleSpecification,
false otherwise.public IProductionRule getRule(String id)
IRuleSpecification
getRule in interface IRuleSpecificationid - ID to look for.
null if not found.public Collection getRules(Collection ids)
IRuleSpecification
getRules in interface IRuleSpecificationids - ID to look for.
public boolean isEqual(IRuleSpecification RuleSpecificationToCheck)
IRuleSpecification
isEqual in interface IRuleSpecificationRuleSpecificationToCheck - RuleSpecification to compare with this
one.public boolean isEquivalent(IRuleSpecification c)
IRuleSpecification
isEquivalent in interface IRuleSpecificationc - RuleSpecification to compare to this one.
true if all the child elements of this
RuleSpecification are equivalent, false otherwise.
|
xArch/xADL 2.0 Data Binding Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||