deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wcts
Class XMLFactory

java.lang.Object
  extended by org.deegree.ogcwebservices.wcts.XMLFactory

public class XMLFactory
extends java.lang.Object

The XMLFactory provides helper methods to create xml-doc representations of bean encapsulations.

Version:
$Revision:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Constructor Summary
XMLFactory()
           
 
Method Summary
protected static void appendCapabilitiesContent(org.w3c.dom.Element root, Content content)
          Appends the WCTSContent bean, as an xml-dom element to the given root.
protected static void appendFeatureCollectionData(org.w3c.dom.Element root, FeatureCollectionData transformableData, boolean useDeegreeModel)
          Appends a dom-xml document element with the name {http://www.deegree.org/wcts}:FeatureCollectionData.
protected static void appendGeometryData(org.w3c.dom.Element root, GeometryData transformableData, boolean useDeegreeModel)
          Appends a dom-xml document element with the name {http://www.deegree.org/wcts}:GeometryData.
protected static void appendSimpleData(org.w3c.dom.Element root, int targetDimension, SimpleData transformableData, boolean useDeegreeModel)
          Appends a dom-xml document element with the name is {http://www.deegree.org/wcts}:SimpleData.
protected static void appendTransformableData(org.w3c.dom.Element root, TransformResponse response, boolean useDeegreeModel)
          Appends the TransformableData bean, as an xml-dom element to the given root.
static XMLFragment create(GetResourceByID resourceByID)
          Exports an GetResourceById bean to xml.
static XMLFragment create(WCTSCapabilities capabilities)
          Exports an WCTSCapabilies bean to xml.
static void createOperationResponse(XMLFactory owsFactory, org.w3c.dom.Element root, Manifest operationResponse)
          Will create an XMLFragment which holds the d_wcts:OperationResponse as the root element, values from the given manifest will be appended by the given ows_1_1 XMLFactory.
static XMLFragment createResponse(TransformResponse transformResponse, boolean useDeegreeModel)
          Creates a response to a Transform request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFactory

public XMLFactory()
Method Detail

create

public static XMLFragment create(GetResourceByID resourceByID)
Exports an GetResourceById bean to xml.

Parameters:
resourceByID -
Returns:
a dom-representation.

create

public static XMLFragment create(WCTSCapabilities capabilities)
Exports an WCTSCapabilies bean to xml.

Parameters:
capabilities - to be exported.
Returns:
an xml-dom-representation of the given bean or null if the given parameter is null.

createResponse

public static XMLFragment createResponse(TransformResponse transformResponse,
                                         boolean useDeegreeModel)
Creates a response to a Transform request. The wcts spec defines it to be a ows_1_1_0:OperationResponse, this method appends the deegreewcts:MultiParts or the deegreewcts:InlineData element(s) to the root node.

Parameters:
transformResponse - to create.
useDeegreeModel - true if the transform response element should be embedded into inline/multipart elements.
Returns:
the ows_1_1_0:OperationResponse with deegreewcts:MultiPart element added or null if the given param is null.

createOperationResponse

public static void createOperationResponse(XMLFactory owsFactory,
                                           org.w3c.dom.Element root,
                                           Manifest operationResponse)
Will create an XMLFragment which holds the d_wcts:OperationResponse as the root element, values from the given manifest will be appended by the given ows_1_1 XMLFactory.

Parameters:
owsFactory - an instance of the ows_1-1 XMLFactory
root - to append the manifest to.
operationResponse - to create the dom-xml representation from.

appendTransformableData

protected static void appendTransformableData(org.w3c.dom.Element root,
                                              TransformResponse response,
                                              boolean useDeegreeModel)
Appends the TransformableData bean, as an xml-dom element to the given root. If either one of the parameters is null, this method just returns.

Parameters:
root - to append to.
response - to get the transformable data from.
useDeegreeModel - true if the transform response element should be embedded into inline/multipart elements.

appendFeatureCollectionData

protected static void appendFeatureCollectionData(org.w3c.dom.Element root,
                                                  FeatureCollectionData transformableData,
                                                  boolean useDeegreeModel)
Appends a dom-xml document element with the name {http://www.deegree.org/wcts}:FeatureCollectionData. It will contain all transformed FeaturCollection as it's children. Or if no FeatureCollections were transformed this element will have no children at all.

If either one of the parameters is null, this method just returns.

Parameters:
root - to append to.
transformableData - to append.
useDeegreeModel - true if the transform response element should be embedded into inline/multipart elements.

appendGeometryData

protected static void appendGeometryData(org.w3c.dom.Element root,
                                         GeometryData transformableData,
                                         boolean useDeegreeModel)
Appends a dom-xml document element with the name {http://www.deegree.org/wcts}:GeometryData. It it will contain all transformed Geometries as it's children. Or if no Geometries were transformed this element will have no children at all.

If either one of the parameters is null, this method just returns.

Parameters:
root - to append to.
transformableData - to append.
useDeegreeModel - true if the transform response element should be embedded into inline/multipart elements.

appendSimpleData

protected static void appendSimpleData(org.w3c.dom.Element root,
                                       int targetDimension,
                                       SimpleData transformableData,
                                       boolean useDeegreeModel)
Appends a dom-xml document element with the name is {http://www.deegree.org/wcts}:SimpleData. It will contain the points as a separated list as defined by the 'cs' separator. The element has the attribute 'srsDimension'. The list elements can therefore be interpreted as a tuple of the value of 'srsDimension'. If no points were transformed the list will be empty.

If either one of the parameters is null, this method just returns.

Parameters:
root - to append to.
targetDimension - of the target CRS
transformableData - to append.
useDeegreeModel - true if the transform response element should be embedded into inline/multipart elements.

appendCapabilitiesContent

protected static void appendCapabilitiesContent(org.w3c.dom.Element root,
                                                Content content)
Appends the WCTSContent bean, as an xml-dom element to the given root. If either one of the parameters is null, this method just returns.

Parameters:
root - to append the values to.
content - to be appended.

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org