|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.msv.verifier.regexp.CombinedChildContentExpCreator
creates "combined child content expression" and gathers "elements of concern" and its "attribute-pruned" content model. Intuitively, "combined child content expression" is a set of content models of "elements of concern", which is appropriately combined to express dependency between elements. "Elements of concern" are ElementExps that are possibly applicable to the next element. These gathered element declarations are then tested against next XML element. "Attribute-pruned" content model is a content model after consuming AttributeTokens and removing unused AttributeExp nodes.
For example, when the current expression is
then the combined child expression is..(A).. ..(B).. .....(C).. ....
and elements of concern and its attribute-pruned content models are..(A').. ..(B').. ..(C')..
Inner Class Summary | |
static class |
CombinedChildContentExpCreator.ExpressionPair
|
Method Summary | |
CombinedChildContentExpCreator.ExpressionPair |
continueGet(Expression combinedPattern,
StartTagInfo info,
boolean checkTagName)
|
CombinedChildContentExpCreator.ExpressionPair |
get(Expression combinedPattern,
StartTagInfo info)
computes a combined child content pattern and (,if possible,) its continuation. |
CombinedChildContentExpCreator.ExpressionPair |
get(Expression combinedPattern,
StartTagInfo info,
boolean checkTagName)
computes a combined child content pattern and its continuation, with error recovery. |
ElementExp[] |
getMatchedElements()
obtains matched elements. |
boolean |
isComplex()
checks if the result of 'get' method is not the union of all elements of concern. |
int |
numMatchedElements()
gets the number of matched elements. |
void |
onAnyString()
|
void |
onAttribute(AttributeExp exp)
|
void |
onChoice(ChoiceExp exp)
|
void |
onConcur(ConcurExp exp)
|
void |
onElement(ElementExp exp)
|
void |
onEpsilon()
|
void |
onInterleave(InterleaveExp exp)
|
void |
onKey(KeyExp exp)
|
void |
onList(ListExp exp)
|
void |
onMixed(MixedExp exp)
|
void |
onNullSet()
|
void |
onOneOrMore(OneOrMoreExp exp)
|
void |
onOther(OtherExp exp)
|
void |
onRef(ReferenceExp exp)
|
void |
onSequence(SequenceExp exp)
|
void |
onTypedString(TypedStringExp exp)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public CombinedChildContentExpCreator.ExpressionPair get(Expression combinedPattern, StartTagInfo info, boolean checkTagName)
feedAttributes
- if this flag is false, Attribute feeding & pruning are skipped and
AttributeExps are fully remained in the resulting expression.checkTagName
- if this flag is false, tag name check is skipped.public final CombinedChildContentExpCreator.ExpressionPair continueGet(Expression combinedPattern, StartTagInfo info, boolean checkTagName)
public CombinedChildContentExpCreator.ExpressionPair get(Expression combinedPattern, StartTagInfo info)
public final ElementExp[] getMatchedElements()
The extra care should be taken not to hold reference to the result longer than necessary. The contents of the result is valid only until the next invocation. Because OwnerAndContent objects are reused.
Apparently this is a bad design, but this design gives us better performance.
public final int numMatchedElements()
public void onConcur(ConcurExp exp)
onConcur
in interface ExpressionVisitorVoid
public void onInterleave(InterleaveExp exp)
onInterleave
in interface ExpressionVisitorVoid
public final boolean isComplex()
public void onElement(ElementExp exp)
onElement
in interface ExpressionVisitorVoid
public void onOneOrMore(OneOrMoreExp exp)
onOneOrMore
in interface ExpressionVisitorVoid
public void onMixed(MixedExp exp)
onMixed
in interface ExpressionVisitorVoid
public void onAttribute(AttributeExp exp)
onAttribute
in interface ExpressionVisitorVoid
public void onEpsilon()
onEpsilon
in interface ExpressionVisitorVoid
public void onNullSet()
onNullSet
in interface ExpressionVisitorVoid
public void onAnyString()
onAnyString
in interface ExpressionVisitorVoid
public void onTypedString(TypedStringExp exp)
onTypedString
in interface ExpressionVisitorVoid
public void onList(ListExp exp)
onList
in interface ExpressionVisitorVoid
public void onKey(KeyExp exp)
onKey
in interface ExpressionVisitorVoid
public void onRef(ReferenceExp exp)
onRef
in interface ExpressionVisitorVoid
public void onOther(OtherExp exp)
onOther
in interface ExpressionVisitorVoid
public void onChoice(ChoiceExp exp)
onChoice
in interface ExpressionVisitorVoid
public void onSequence(SequenceExp exp)
onSequence
in interface ExpressionVisitorVoid
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |