com.smallx.xml.infoset.memory
Class MemoryItem

java.lang.Object
  extended bycom.smallx.xml.infoset.memory.MemoryItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
MemoryDocumentEnd, MemoryElementEnd, MemoryParent, MemoryTextDataItem

public abstract class MemoryItem
extends java.lang.Object
implements Item


Field Summary
protected  Infoset infoset
           
protected  Parent origin
           
protected  double ranking
           
 
Fields inherited from interface com.smallx.xml.infoset.Item
ANCESTOR_AXIS, ANCESTOR_OR_SELF_AXIS, ATTRIBUTE, ATTRIBUTE_AXIS, CHARACTERS, CHILD_AXIS, COMMENT, DESCENDANT_AXIS, DESCENDANT_OR_SELF_AXIS, DOCUMENT, DOCUMENT_END, ELEMENT, ELEMENT_END, FOLLOWING_AXIS, FOLLOWING_SIBLING_AXIS, N_TYPES, NAMESPACE, NAMESPACE_AXIS, PARENT_AXIS, PRECEDING_AXIS, PRECEDING_SIBLING_AXIS, PROCESSING_INSTRUCTION, SELF_AXIS
 
Constructor Summary
protected MemoryItem(Infoset infoset, double ranking, Parent origin)
           
 
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.
protected abstract  void setIndex(int i)
           
protected  void setRank(double value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.smallx.xml.infoset.Item
getType
 

Field Detail

ranking

protected double ranking

origin

protected Parent origin

infoset

protected Infoset infoset
Constructor Detail

MemoryItem

protected MemoryItem(Infoset infoset,
                     double ranking,
                     Parent origin)
Method Detail

setIndex

protected abstract void setIndex(int i)

getInfoset

public Infoset getInfoset()
Description copied from interface: Item
Returns the document context.

Specified by:
getInfoset in interface Item

getOrigin

public Parent getOrigin()
Description copied from interface: Item
Returns the origin of this node. This is either the element on which the attribute is declared or the parent of the node.

Specified by:
getOrigin in interface Item

getDocument

public Document getDocument()
Description copied from interface: Item
This method returns the same as getOrigin().getDocument(). That is, the document that contains this item.

Specified by:
getDocument in interface Item

compareTo

public int compareTo(Item other)
Description copied from interface: Item
Compares this node to another node returning 1, 0, or -1.

Specified by:
compareTo in interface Item
Parameters:
other - The node with which to compare.

setRank

protected void setRank(double value)

getGeneratedId

public java.lang.String getGeneratedId()
Description copied from interface: Item
Returns a globally unique identifier for this node.

Specified by:
getGeneratedId in interface Item

getAxis

public java.util.Iterator getAxis(byte type)
Specified by:
getAxis in interface Item