com.smallx.xml.infoset
Interface Item

All Known Subinterfaces:
Attribute, Characters, Child, Comment, Document, DocumentEnd, Element, ElementEnd, Namespace, Parent, ProcessingInstruction
All Known Implementing Classes:
MemoryAttribute, MemoryCharacters, MemoryComment, MemoryDocument, MemoryDocumentEnd, MemoryElement, MemoryElementEnd, MemoryItem, MemoryParent, MemoryProcessingInstruction

public interface Item

This interface represents a infoset item in an XML document.


Field Summary
static int ANCESTOR_AXIS
           
static int ANCESTOR_OR_SELF_AXIS
           
static byte ATTRIBUTE
          The type signifying an Attribute instance.
static int ATTRIBUTE_AXIS
           
static byte CHARACTERS
          The type signifying an Characters instance.
static int CHILD_AXIS
           
static byte COMMENT
          The type signifying a Comment instance.
static int DESCENDANT_AXIS
           
static int DESCENDANT_OR_SELF_AXIS
           
static byte DOCUMENT
          The type signifying a Document instance.
static byte DOCUMENT_END
          The type signifying a DocumentEnd instance.
static byte ELEMENT
          The type signifying an Element instance.
static byte ELEMENT_END
          The type signifying an ElementEnd instance.
static int FOLLOWING_AXIS
           
static int FOLLOWING_SIBLING_AXIS
           
static int N_TYPES
          The number of types of nodes.
static byte NAMESPACE
           
static int NAMESPACE_AXIS
           
static int PARENT_AXIS
           
static int PRECEDING_AXIS
           
static int PRECEDING_SIBLING_AXIS
           
static byte PROCESSING_INSTRUCTION
          The type signifying a ProcessingInstruction instance.
static int SELF_AXIS
           
 
Method Summary
 int compareTo(Item other)
          Compares this node to another node returning 1, 0, or -1.
 java.util.Iterator getAxis(byte type)
           
 Document getDocument()
          This method returns the same as getOrigin().getDocument().
 java.lang.String getGeneratedId()
          Returns a globally unique identifier for this node.
 Infoset getInfoset()
          Returns the document context.
 Parent getOrigin()
          Returns the origin of this node.
 byte getType()
          Returns the type of type node.
 

Field Detail

DOCUMENT

public static final byte DOCUMENT
The type signifying a Document instance.

See Also:
Constant Field Values

ELEMENT

public static final byte ELEMENT
The type signifying an Element instance.

See Also:
Constant Field Values

ATTRIBUTE

public static final byte ATTRIBUTE
The type signifying an Attribute instance.

See Also:
Constant Field Values

CHARACTERS

public static final byte CHARACTERS
The type signifying an Characters instance.

See Also:
Constant Field Values

COMMENT

public static final byte COMMENT
The type signifying a Comment instance.

See Also:
Constant Field Values

PROCESSING_INSTRUCTION

public static final byte PROCESSING_INSTRUCTION
The type signifying a ProcessingInstruction instance.

See Also:
Constant Field Values

ELEMENT_END

public static final byte ELEMENT_END
The type signifying an ElementEnd instance.

See Also:
Constant Field Values

DOCUMENT_END

public static final byte DOCUMENT_END
The type signifying a DocumentEnd instance.

See Also:
Constant Field Values

NAMESPACE

public static final byte NAMESPACE
See Also:
Constant Field Values

N_TYPES

public static final int N_TYPES
The number of types of nodes.

See Also:
Constant Field Values

CHILD_AXIS

public static final int CHILD_AXIS
See Also:
Constant Field Values

DESCENDANT_AXIS

public static final int DESCENDANT_AXIS
See Also:
Constant Field Values

PARENT_AXIS

public static final int PARENT_AXIS
See Also:
Constant Field Values

ANCESTOR_AXIS

public static final int ANCESTOR_AXIS
See Also:
Constant Field Values

FOLLOWING_SIBLING_AXIS

public static final int FOLLOWING_SIBLING_AXIS
See Also:
Constant Field Values

PRECEDING_SIBLING_AXIS

public static final int PRECEDING_SIBLING_AXIS
See Also:
Constant Field Values

FOLLOWING_AXIS

public static final int FOLLOWING_AXIS
See Also:
Constant Field Values

PRECEDING_AXIS

public static final int PRECEDING_AXIS
See Also:
Constant Field Values

ATTRIBUTE_AXIS

public static final int ATTRIBUTE_AXIS
See Also:
Constant Field Values

NAMESPACE_AXIS

public static final int NAMESPACE_AXIS
See Also:
Constant Field Values

SELF_AXIS

public static final int SELF_AXIS
See Also:
Constant Field Values

DESCENDANT_OR_SELF_AXIS

public static final int DESCENDANT_OR_SELF_AXIS
See Also:
Constant Field Values

ANCESTOR_OR_SELF_AXIS

public static final int ANCESTOR_OR_SELF_AXIS
See Also:
Constant Field Values
Method Detail

getGeneratedId

public java.lang.String getGeneratedId()
Returns a globally unique identifier for this node.


getType

public byte getType()
Returns the type of type node.


getOrigin

public Parent getOrigin()
Returns the origin of this node. This is either the element on which the attribute is declared or the parent of the node.


getDocument

public Document getDocument()
This method returns the same as getOrigin().getDocument(). That is, the document that contains this item.


getAxis

public java.util.Iterator getAxis(byte type)

compareTo

public int compareTo(Item other)
Compares this node to another node returning 1, 0, or -1.

Parameters:
other - The node with which to compare.

getInfoset

public Infoset getInfoset()
Returns the document context.