org.deegree.protocol.ows.capabilities
Class OWSCommon110CapabilitiesAdapter

java.lang.Object
  extended by org.deegree.commons.xml.XMLAdapter
      extended by org.deegree.protocol.ows.capabilities.OWSCommon110CapabilitiesAdapter
All Implemented Interfaces:
OWSCapabilitiesAdapter
Direct Known Subclasses:
WFS200CapabilitiesAdapter, WPS100CapabilitiesAdapter

public class OWSCommon110CapabilitiesAdapter
extends XMLAdapter

OWSCapabilitiesAdapter for capabilities documents that comply to the OWS Common 1.1.0 specification.

Known OWS Common 1.1.0-based specifications:

Version:
$Revision: 31896 $, $Date: 2011-09-15 15:12:23 +0200 (Thu, 15 Sep 2011) $
Author:
Markus Schneider, Andrei Ionita, last edited by: $Author: mschneider $

Field Summary
protected  NamespaceBindings nsContext
           
protected static String XML1998NS
           
 
Fields inherited from class org.deegree.commons.xml.XMLAdapter
DEFAULT_URL, rootElement, XLN_NS
 
Constructor Summary
OWSCommon110CapabilitiesAdapter()
          Creates a new OWSCommon110CapabilitiesAdapter instance.
 
Method Summary
 URL getOperationURL(String operation, boolean post)
          Returns the URL for the specified operation and HTTP method.
protected  Address parseAddress(org.apache.axiom.om.OMElement addressEl)
           
protected  CodeType parseCodeSpace(org.apache.axiom.om.OMElement omelement)
           
protected  ContactInfo parseContactInfo(org.apache.axiom.om.OMElement contactInfoEl)
           
protected  DCP parseDCP(org.apache.axiom.om.OMElement dcpEl)
           
protected  Description parseDescription(org.apache.axiom.om.OMElement serviceIdEl)
           
protected  Domain parseDomain(org.apache.axiom.om.OMElement domainEl)
           
 List<String> parseLanguages()
          Extracts the supported languages from the underlying XML document.
 OWSCapabilities parseMetadata()
           
 OperationsMetadata parseOperationsMetadata()
          Extracts the OperationsMetadata from the underlying XML document.
protected  Telephone parsePhone(org.apache.axiom.om.OMElement phoneEl)
           
protected  PossibleValues parsePossibleValues(org.apache.axiom.om.OMElement possibleValuesEl)
           
 Range parseRange(org.apache.axiom.om.OMElement rangeEl)
          Parses the given ows:Range element.
protected  ResponsibleParty parseServiceContact(org.apache.axiom.om.OMElement serviceContactEl)
           
 ServiceIdentification parseServiceIdentification()
          Extracts the ServiceIdentification from the underlying XML document.
 ServiceProvider parseServiceProvider()
          Extracts the ServiceProvider from the underlying XML document.
 
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

XML1998NS

protected static final String XML1998NS
See Also:
Constant Field Values

nsContext

protected final NamespaceBindings nsContext
Constructor Detail

OWSCommon110CapabilitiesAdapter

public OWSCommon110CapabilitiesAdapter()
Creates a new OWSCommon110CapabilitiesAdapter instance.

Method Detail

parseOperationsMetadata

public OperationsMetadata parseOperationsMetadata()
Description copied from interface: OWSCapabilitiesAdapter
Extracts the OperationsMetadata from the underlying XML document.

Returns:
operations metadata, can be null (if document does not contain such a section)

getOperationURL

public URL getOperationURL(String operation,
                           boolean post)
                    throws MalformedURLException
Returns the URL for the specified operation and HTTP method.

Parameters:
operation - name of the operation, must not be null
post - if set to true, the URL for POST requests will be returned, otherwise the URL for GET requests will be returned
Returns:
the operation URL (trailing question marks are stripped), can be null (if the operation/method is not announced by the service)
Throws:
MalformedURLException - if the announced URL is malformed

parseDomain

protected Domain parseDomain(org.apache.axiom.om.OMElement domainEl)
Parameters:
domainEl - context OMElement
Returns:
an Operation instance, never null

parseMetadata

public OWSCapabilities parseMetadata()
Returns:
a OWSCapabilities instance, never null

parseServiceIdentification

public ServiceIdentification parseServiceIdentification()
Description copied from interface: OWSCapabilitiesAdapter
Extracts the ServiceIdentification from the underlying XML document.

Specified by:
parseServiceIdentification in interface OWSCapabilitiesAdapter
Returns:
service identification, can be null (if document does not contain such a section)

parseDescription

protected Description parseDescription(org.apache.axiom.om.OMElement serviceIdEl)
Parameters:
serviceIdEl - context OMElement
Returns:
an Description instance, never null

parseServiceProvider

public ServiceProvider parseServiceProvider()
Description copied from interface: OWSCapabilitiesAdapter
Extracts the ServiceProvider from the underlying XML document.

Specified by:
parseServiceProvider in interface OWSCapabilitiesAdapter
Returns:
service provider, can be null (if document does not contain such a section)

parseServiceContact

protected ResponsibleParty parseServiceContact(org.apache.axiom.om.OMElement serviceContactEl)
Parameters:
serviceContactEl - context OMElement
Returns:
an ResponsibleParty instance, never null

parseContactInfo

protected ContactInfo parseContactInfo(org.apache.axiom.om.OMElement contactInfoEl)
Parameters:
contactInfoEl - context OMElement
Returns:
an ContactInfo instance, never null

parsePhone

protected Telephone parsePhone(org.apache.axiom.om.OMElement phoneEl)
Parameters:
phoneEl - context OMElement
Returns:
an Telephone instance, never null

parseAddress

protected Address parseAddress(org.apache.axiom.om.OMElement addressEl)
Parameters:
addressEl - context OMElement
Returns:
an Address instance, never null

parseCodeSpace

protected CodeType parseCodeSpace(org.apache.axiom.om.OMElement omelement)
Parameters:
omelement - context OMElement
Returns:
an CodeType instance, never null

parseLanguages

public List<String> parseLanguages()
Description copied from interface: OWSCapabilitiesAdapter
Extracts the supported languages from the underlying XML document.

Specified by:
parseLanguages in interface OWSCapabilitiesAdapter
Returns:
supported languages, can be null (if document does not contain such a section)

parsePossibleValues

protected PossibleValues parsePossibleValues(org.apache.axiom.om.OMElement possibleValuesEl)

parseRange

public Range parseRange(org.apache.axiom.om.OMElement rangeEl)
Parses the given ows:Range element.

Verified for the following OWS Commons versions:

Parameters:
rangeEl - ows:Range element, must not be null
Returns:
corresponding object representation, never null

parseDCP

protected DCP parseDCP(org.apache.axiom.om.OMElement dcpEl)
Parameters:
dcpEl - context OMElement
Returns:
an DCP instance, never null


Copyright © 2011. All Rights Reserved.