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.io.datastore.sql.wherebuilder
Class QueryTableTree

    java.lang.Object
      org.deegree.io.datastore.sql.wherebuilder.QueryTableTree

    public class QueryTableTree

extends Object

Represents selected `MappedFeatureType`s and `PropertyPath` instances (properties used in an OGC filter and as sort criteria) and their mapping to a certain relational schema.

The requested `MappedFeatureType`s are the root nodes of the tree. If there is more than root node (feature type), the query requests a join between feature types.

Version:
  $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Markus Schneider , last edited by: $Author: mschneider $

Constructor Summary
`QueryTableTree(MappedFeatureType[] rootFts, String[] aliases, TableAliasGenerator aliasGenerator)` Creates a new instance of `QueryTableTree`.

Method Summary
`void` | `addFilterProperty(PropertyPath property)` Tries to insert the given `PropertyPath` as a filter criterion into the tree.
`void` | `addSortProperty(PropertyPath property)` Tries to insert the given `PropertyPath` as a sort criterion into the tree.
`PropertyNode` | `getPropertyNode(PropertyPath path)` Returns the property node for the given property path.
`String` | `getRootAlias()` Returns the alias for the root table.
`FeatureTypeNode[]` | `getRootNodes()` Returns the root feature type nodes of the tree.
`String` | `toString()`

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

Constructor Detail

### QueryTableTree

    public QueryTableTree(MappedFeatureType[] rootFts,
                          String[] aliases,
                          TableAliasGenerator aliasGenerator)

  Creates a new instance of `QueryTableTree`.

  Parameters:
    `rootFts` - selected feature types, more than one type means that the types are joined
    `aliases` - aliases for the feature types, may be null (must have same length as rootFts otherwise)
    `aliasGenerator` - aliasGenerator to be used to generate table aliases, may be null

Method Detail

### getRootNodes

    public FeatureTypeNode[] getRootNodes()

  Returns the root feature type nodes of the tree.

  Returns:
    the root feature type nodes of the tree, contains at least one entry

### getRootAlias

    public String getRootAlias()

  Returns the alias for the root table. TODO support more than one root node

  Returns:
    the alias for the root table

### getPropertyNode

    public PropertyNode getPropertyNode(PropertyPath path)

  Returns the property node for the given property path.

  Parameters:
    `path` - property to be looked up
  Returns:
    the property node for the given property path

### addFilterProperty

    public void addFilterProperty(PropertyPath property)
                           throws PropertyPathResolvingException

  Tries to insert the given `PropertyPath` as a filter criterion into the tree.

  The `PropertyPath` is validated during insertion.

  Parameters:
    `property` - property to be inserted, has to have at least one step
  Throws:
    `PropertyPathResolvingException` - if the path violates the feature type's schema

### addSortProperty

    public void addSortProperty(PropertyPath property)
                         throws PropertyPathResolvingException

  Tries to insert the given `PropertyPath` as a sort criterion into the tree.

  The `PropertyPath` is validated during insertion. It is also checked that the path is unique, i.e. every property type on the path must have maxOccurs set to 1.

  Parameters:
    `property` - property to be inserted, has to have at least one step
  Throws:
    `PropertyPathResolvingException` - if the path violates the feature type's schema

### toString

    public String toString()

  Overrides:
    `toString` in class `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