public class XSDFACM extends java.lang.Object implements XSCMValidator
FIRST_ERROR, SUBSEQUENT_ERROR| Constructor and Description |
|---|
XSDFACM(CMNode syntaxTree,
int leafCount,
short schemaVersion,
XSOpenContentDecl openContent)
Constructs a DFA content model.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowExpandedName(XSWildcardDecl wildcard,
org.apache.xerces.xni.QName curElem,
SubstitutionGroupHandler subGroupHandler,
XSElementDeclHelper eDeclHelper) |
boolean |
checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler,
XSConstraints xsConstraints)
check whether this content violates UPA constraint.
|
boolean |
endContentModel(int[] state)
The method indicates the end of list of children
|
XSElementDecl |
findMatchingElemDecl(org.apache.xerces.xni.QName curElem,
SubstitutionGroupHandler subGroupHandler) |
java.util.List |
getDefinedNames(SubstitutionGroupHandler subGroupHandler) |
java.lang.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
|
boolean |
isOpenContent(XSWildcardDecl w) |
XSElementDecl |
nextElementTransition(int[] s,
int[] sn,
int[] index) |
XSWildcardDecl |
nextWildcardTransition(int[] s,
int[] sn,
int[] index) |
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. |
java.lang.Object |
oneTransition(org.apache.xerces.xni.QName curElem,
int[] state,
SubstitutionGroupHandler subGroupHandler,
XSElementDeclHelper eDeclHelper)
one transition only
|
void |
optimizeStates(org.apache.xerces.impl.xs.models.XS11CMRestriction.XS11CM base,
int[] b,
int[] d,
int indexb) |
int[] |
startContentModel()
This methods to be called on entering a first element whose type
has this content model.
|
java.util.Vector |
whatCanGoHere(int[] state)
Check which elements are valid to appear at this point.
|
public XSDFACM(CMNode syntaxTree, int leafCount, short schemaVersion, XSOpenContentDecl openContent)
syntaxTree - The syntax tree of the content model.leafCount - The number of leaves.java.lang.RuntimeException - Thrown if DFA can't be built.public boolean isFinalState(int state)
state - the state to checkpublic java.lang.Object oneTransition(org.apache.xerces.xni.QName curElem,
int[] state,
SubstitutionGroupHandler subGroupHandler,
XSElementDeclHelper eDeclHelper)
oneTransition in interface XSCMValidatorcurElem - The current element's QNamestate - stack to store the previous statesubGroupHandler - the substitution group handlereDeclHelper - A helper that allows inquiry of global element declarationsjava.lang.RuntimeException - thrown on errorpublic XSElementDecl findMatchingElemDecl(org.apache.xerces.xni.QName curElem, SubstitutionGroupHandler subGroupHandler)
findMatchingElemDecl in interface XSCMValidatorpublic boolean allowExpandedName(XSWildcardDecl wildcard, org.apache.xerces.xni.QName curElem, SubstitutionGroupHandler subGroupHandler, XSElementDeclHelper eDeclHelper)
public int[] startContentModel()
XSCMValidatorstartContentModel in interface XSCMValidatorpublic boolean endContentModel(int[] state)
XSCMValidatorendContentModel in interface XSCMValidatorstate - Current state of the content modelpublic boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler, XSConstraints xsConstraints) throws XMLSchemaException
checkUniqueParticleAttribution in interface XSCMValidatorsubGroupHandler - the substitution group handlerxsConstraints - the XML Schema Constraint checkerXMLSchemaExceptionpublic java.util.Vector whatCanGoHere(int[] state)
whatCanGoHere in interface XSCMValidatorstate - the current statepublic int[] occurenceInfo(int[] state)
XSCMValidatorReturns 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 XSCMValidatorstate - the current statepublic java.lang.String getTermName(int termId)
XSCMValidatorgetTermName in interface XSCMValidatortermId - identifier for the element declaration or wildcardpublic boolean isCompactedForUPA()
XSCMValidatorisCompactedForUPA in interface XSCMValidatorpublic XSElementDecl nextElementTransition(int[] s, int[] sn, int[] index)
public XSWildcardDecl nextWildcardTransition(int[] s, int[] sn, int[] index)
public boolean isOpenContent(XSWildcardDecl w)
public java.util.List getDefinedNames(SubstitutionGroupHandler subGroupHandler)
public void optimizeStates(org.apache.xerces.impl.xs.models.XS11CMRestriction.XS11CM base,
int[] b,
int[] d,
int indexb)
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.