com.sun.msv.reader.trex

Class TREXSequencedStringChecker

Implemented Interfaces:
ExpressionVisitor

public class TREXSequencedStringChecker
extends Object
implements ExpressionVisitor

makes sure that there is no sequenced string. "sequenced string" is something like this. <oneormore> <string> abc </string> </oneormore> Also, TREX prohibits sequence of typed strings and elements.

In this checker, we introduce a function "f" that takes a string and computes the string-sensitivity of the pattern.

"f" returns 3 bits of information. One is whether it contains elements. Another is whehter it contains text. And the last is whether it contains DataExp/ValueExp.

"f" is computed recursively through the pattern.

Author:
Kohsuke KAWAGUCHI

Constructor Summary

TREXSequencedStringChecker(TREXBaseReader reader, boolean _rejectTextInInterleave)

Method Summary

Object
onAnyString()
Object
onAttribute(AttributeExp exp)
Object
onChoice(ChoiceExp exp)
Object
onConcur(ConcurExp exp)
Object
onData(DataExp exp)
Object
onElement(ElementExp exp)
Object
onEpsilon()
Object
onInterleave(InterleaveExp exp)
Object
onList(ListExp exp)
Object
onMixed(MixedExp exp)
Object
onNullSet()
Object
onOneOrMore(OneOrMoreExp exp)
Object
onOther(OtherExp exp)
Object
onRef(ReferenceExp exp)
Object
onSequence(SequenceExp exp)
Object
onValue(ValueExp exp)

Constructor Details

TREXSequencedStringChecker

public TREXSequencedStringChecker(TREXBaseReader reader,
                                  boolean _rejectTextInInterleave)

Method Details

onAnyString

public Object onAnyString()
Specified by:
onAnyString in interface ExpressionVisitor

onAttribute

public Object onAttribute(AttributeExp exp)
Specified by:
onAttribute in interface ExpressionVisitor

onChoice

public Object onChoice(ChoiceExp exp)
Specified by:
onChoice in interface ExpressionVisitor

onConcur

public Object onConcur(ConcurExp exp)
Specified by:
onConcur in interface ExpressionVisitor

onData

public Object onData(DataExp exp)
Specified by:
onData in interface ExpressionVisitor

onElement

public Object onElement(ElementExp exp)
Specified by:
onElement in interface ExpressionVisitor

onEpsilon

public Object onEpsilon()
Specified by:
onEpsilon in interface ExpressionVisitor

onInterleave

public Object onInterleave(InterleaveExp exp)
Specified by:
onInterleave in interface ExpressionVisitor

onList

public Object onList(ListExp exp)
Specified by:
onList in interface ExpressionVisitor

onMixed

public Object onMixed(MixedExp exp)
Specified by:
onMixed in interface ExpressionVisitor

onNullSet

public Object onNullSet()
Specified by:
onNullSet in interface ExpressionVisitor

onOneOrMore

public Object onOneOrMore(OneOrMoreExp exp)
Specified by:
onOneOrMore in interface ExpressionVisitor

onOther

public Object onOther(OtherExp exp)
Specified by:
onOther in interface ExpressionVisitor

onRef

public Object onRef(ReferenceExp exp)
Specified by:
onRef in interface ExpressionVisitor

onSequence

public Object onSequence(SequenceExp exp)
Specified by:
onSequence in interface ExpressionVisitor

onValue

public Object onValue(ValueExp exp)
Specified by:
onValue in interface ExpressionVisitor