Esri Geoportal Server
1.0

com.esri.gpt.catalog.search
Class GetRecordsGenerator

java.lang.Object
  extended by com.esri.gpt.catalog.search.GetRecordsGenerator

public class GetRecordsGenerator
extends Object

Generates a CSW GetRecords request from a discovery query.


Constructor Summary
GetRecordsGenerator(RequestContext context)
          Constructs with a an active request context.
 
Method Summary
 String generateCswByIdRequest(String id)
          Generates a CSW GetRecordById request.
 String generateCswRequest(DiscoveryQuery query)
          Generates a CSW GetRecords request string from a DiscoveryQuery.
 String getElementSetName()
          Gets the CSW element set name to return.
 String getFilterVersion()
          Gets the CSW filter version.
 String getResultType()
          Gets the CSW result type.
 String getService()
          Gets the OGC service type.
 String getTypeNames()
          Gets the CSW type names to query.
 String getVersion()
          Gets the CSW version.
 void setElementSetName(String elementSetName)
          Sets the CSW element set name to return.
 void setFilterVersion(String version)
          Sets the CSW filter version.
 void setResultType(String resultType)
          Sets the CSW result type.
 void setService(String service)
          Sets the OGC service type.
 void setTypeNames(String typeNames)
          Sets the CSW type names to query.
 void setVersion(String version)
          Sets the CSW version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetRecordsGenerator

public GetRecordsGenerator(RequestContext context)
Constructs with a an active request context.

Parameters:
context - the request context
Method Detail

getElementSetName

public String getElementSetName()
Gets the CSW element set name to return.
Default = "full"

Returns:
the element set name

setElementSetName

public void setElementSetName(String elementSetName)
Sets the CSW element set name to return.
Default = "full"

Parameters:
elementSetName - the element set name

getFilterVersion

public String getFilterVersion()
Gets the CSW filter version.
Default = "1.1.0"

Returns:
the filter version

setFilterVersion

public void setFilterVersion(String version)
Sets the CSW filter version.
Default = "1.1.0"
Modifying the filter version will not change the generation logic.

Parameters:
version - the filter version

getResultType

public String getResultType()
Gets the CSW result type.
Default = "RESULTS"

Returns:
the result type

setResultType

public void setResultType(String resultType)
Sets the CSW result type.
Default = "RESULTS"

Parameters:
resultType - the result type

getService

public String getService()
Gets the OGC service type.
Default = "CSW"

Returns:
the OGC service type

setService

public void setService(String service)
Sets the OGC service type.
Default = "CSW"
Modifying the OGC service type not change the generation logic.

Parameters:
service - the OGC service type

getTypeNames

public String getTypeNames()
Gets the CSW type names to query.
Default = "csw:Record"

Returns:
the type names

setTypeNames

public void setTypeNames(String typeNames)
Sets the CSW type names to query.
Default = "csw:Record"

Parameters:
typeNames - the type names

getVersion

public String getVersion()
Gets the CSW version.
Default = "2.0.2"

Returns:
the CSW version

setVersion

public void setVersion(String version)
Sets the CSW version.
Default = "2.0.2"
Modifying the CSW version will not change the generation logic.

Parameters:
version - the CSW version

generateCswRequest

public String generateCswRequest(DiscoveryQuery query)
                          throws Exception
Generates a CSW GetRecords request string from a DiscoveryQuery.

Parameters:
query - the discovery query
Returns:
the CSW GetRecords request string
Throws:
Exception - if an exception occurs

generateCswByIdRequest

public String generateCswByIdRequest(String id)
                              throws Exception
Generates a CSW GetRecordById request.

Parameters:
id - the record ID
Returns:
the CSW GetRecordById request string
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.0

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