|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xerces.impl.xs.models.XSDFACM
public class XSDFACM
DFAContentModel is the implementation of XSCMValidator that does all of the non-trivial element content validation. This class does the conversion from the regular expression to the DFA that it then uses in its validation algorithm.
Field Summary |
---|
Fields inherited from interface org.apache.xerces.impl.xs.models.XSCMValidator |
---|
FIRST_ERROR, SUBSEQUENT_ERROR |
Constructor Summary | |
---|---|
XSDFACM(CMNode syntaxTree,
int leafCount)
Constructs a DFA content model. |
Method Summary | |
---|---|
boolean |
checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler)
check whether this content violates UPA constraint. |
boolean |
endContentModel(int[] state)
The method indicates the end of list of children |
String |
getTermName(int termId)
Returns the name of the term (element or wildcard) for the given identifier. |
boolean |
isCompactedForUPA()
Checks if this content model has had its min/maxOccurs values reduced for purposes of speeding up UPA. |
boolean |
isFinalState(int state)
check whether the given state is one of the final states |
int[] |
occurenceInfo(int[] state)
Returns an array containing information about the current repeating term or null if no occurrence counting was being performed at the
current state. |
Object |
oneTransition(QName curElem,
int[] state,
SubstitutionGroupHandler subGroupHandler)
one transition only |
int[] |
startContentModel()
This methods to be called on entering a first element whose type has this content model. |
Vector |
whatCanGoHere(int[] state)
Check which elements are valid to appear at this point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSDFACM(CMNode syntaxTree, int leafCount)
syntaxTree
- The syntax tree of the content model.leafCount
- The number of leaves.
RuntimeException
- Thrown if DFA can't be built.Method Detail |
---|
public boolean isFinalState(int state)
state
- the state to check
public Object oneTransition(QName curElem, int[] state, SubstitutionGroupHandler subGroupHandler)
oneTransition
in interface XSCMValidator
curElem
- The current element's QNamestate
- stack to store the previous statesubGroupHandler
- the substitution group handler
RuntimeException
- thrown on errorpublic int[] startContentModel()
XSCMValidator
startContentModel
in interface XSCMValidator
public boolean endContentModel(int[] state)
XSCMValidator
endContentModel
in interface XSCMValidator
state
- Current state of the content model
public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException
checkUniqueParticleAttribution
in interface XSCMValidator
subGroupHandler
- the substitution group handler
XMLSchemaException
public Vector whatCanGoHere(int[] state)
whatCanGoHere
in interface XSCMValidator
state
- the current state
public int[] occurenceInfo(int[] state)
XSCMValidator
Returns an array containing information about the current repeating term
or null
if no occurrence counting was being performed at the
current state.
If an array is returned it will have a length == 4 and will contain:
occurenceInfo
in interface XSCMValidator
state
- the current state
public String getTermName(int termId)
XSCMValidator
getTermName
in interface XSCMValidator
termId
- identifier for the element declaration or wildcard
public boolean isCompactedForUPA()
XSCMValidator
isCompactedForUPA
in interface XSCMValidator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |