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

org.deegree.owscommon_1_1_0
Class CommonsDocument

java.lang.Object
  extended by org.deegree.framework.xml.XMLFragment
      extended by org.deegree.owscommon_1_1_0.CommonsDocument
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ManifestDocument, OWSCommonCapabilitiesDocument

public class CommonsDocument
extends XMLFragment

CommonsDocument supplies helper methods for all common ows (version 1.1.0) xml elements.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $
See Also:
Serialized Form

Field Summary
protected static java.lang.String PRE_OWS
          The ows 1.1 prefix with a ':' (colon) suffix.
 
Fields inherited from class org.deegree.framework.xml.XMLFragment
DEFAULT_URL, nsContext, XLNNS
 
Constructor Summary
CommonsDocument()
           
 
Method Summary
protected  BasicIdentification parseBasicIdentificationType(org.w3c.dom.Element basicIdentificationType)
           
protected  ContactInfo parseContactInfo(org.w3c.dom.Element contactInfo)
           
protected  Pair<java.lang.String,java.lang.String> parseDomainMetadataType(org.w3c.dom.Element domainMDElement)
          Parses the domain metadata type and it's reference attribute and puts them in a pair, like name, reference, the latter may be null
protected  java.util.List<Pair<java.lang.String,java.lang.String>> parseDomainMetadataTypes(java.util.List<org.w3c.dom.Element> domainMDElements)
          Parses the domain metadata type and it's reference attribute and puts them in a pair, like name, reference, which may be null
protected  DomainType parseDomainType(org.w3c.dom.Element domainType)
           
protected  Pair<java.lang.String,java.util.List<DomainType>> parseHTTPChild(org.w3c.dom.Element getOrPost)
          parses the post or get information beneath a http element.
protected  Pair<java.lang.String,java.lang.String> parseIdentifier(org.w3c.dom.Element root)
           
protected  Keywords parseKeywords(org.w3c.dom.Element keywords)
          Return the ows_1_1_0 keywords..
protected  Metadata parseMetadata(org.w3c.dom.Element metadataElement)
           
protected  java.util.List<Metadata> parseMetadatas(java.util.List<org.w3c.dom.Element> metadataElements)
           
protected  java.util.List<Operation> parseOperations(java.util.List<org.w3c.dom.Element> operationElements)
           
protected  ServiceContact parseServiceContact(org.w3c.dom.Element serviceContact)
           
 
Methods inherited from class org.deegree.framework.xml.XMLFragment
getAsPrettyString, getAsString, getAttachedSchemas, getQualifiedName, getRootElement, getSystemId, hasSchema, load, load, load, parseQualifiedName, parseSimpleLink, prettyPrint, prettyPrint, resolve, setRootElement, setSystemId, setSystemId, toString, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRE_OWS

protected static java.lang.String PRE_OWS
The ows 1.1 prefix with a ':' (colon) suffix.

Constructor Detail

CommonsDocument

public CommonsDocument()
Method Detail

parseOperations

protected java.util.List<Operation> parseOperations(java.util.List<org.w3c.dom.Element> operationElements)
                                             throws XMLParsingException
Parameters:
operationElements - to be parsed.
Returns:
a list of operations which may be empty but never null
Throws:
XMLParsingException

parseHTTPChild

protected Pair<java.lang.String,java.util.List<DomainType>> parseHTTPChild(org.w3c.dom.Element getOrPost)
                                                                    throws XMLParsingException
parses the post or get information beneath a http element.

Parameters:
getOrPost -
Returns:
the pair containing the xlink, list<contraint>. or null if attribute and elements were not found.
Throws:
XMLParsingException

parseDomainType

protected DomainType parseDomainType(org.w3c.dom.Element domainType)
                              throws XMLParsingException
Parameters:
domainType - to parse
Returns:
a bean representation of the domainType or null if given element is null.
Throws:
XMLParsingException

parseMetadatas

protected java.util.List<Metadata> parseMetadatas(java.util.List<org.w3c.dom.Element> metadataElements)
Parameters:
metadataElements - to be parsed.
Returns:
a List of pairs of optional <xlink:href, about> attributes, or an empty list null if no elements were found.

parseMetadata

protected Metadata parseMetadata(org.w3c.dom.Element metadataElement)
                          throws XMLParsingException
Parameters:
metadataElement - to be parsed.
Returns:
the pair of optional <xlink:href, about> attributes.
Throws:
XMLParsingException - if the abstract metadatas could not be parsed.

parseDomainMetadataTypes

protected java.util.List<Pair<java.lang.String,java.lang.String>> parseDomainMetadataTypes(java.util.List<org.w3c.dom.Element> domainMDElements)
                                                                                    throws XMLParsingException
Parses the domain metadata type and it's reference attribute and puts them in a pair, like name, reference, which may be null

Parameters:
domainMDElements -
Returns:
a list of pairs containing the values or null if given list is null or it does not contain any domain elements value.
Throws:
XMLParsingException

parseDomainMetadataType

protected Pair<java.lang.String,java.lang.String> parseDomainMetadataType(org.w3c.dom.Element domainMDElement)
                                                                   throws XMLParsingException
Parses the domain metadata type and it's reference attribute and puts them in a pair, like name, reference, the latter may be null

Parameters:
domainMDElement - to parse
Returns:
a pair containing the values or null if given element is null or it does not contain a value.
Throws:
XMLParsingException

parseServiceContact

protected ServiceContact parseServiceContact(org.w3c.dom.Element serviceContact)
                                      throws XMLParsingException
Parameters:
serviceContact -
Returns:
the service contact bean
Throws:
XMLParsingException

parseContactInfo

protected ContactInfo parseContactInfo(org.w3c.dom.Element contactInfo)
                                throws XMLParsingException
Parameters:
contactInfo -
Returns:
the contactinfo or null if all underlying elements are empty.
Throws:
XMLParsingException

parseBasicIdentificationType

protected BasicIdentification parseBasicIdentificationType(org.w3c.dom.Element basicIdentificationType)
                                                    throws XMLParsingException
Parameters:
basicIdentificationType - to be parsed.
Returns:
the BasicIdentification bean representation or null if the given element is null.
Throws:
XMLParsingException - if the given param can not be parsed.

parseIdentifier

protected Pair<java.lang.String,java.lang.String> parseIdentifier(org.w3c.dom.Element root)
                                                           throws XMLParsingException
Parameters:
root - element to be parsed for the identifier.
Returns:
a <value, codeSpace> pair or null if the given element is null or if the identifier has no value and codeSpace.
Throws:
XMLParsingException

parseKeywords

protected Keywords parseKeywords(org.w3c.dom.Element keywords)
                          throws XMLParsingException
Return the ows_1_1_0 keywords..

Parameters:
keywords - element to parse from
Returns:
a ,Type> pair.
Throws:
XMLParsingException

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