Esri Geoportal Server
1.0

com.esri.gpt.server.csw.client
Class CswProfile

java.lang.Object
  extended by com.esri.gpt.framework.search.SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
      extended by com.esri.gpt.server.csw.client.CswProfile

public class CswProfile
extends SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>

The Class CswProfile. Hold the class statically if you intend to use the XSLT templates.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.gpt.framework.search.SearchXslProfile
SearchXslProfile.FORMAT_SEARCH_TO_XSL
 
Constructor Summary
CswProfile()
          Instantiates a new csw profile.
CswProfile(String sid, String sname, String sdescription)
          The Constructor.
CswProfile(String id, String name, String description, String kvp, String requestxslt, String responsexslt, String metadataxslt, boolean livedatamap, boolean extentsearch)
          The Constructor.
 
Method Summary
 String generateCSWGetMetadataByIDRequestURL(String baseURL, String recordId)
          Generate a CSW request String to get metadata by ID.
 String generateCSWGetRecordsRequest(CswSearchCriteria search)
          Generate a CSW request String.
 boolean isFilter_extentsearch()
          Checks if is filter_extentsearch.
 boolean isFilter_livedatamap()
          Checks if is filter_livedatamap.
 void readCSWGetMetadataByIDResponse(String recordByIdResponse, CswRecord record)
          Read a CSW metadata response.
 void readCSWGetRecordsResponse(String src, CswRecords recordList)
          Parse a CSW response.
 void readGetMetadataByIDResponse(String response, CswRecord record)
          Read get metadata by id response.
 void setFilter_extentsearch(boolean filter_extentsearch)
          Sets the filter_extentsearch.
 void setFilter_livedatamap(boolean filter_livedatamap)
          Sets the filter_livedatamap.
 boolean SupportContentTypeQuery()
          Support content type query.
 boolean SupportSpatialBoundary()
           
 boolean SupportSpatialQuery()
          Support spatial query.
 
Methods inherited from class com.esri.gpt.framework.search.SearchXslProfile
generateGetRecordsRequest, getDescription, getFactory, getFormatRequestToXsl, getId, getKvp, getMetadataxslt, getMetadataxsltobj, getMetadataXsltObj, getName, getRecordById, getRequestxslt, getRequestxsltobj, getResponsexslt, getResponsexsltobj, isHarvestable, isSupportsContentTypeQuery, isSupportsFullMetadataAtSearch, isSupportsSpatialBoundary, isSupportsSpatialQuery, readGetRecordsResponse, readIntermidiateGetRecordById, setDescription, setFormatRequestToXsl, setHarvestable, setId, setKvp, setMetadataxslt, setMetadataxsltobj, setName, setRequestxslt, setRequestxsltobj, setResponsexslt, setResponsexsltobj, setSupportsContentTypeQuery, setSupportsFullMetadataAtSearch, setSupportsSpatialBoundary, setSupportsSpatialQuery, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CswProfile

public CswProfile()
Instantiates a new csw profile.


CswProfile

public CswProfile(String sid,
                  String sname,
                  String sdescription)
The Constructor.

Parameters:
sid - the sid
sname - the sname
sdescription - the sdescription

CswProfile

public CswProfile(String id,
                  String name,
                  String description,
                  String kvp,
                  String requestxslt,
                  String responsexslt,
                  String metadataxslt,
                  boolean livedatamap,
                  boolean extentsearch)
The Constructor.

Parameters:
id - the id
name - the name
description - the description
kvp - the kvp
requestxslt - the requestxslt
responsexslt - the responsexslt
metadataxslt - the metadataxslt
livedatamap - the livedatamap
extentsearch - the extentsearch
Method Detail

generateCSWGetMetadataByIDRequestURL

public String generateCSWGetMetadataByIDRequestURL(String baseURL,
                                                   String recordId)
Generate a CSW request String to get metadata by ID. The CSW request String is built. The request is String is build based on the baseurl and record id

Parameters:
baseURL - the base URL
recordId - the record id
Returns:
The request String

generateCSWGetRecordsRequest

public String generateCSWGetRecordsRequest(CswSearchCriteria search)
                                    throws TransformerException,
                                           IOException
Generate a CSW request String. First, create a simple common form of request xml Then, transform the request xml into a real request xml using profile specific xslt The CSW request String is built. The request is String is build based on the request xslt.

Parameters:
search - the search
Returns:
The request String
Throws:
TransformerException - the transformer exception
IOException - Signals that an I/O exception has occurred.

readCSWGetMetadataByIDResponse

public void readCSWGetMetadataByIDResponse(String recordByIdResponse,
                                           CswRecord record)
                                    throws TransformerException,
                                           IOException
Read a CSW metadata response. Will populate record referenceList and record metadataResourceUrl The CSW metadata response is read. The CSw record is updated with the metadata

Parameters:
recordByIdResponse - the response
record - the record
Throws:
TransformerException - the transformer exception
IOException - Exception while reading

readCSWGetRecordsResponse

public void readCSWGetRecordsResponse(String src,
                                      CswRecords recordList)
                               throws TransformerException,
                                      SAXException,
                                      IOException,
                                      ParserConfigurationException,
                                      XPathExpressionException
Parse a CSW response. The CSW response is parsed and the records collection is populated with the result.The reponse is parsed based on the response xslt.

Parameters:
src - the src
recordList - the record list
Throws:
TransformerException - the transformer exception
ParserConfigurationException - the parser configuration exception
IOException - Signals that an I/O exception has occurred.
SAXException - the SAX exception
XPathExpressionException - the x path expression exception

SupportContentTypeQuery

public boolean SupportContentTypeQuery()
Support content type query.

Overrides:
SupportContentTypeQuery in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Returns:
true, if successful

SupportSpatialBoundary

public boolean SupportSpatialBoundary()
Overrides:
SupportSpatialBoundary in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>

SupportSpatialQuery

public boolean SupportSpatialQuery()
Support spatial query.

Overrides:
SupportSpatialQuery in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Returns:
true, if successful

isFilter_extentsearch

public boolean isFilter_extentsearch()
Checks if is filter_extentsearch.

Overrides:
isFilter_extentsearch in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Returns:
true, if is filter_extentsearch

setFilter_extentsearch

public void setFilter_extentsearch(boolean filter_extentsearch)
Sets the filter_extentsearch.

Overrides:
setFilter_extentsearch in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Parameters:
filter_extentsearch - the new filter_extentsearch

isFilter_livedatamap

public boolean isFilter_livedatamap()
Checks if is filter_livedatamap.

Overrides:
isFilter_livedatamap in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Returns:
true, if is filter_livedatamap

setFilter_livedatamap

public void setFilter_livedatamap(boolean filter_livedatamap)
Sets the filter_livedatamap.

Overrides:
setFilter_livedatamap in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Parameters:
filter_livedatamap - the new filter_livedatamap

readGetMetadataByIDResponse

public void readGetMetadataByIDResponse(String response,
                                        CswRecord record)
                                 throws TransformerException
Read get metadata by id response.

Specified by:
readGetMetadataByIDResponse in class SearchXslProfile<CswSearchCriteria,CswRecord,CswRecords,CswResult>
Parameters:
response - the response
record - the record
Throws:
TransformerException - the transformer exception
See Also:
SearchXslProfile.readGetMetadataByIDResponse(java.lang.String, com.esri.gpt.framework.request.Record)

Esri Geoportal Server
1.0

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