org.geotools.data.complex.filter
Class XPath.Step

java.lang.Object
  extended by org.geotools.data.complex.filter.XPath.Step
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
XPath

public static class XPath.Step
extends java.lang.Object
implements org.opengis.util.Cloneable

Author:
gabriel

Constructor Summary
XPath.Step(javax.xml.namespace.QName name, int index)
          Creates a "property" xpath step (i.e.
XPath.Step(javax.xml.namespace.QName name, int index, boolean isXmlAttribute)
          Creates an xpath step for the given qualified name and index; and the given flag to indicate if it it an "attribute" or "property" step.
XPath.Step(javax.xml.namespace.QName name, int index, boolean isXmlAttribute, boolean isIndexed)
          Creates an xpath step for the given qualified name and index; and the given flag to indicate if it it an "attribute" or "property" step.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 boolean equalsIgnoreIndex(XPath.Step other)
          Compares this Step with another for equivalence ignoring the steps indexes.
 int getIndex()
           
 javax.xml.namespace.QName getName()
           
 int hashCode()
           
 boolean isIndexed()
           
 boolean isXmlAttribute()
          Flag that indicates that this single step refers to an "attribute" rather than a "property".
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XPath.Step

public XPath.Step(javax.xml.namespace.QName name,
                  int index)
Creates a "property" xpath step (i.e. isXmlAttribute() == false).

Parameters:
name -
index -

XPath.Step

public XPath.Step(javax.xml.namespace.QName name,
                  int index,
                  boolean isXmlAttribute)
Creates an xpath step for the given qualified name and index; and the given flag to indicate if it it an "attribute" or "property" step.

Parameters:
name - the qualified name of the step (name should include prefix to be reflected in toString())
index - the index (indexing starts at 1 for Xpath) of the step
isXmlAttribute - whether the step referers to an "attribute" or a "property" (like for attributes and elements in xml)
Throws:
java.lang.NullPointerException - if name==null
java.lang.IllegalArgumentException - if index < 1

XPath.Step

public XPath.Step(javax.xml.namespace.QName name,
                  int index,
                  boolean isXmlAttribute,
                  boolean isIndexed)
Creates an xpath step for the given qualified name and index; and the given flag to indicate if it it an "attribute" or "property" step.

Parameters:
name - the qualified name of the step (name should include prefix to be reflected in toString())
index - the index (indexing starts at 1 for Xpath) of the step
isXmlAttribute - whether the step referers to an "attribute" or a "property" (like for attributes and elements in xml)
isIndexed - whether or not the index is to be shown in the string representation even if index = 1
Throws:
java.lang.NullPointerException - if name==null
java.lang.IllegalArgumentException - if index < 1
Method Detail

equalsIgnoreIndex

public boolean equalsIgnoreIndex(XPath.Step other)
Compares this Step with another for equivalence ignoring the steps indexes.

Parameters:
hisStep -
Returns:

getIndex

public int getIndex()

isIndexed

public boolean isIndexed()

getName

public javax.xml.namespace.QName getName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

isXmlAttribute

public boolean isXmlAttribute()
Flag that indicates that this single step refers to an "attribute" rather than a "property".

I.e. it was created from the last step of an expression like foo/bar@attribute.

Returns:


Copyright © 1996-2010 Geotools. All Rights Reserved.