Class XmlSchemaPathNode<U,V>
java.lang.Object
org.apache.ws.commons.schema.docpath.XmlSchemaPathNode<U,V>
This represents a node in the path when walking an XML or Avro document. As
XmlSchemaPathFinder walks through an XML document, it builds
XmlSchemaPathNodes representing the path walked, and
XmlSchemaDocumentNodes representing where the XML document's elements
fall in the XML Schema's sequences, choices, and all groups.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents a path's direction. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XmlSchemaPathNode.Directionprivate XmlSchemaDocumentNode<U> private intprivate XmlSchemaPathNode<U, V> private intprivate XmlSchemaPathNode<U, V> private XmlSchemaStateMachineNodeprivate V -
Constructor Summary
ConstructorsConstructorDescriptionXmlSchemaPathNode(XmlSchemaPathNode.Direction dir, XmlSchemaPathNode<U, V> previous, XmlSchemaDocumentNode<U> node) XmlSchemaPathNode(XmlSchemaPathNode.Direction dir, XmlSchemaPathNode<U, V> previous, XmlSchemaStateMachineNode stateMachine) -
Method Summary
Modifier and TypeMethodDescriptionThe direction this path travels.intShortcut for callinggetDocumentNode().getIteration().(package private) intRetrieves theXmlSchemaDocumentNodethisXmlSchemaPathNodeis visiting.(package private) intintThe iteration through the underlyingXmlSchemaDocumentNode.longShortcut for callinggetStateMachineNode().getMaxOccurs().longShortcut for callinggetStateMachineNode().getMinOccurs().getNext()The next node in the path, ornullif at the end of the path.The previous node in the path, ornullif at the beginning of the path.Retrieves theXmlSchemaStateMachineNoderepresenting the XML Schema that thisXmlSchemaPathNodeis visiting.Retrieves any user-defined content attached to thisXmlSchemaPathNode, ornullif none.(package private) voidsetDocumentNode(XmlSchemaDocumentNode<U> docNode) (package private) voidsetIteration(int newIteration) (package private) voidsetNextNode(int nextNodeIndex, XmlSchemaPathNode<U, V> newNext) (package private) XmlSchemaPathNode<U, V> setPreviousNode(XmlSchemaPathNode<U, V> newPrevious) Changes the previous node this one was pointing to.voidsetUserDefinedContent(V content) Attaches user-defined content to thisXmlSchemaPathNode.(package private) voidupdate(XmlSchemaPathNode.Direction newDirection, XmlSchemaPathNode<U, V> newPrevious, XmlSchemaDocumentNode<U> newNode) Use this method when changing the theXmlSchemaStateMachineNodethisDocumentPathNoderefers to.(package private) voidupdate(XmlSchemaPathNode.Direction newDirection, XmlSchemaPathNode<U, V> newPrevious, XmlSchemaStateMachineNode newStateMachineNode)
-
Field Details
-
direction
-
documentNode
-
stateMachineNode
-
nextNodeStateIndex
private int nextNodeStateIndex -
iterationNum
private int iterationNum -
userDefinedContent
-
prevNode
-
nextNode
-
-
Constructor Details
-
XmlSchemaPathNode
XmlSchemaPathNode(XmlSchemaPathNode.Direction dir, XmlSchemaPathNode<U, V> previous, XmlSchemaDocumentNode<U> node) -
XmlSchemaPathNode
XmlSchemaPathNode(XmlSchemaPathNode.Direction dir, XmlSchemaPathNode<U, V> previous, XmlSchemaStateMachineNode stateMachine)
-
-
Method Details
-
getDocumentNode
Retrieves theXmlSchemaDocumentNodethisXmlSchemaPathNodeis visiting. -
getStateMachineNode
Retrieves theXmlSchemaStateMachineNoderepresenting the XML Schema that thisXmlSchemaPathNodeis visiting. This is equivalent to callinggetDocumentNode().getStateMachineNode(). -
getDirection
The direction this path travels. -
getIteration
public int getIteration()The iteration through the underlyingXmlSchemaDocumentNode. If the path traverses the sameXmlSchemaDocumentNodetwice,XmlSchemaDocumentNode.getIteration()will return two, and onegetIteration()will return one, while the other will return two. -
getMinOccurs
public long getMinOccurs()Shortcut for callinggetStateMachineNode().getMinOccurs().- See Also:
-
getMaxOccurs
public long getMaxOccurs()Shortcut for callinggetStateMachineNode().getMaxOccurs().- See Also:
-
getDocIteration
public int getDocIteration()Shortcut for callinggetDocumentNode().getIteration().- See Also:
-
getPrevious
The previous node in the path, ornullif at the beginning of the path. -
getNext
The next node in the path, ornullif at the end of the path. -
getIndexOfNextNodeState
int getIndexOfNextNodeState() -
getDocSequencePosition
int getDocSequencePosition() -
setIteration
void setIteration(int newIteration) -
setDocumentNode
-
setNextNode
-
setPreviousNode
Changes the previous node this one was pointing to. This is useful when cloning prior nodes in the chain.- Parameters:
newPrevious- The new previous node.- Returns:
- The old previous node.
-
update
void update(XmlSchemaPathNode.Direction newDirection, XmlSchemaPathNode<U, V> newPrevious, XmlSchemaDocumentNode<U> newNode) Use this method when changing the theXmlSchemaStateMachineNodethisDocumentPathNoderefers to. The next node in the path is returned, as it will be discarded internally.- Parameters:
newPrevious- The new previousDocumentPathNodethis node is traversed from.newNode- The newXmlSchemaStateMachineNodethis node refers to.
-
update
void update(XmlSchemaPathNode.Direction newDirection, XmlSchemaPathNode<U, V> newPrevious, XmlSchemaStateMachineNode newStateMachineNode) -
getUserDefinedContent
Retrieves any user-defined content attached to thisXmlSchemaPathNode, ornullif none. -
setUserDefinedContent
Attaches user-defined content to thisXmlSchemaPathNode.
-