org.deegree.protocol.ows
Class OWSCommonXMLAdapter

java.lang.Object
  extended by org.deegree.commons.xml.XMLAdapter
      extended by org.deegree.protocol.ows.OWSCommonXMLAdapter
Direct Known Subclasses:
ExecuteRequestXMLAdapter, GetCapabilitiesXMLParser, OWSCapabilitiesXMLAdapter, SOSRequest100XMLAdapter

public class OWSCommonXMLAdapter
extends XMLAdapter

Supplies some basic exports methods for deegree/commons to ows mappings.

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

Field Summary
static String OWS_NS
          ows namespace without version
static String OWS_PREFIX
          the ows prefix
static String OWS110_NS
          ows 1.1 version
static String OWS110_PREFIX
          the ows 1.1.0 prefix
static String XML_NS
          normal xml namespace
static String XML_PREFIX
          the xml prefix
 
Fields inherited from class org.deegree.commons.xml.XMLAdapter
DEFAULT_URL, nsContext, rootElement, XLN_NS
 
Constructor Summary
OWSCommonXMLAdapter()
           
 
Method Summary
static void exportBoundingBoxType(XMLStreamWriter writer, Envelope bbox)
          Exports an Envelope as a ows:BoundingBoxType.
static void exportCoordinateList(XMLStreamWriter writer, List<? extends Number> coordinates, String separator)
           
static void exportPositionType(XMLStreamWriter writer, Point pos)
          Exports a Point as a ows:PositionType.
 Envelope parseBoundingBoxType(org.apache.axiom.om.OMElement boundingBoxDataElement, ICRS defaultCRS)
          Parses the given element of type ows:BoundingBoxType.
 
Methods inherited from class org.deegree.commons.xml.XMLAdapter
evaluateXPath, getElement, getElements, getNamespaceContext, getNode, getNodeAsBigInt, getNodeAsBoolean, getNodeAsDouble, getNodeAsFloat, getNodeAsInt, getNodeAsQName, getNodeAsString, getNodeAsURL, getNodeAsVersion, getNodes, getNodesAsQNames, getNodesAsStrings, getRequiredElement, getRequiredElements, getRequiredNode, getRequiredNodeAsBoolean, getRequiredNodeAsDouble, getRequiredNodeAsFloat, getRequiredNodeAsInteger, getRequiredNodeAsQName, getRequiredNodeAsString, getRequiredNodeAsURL, getRequiredNodeAsVersion, getRequiredNodes, getRootElement, getSchemas, getSystemId, hasSchemas, load, load, load, load, load, load, load, maybeWriteElement, maybeWriteElementNS, parseBoolean, parseDouble, parseFloat, parseInt, parseQName, parseSimpleLink, parseURL, resolve, setRootElement, setSystemId, toString, writeElement, writeElement, writeElement, writeElement, writeElement, writeOptionalAttribute, writeOptionalElement, writeOptionalNSAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OWS_NS

public static final String OWS_NS
ows namespace without version

See Also:
Constant Field Values

OWS110_NS

public static final String OWS110_NS
ows 1.1 version

See Also:
Constant Field Values

XML_NS

public static final String XML_NS
normal xml namespace

See Also:
Constant Field Values

OWS_PREFIX

public static final String OWS_PREFIX
the ows prefix

See Also:
Constant Field Values

OWS110_PREFIX

public static final String OWS110_PREFIX
the ows 1.1.0 prefix

See Also:
Constant Field Values

XML_PREFIX

public static final String XML_PREFIX
the xml prefix

See Also:
Constant Field Values
Constructor Detail

OWSCommonXMLAdapter

public OWSCommonXMLAdapter()
Method Detail

parseBoundingBoxType

public Envelope parseBoundingBoxType(org.apache.axiom.om.OMElement boundingBoxDataElement,
                                     ICRS defaultCRS)
Parses the given element of type ows:BoundingBoxType.

Parameters:
boundingBoxDataElement - element of type ows:BoundingBoxType
defaultCRS - default CRS to use if no crs attribute is specified
Returns:
corresponding Envelope object
Throws:
XMLParsingException - if a syntactical or semantical error has been encountered in the element's contents

exportBoundingBoxType

public static void exportBoundingBoxType(XMLStreamWriter writer,
                                         Envelope bbox)
                                  throws XMLStreamException
Exports an Envelope as a ows:BoundingBoxType.

Parameters:
writer -
bbox - envelope to be exported
Throws:
XMLStreamException

exportCoordinateList

public static void exportCoordinateList(XMLStreamWriter writer,
                                        List<? extends Number> coordinates,
                                        String separator)
                                 throws XMLStreamException
Parameters:
writer - to export to
coordinates - to be exported
separator - to use between coordinates, if null a space character will be used.
Throws:
XMLStreamException - if the writing fails.

exportPositionType

public static void exportPositionType(XMLStreamWriter writer,
                                      Point pos)
                               throws XMLStreamException
Exports a Point as a ows:PositionType.

Parameters:
writer -
pos - point to be exported
Throws:
XMLStreamException


Copyright © 2011. All Rights Reserved.