deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.datastore.sql.wherebuilder
Class QueryTableTree

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

public class QueryTableTree
extends java.lang.Object

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

The requested MappedFeatureTypes 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, java.lang.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.
 java.lang.String getRootAlias()
          Returns the alias for the root table.
 FeatureTypeNode[] getRootNodes()
          Returns the root feature type nodes of the tree.
 java.lang.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,
                      java.lang.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 java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

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