| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private static final boolean | DEBUG_VALIDATE_CONTENT
Set to true to debug content model validation. |
| private XSDFACM. | fCountingStates
Array containing occurence information for looping states which use counters to check minOccurs/maxOccurs. |
| private Object[] | fElemMap
This is the map of unique input symbol elements to indices into each state's per-input symbol transition table entry. |
| private int[] | fElemMapCounter
Array of counters for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. |
| private int[] | fElemMapCounterLowerBound
Array of lower bounds for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. |
| private int[] | fElemMapCounterUpperBound
Array of upper bounds for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. |
| private int[] | fElemMapId
id of the unique input symbol |
| private int | fElemMapSize
The element map size. |
| private int[] | fElemMapType
This is a map of whether the element map contains information related to ANY models. |
| private boolean[] | fFinalStateFlags
This is an array of booleans, one per state (there are fTransTableSize states in the DFA) that indicates whether that state is a final state. |
| private CMStateSet[] | fFollowList
The list of follow positions for each NFA position (i.e. for each non-epsilon leaf node.) This is only used during the building of the DFA, and is let go afterwards. |
| private CMNode | fHeadNode
This is the head node of our intermediate representation. |
| private boolean | |
| private int | fLeafCount
The count of leaf nodes. |
| private XSCMLeaf[] | fLeafList
An array of non-epsilon leaf nodes, which is used during the DFA build operation, then dropped. |
| private int[] | fLeafListType
Array mapping ANY types to the leaf list. |
| private int[][] | fTransTable
This is the transition table that is the main by product of all of the effort here. |
| private int | fTransTableSize
The number of valid entries in the transition table, and in the other related tables such as fFinalStateFlags. |
| private static long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public List | checkMinMaxBounds()
Implements com. Used by constant space algorithm for a{n,m} for n > 1 and m <= unbounded. |
| public boolean | Returns: true if this content model contains other or list wildcardthe substitution group handler subGroupHandler)Implements com. check whether this content violates UPA constraint. |
| private void | |
| public boolean | endContentModel(int[] state)
Implements com. The method indicates the end of list of children |
| pack-priv Object | |
| pack-priv Object | findMatchingDecl(QName curElem, int[] state, SubstitutionGroupHandler subGroupHandler, int elemIndex)
|
| public String | getTermName(int termId)
Implements com. Returns the name of the term (element or wildcard) for the given identifier. |
| public boolean | isCompactedForUPA()
Implements com. Checks if this content model has had its min/maxOccurs values reduced for purposes of speeding up UPA. |
| public boolean | Returns: whether it's a final statethe state to check state)check whether the given state is one of the final states |
| private int[] | makeDefStateList()
-1 is used to represent bad transitions in the transition table entry for each state. |
| public int[] | occurenceInfo(int[] state)
Implements com. Returns an array containing information about the current repeating term
or |
| public Object | Returns: null if transition is invalid; otherwise the Object corresponding to the XSElementDecl or XSWildcardDecl identified. Also, the state array will be modified to include the new state; this so that the validator can store it away.The current element's QName curElem, int[] stack to store the previous state state, SubstitutionGroupHandler the substitution group handler subGroupHandler)Implements com. one transition only |
| private void | |
| public int[] | startContentModel()
Implements com. This methods to be called on entering a first element whose type has this content model. |
| public List | Returns: a list whose entries are instances of either XSWildcardDecl or XSElementDecl.the current state state)Implements com. Check which elements are valid to appear at this point. |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG | |
| DEBUG_VALIDATE_CONTENT | back to summary |
|---|---|
| private static final boolean DEBUG_VALIDATE_CONTENT Set to true to debug content model validation. | |
| fCountingStates | back to summary |
|---|---|
| private XSDFACM. Array containing occurence information for looping states which use counters to check minOccurs/maxOccurs. | |
| fElemMap | back to summary |
|---|---|
| private Object[] fElemMap This is the map of unique input symbol elements to indices into each state's per-input symbol transition table entry. This is part of the built DFA information that must be kept around to do the actual validation. Note tat since either XSElementDecl or XSParticleDecl object can live here, we've got to use an Object. | |
| fElemMapCounter | back to summary |
|---|---|
| private int[] fElemMapCounter Array of counters for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. Used to count the a's to later check against n and m. Counter set to -1 if element (or wildcard) not optimized by constant space algorithm. | |
| fElemMapCounterLowerBound | back to summary |
|---|---|
| private int[] fElemMapCounterLowerBound Array of lower bounds for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. This array stores the n's for those elements (or wildcards) for which the constant space algorithm applies (or -1 otherwise). | |
| fElemMapCounterUpperBound | back to summary |
|---|---|
| private int[] fElemMapCounterUpperBound Array of upper bounds for all the for elements (or wildcards) of the form a{n,m} where n > 1 and m <= unbounded. This array stores the n's for those elements (or wildcards) for which the constant space algorithm applies, or -1 if algorithm does not apply or m = unbounded. | |
| fElemMapId | back to summary |
|---|---|
| private int[] fElemMapId id of the unique input symbol | |
| fElemMapSize | back to summary |
|---|---|
| private int fElemMapSize The element map size. | |
| fElemMapType | back to summary |
|---|---|
| private int[] fElemMapType This is a map of whether the element map contains information related to ANY models. | |
| fFinalStateFlags | back to summary |
|---|---|
| private boolean[] fFinalStateFlags This is an array of booleans, one per state (there are fTransTableSize states in the DFA) that indicates whether that state is a final state. | |
| fFollowList | back to summary |
|---|---|
| private CMStateSet[] fFollowList The list of follow positions for each NFA position (i.e. for each non-epsilon leaf node.) This is only used during the building of the DFA, and is let go afterwards. | |
| fHeadNode | back to summary |
|---|---|
| private CMNode fHeadNode This is the head node of our intermediate representation. It is only non-null during the building of the DFA (just so that it does not have to be passed all around.) Once the DFA is built, this is no longer required so its nulled out. | |
| fIsCompactedForUPA | back to summary |
|---|---|
| private boolean fIsCompactedForUPA | |
| fLeafCount | back to summary |
|---|---|
| private int fLeafCount The count of leaf nodes. This is an important number that set some limits on the sizes of data structures in the DFA process. | |
| fLeafList | back to summary |
|---|---|
| private XSCMLeaf[] fLeafList An array of non-epsilon leaf nodes, which is used during the DFA build operation, then dropped. | |
| fLeafListType | back to summary |
|---|---|
| private int[] fLeafListType Array mapping ANY types to the leaf list. | |
| fTransTable | back to summary |
|---|---|
| private int[][] fTransTable This is the transition table that is the main by product of all of the effort here. It is an array of arrays of ints. The first dimension is the number of states we end up with in the DFA. The second dimensions is the number of unique elements in the content model (fElemMapSize). Each entry in the second dimension indicates the new state given that input for the first dimension's start state. The fElemMap array handles mapping from element indexes to positions in the second dimension of the transition table. | |
| fTransTableSize | back to summary |
|---|---|
| private int fTransTableSize The number of valid entries in the transition table, and in the other related tables such as fFinalStateFlags. | |
| time | back to summary |
|---|---|
| private static long time | |
| XSDFACM | back to summary |
|---|---|
| public XSDFACM(CMNode syntaxTree, int leafCount) Constructs a DFA content model.
| |
| buildDFA | back to summary |
|---|---|
| private void buildDFA(CMNode syntaxTree) Builds the internal DFA transition table from the given syntax tree.
| |
| calcFollowList | back to summary |
|---|---|
| private void calcFollowList(CMNode nodeCur) Calculates the follow list of the current node.
| |
| checkMinMaxBounds | back to summary |
|---|---|
| public List Implements com. Used by constant space algorithm for a{n,m} for n > 1 and
m <= unbounded. Called by a validator if validation of
countent model succeeds after subsuming a{n,m} to a*
(or a+) to check the n and m bounds.
Returns | |
| checkUniqueParticleAttribution | back to summary |
|---|---|
| public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException Implements com. check whether this content violates UPA constraint.
| |
| dumpTree | back to summary |
|---|---|
| private void dumpTree(CMNode nodeCur, int level) Dumps the tree of the current node to standard output.
| |
| endContentModel | back to summary |
|---|---|
| public boolean endContentModel(int[] state) Implements com. Doc from com. The method indicates the end of list of children | |
| findMatchingDecl | back to summary |
|---|---|
| pack-priv Object findMatchingDecl(QName curElem, SubstitutionGroupHandler subGroupHandler) | |
| findMatchingDecl | back to summary |
|---|---|
| pack-priv Object findMatchingDecl(QName curElem, int[] state, SubstitutionGroupHandler subGroupHandler, int elemIndex) | |
| getTermName | back to summary |
|---|---|
| public String getTermName(int termId) Implements com. Doc from com. Returns the name of the term (element or wildcard) for the given identifier. | |
| isCompactedForUPA | back to summary |
|---|---|
| public boolean isCompactedForUPA() Implements com. Doc from com. Checks if this content model has had its min/maxOccurs values reduced for purposes of speeding up UPA. If so, this content model should not be used for any purpose other than checking unique particle attribution | |
| isFinalState | back to summary |
|---|---|
| public boolean isFinalState(int state) check whether the given state is one of the final states
| |
| makeDefStateList | back to summary |
|---|---|
| private int[] makeDefStateList() -1 is used to represent bad transitions in the transition table entry for each state. So each entry is initialized to an all -1 array. This method creates a new entry and initializes it. | |
| occurenceInfo | back to summary |
|---|---|
| public int[] occurenceInfo(int[] state) Implements com. Doc from com. Returns an array containing information about the current repeating term
or If an array is returned it will have a length == 4 and will contain:
| |
| oneTransition | back to summary |
|---|---|
| public Object oneTransition(QName curElem, int[] state, SubstitutionGroupHandler subGroupHandler) Implements com. one transition only
| |
| postTreeBuildInit | back to summary |
|---|---|
| private void postTreeBuildInit(CMNode nodeCur) throws RuntimeException Post tree build initialization. | |
| startContentModel | back to summary |
|---|---|
| public int[] startContentModel() Implements com. Doc from com. This methods to be called on entering a first element whose type has this content model. It will return the initial state of the content model | |
| whatCanGoHere | back to summary |
|---|---|
| public List Implements com. Check which elements are valid to appear at this point. This method also works if the state is in error, in which case it returns what should have been seen. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| elemIndex | back to summary |
|---|---|
| pack-priv final int elemIndex | |
| maxOccurs | back to summary |
|---|---|
| pack-priv final int maxOccurs | |
| minOccurs | back to summary |
|---|---|
| pack-priv final int minOccurs | |
| Occurence | back to summary |
|---|---|
| public Occurence(XSCMRepeatingLeaf leaf, int elemIndex) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |