org.deegree.services.controller.ows.capabilities
Class OWSCapabilitiesXMLAdapter

java.lang.Object
  extended by org.deegree.commons.xml.XMLAdapter
      extended by org.deegree.protocol.ows.OWSCommonXMLAdapter
          extended by org.deegree.services.controller.ows.capabilities.OWSCapabilitiesXMLAdapter
Direct Known Subclasses:
Capabilities100XMLAdapter, CapabilitiesXMLAdapter, CapabilitiesXMLWriter, GetCapabilitiesHandler

public class OWSCapabilitiesXMLAdapter
extends org.deegree.protocol.ows.OWSCommonXMLAdapter

Provides methods for exporting

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Field Summary
 
Fields inherited from class org.deegree.protocol.ows.OWSCommonXMLAdapter
OWS_NS, OWS_PREFIX, OWS110_NS, OWS110_PREFIX, XML_NS, XML_PREFIX
 
Fields inherited from class org.deegree.commons.xml.XMLAdapter
DEFAULT_URL, nsContext, rootElement, XLN_NS
 
Constructor Summary
OWSCapabilitiesXMLAdapter()
           
 
Method Summary
static void exportDCP(javax.xml.stream.XMLStreamWriter writer, DCPType dcp, java.lang.String owsNS)
          Exports a DCPType as an OWS DCP element.
static void exportDCP100(javax.xml.stream.XMLStreamWriter writer, DCPType dcp)
          Exports a DCPType as an OWS 1.0.0 DCP element.
static void exportDCP110(javax.xml.stream.XMLStreamWriter writer, DCPType dcp)
          Exports a DCPType as an OWS 1.1.0 DCP element.
static void exportKeyWords110(javax.xml.stream.XMLStreamWriter writer, java.util.List<KeywordsType> keywords)
          Exports the given (commons) keywords to ows 1.1.0 format
static void exportOperationsMetadata100(javax.xml.stream.XMLStreamWriter writer, java.util.List<OWSOperation> operations)
          Exports a list of OWSOperations as an OWS 1.0.0 OperationsMetadata element.
static void exportOperationsMetadata110(javax.xml.stream.XMLStreamWriter writer, java.util.List<OWSOperation> operations)
          Exports a list of OWSOperations as an OWS 1.1.0 OperationsMetadata element.
static void exportServiceIdentification100(javax.xml.stream.XMLStreamWriter writer, ServiceIdentificationType serviceID, java.lang.String serviceName, java.util.List<org.deegree.commons.tom.ows.Version> serviceVersions)
          Exports the given ServiceIdentificationType as an OWS 1.0.0 ServiceIdentification element.
static void exportServiceIdentification110(javax.xml.stream.XMLStreamWriter writer, ServiceIdentificationType serviceID, java.lang.String serviceName, java.util.List<org.deegree.commons.tom.ows.Version> serviceVersions)
          Exports the given ServiceIdentificationType as an OWS 1.1.0 ServiceIdentification element.
static void exportServiceProvider100(javax.xml.stream.XMLStreamWriter writer, ServiceProviderType serviceProvider)
          Exports a ServiceProviderType as an OWS 1.0.0 ServiceProvider element.
static void exportServiceProvider110(javax.xml.stream.XMLStreamWriter writer, ServiceProviderType serviceProvider)
          Exports a ServiceProviderType as an OWS 1.1.0 ServiceProvider element.
static void exportSimpleStrings(javax.xml.stream.XMLStreamWriter writer, java.util.List<java.lang.String> strings, java.lang.String owsNS, java.lang.String elementName)
          Write a list of strings to the given namespace and with the given element name.
 
Methods inherited from class org.deegree.protocol.ows.OWSCommonXMLAdapter
exportBoundingBoxType, exportCoordinateList, exportPositionType, parseBoundingBoxType
 
Methods inherited from class org.deegree.commons.xml.XMLAdapter
evaluateXPath, getElement, getElements, getNamespaceContext, getNode, 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, 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
 

Constructor Detail

OWSCapabilitiesXMLAdapter

public OWSCapabilitiesXMLAdapter()
Method Detail

exportServiceIdentification100

public static void exportServiceIdentification100(javax.xml.stream.XMLStreamWriter writer,
                                                  ServiceIdentificationType serviceID,
                                                  java.lang.String serviceName,
                                                  java.util.List<org.deegree.commons.tom.ows.Version> serviceVersions)
                                           throws javax.xml.stream.XMLStreamException
Exports the given ServiceIdentificationType as an OWS 1.0.0 ServiceIdentification element.

Parameters:
writer - used to append the XML, must not be null
serviceID - configuration object that provides most of the required metadata, must not be null
serviceName - OGC-style abbreviation of the service, e.g. WFS, must not be null
serviceVersions - supported protocol versions, must not be null and contain at least one entry
Throws:
javax.xml.stream.XMLStreamException - if writing the XML fails

exportServiceIdentification110

