Esri Geoportal Server
1.0

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

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

public class QueryResponse
extends DiscoveryAdapter
implements IResponseGenerator

Generates a CSW query response.

Applies to the GetRecordById and GetRecords operation response.


Constructor Summary
QueryResponse(OperationContext context)
          Default constructor
 
Method Summary
protected  void appendDiscoveredField(OperationContext context, Element record, Returnable returnable)
          Creates and appends elements associated with a returnable property to a record element.
protected  void appendDiscoveredRecords(OperationContext context, Element parent)
          Creates and appends the discovered record elements to the XML document.
protected  void appendSearchResultsElement(OperationContext context, Element parent)
          Creates and appends the csw:SearchResults element to the XML document.
 void generateResponse(OperationContext context)
          Generates the response.
 Element newResponseDom(OperationContext context, String rootName)
          Creates a new XML document for response construction.
 
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

QueryResponse

public QueryResponse(OperationContext context)
Default constructor

Method Detail

appendDiscoveredField

protected void appendDiscoveredField(OperationContext context,
                                     Element record,
                                     Returnable returnable)
Creates and appends elements associated with a returnable property to a record element.

Parameters:
context - the operation context
record - the parent element that will hold the fields (a Record)
returnable - the returnable property

appendDiscoveredRecords

protected void appendDiscoveredRecords(OperationContext context,
                                       Element parent)
                                throws Exception
Creates and appends the discovered record elements to the XML document.
Applies to csw:GetRecordByIdResponse and csw:GetRecordsResponse.

Parameters:
context - the operation context
parent - the parent element that will hold the records
Throws:
Exception

appendSearchResultsElement

protected void appendSearchResultsElement(OperationContext context,
                                          Element parent)
                                   throws Exception
Creates and appends the csw:SearchResults element to the XML document.
Applies to csw:GetRecordsResponse.
Discovered records are also created and appended.

Parameters:
parent - the parent element that will hold the results (typically the root)
Throws:
Exception

generateResponse

public void generateResponse(OperationContext context)
                      throws Exception
Generates the response.

Specified by:
generateResponse in interface IResponseGenerator
Parameters:
context - the operation context
Throws:
Exception - if a processing exception occurs

newResponseDom

public Element newResponseDom(OperationContext context,
                              String rootName)
                       throws Exception
Creates a new XML document for response construction.

Parameters:
rootName - the name of the root element
Returns:
the root element
Throws:
Exception - if a processing exception occurs

Esri Geoportal Server
1.0

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