|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.ogcwebservices.AbstractOGCWebServiceRequest org.deegree.ogcwebservices.csw.manager.Harvest
public class Harvest
The general model defines two operations in the Manager class that may be used to create or update records in the catalogue. They are the transaction operation and the harvestRecords operation. The transaction operation may be used to "push" data into the catalogue and is defined in Subclause 10.11. of CS-W specification. This subclause defines the optional Harvest operation, which is an operation that "pulls" data into the catalogue. That is, this operation only references the data to be inserted or updated in the catalogue, and it is the job of the catalogue service to resolve the reference, fetch that data, and process it into the catalogue.
The Harvest operation had two modes of operation, controlled by a flag in the request. The first mode of operation is a synchronous mode in whice the CSW receives a Harvest request from the client, processes it immediately, and sends the results to the client while the client waits. The second mode of operation is asynchronous in that the server receives a Harvest request from the client, and sends the client an immediate acknowledgement that the request has been successfully received. The server can then process the Harvest request whenever it likes, taking as much time as is required and then send the results of the processing to a URI specified in the original Harvest request. This latter mode of operation is included to support Harvest requests that could run for a period of time longer than most HTTP timeout’s will allow.
Processing a Harvest request means that the CSW resolves the URI pointing to the metadata resource, parses the resource, and then creates or modifies metadata records in the catalogue in order to register the resource. This operation may be performed only once or periodically depending on how the client invokes the operation.
Constructor Summary | |
---|---|
Harvest(java.lang.String version,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter,
java.net.URI source,
java.net.URI resourceType,
java.lang.String resourceFormat,
TimeDuration harvestTimeDuration,
java.util.List<java.net.URI> responseHandler,
java.util.Date startTimestamp)
|
Method Summary | |
---|---|
static Harvest |
create(java.util.Map<java.lang.String,java.lang.String> param)
factory method for creating a Harvest request from its KVP representation |
static Transaction |
create(java.lang.String id,
org.w3c.dom.Element transRoot)
creates a Harvesting Request from its XM representation |
TimeDuration |
getHarvestInterval()
The HarvestTimeDuration parameter is used to specify the period of time, in ISO 8601 period format, that should elapse before a CSW attempts to re-harvest the specified resource thus refreshing it copy of a resource. |
java.lang.String |
getResourceFormat()
The ResourceFormat paramter is used to indicate the encoding used for the resource being harvested. |
java.net.URI |
getResourceType()
The ResourceType parameter is a reference to a schema document that defines the structure of the resource being harvested. |
java.util.List<java.net.URI> |
getResponseHandler()
The ResponseHandler parameter is a flag that indicates how the Harvest operation should be processed by a CSW server. |
java.lang.String |
getServiceName()
will always return 'CSW' |
java.net.URI |
getSource()
The Source parameter is used to specify a URI reference to the metadata resource to be harvested. |
java.util.Date |
getStartTimestamp()
returns the deegree specific timestamp when harvesting shall start. |
Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest |
---|
getId, getParam, getParamAsInt, getParamValues, getRequestParameter, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
Harvest(java.lang.String version, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter, java.net.URI source, java.net.URI resourceType, java.lang.String resourceFormat, TimeDuration harvestTimeDuration, java.util.List<java.net.URI> responseHandler, java.util.Date startTimestamp)
version
- id
- vendorSpecificParameter
- source
- resourceType
- resourceFormat
- harvestTimeDuration
- responseHandler
- Method Detail |
---|
public static Harvest create(java.util.Map<java.lang.String,java.lang.String> param) throws InvalidParameterValueException, MissingParameterValueException
param
-
InvalidParameterValueException
MissingParameterValueException
public static final Transaction create(java.lang.String id, org.w3c.dom.Element transRoot) throws XMLParsingException
id
- transRoot
-
XMLParsingException
public TimeDuration getHarvestInterval()
The HarvestTimeDuration parameter is used to specify the period of time, in ISO 8601 period format, that should elapse before a CSW attempts to re-harvest the specified resource thus refreshing it copy of a resource.
If no HarvestTimeDuration parameter is specified then the resource is harvested only once in response to the Harvest request.
public java.lang.String getResourceFormat()
public java.net.URI getResourceType()
public java.util.List<java.net.URI> getResponseHandler()
The ResponseHandler parameter is a flag that indicates how the Harvest operation should be processed by a CSW server.
If the parameter is not present, then the Harvest operation is processed synchronously meaning that the client sends the Harvest request to a CSW and then waits to receive a HarvestResponse or exception message. The CSW immediately processes the Harvest request, while the client waits for a response. The problem with this mode of operation is that the client may timeout waiting for the server to process the request.
If the parameter is present, the Harvest operation is processed asynchronously. In this case, the server responds immediately to a client’s request with an acknowledgement message. The acknowlegment message echos the client’s request, using the <EchoedRequest> element, and may include an optionally generated request identifier using the <RequestId> element. The acknowledgement message tells the client that the request has been received and notification of completion will be send to the URL specified as the value of the ResponseHandler parameter. The Harvest request may then be processed at some later time taking as much time as is required to complete the operation. When the operation is completed, a HarvestResponse message or exception message (if a problem was encountered) is sent to the URL specified as the value of the ResponseHandler parameter.
public java.net.URI getSource()
public java.util.Date getStartTimestamp()
null
is
returned harvesting shall start as soon as possible
public java.lang.String getServiceName()
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org