org.deegree_impl.services.wcas.protocol
Class CASProtocolFactory

java.lang.Object
  extended byorg.deegree_impl.services.wcas.protocol.CASProtocolFactory

public class CASProtocolFactory
extends java.lang.Object

--------------------------------------------------------

Version:
$Revision: 1.16 $ $Date: 2004/03/29 10:39:04 $
Author:
Field Summary
private static java.lang.String WFSNS
           
 
Constructor Summary
CASProtocolFactory()
           
 
Method Summary
static CASDescribeRecordTypeRequest createCASDescribeRecordTypeRequest(java.lang.String id, org.w3c.dom.Document doc)
          creates a DescribeRecordType request from a reader object that offers access to a string resource that contains XML document that encodes the request.
static CASDescribeRecordTypeRequest createCASDescribeRecordTypeRequest(java.lang.String version, java.lang.String id, java.util.HashMap vendorSpecificParameter, java.lang.String[] typeNames, java.lang.String[] setNames, java.lang.String outputFormat)
          creates a CASDescribeRecordTypeRequest object.
static CASDescribeRecordTypeResponse createCASDescribeRecordTypeResponse(OGCWebServiceRequest request, OGCWebServiceException exception, java.lang.String featureTypeSchema)
          creates a CASDescribeRecordTypeResponse object
static CASGetCapabilitiesRequest createCASGetCapabilitiesRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter)
          creates a CASGetCapabilitiesRequest object.
static CASGetRecordRequest createCASGetRecordRequest(java.lang.String id, org.w3c.dom.Document doc)
          creates a instance of a CASGetRecordRequest object from a reader that contains the request-xml.
static CASGetRecordRequest createCASGetRecordRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, int maxRecords, int startPosition, java.lang.String outputFormat, java.lang.String outputRecType, CASQuery[] queries, int queryScope, Filter filter)
          creates a CASGetRecordRequest object.
static CASGetRecordResponse createCASGetRecordResponse(OGCWebServiceRequest request, OGCWebServiceException exception, java.lang.Object response)
          creates a CASGetRecordResponse object
static CASInsertResult createCASInsertResult(java.lang.String handle, java.lang.String[] featureIds)
          creates a CASInsertResult
static CASRegisterServiceRequest createCASRegisterServiceRequest(java.lang.String id, org.w3c.dom.Document doc)
          creates a CASRegisterServiceRequest object
static CASRegisterServiceRequest createCASRegisterServiceRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, java.net.URL serviceAddress, java.lang.String serviceOwnerContactInfo, int harvestFrequency)
          creates a CASRegisterServiceRequest object
static CASTransactionRequest createCASTransactionRequest(java.lang.String id, org.w3c.dom.Document doc)
          creates a CASTransactionRequest object.
 CASTransactionRequest createCASTransactionRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, java.lang.String lockId, java.lang.String handle, CASOperation[] operations)
          creates a CASTransactionRequest object.
static CASTransactionResponse createCASTransactionResponse(OGCWebServiceRequest request, OGCWebServiceException exception, CASInsertResult[] insertResults, java.lang.String status, java.lang.String handle)
          creates a CASTransactionRequest object.
private static CASOperation[] createDeletes(org.w3c.dom.NodeList nl)
          creates delete operations object from a XML-element defined by the OGC CAS specifications
private static CASOperation[] createInserts(org.w3c.dom.NodeList nl)
          creates insert operations object from a XML-element defined by the OGC CAS specifications
 CASQuery createQuery(org.w3c.dom.Element element)
          creates a CAS Query object from a dom element.
static OGCWebServiceRequest createRequest(java.lang.String id, java.io.Reader reader)
          creates a WFS request from a reader that contains an XML encoded form of the request
private static CASOperation[] createUpdates(org.w3c.dom.NodeList nl)
          creates update operations object from a XML-element defined by the OGC CAS specifications
static Filter getFilter(org.w3c.dom.Element element)
          returns the filter that limits the query
private static java.lang.String[] getPropertyNames(org.w3c.dom.Element element)
          The property names is used to enumerate the feature properties or attributes that should be selected.
private static java.lang.String getPropertySetName(org.w3c.dom.Element element)
          returns the name of the propertySetName of the catalog request from the passed Element
private static CASQuery[] getQuery(org.w3c.dom.Element element)
          The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WFSNS

private static java.lang.String WFSNS
Constructor Detail

CASProtocolFactory

public CASProtocolFactory()
Method Detail

createRequest

public static OGCWebServiceRequest createRequest(java.lang.String id,
                                                 java.io.Reader reader)
                                          throws java.lang.Exception
creates a WFS request from a reader that contains an XML encoded form of the request

Throws:
java.lang.Exception

createCASDescribeRecordTypeRequest

public static CASDescribeRecordTypeRequest createCASDescribeRecordTypeRequest(java.lang.String id,
                                                                              org.w3c.dom.Document doc)
                                                                       throws java.io.IOException
creates a DescribeRecordType request from a reader object that offers access to a string resource that contains XML document that encodes the request.

Throws:
java.io.IOException

createCASDescribeRecordTypeRequest

public static CASDescribeRecordTypeRequest createCASDescribeRecordTypeRequest(java.lang.String version,
                                                                              java.lang.String id,
                                                                              java.util.HashMap vendorSpecificParameter,
                                                                              java.lang.String[] typeNames,
                                                                              java.lang.String[] setNames,
                                                                              java.lang.String outputFormat)
creates a CASDescribeRecordTypeRequest object.

Parameters:
id - id of the request
vendorSpecificParameter - none standadized parameters as name-value pairs
outputFormat - indicates the format the result shall be formated
typeNames - names of the feature types that shalle be described

createCASDescribeRecordTypeResponse

public static CASDescribeRecordTypeResponse createCASDescribeRecordTypeResponse(OGCWebServiceRequest request,
                                                                                OGCWebServiceException exception,
                                                                                java.lang.String featureTypeSchema)
creates a CASDescribeRecordTypeResponse object

Parameters:
request - a copy of the request that leads to this response
exception - a describtion of an excetion (only if raised)
featureTypeSchema - schemas of the feature types which describtion has been requested.

createCASGetRecordRequest

public static CASGetRecordRequest createCASGetRecordRequest(java.lang.String id,
                                                            java.util.HashMap vendorSpecificParameter,
                                                            int maxRecords,
                                                            int startPosition,
                                                            java.lang.String outputFormat,
                                                            java.lang.String outputRecType,
                                                            CASQuery[] queries,
                                                            int queryScope,
                                                            Filter filter)
creates a CASGetRecordRequest object.

Parameters:
id - id of the request
vendorSpecificParameter - none standadized parameters as name-value pairs
outputFormat - indicates the format the result shall be formated
filter - filter expression that describes the 'global' limitations of the query.
maxRecords - maximal amout of featuers that shall be returned
startPosition - index of the feature the query shall start
queries - a set of Query objects that describes the query to perform
queryScope - number that indicates if the request is part of a cascading request

createCASGetRecordRequest

public static CASGetRecordRequest createCASGetRecordRequest(java.lang.String id,
                                                            org.w3c.dom.Document doc)
                                                     throws java.lang.Exception
creates a instance of a CASGetRecordRequest object from a reader that contains the request-xml.

Parameters:
doc - DOM object that contains the request
id - id of the request
Throws:
java.lang.Exception

getQuery

private static CASQuery[] getQuery(org.w3c.dom.Element element)
                            throws java.lang.Exception
The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.

only used for xml-coded requests

Throws:
java.lang.Exception

getPropertySetName

private static java.lang.String getPropertySetName(org.w3c.dom.Element element)
                                            throws java.lang.Exception
returns the name of the propertySetName of the catalog request from the passed Element

Parameters:
element -
Returns:
Throws:
java.lang.Exception

getPropertyNames

private static java.lang.String[] getPropertyNames(org.w3c.dom.Element element)
The property names is used to enumerate the feature properties or attributes that should be selected. If no property names are specified then all properties should be fetched.


getFilter

public static Filter getFilter(org.w3c.dom.Element element)
                        throws java.lang.Exception
returns the filter that limits the query

Throws:
java.lang.Exception

createCASGetRecordResponse

public static CASGetRecordResponse createCASGetRecordResponse(OGCWebServiceRequest request,
                                                              OGCWebServiceException exception,
                                                              java.lang.Object response)
creates a CASGetRecordResponse object

Parameters:
request - a copy of the request that leads to this response
exception - a describtion of an excetion (only if raised)
response - the response to the request

createCASGetCapabilitiesRequest

public static CASGetCapabilitiesRequest createCASGetCapabilitiesRequest(java.lang.String id,
                                                                        java.util.HashMap vendorSpecificParameter)
creates a CASGetCapabilitiesRequest object.

Parameters:
id - id of the request
vendorSpecificParameter - none standadized parameters as name-value pairs

createQuery

public CASQuery createQuery(org.w3c.dom.Element element)
                     throws java.lang.Exception
creates a CAS Query object from a dom element.

Parameters:
element - dom element containing a CAS query
Throws:
java.lang.Exception

createCASTransactionRequest

public CASTransactionRequest createCASTransactionRequest(java.lang.String id,
                                                         java.util.HashMap vendorSpecificParameter,
                                                         java.lang.String lockId,
                                                         java.lang.String handle,
                                                         CASOperation[] operations)
creates a CASTransactionRequest object.

Parameters:
id - id of the request
lockId -
operations -
handle -

createCASTransactionRequest

public static CASTransactionRequest createCASTransactionRequest(java.lang.String id,
                                                                org.w3c.dom.Document doc)
                                                         throws java.lang.Exception
creates a CASTransactionRequest object.

Parameters:
id - id of the request
doc - DOM objects that contains the request
Throws:
java.lang.Exception

createInserts

private static CASOperation[] createInserts(org.w3c.dom.NodeList nl)
creates insert operations object from a XML-element defined by the OGC CAS specifications


createUpdates

private static CASOperation[] createUpdates(org.w3c.dom.NodeList nl)
creates update operations object from a XML-element defined by the OGC CAS specifications


createDeletes

private static CASOperation[] createDeletes(org.w3c.dom.NodeList nl)
                                     throws java.lang.Exception
creates delete operations object from a XML-element defined by the OGC CAS specifications

Throws:
java.lang.Exception

createCASTransactionResponse

public static CASTransactionResponse createCASTransactionResponse(OGCWebServiceRequest request,
                                                                  OGCWebServiceException exception,
                                                                  CASInsertResult[] insertResults,
                                                                  java.lang.String status,
                                                                  java.lang.String handle)
creates a CASTransactionRequest object.

Parameters:
request - request that lead to the response
exception - exception if raised
status - termination status of the transaction (Success|Partial|Failed)
handle - something to identify the failure if one has occured

createCASInsertResult

public static CASInsertResult createCASInsertResult(java.lang.String handle,
                                                    java.lang.String[] featureIds)
creates a CASInsertResult


createCASRegisterServiceRequest

public static CASRegisterServiceRequest createCASRegisterServiceRequest(java.lang.String id,
                                                                        java.util.HashMap vendorSpecificParameter,
                                                                        java.net.URL serviceAddress,
                                                                        java.lang.String serviceOwnerContactInfo,
                                                                        int harvestFrequency)
creates a CASRegisterServiceRequest object

Parameters:
id - id of the request
vendorSpecificParameter -
serviceAddress - URL of (ISO19119) document that describes the service that shall be registered
serviceOwnerContactInfo - information about who to contact to get additional informations about the service
harvestFrequency - time interval in hours a catalog shall revisit the service

createCASRegisterServiceRequest

public static CASRegisterServiceRequest createCASRegisterServiceRequest(java.lang.String id,
                                                                        org.w3c.dom.Document doc)
                                                                 throws java.net.MalformedURLException
creates a CASRegisterServiceRequest object

Parameters:
id - id of the request
doc - XML document encoding the request
Throws:
java.net.MalformedURLException