org.geotools.data
Class NewQuery

java.lang.Object
  extended byorg.geotools.data.NewQuery
Direct Known Subclasses:
Join

public abstract class NewQuery
extends java.lang.Object

Author:
dzwiers

Nested Class Summary
static class NewQuery.QueryAs
          Provides a mapping from from an expression to attribute.
 
Field Summary
static NewQuery.QueryAs[] ALL_ATTRIBUTES
          Ask for all properties when used with setPropertyNames.
static int DEFAULT_MAX
          So getMaxFeatures does not return null we use a very large number.
static NewQuery.QueryAs[] NO_ATTRIBUTES
          Ask for no properties when used with setPropertyNames.
static java.net.URI NO_NAMESPACE
          TODO: should this be ANY_URI (JG:xml is in main so you could point to it)
 
Constructor Summary
NewQuery()
           
 
Method Summary
abstract  java.lang.Object getCoordinateSystemReprojectHint()
          aaime -- this is you hint spot :) interface magic extends wish { GeometryFactory geomFactory(); CoordinateReferenceSystem force(); CoordinateReferenceSystem reproject(); }
abstract  Filter getFilter()
          The Filter can be used to define constraints on a query.
abstract  int getMaxFeatures()
          The optional maxFeatures can be used to limit the number of features that a query request retrieves.
abstract  java.net.URI getNamespace()
          The namespace attribute is used to indicate the namespace of the schema being represented.
abstract  NewQuery.QueryAs[] getProperties()
          The property mappings for this query.
 java.lang.String[] getPropertyNames()
          The resulting property names from executing this query (note: output name/value may be the result of an expression ...
abstract  int getStartingOffset()
          A starting offset (taken from Catalog Specification) This recomendation allows us to step through feature content in bite sized chunks (well getMaxFeatures() sized chunks).
abstract  java.lang.String getTypeName()
          The typeName attribute is used to indicate the name of the feature type to be queried.
 boolean retrieveAllProperties()
          Convenience method to determine if the query should use the full schema (all properties) of the data source for the features returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_NAMESPACE

public static final java.net.URI NO_NAMESPACE
TODO: should this be ANY_URI (JG:xml is in main so you could point to it)


DEFAULT_MAX

public static final int DEFAULT_MAX
So getMaxFeatures does not return null we use a very large number. TODO: The existing implementation does that - I would perfer to use -1 to prevent any misunderstanding.

See Also:
Constant Field Values

NO_ATTRIBUTES

public static final NewQuery.QueryAs[] NO_ATTRIBUTES
Ask for no properties when used with setPropertyNames.

Note the query will still return a result - limited to FeatureIDs.

(JG: This looks like a great improvement)


ALL_ATTRIBUTES

public static final NewQuery.QueryAs[] ALL_ATTRIBUTES
Ask for all properties when used with setPropertyNames.

Constructor Detail

NewQuery

public NewQuery()
Method Detail

getPropertyNames

public java.lang.String[] getPropertyNames()
The resulting property names from executing this query (note: output name/value may be the result of an expression ... @see QueryAs).

Note this is a convience method - does not *have* to be here.


getProperties

public abstract NewQuery.QueryAs[] getProperties()
The property mappings for this query.

Note: output name/value may be the result of an expression ...

See Also:


retrieveAllProperties

public boolean retrieveAllProperties()
Convenience method to determine if the query should use the full schema (all properties) of the data source for the features returned.

This method is equivalent to if (query.getProperties() == null), but allows for more clarity on the part of datasource implementors, so they do not need to examine and use null values. All Query implementations should return true for this function if getProperties returns null.

Returns:
if all datasource attributes should be included in the schema of the returned FeatureCollection.

getMaxFeatures

public abstract int getMaxFeatures()
The optional maxFeatures can be used to limit the number of features that a query request retrieves. If no maxFeatures is specified then all features should be returned.

This is the only method that is not directly out of the Query element in the WFS spec. It is instead a part of a GetFeature request, which can hold one or more queries. But each of those in turn will need a maxFeatures, so it is needed here.

Returns:
the max features the getFeature call should return.

getStartingOffset

public abstract int getStartingOffset()
A starting offset (taken from Catalog Specification)

This recomendation allows us to step through feature content in bite sized chunks (well getMaxFeatures() sized chunks).

Returns:
starting offset (counting from 0)

getFilter

public abstract Filter getFilter()
The Filter can be used to define constraints on a query. If no Filter is present then the query is unconstrained and all feature instances should be retrieved.

TODO: This is a Filter as defined by the OGC Filter Specification 58XXXX

Returns:
The filter that defines constraints on the query.

getTypeName

public abstract java.lang.String getTypeName()
The typeName attribute is used to indicate the name of the feature type to be queried. If no typename is specified, then the default typeName should be returned from the dataStore. If the datasstore only supports one feature type then this part of the query may be ignored.

Returns:
the name of the feature type to be returned with this query.

getNamespace

public abstract java.net.URI getNamespace()
The namespace attribute is used to indicate the namespace of the schema being represented.

Returns:
the gml namespace of the feature type to be returned with this query

getCoordinateSystemReprojectHint

public abstract java.lang.Object getCoordinateSystemReprojectHint()
aaime -- this is you hint spot :)

interface magic extends wish { GeometryFactory geomFactory(); CoordinateReferenceSystem force(); CoordinateReferenceSystem reproject(); }



Copyright © GeoTools. All Rights Reserved.