deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.csw.discovery
Class Query

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

public class Query
extends 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(String elementSetName, List<QualifiedName> elementSetNameTypeNames, Map<String,QualifiedName> elementSetNameVariables, List<PropertyPath> elementNames, Filter constraint, SortProperty[] sortProperties, List<QualifiedName> typeNames, Map<String,QualifiedName> typeNameVariables)
           
Query(String elementSetName, String[] elementNames, Filter constraint, SortProperty[] sortProperties, String[] typeNames)
          Creates a new Query instance.
 
Method Summary
 Filter getContraint()
          Zero or one (Optional); Default action is to execute an unconstrained query
 Map<String,QualifiedName> getDeclaredTypeNameVariables()
           
 List<PropertyPath> getElementNamesAsPropertyPaths()
           
 String getElementSetName()
          Zero or one (Optional); If null then getElementNames may return a list of requested elements.
 List<QualifiedName> getElementSetNameTypeNamesList()
           
 Map<String,QualifiedName> getElementSetNameVariables()
           
 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.
 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
 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(String elementSetName,
      String[] elementNames,
      Filter constraint,
      SortProperty[] sortProperties,
      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(String elementSetName,
             List<QualifiedName> elementSetNameTypeNames,
             Map<String,QualifiedName> elementSetNameVariables,
             List<PropertyPath> elementNames,
             Filter constraint,
             SortProperty[] sortProperties,
             List<QualifiedName> typeNames,
             Map<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 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 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 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 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 Map<String,QualifiedName> getDeclaredTypeNameVariables()
Returns:
the variables (with a leading $ (dollar_sign) as a String), declared with the typeNames (given as QualifiedName ).

getElementNamesAsPropertyPaths

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

getElementSetNameVariables

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

getElementSetNameTypeNamesList

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

deegree 2.3 (2010/04/09 10:10 build-4-official)

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