org.deegree.services.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.ows.capabilities.OWSCapabilitiesXMLAdapter
Direct Known Subclasses:
Capabilities100XMLAdapter, CapabilitiesXMLAdapter, CapabilitiesXMLWriter, EbrimGetCapabilitiesHandler, GetCapabilitiesHandler

public class OWSCapabilitiesXMLAdapter
extends 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(XMLStreamWriter writer, DCP dcp, String owsNS)
          Exports a DCPType as an OWS DCP element.
static void exportDCP(XMLStreamWriter writer, String get, String post, String owsNS)
           
static void exportDomainType100(XMLStreamWriter writer, Domain domain)
           
static void exportDomainType110(XMLStreamWriter writer, Domain domain)
           
static void exportKeyWords110(XMLStreamWriter writer, List<KeywordsType> keywords)
          Exports the given (commons) keywords to ows 1.1.0 format
static void exportOperationsMetadata100(XMLStreamWriter writer, OperationsMetadata operationsMd)
          Exports a list of OWSOperations as an OWS 1.0.0 OperationsMetadata element.
static void exportOperationsMetadata110(XMLStreamWriter writer, OperationsMetadata operationsMd)
          Exports an OperationsMetadata instance as an OWS 1.1.0 OperationsMetadata element.
static void exportServiceIdentification100(XMLStreamWriter writer, ServiceIdentificationType serviceID, String serviceName, List<Version> serviceVersions)
          Exports the given ServiceIdentificationType as an OWS 1.0.0 ServiceIdentification element.
static void exportServiceIdentification110(XMLStreamWriter writer, ServiceIdentificationType serviceID, String serviceName, List<Version> serviceVersions)
          Exports the given ServiceIdentificationType as an OWS 1.1.0 ServiceIdentification element.
static void exportServiceProvider100(XMLStreamWriter writer, ServiceProviderType serviceProvider)
          Exports a ServiceProviderType as an OWS 1.0.0 ServiceProvider element.
static void exportServiceProvider110(XMLStreamWriter writer, ServiceProviderType serviceProvider)
          Exports a ServiceProviderType as an OWS 1.1.0 ServiceProvider element.
static void exportSimpleStrings(XMLStreamWriter writer, List<String> strings, String owsNS, 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, 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
 

Constructor Detail

OWSCapabilitiesXMLAdapter

public OWSCapabilitiesXMLAdapter()
Method Detail

exportServiceIdentification100

public static void exportServiceIdentification100(XMLStreamWriter writer,
                                                  ServiceIdentificationType serviceID,
                                                  String serviceName,
                                                  List<Version> serviceVersions)
                                           throws 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:
XMLStreamException - if writing the XML fails

exportServiceIdentification110

public static void exportServiceIdentification110(XMLStreamWriter writer,
                                                  ServiceIdentificationType serviceID,
                                                  String serviceName,
                                                  List<Version> serviceVersions)
                                           throws 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:
XMLStreamException - if writing the XML fails

exportKeyWords110

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

Parameters:
writer -
keywords -
Throws:
XMLStreamException

exportServiceProvider100

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

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

exportServiceProvider110

public static void exportServiceProvider110(XMLStreamWriter writer,
                                            ServiceProviderType serviceProvider)
                                     throws 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:
XMLStreamException

exportOperationsMetadata100

public static void exportOperationsMetadata100(XMLStreamWriter writer,
                                               OperationsMetadata operationsMd)
                                        throws 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
operationsMd - operations metadata, must not be null
extendedCapabilities - extended capabilities, can be null
Throws:
XMLStreamException

exportOperationsMetadata110

public static void exportOperationsMetadata110(XMLStreamWriter writer,
                                               OperationsMetadata operationsMd)
                                        throws XMLStreamException
Exports an OperationsMetadata instance as an OWS 1.1.0 OperationsMetadata element.

Parameters:
writer - writer to append the xml, must not be null
operationsMd - operations metadata, must not be null
Throws:
XMLStreamException

exportDCP

public static void exportDCP(XMLStreamWriter writer,
                             DCP dcp,
                             String owsNS)
                      throws 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:
XMLStreamException

exportDCP

public static void exportDCP(XMLStreamWriter writer,
                             String get,
                             String post,
                             String owsNS)
                      throws XMLStreamException
Throws:
XMLStreamException

exportSimpleStrings

public static void exportSimpleStrings(XMLStreamWriter writer,
                                       List<String> strings,
                                       String owsNS,
                                       String elementName)
                                throws 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:
XMLStreamException

exportDomainType100

public static void exportDomainType100(XMLStreamWriter writer,
                                       Domain domain)
                                throws XMLStreamException
Throws:
XMLStreamException

exportDomainType110

public static void exportDomainType110(XMLStreamWriter writer,
                                       Domain domain)
                                throws XMLStreamException
Throws:
XMLStreamException


Copyright © 2011. All Rights Reserved.