Class ExportedHedgeRuleChecker
- java.lang.Object
-
- com.sun.msv.reader.relax.core.checker.ExportedHedgeRuleChecker
-
- All Implemented Interfaces:
ExpressionVisitorBoolean,RELAXExpressionVisitorBoolean
public final class ExportedHedgeRuleChecker extends java.lang.Object implements RELAXExpressionVisitorBoolean
the purpose of this function object is to make sure that the expression does not contain references to modules other than one specified by this variable.
-
-
Field Summary
Fields Modifier and Type Field Description ReferenceExp[]errorSnapshotprivate RELAXModulemoduleprivate java.util.StacktraversalStacktraversal stack.
-
Constructor Summary
Constructors Constructor Description ExportedHedgeRuleChecker(RELAXModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanonAnyString()booleanonAttPool(AttPoolClause exp)booleanonAttribute(AttributeExp exp)booleanonChoice(ChoiceExp exp)booleanonConcur(ConcurExp exp)booleanonData(DataExp exp)booleanonElement(ElementExp exp)booleanonElementRules(ElementRules exp)booleanonEpsilon()booleanonHedgeRules(HedgeRules exp)booleanonInterleave(InterleaveExp exp)booleanonList(ListExp exp)booleanonMixed(MixedExp exp)booleanonNullSet()booleanonOneOrMore(OneOrMoreExp exp)booleanonOther(OtherExp exp)booleanonRef(ReferenceExp exp)booleanonSequence(SequenceExp exp)booleanonTag(TagClause exp)booleanonValue(ValueExp exp)private voidtakeSnapshot(ReferenceExp lastExp)takes a snap shot of traversal to this.errorSnapshot so that the user will know what references cause this problem.
-
-
-
Field Detail
-
module
private final RELAXModule module
-
traversalStack
private final java.util.Stack traversalStack
traversal stack. This object keeps track of how hedgeRules are visited so that detailed error message can be provided when an error is found. Say if you start from hr1, hr1 refers hr2, hr2 refers hr3, and hr3 has a reference to the other module, this stack is {hr1,hr2,hr3} when an error is found.
-
errorSnapshot
public ReferenceExp[] errorSnapshot
-
-
Constructor Detail
-
ExportedHedgeRuleChecker
public ExportedHedgeRuleChecker(RELAXModule module)
-
-
Method Detail
-
onAttribute
public boolean onAttribute(AttributeExp exp)
- Specified by:
onAttributein interfaceExpressionVisitorBoolean
-
onChoice
public boolean onChoice(ChoiceExp exp)
- Specified by:
onChoicein interfaceExpressionVisitorBoolean
-
onSequence
public boolean onSequence(SequenceExp exp)
- Specified by:
onSequencein interfaceExpressionVisitorBoolean
-
onElement
public boolean onElement(ElementExp exp)
- Specified by:
onElementin interfaceExpressionVisitorBoolean
-
onOneOrMore
public boolean onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMorein interfaceExpressionVisitorBoolean
-
onMixed
public boolean onMixed(MixedExp exp)
- Specified by:
onMixedin interfaceExpressionVisitorBoolean
-
onRef
public boolean onRef(ReferenceExp exp)
- Specified by:
onRefin interfaceExpressionVisitorBoolean
-
onOther
public boolean onOther(OtherExp exp)
- Specified by:
onOtherin interfaceExpressionVisitorBoolean
-
onEpsilon
public boolean onEpsilon()
- Specified by:
onEpsilonin interfaceExpressionVisitorBoolean
-
onNullSet
public boolean onNullSet()
- Specified by:
onNullSetin interfaceExpressionVisitorBoolean
-
onAnyString
public boolean onAnyString()
- Specified by:
onAnyStringin interfaceExpressionVisitorBoolean
-
onData
public boolean onData(DataExp exp)
- Specified by:
onDatain interfaceExpressionVisitorBoolean
-
onValue
public boolean onValue(ValueExp exp)
- Specified by:
onValuein interfaceExpressionVisitorBoolean
-
onAttPool
public boolean onAttPool(AttPoolClause exp)
- Specified by:
onAttPoolin interfaceRELAXExpressionVisitorBoolean
-
onTag
public boolean onTag(TagClause exp)
- Specified by:
onTagin interfaceRELAXExpressionVisitorBoolean
-
onInterleave
public boolean onInterleave(InterleaveExp exp)
- Specified by:
onInterleavein interfaceExpressionVisitorBoolean
-
onConcur
public boolean onConcur(ConcurExp exp)
- Specified by:
onConcurin interfaceExpressionVisitorBoolean
-
onList
public boolean onList(ListExp exp)
- Specified by:
onListin interfaceExpressionVisitorBoolean
-
onElementRules
public boolean onElementRules(ElementRules exp)
- Specified by:
onElementRulesin interfaceRELAXExpressionVisitorBoolean
-
onHedgeRules
public boolean onHedgeRules(HedgeRules exp)
- Specified by:
onHedgeRulesin interfaceRELAXExpressionVisitorBoolean
-
takeSnapshot
private void takeSnapshot(ReferenceExp lastExp)
takes a snap shot of traversal to this.errorSnapshot so that the user will know what references cause this problem.
-
-