Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.ogcbase
Class PropertyPath

    java.lang.Object
      org.deegree.ogcbase.PropertyPath

All Implemented Interfaces:
  Comparable<PropertyPath>

Direct Known Subclasses:
  XLinkPropertyPath

    public class PropertyPath

extends Object
implements Comparable<PropertyPath>

Represents a subset of the XPath expression language as described in section 7.4.2 of the Web Feature Implementation Specification 1.1.0 (but is used by other OGC specifications as well).

This specification does not require a WFS implementation to support the full XPath language. In order to keep the implementation entry cost as low as possible, this specification mandates that a WFS implementation must support the following subset of the XPath language:

1. A WFS implementation must support abbreviated relative location paths.
2. Relative location paths are composed of one or more steps separated by the path separator '/'.
3. The first step of a relative location path may correspond to the root element of the feature property being referenced or to the root element of the feature type with the next step corresponding to the root element of the feature property being referenced
4. Each subsequent step in the path must be composed of the abbreviated form of the child:: axis specifier and the name of the feature property encoded as the principal node type of element. The abbreviated form of the child:: axis specifier is to simply omit the specifier from the location step.
5. Each step in the path may optionally contain a predicate composed of the predicate delimiters '[' and ']' and a number indicating which child of the context node is to be selected. This allows feature properties that may be repeated to be specifically referenced.
6. The final step in a path may optionally be composed of the abbreviated form of the attribute:: axis specifier, '@', and the name of a feature property encoded as the principal node type of attribute::.

Version:
  $Revision: 23794 $, $Date: 2010-04-23 15:05:33 +0200 (Fr, 23. Apr 2010) $
Author:
  Markus Schneider , last edited by: $Author: aionita $
See Also:
  `PropertyPathStep`

Constructor Summary
`PropertyPath(List<PropertyPathStep> steps)` Creates a new instance of `PropertyPath` with the specified steps.

Method Summary
`void` | `append(PropertyPathStep last)` Adds the given `PropertyPathStep` to the end of the path.
`int` | `compareTo(PropertyPath that)` Compares this object with the specified object for order.
`boolean` | `equals(Object obj)`
`List<PropertyPathStep>` | `getAllSteps()` Returns all steps of the `PropertyPath`.
`String` | `getAsString()` Returns the canonical string representation.
`NamespaceContext` | `getNamespaceContext()` Returns the namespace bindings for the prefices that are used by this property path.
`PropertyPathStep` | `getStep(int i)` Returns the `PropertyPathStep` at the given index.
`int` | `getSteps()` Returns the number of steps.
`int` | `hashCode()`
`void` | `prepend(PropertyPathStep first)` Adds the given `PropertyPathStep` to the beginning of the path.
`void` | `setSteps(List<PropertyPathStep> steps)` Setter method for steps
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PropertyPath

    public PropertyPath(List<PropertyPathStep> steps)

  Creates a new instance of `PropertyPath` with the specified steps.

  Parameters:
    `steps` - property path steps, may not be null

Method Detail

### getNamespaceContext

    public NamespaceContext getNamespaceContext()

  Returns the namespace bindings for the prefices that are used by this property path.

  Returns:
    the namespace bindings

### getSteps

    public int getSteps()

  Returns the number of steps.

  Returns:
    the number of steps.

### setSteps

    public void setSteps(List<PropertyPathStep> steps)

  Setter method for steps

  Parameters:
    `steps` - a list of `PropertyPathStep`s

### getAsString

    public String getAsString()

  Returns the canonical string representation.

  Returns:
    canonical string representation

### getStep

    public PropertyPathStep getStep(int i)

  Returns the `PropertyPathStep` at the given index.

  Parameters:
    `i` -
  Returns:
    the `PropertyPathStep` at the given index

### getAllSteps

    public List<PropertyPathStep> getAllSteps()

  Returns all steps of the `PropertyPath`.

  Returns:
    all steps of the `PropertyPath`

### append

    public void append(PropertyPathStep last)

  Adds the given `PropertyPathStep` to the end of the path.

  Parameters:
    `last` - `PropertyPathStep` to add

### prepend

    public void prepend(PropertyPathStep first)

  Adds the given `PropertyPathStep` to the beginning of the path.

  Parameters:
    `first` - `PropertyPathStep` to add

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### compareTo

    public int compareTo(PropertyPath that)

  Compares this object with the specified object for order.

  TODO use really unique string representations (namespaces!) + cache them

  Specified by:
    `compareTo` in interface `Comparable<PropertyPath>`
  Parameters:
    `that` - the PropertyPath to be compared
  Returns:
    a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org