public static void exportServiceIdentification110(javax.xml.stream.XMLStreamWriter writer,
                                                  ServiceIdentificationType serviceID,
                                                  java.lang.String serviceName,
                                                  java.util.List<org.deegree.commons.tom.ows.Version> serviceVersions)
                                           throws javax.xml.stream.XMLStreamException
Exports the given ServiceIdentificationType as an OWS 1.1.0 ServiceIdentification element.

Parameters:
writer - used to append the XML, must not be null
serviceID - configuration object that provides most of the required metadata, must not be null
serviceName - OGC-style abbreviation of the service, e.g. WFS, must not be null
serviceVersions - supported protocol versions, must not be null and contain at least one entry
Throws:
javax.xml.stream.XMLStreamException - if writing the XML fails

exportKeyWords110

public static void exportKeyWords110(javax.xml.stream.XMLStreamWriter writer,
                                     java.util.List<KeywordsType> keywords)
                              throws javax.xml.stream.XMLStreamException
Exports the given (commons) keywords to ows 1.1.0 format

Parameters:
writer -
keywords -
Throws:
javax.xml.stream.XMLStreamException

exportServiceProvider100

public static void exportServiceProvider100(javax.xml.stream.XMLStreamWriter writer,
                                            ServiceProviderType serviceProvider)
                                     throws javax.xml.stream.XMLStreamException
Exports a ServiceProviderType as an OWS 1.0.0 ServiceProvider element.

Parameters:
writer - writer to append the xml
serviceProvider - ServiceProviderType to export
Throws:
javax.xml.stream.XMLStreamException

exportServiceProvider110

public static void exportServiceProvider110(javax.xml.stream.XMLStreamWriter writer,
                                            ServiceProviderType serviceProvider)
                                     throws javax.xml.stream.XMLStreamException
Exports a ServiceProviderType as an OWS 1.1.0 ServiceProvider element. Validated against ows schema by rb at 23.02.2009.

Parameters:
writer - writer to append the xml
serviceProvider - ServiceProviderType to export
Throws:
javax.xml.stream.XMLStreamException

exportOperationsMetadata100

public static void exportOperationsMetadata100(javax.xml.stream.XMLStreamWriter writer,
                                               java.util.List<OWSOperation> operations)
                                        throws javax.xml.stream.XMLStreamException
Exports a list of OWSOperations as an OWS 1.0.0 OperationsMetadata element.

Parameters:
writer - writer to append the xml, must not be null
operations - operations, e.g. "GetCapabilities", must not be null
Throws:
javax.xml.stream.XMLStreamException

exportOperationsMetadata110

public static void exportOperationsMetadata110(javax.xml.stream.XMLStreamWriter writer,
                                               java.util.List<OWSOperation> operations)
                                        throws javax.xml.stream.XMLStreamException
Exports a list of OWSOperations as an OWS 1.1.0 OperationsMetadata element.

Parameters:
writer - writer to append the xml, must not be null
operations - operations, e.g. "GetCapabilities", must not be null
Throws:
javax.xml.stream.XMLStreamException

exportDCP100

public static void exportDCP100(javax.xml.stream.XMLStreamWriter writer,
                                DCPType dcp)
                         throws javax.xml.stream.XMLStreamException
Exports a DCPType as an OWS 1.0.0 DCP element.

Parameters:
writer - writer to append the xml
dcp - DCPType to export
Throws:
javax.xml.stream.XMLStreamException

exportDCP110

public static void exportDCP110(javax.xml.stream.XMLStreamWriter writer,
                                DCPType dcp)
                         throws javax.xml.stream.XMLStreamException
Exports a DCPType as an OWS 1.1.0 DCP element.

Parameters:
writer - writer to append the xml
dcp - DCPType to export
Throws:
javax.xml.stream.XMLStreamException

exportDCP

public static void exportDCP(javax.xml.stream.XMLStreamWriter writer,
                             DCPType dcp,
                             java.lang.String owsNS)
                      throws javax.xml.stream.XMLStreamException
Exports a DCPType as an OWS DCP element.

The namespace of the produced elements is given as a parameter so it is usable for different OWS versions. It has been checked that this method produces the correct output for the following OWS versions/namespaces:

OWS version OWS namespace
1.0.0
http://www.opengis.net/ows
1.1.0
http://www.opengis.net/ows/1.1

Parameters:
writer - writer to append the xml
dcp - DCPType to export
owsNS - namespace for the generated elements
Throws:
javax.xml.stream.XMLStreamException

exportSimpleStrings

public static void exportSimpleStrings(javax.xml.stream.XMLStreamWriter writer,
                                       java.util.List<java.lang.String> strings,
                                       java.lang.String owsNS,
                                       java.lang.String elementName)
                                throws javax.xml.stream.XMLStreamException
Write a list of strings to the given namespace and with the given element name.

Parameters:
writer -
strings - to export
owsNS - the name space to use
elementName - to use
Throws:
javax.xml.stream.XMLStreamException


Copyright © 2011. All Rights Reserved.