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

org.deegree.ogcwebservices.csw.discovery
Class Query

java.lang.Object
  extended by org.deegree.ogcwebservices.csw.discovery.Query

public class Query
extends java.lang.Object

Main component of a GetRecords request. A GetRecords request may consist of several Query elements.

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
Query(java.lang.String elementSetName, java.util.List<QualifiedName> elementSetNameTypeNames, java.util.Map<java.lang.String,QualifiedName> elementSetNameVariables, java.util.List<PropertyPath> elementNames, Filter constraint, SortProperty[] sortProperties, java.util.List<QualifiedName> typeNames, java.util.Map<java.lang.String,QualifiedName> typeNameVariables)
           
Query(java.lang.String elementSetName, java.lang.String[] elementNames, Filter constraint, SortProperty[] sortProperties, java.lang.String[] typeNames)
          Creates a new Query instance.
 
Method Summary
 Filter getContraint()
          Zero or one (Optional); Default action is to execute an unconstrained query
 java.util.Map<java.lang.String,QualifiedName> getDeclaredTypeNameVariables()
           
 java.util.List<PropertyPath> getElementNamesAsPropertyPaths()
           
 java.lang.String getElementSetName()
          Zero or one (Optional); If null then getElementNames may return a list of requested elements.
 java.util.List<QualifiedName> getElementSetNameTypeNamesList()
           
 java.util.Map<java.lang.String,QualifiedName> getElementSetNameVariables()
           
 java.lang.String[] getElementsNames()
          Deprecated. this method is replaced with the more correct getElementNamesAsPropertyPaths(). For now it just returns the values of PropertyPath.getAsString() method or null if no elementName were requested.
 SortProperty[] getSortProperties()
          Ordered list of names of metadata elements to use for sorting the response.
 java.lang.String[] getTypeNames()
          Deprecated. this function actually creates an Array of Strings using the values returned from the QualifiedName.getFormattedString() method or null if no typenames were requested. It is more correct to use the values of the getTypeNamesAsList() method
 java.util.List<QualifiedName> getTypeNamesAsList()
          The typeName parameter specifies the record type name that defines a set of metadata record element names which will be constrained in the predicate of the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query

Query(java.lang.String elementSetName,
      java.lang.String[] elementNames,
      Filter constraint,
      SortProperty[] sortProperties,
      java.lang.String[] typeNames)
Creates a new Query instance.

Parameters:
elementSetName -
elementNames - a String array containing the requested ElementName propertypaths. If not null, they will be converted to an ArrayList.
sortProperties -
constraint -
typeNames - which will be transformed to a list of qualified names.

Query

public Query(java.lang.String elementSetName,
             java.util.List<QualifiedName> elementSetNameTypeNames,
             java.util.Map<java.lang.String,QualifiedName> elementSetNameVariables,
             java.util.List<PropertyPath> elementNames,
             Filter constraint,
             SortProperty[] sortProperties,
             java.util.List<QualifiedName> typeNames,
             java.util.Map<java.lang.String,QualifiedName> typeNameVariables)
Parameters:
elementSetName -
elementSetNameTypeNames - the typenames (not the variables) which should be returned inside a GetRecordsReponse
elementSetNameVariables - the variables (and their mapping to the TypeName) which were requested.
elementNames - a list of propertyPath of propertys a client is interested in.
constraint -
sortProperties -
typeNames - list of QualifiedNames which were defined in the query element.
typeNameVariables - the variables (strings starting with an $-sign) which were declared typeNameattribtue in the Query element.
Method Detail

getElementSetName

public java.lang.String getElementSetName()
Zero or one (Optional); If null then getElementNames may return a list of requested elements. If both methods returns null the default action is to present all metadata elements.

The ElementName parameter is used to specify one or more metadata record elements that the query should present in the response to the a GetRecords operation. Well known sets of element may be named, in which case the ElementSetName parameter may be used (e. g.brief, summary or full).

If neither parameter is specified, then a CSW shall present all metadata record elements

Returns:
the textual value (brief, summary, full) of the elementSetName node or null if none was given.

getElementsNames

@Deprecated
public java.lang.String[] getElementsNames()
Deprecated. this method is replaced with the more correct getElementNamesAsPropertyPaths(). For now it just returns the values of PropertyPath.getAsString() method or null if no elementName were requested.

Returns:
an Array of element names returned by a getRecord request.

getContraint

public Filter getContraint()
Zero or one (Optional); Default action is to execute an unconstrained query

Returns:
the Filter which was given in the query.

getSortProperties

public SortProperty[] getSortProperties()
Ordered list of names of metadata elements to use for sorting the response. Format of each list item is metadata_elemen_ name:A indicating an ascending sort or metadata_ element_name:D indicating descending sort

The result set may be sorted by specifying one or more metadata record elements upon which to sort.

Returns:
an Array of properties for sorting the response.
To do:
verify return type URI[] or String

getTypeNames

@Deprecated
public java.lang.String[] getTypeNames()
Deprecated. this function actually creates an Array of Strings using the values returned from the QualifiedName.getFormattedString() method or null if no typenames were requested. It is more correct to use the values of the getTypeNamesAsList() method

The typeName parameter specifies the record type name that defines a set of metadata record element names which will be constrained in the predicate of the query. In addition, all or some of the these names may be specified in the query to define which metadata record elements the query should present in the response to the GetRecords operation.

Returns:
the type names of the query.

getTypeNamesAsList

public java.util.List<QualifiedName> getTypeNamesAsList()
The typeName parameter specifies the record type name that defines a set of metadata record element names which will be constrained in the predicate of the query. In addition, all or some of the these names may be specified in the query to define which metadata record elements the query should present in the response to the GetRecords operation.

Returns:
the type names of the query.

getDeclaredTypeNameVariables

public java.util.Map<java.lang.String,QualifiedName> getDeclaredTypeNameVariables()
Returns:
the variables (with a leading $ (dollar_sign) as a String), declared with the typeNames (given as QualifiedName ).

getElementNamesAsPropertyPaths

public java.util.List<PropertyPath> getElementNamesAsPropertyPaths()
Returns:
the requested elementNames as a list of PropertyPaths.

getElementSetNameVariables

public java.util.Map<java.lang.String,QualifiedName> getElementSetNameVariables()
Returns:
the variables which were requested in the ElementSetNames/@typeNames attribute and the mapping to their typenames.

getElementSetNameTypeNamesList

public java.util.List<QualifiedName> getElementSetNameTypeNamesList()
Returns:
the typenames which were requested in the ElementSetNames/@typeNames attribute.

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