org.geotools.xml.impl.jxpath
Class FeaturePropertyPointer

Object
  extended by NodePointer
      extended by FeaturePropertyPointer
All Implemented Interfaces:
Serializable, Cloneable, Comparable, Pointer

public class FeaturePropertyPointer
extends NodePointer

Pointer to a single property of a feature.

THe property of the feature is specified via index. Setting the index to -1 will cause the pointer to point at the feature id.

Author:
Justin Deoliveira, The Open Planning Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class NodePointer
locale, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
 
Constructor Summary
FeaturePropertyPointer(FeaturePointer parent, int index)
          Creates the pointer.
 
Method Summary
 int compareChildNodePointers(NodePointer pointer1, NodePointer pointer2)
          Always return 0, can never have child pointers.
 Object getBaseValue()
           
 Object getImmediateNode()
           
 int getLength()
          Return 1
 QName getName()
          Returns the qname with prefix as null, and local part the name of the feature attribute.
 boolean isCollection()
          Return false.
 boolean isLeaf()
          Return true.
 void setValue(Object value)
           
 
Methods inherited from class NodePointer
asPath, attributeIterator, childIterator, clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, getDefaultNamespaceURI, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isActual, isAttribute, isContainer, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, remove, setAttribute, setIndex, setNamespaceResolver, testNode, toString
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeaturePropertyPointer

public FeaturePropertyPointer(FeaturePointer parent,
                              int index)
Creates the pointer.

Parameters:
parent - The parent pointer, pointer at the feature.
index - The index of hte property to point to, or -1 to point to the feature id.
Method Detail

isLeaf

public boolean isLeaf()
Return true.

Specified by:
isLeaf in class NodePointer

isCollection

public boolean isCollection()
Return false.

Specified by:
isCollection in class NodePointer

getLength

public int getLength()
Return 1

Specified by:
getLength in class NodePointer

getName

public QName getName()
Returns the qname with prefix as null, and local part the name of the feature attribute.

Specified by:
getName in class NodePointer

getBaseValue

public Object getBaseValue()
Specified by:
getBaseValue in class NodePointer

getImmediateNode

public Object getImmediateNode()
Specified by:
getImmediateNode in class NodePointer

setValue

public void setValue(Object value)
Specified by:
setValue in interface Pointer
Specified by:
setValue in class NodePointer

compareChildNodePointers

public int compareChildNodePointers(NodePointer pointer1,
                                    NodePointer pointer2)
Always return 0, can never have child pointers.

Specified by:
compareChildNodePointers in class NodePointer


Copyright © 1996-2009 Geotools. All Rights Reserved.