Esri Geoportal Server
1.0

com.esri.gpt.server.csw.provider.local
Class QueryFilterParser

java.lang.Object
  extended by com.esri.gpt.server.csw.provider.local.DiscoveryAdapter
      extended by com.esri.gpt.server.csw.provider.local.QueryFilterParser
All Implemented Interfaces:
IFilterParser

public class QueryFilterParser
extends DiscoveryAdapter
implements IFilterParser

Parses the ogc:Filter portion of a CSW query request (GetRecords).


Constructor Summary
QueryFilterParser(OperationContext context)
          Default constructor
 
Method Summary
 void parseFilter(OperationContext context, Node filterNode, XPath xpath)
          Parses the ogc:Filter node for an XML based request.
protected  void parseLogicalClause(Node parent, XPath xpath, LogicalClause logicalClause)
          Parses a parent node for logical, property comparison and spatial sub-clauses.
protected  void parsePropertyClause(Node parent, XPath xpath, LogicalClause logicalClause, PropertyClause propertyClause)
          Parses the property and literal elements underlying a comparison operator.
protected  void parseSpatialClause(Node parent, XPath xpath, LogicalClause logicalClause, SpatialClause spatialClause)
          Parses the spatial operand underlying a spatial operator.
 
Methods inherited from class com.esri.gpt.server.csw.provider.local.DiscoveryAdapter
getDiscoveryContext, parsePropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryFilterParser

public QueryFilterParser(OperationContext context)
Default constructor

Method Detail

parseFilter

public void parseFilter(OperationContext context,
                        Node filterNode,
                        XPath xpath)
                 throws OwsException,
                        XPathExpressionException
Parses the ogc:Filter node for an XML based request.

Specified by:
parseFilter in interface IFilterParser
Parameters:
context - the operation context
filterNode - the ogc:Filter node
xpath - an XPath to enable queries (properly configured with name spaces)
Throws:
OwsException - if validation fails
XPathExpressionException - if an XPath related exception occurs

parseLogicalClause

protected void parseLogicalClause(Node parent,
                                  XPath xpath,
                                  LogicalClause logicalClause)
                           throws OwsException,
                                  XPathExpressionException
Parses a parent node for logical, property comparison and spatial sub-clauses.
Any logical clauses encountered will be recursively parsed.

Parameters:
parent - the parent node from which sub-clauses will read
xpath - an XPath to enable queries (properly configured with name spaces)
logicalClause - the active logical clause to which sub-clauses will be added
Throws:
OwsException - if validation fails
XPathExpressionException - if an XPath related exception occurs

parsePropertyClause

protected void parsePropertyClause(Node parent,
                                   XPath xpath,
                                   LogicalClause logicalClause,
                                   PropertyClause propertyClause)
                            throws OwsException,
                                   XPathExpressionException
Parses the property and literal elements underlying a comparison operator.
If the resulting property clause is valid, it will be added to the clause collection of the supplied logical clause.

Parameters:
parent - the parent node (the node of the property operator)
xpath - an XPath to enable queries (properly configured with name spaces)
logicalClause - the logical clause which will contain the comparison clause
propertyClause - the populate
Throws:
OwsException - OwsException if validation fails
XPathExpressionException - if an XPath related exception occurs

parseSpatialClause

protected void parseSpatialClause(Node parent,
                                  XPath xpath,
                                  LogicalClause logicalClause,
                                  SpatialClause spatialClause)
                           throws OwsException,
                                  XPathExpressionException
Parses the spatial operand underlying a spatial operator.
The spatial operand is used to populate the bounding envelope associated with the supplied spatial clause.
If the envelope is valid, the spatial clause will be added to the clause collection of the supplied logical clause.

Parameters:
parent - the parent node (specifies the spatial operator)
xpath - an XPath to enable queries (properly configured with namespaces)
logicalClause - the logical clause which will contain the spatial clause
spatialClause - the spatial clause to populate
Throws:
OwsException - OwsException if validation fails
XPathExpressionException - if an XPath related exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.