Top Description Fields Constructors Methods
com.sun.msv.reader.relax.core.checker

public final Class ExportedHedgeRuleChecker

extends Object
implements RELAXExpressionVisitorBoolean
Class Inheritance
All Implemented Interfaces
com.sun.msv.grammar.relax.RELAXExpressionVisitorBoolean, com.sun.msv.grammar.ExpressionVisitorBoolean
Imports
java.util.Stack, com.sun.msv.grammar.AttributeExp, .ChoiceExp, .ConcurExp, .DataExp, .ElementExp, .InterleaveExp, .ListExp, .MixedExp, .OneOrMoreExp, .OtherExp, .ReferenceExp, .SequenceExp, .ValueExp, com.sun.msv.grammar.relax.AttPoolClause, .ElementRules, .HedgeRules, .RELAXExpressionVisitorBoolean, .RELAXModule, .TagClause

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.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
public ReferenceExp[]
private final RELAXModule
private final Stack<HedgeRules>
traversalStack

traversal stack.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errorSnapshotback to summary
public ReferenceExp[] errorSnapshot
moduleback to summary
private final RELAXModule module
traversalStackback to summary
private final Stack<HedgeRules> 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.

Constructor Detail

ExportedHedgeRuleCheckerback to summary
public ExportedHedgeRuleChecker(RELAXModule module)

Method Detail

onAnyStringback to summary
public boolean onAnyString()

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onAnyString.

onAttPoolback to summary
public boolean onAttPool(AttPoolClause exp)

Implements com.sun.msv.grammar.relax.RELAXExpressionVisitorBoolean.onAttPool.

onAttributeback to summary
public boolean onAttribute(AttributeExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onAttribute.

onChoiceback to summary
public boolean onChoice(ChoiceExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onChoice.

onConcurback to summary
public boolean onConcur(ConcurExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onConcur.

onDataback to summary
public boolean onData(DataExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onData.

onElementback to summary
public boolean onElement(ElementExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onElement.

onElementRulesback to summary
public boolean onElementRules(ElementRules exp)

Implements com.sun.msv.grammar.relax.RELAXExpressionVisitorBoolean.onElementRules.

onEpsilonback to summary
public boolean onEpsilon()

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onEpsilon.

onHedgeRulesback to summary
public boolean onHedgeRules(HedgeRules exp)

Implements com.sun.msv.grammar.relax.RELAXExpressionVisitorBoolean.onHedgeRules.

onInterleaveback to summary
public boolean onInterleave(InterleaveExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onInterleave.

onListback to summary
public boolean onList(ListExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onList.

onMixedback to summary
public boolean onMixed(MixedExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onMixed.

onNullSetback to summary
public boolean onNullSet()

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onNullSet.

onOneOrMoreback to summary
public boolean onOneOrMore(OneOrMoreExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onOneOrMore.

onOtherback to summary
public boolean onOther(OtherExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onOther.

onRefback to summary
public boolean onRef(ReferenceExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onRef.

onSequenceback to summary
public boolean onSequence(SequenceExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onSequence.

onTagback to summary
public boolean onTag(TagClause exp)

Implements com.sun.msv.grammar.relax.RELAXExpressionVisitorBoolean.onTag.

onValueback to summary
public boolean onValue(ValueExp exp)

Implements com.sun.msv.grammar.ExpressionVisitorBoolean.onValue.

takeSnapshotback to summary
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.