org.deegree_impl.services.wcts.protocol
Class WCTS_ProtocolFactory

java.lang.Object
  extended byorg.deegree_impl.services.wcts.protocol.WCTS_ProtocolFactory

public final class WCTS_ProtocolFactory
extends java.lang.Object

Factory class for creating WCTS_Protocol classes from a XML document that's conform to the WCTS-specification.

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

Version:
2002-07-22
Author:
Andreas Poth

Constructor Summary
WCTS_ProtocolFactory()
           
 
Method Summary
static DescribeTransformationRequest createDescribeTransformationRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, org.w3c.dom.Document doc)
          factory method for creating a DescribeTransformationRequest object from a WCTS-specification conform XML describetransformation-request document
static DescribeTransformationRequest createDescribeTransformationRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, java.io.Reader reader)
          factory method to create DescribeTransformation object
static DescribeTransformationResponse createDescribeTransformationResponse(OGCWebServiceRequest request, OGCWebServiceException exception, CT_MathTransform[] parameterizedTransformation)
          DescribeTransformationResponse
static GetCapabilitiesRequest createGetCapabilitiesRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter)
          factory method for creating a Capabilities Request
static GetCapabilitiesResponse createGetCapabilitiesResponse(OGCWebServiceRequest request, OGCWebServiceException exception, java.lang.String capabilities)
           
static IsTransformableRequest createIsTransformableRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, org.w3c.dom.Document doc)
          factory method for creating a Transformable object from a WCTS-specification conform XML transformable-request document
static IsTransformableRequest createIsTransformableRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, java.io.Reader reader)
          factory method for creating a Transformable object from a file that contains a WCTS-specification conform XML transformable-request document.
static IsTransformableResponse createIsTransformableResponse(OGCWebServiceRequest request, OGCWebServiceException exception, boolean istransformable)
          factory method for creating a Transformable object from a file that contains a WCTS-specification conform XML transformable-response document.
static OGCWebServiceRequest createRequest(java.lang.String id, java.io.Reader reader)
          factory method for creating a Request where the type of the Request is chosen and initialized.
static TransformRequest createTransformRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, org.w3c.dom.Document doc)
          factory method for creating a Transform object from a WCTS-specification conform XML transform-request document
static TransformRequest createTransformRequest(java.lang.String id, java.util.HashMap vendorSpecificParameter, java.io.Reader reader)
          factory method for creating a Transform object from a file that contains a WCTS-specification conform XML transform-request document.
static TransformResponse createTransformResponse(OGCWebServiceRequest request, OGCWebServiceException exception, GMLGeometry[] data)
          factory method for creating a Transform object from a file that contains a WCTS-specification conform XML transform-response document.
static GMLGeometry[] getData(org.w3c.dom.NodeList nl)
          gets the Data element
static CS_CoordinateSystem getDestinationCRS(org.w3c.dom.Element element)
          gets the DestinationCRS out of the Transformable element
static java.lang.String getFormat(org.w3c.dom.Element element)
          gets the format element
static java.lang.String getInputFormat(org.w3c.dom.Element element)
          gets the InputFormat element
static java.lang.String getOutputFormat(org.w3c.dom.Element element)
          gets the OutputFormat element
static CS_CoordinateSystem getSourceCRS(org.w3c.dom.Element element)
          gets the SourceCRS out of the Transformable element
static TransformationSequence[] getTransformationSequence(org.w3c.dom.Element element)
          gets TransformationSequence element
 java.lang.String replace(java.lang.String target, java.lang.String from, java.lang.String to, boolean all)
          replaces occurences of a string fragment within a string by a new string.
private static CS_CoordinateSystem String2CS_CoordinateSystem(java.lang.String string)
          creates an CS_CoordinateSystem from a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCTS_ProtocolFactory

public WCTS_ProtocolFactory()
Method Detail

createRequest

public static OGCWebServiceRequest createRequest(java.lang.String id,
                                                 java.io.Reader reader)
factory method for creating a Request where the type of the Request is chosen and initialized.

Parameters:
reader - the post-request

createGetCapabilitiesRequest

public static GetCapabilitiesRequest createGetCapabilitiesRequest(java.lang.String id,
                                                                  java.util.HashMap vendorSpecificParameter)
                                                           throws java.lang.Exception
factory method for creating a Capabilities Request

Throws:
java.lang.Exception

createGetCapabilitiesResponse

public static GetCapabilitiesResponse createGetCapabilitiesResponse(OGCWebServiceRequest request,
                                                                    OGCWebServiceException exception,
                                                                    java.lang.String capabilities)
                                                             throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
createGetCapabilitiesResponse(OGCWebServiceRequest, OGCWebServiceException, String)

createIsTransformableRequest

public static IsTransformableRequest createIsTransformableRequest(java.lang.String id,
                                                                  java.util.HashMap vendorSpecificParameter,
                                                                  java.io.Reader reader)
                                                           throws java.lang.Exception
factory method for creating a Transformable object from a file that contains a WCTS-specification conform XML transformable-request document.

Throws:
java.lang.Exception

createIsTransformableRequest

public static IsTransformableRequest createIsTransformableRequest(java.lang.String id,
                                                                  java.util.HashMap vendorSpecificParameter,
                                                                  org.w3c.dom.Document doc)
                                                           throws java.lang.Exception
factory method for creating a Transformable object from a WCTS-specification conform XML transformable-request document

Throws:
java.lang.Exception

getSourceCRS

public static CS_CoordinateSystem getSourceCRS(org.w3c.dom.Element element)
                                        throws java.rmi.RemoteException
gets the SourceCRS out of the Transformable element

Throws:
java.rmi.RemoteException

getDestinationCRS

public static CS_CoordinateSystem getDestinationCRS(org.w3c.dom.Element element)
                                             throws java.rmi.RemoteException
gets the DestinationCRS out of the Transformable element

Throws:
java.rmi.RemoteException

String2CS_CoordinateSystem

private static CS_CoordinateSystem String2CS_CoordinateSystem(java.lang.String string)
                                                       throws java.rmi.RemoteException
creates an CS_CoordinateSystem from a String.

Throws:
java.rmi.RemoteException

createIsTransformableResponse

public static IsTransformableResponse createIsTransformableResponse(OGCWebServiceRequest request,
                                                                    OGCWebServiceException exception,
                                                                    boolean istransformable)
                                                             throws java.lang.Exception
factory method for creating a Transformable object from a file that contains a WCTS-specification conform XML transformable-response document.

Throws:
java.lang.Exception

createTransformRequest

public static TransformRequest createTransformRequest(java.lang.String id,
                                                      java.util.HashMap vendorSpecificParameter,
                                                      java.io.Reader reader)
                                               throws java.io.IOException,
                                                      org.xml.sax.SAXException,
                                                      java.lang.Exception
factory method for creating a Transform object from a file that contains a WCTS-specification conform XML transform-request document.

Throws:
java.io.IOException
org.xml.sax.SAXException
java.lang.Exception

createTransformRequest

public static TransformRequest createTransformRequest(java.lang.String id,
                                                      java.util.HashMap vendorSpecificParameter,
                                                      org.w3c.dom.Document doc)
                                               throws java.lang.Exception
factory method for creating a Transform object from a WCTS-specification conform XML transform-request document

Throws:
java.lang.Exception

getInputFormat

public static java.lang.String getInputFormat(org.w3c.dom.Element element)
gets the InputFormat element


getOutputFormat

public static java.lang.String getOutputFormat(org.w3c.dom.Element element)
gets the OutputFormat element


getTransformationSequence

public static TransformationSequence[] getTransformationSequence(org.w3c.dom.Element element)
gets TransformationSequence element


getData

public static GMLGeometry[] getData(org.w3c.dom.NodeList nl)
                             throws GMLException
gets the Data element

Throws:
GMLException

createTransformResponse

public static TransformResponse createTransformResponse(OGCWebServiceRequest request,
                                                        OGCWebServiceException exception,
                                                        GMLGeometry[] data)
factory method for creating a Transform object from a file that contains a WCTS-specification conform XML transform-response document.


createDescribeTransformationRequest

public static DescribeTransformationRequest createDescribeTransformationRequest(java.lang.String id,
                                                                                java.util.HashMap vendorSpecificParameter,
                                                                                java.io.Reader reader)
                                                                         throws java.lang.Exception
factory method to create DescribeTransformation object

Throws:
java.lang.Exception

createDescribeTransformationRequest

public static DescribeTransformationRequest createDescribeTransformationRequest(java.lang.String id,
                                                                                java.util.HashMap vendorSpecificParameter,
                                                                                org.w3c.dom.Document doc)
                                                                         throws java.lang.Exception
factory method for creating a DescribeTransformationRequest object from a WCTS-specification conform XML describetransformation-request document

Throws:
java.lang.Exception

getFormat

public static java.lang.String getFormat(org.w3c.dom.Element element)
gets the format element


createDescribeTransformationResponse

public static DescribeTransformationResponse createDescribeTransformationResponse(OGCWebServiceRequest request,
                                                                                  OGCWebServiceException exception,
                                                                                  CT_MathTransform[] parameterizedTransformation)
                                                                           throws java.lang.Exception
DescribeTransformationResponse

Throws:
java.lang.Exception

replace

public java.lang.String replace(java.lang.String target,
                                java.lang.String from,
                                java.lang.String to,
                                boolean all)
replaces occurences of a string fragment within a string by a new string.

Parameters:
target - is the original string
from - is the string to be replaced
to - is the string which will used to replace
all - if it's true all occurences of the string to be replaced will be replaced. else only the first occurence will be replaced.