org.apache.ws.commons.schema.docpath
Class XmlSchemaPathNode<U,V>

java.lang.Object
  extended by org.apache.ws.commons.schema.docpath.XmlSchemaPathNode<U,V>

public final class XmlSchemaPathNode<U,V>
extends Object

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
static class XmlSchemaPathNode.Direction
          Represents a path's direction.
 
Method Summary
 XmlSchemaPathNode.Direction getDirection()
          The direction this path travels.
 int getDocIteration()
          Shortcut for calling getDocumentNode().getIteration().
 XmlSchemaDocumentNode<U> getDocumentNode()
          Retrieves the XmlSchemaDocumentNode this XmlSchemaPathNode is visiting.
 int getIteration()
          The iteration through the underlying XmlSchemaDocumentNode.
 long getMaxOccurs()
          Shortcut for calling getStateMachineNode().getMaxOccurs().
 long getMinOccurs()
          Shortcut for calling getStateMachineNode().getMinOccurs().
 XmlSchemaPathNode<U,V> getNext()
          The next node in the path, or null if at the end of the path.
 XmlSchemaPathNode<U,V> getPrevious()
          The previous node in the path, or null if at the beginning of the path.
 XmlSchemaStateMachineNode getStateMachineNode()
          Retrieves the XmlSchemaStateMachineNode representing the XML Schema that this XmlSchemaPathNode is visiting.
 V getUserDefinedContent()
          Retrieves any user-defined content attached to this XmlSchemaPathNode, or null if none.
 void setUserDefinedContent(V content)
          Attaches user-defined content to this XmlSchemaPathNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDocumentNode

public XmlSchemaDocumentNode<U> getDocumentNode()
Retrieves the XmlSchemaDocumentNode this XmlSchemaPathNode is visiting.


getStateMachineNode

public XmlSchemaStateMachineNode getStateMachineNode()
Retrieves the XmlSchemaStateMachineNode representing the XML Schema that this XmlSchemaPathNode is visiting. This is equivalent to calling getDocumentNode().getStateMachineNode().


getDirection

public XmlSchemaPathNode.Direction getDirection()
The direction this path travels.


getIteration

public int getIteration()
The iteration through the underlying XmlSchemaDocumentNode. If the path traverses the same XmlSchemaDocumentNode twice, XmlSchemaDocumentNode.getIteration() will return two, and one getIteration() will return one, while the other will return two.


getMinOccurs

public long getMinOccurs()
Shortcut for calling getStateMachineNode().getMinOccurs().

See Also:
XmlSchemaStateMachineNode.getMinOccurs()

getMaxOccurs

public long getMaxOccurs()
Shortcut for calling getStateMachineNode().getMaxOccurs().

See Also:
XmlSchemaStateMachineNode.getMaxOccurs()

getDocIteration

public int getDocIteration()
Shortcut for calling getDocumentNode().getIteration().

See Also:
XmlSchemaDocumentNode.getIteration()

getPrevious

public XmlSchemaPathNode<U,V> getPrevious()
The previous node in the path, or null if at the beginning of the path.


getNext

public XmlSchemaPathNode<U,V> getNext()
The next node in the path, or null if at the end of the path.


getUserDefinedContent

public V getUserDefinedContent()
Retrieves any user-defined content attached to this XmlSchemaPathNode, or null if none.


setUserDefinedContent

public void setUserDefinedContent(V content)
Attaches user-defined content to this XmlSchemaPathNode.



Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.