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

org.deegree.portal.context
Class XMLFactory

java.lang.Object
  extended by org.deegree.portal.context.XMLFactory

public class XMLFactory
extends java.lang.Object

This is a factory class to export a ViewContext and a ViewContextCollection as an xml org.w3c.dom.Document.

Version:
$Revision: 23790 $, $Revision: 23790 $, $Date: 2010-04-23 14:22:04 +0200 (Fr, 23 Apr 2010) $
Author:
Andreas Poth, last edited by: $Author: jmays $

Field Summary
protected static javax.xml.parsers.DocumentBuilder builder
           
protected static org.w3c.dom.Document document
           
protected static javax.xml.parsers.DocumentBuilderFactory factory
           
 
Method Summary
protected static void appendAbstract(org.w3c.dom.Node toNode, java.lang.String abstr)
          Appends the XML representation of an Abstract to a Node using the namespace.
protected static void appendAuthentificationSettings(org.w3c.dom.Node toNode, AuthentificationSettings settings)
           
protected static void appendBoundingBox(org.w3c.dom.Node toNode, Point[] points)
          Appends the XML representation of a GM_Point[] to a Node using the namespace.
protected static void appendButtons(org.w3c.dom.Node toNode, java.lang.String buttons)
          Appends the XML representation of a list of a String to a Node using the namespace. // TODO
protected static void appendCommonJS(org.w3c.dom.Node toNode, java.lang.String[] commonJS)
          Appends the XML representation of a list of a String[] to a Node using the namespace.
protected static void appendContactAddress(org.w3c.dom.Node toNode, ContactInfo ci)
          Appends the XML representation of a ContactAddress to a Node using the namespace.
protected static void appendContactInformation(org.w3c.dom.Node toNode, CitedResponsibleParty respParty)
          Appends the XML representation of a ContactInformation to a Node using the namespace.
protected static void appendContactPersonPrimary(org.w3c.dom.Node toNode, CitedResponsibleParty respParty)
          Appends the XML representation of a ContactPersonPrimary to a Node using the namespace.
protected static void appendContextReference(org.w3c.dom.Node toNode, ViewContextReference vcr)
          Appends the XML representation of a list of a ViewContextReference to a Node using the namespace.
protected static void appendDataService(org.w3c.dom.Node toNode, DataService dataServ)
          Appends the XML representation of a list of a DataService to a Node using the namespace.
protected static void appendDescriptionURL(org.w3c.dom.Node toNode, BaseURL bURL)
          Appends the XML representation of a BaseURL, the DescriptionURL, to a Node using the namespace.
protected static void appendDirectoryAccess(org.w3c.dom.Node toNode, DirectoryAccess dirAcc, java.lang.String dirName)
          Appends the XML representation of a list of a DirectoryAccess to a Node using the namespace.
protected static void appendFormatList(org.w3c.dom.Node toNode, FormatList formatList)
          Appends the XML representation of a list of a FormatList to a Node using the namespace.
protected static void appendFormats(org.w3c.dom.Node toNode, Format[] formats)
          Appends the XML representation of a list of a Format[] to a Node using the namespace.
protected static void appendFrontend(org.w3c.dom.Node toNode, Frontend fEnd)
          Appends the XML representation of a list of a Frontend to a Node using the namespace.
protected static void appendGeneral(org.w3c.dom.Node toNode, General gen)
          Appends the XML representation of a General to a Node using the namespace.
protected static void appendGeneralExtension(org.w3c.dom.Node toNode, GeneralExtension genExt)
          Appends the XML representation of a list of a GeneralExtension to a Node using the namespace.
protected static void appendGUIArea(org.w3c.dom.Node toNode, GUIArea guiArea, java.lang.String name)
          Appends the XML representation of a list of a GUIArea to a Node using the namespace.
protected static void appendIOSettings(org.w3c.dom.Node toNode, IOSettings ioSetts)
          Appends the XML representation of a list of a IOSettings to a Node using the namespace.
protected static void appendKeywords(org.w3c.dom.Node toNode, java.lang.String[] keywords)
          Appends the XML representation of a keyword list as a String[] to a Node using the namespace.
protected static void appendLayer(org.w3c.dom.Node toNode, Layer layer)
          Appends the XML representation of a Layer to a Node using the namespace.
protected static void appendLayerExtension(org.w3c.dom.Node toNode, LayerExtension layExt)
          Appends the XML representation of a list of a LayerExtension to a Node using the namespace.
protected static void appendLayerList(org.w3c.dom.Node toNode, LayerList lList)
          Appends the XML representation of a LayerList to a Node using the namespace.
protected static void appendLayerTree(org.w3c.dom.Element e, Node layerTreeRoot)
          Appends the XML representation of a LayerTree.
protected static void appendLogoURL(org.w3c.dom.Node toNode, ImageURL logoURL)
          Appends the XML representation of an ImageURL to a Node using the namespace.
protected static void appendMapOperationFactors(org.w3c.dom.Node toNode, MapOperationFactor[] mapOpFac, java.lang.String opName)
          Appends the XML representation of a list of a MapOperationFactor to a Node using the namespace.
protected static void appendMapParameter(org.w3c.dom.Node toNode, MapParameter mapPar)
          Appends the XML representation of a list of a MapParameter to a Node using the namespace.
protected static void appendModule(org.w3c.dom.Node toNode, Module mod)
          Appends the XML representation of a list of a GUIArea to a Node using the namespace.
protected static void appendModuleConfiguration(org.w3c.dom.Node toNode, ModuleConfiguration modConf)
          Appends the XML representation of a list of a ModuleConfiguration to a Node using the namespace.
protected static void appendModuleJSList(org.w3c.dom.Node toNode, java.lang.String[] modJSList)
          Appends the XML representation of a list of a ParameterList to a Node using the namespace.
protected static void appendOnlineResource(org.w3c.dom.Node toNode, java.net.URL onlineRes)
          Appends the XML representation of a URL to a Node as a <OnlineResource> using the namespace.
protected static void appendParameterList(org.w3c.dom.Node toNode, ParameterList parList)
          Appends the XML representation of a list of a ParameterList to a Node using the namespace.
protected static void appendServer(org.w3c.dom.Node toNode, Server server)
          Appends the XML representation of a Server to a Node using the namespace.
protected static void appendSrs(org.w3c.dom.Node toNode, java.lang.String[] srsList)
          Appends the XML representation of a list of SRSs as a String[] to a Node using the namespace.
protected static void appendStyleList(org.w3c.dom.Node toNode, StyleList styleList)
          Appends the XML representation of a list of a StyleList to a Node using the namespace.
protected static void appendTitle(org.w3c.dom.Node toNode, java.lang.String title)
          Appends the XML representation of a Title to a Node using the namespace.
protected static void appendViewContext(org.w3c.dom.Node toNode, ViewContext viewContxt)
          Appends the XML representation of a ViewContext to a Node using the namespace.
protected static void appendViewContextCollection(org.w3c.dom.Node toNode, ViewContextCollection vcc)
          Appends the XML representation of a list of a ViewContextCollection to a Node using the namespace.
protected static void appendWindow(org.w3c.dom.Node toNode, java.awt.Rectangle r)
          Appends the XML representation of a Rectangle to a Node using the namespace.
protected static org.w3c.dom.Document createDocument()
          Creates a new org.w3c.dom.Document using the internal document builder.
static XMLFragment export(ViewContext viewContext)
          Creates a new org.w3c.dom.Document describing a ViewContext.
static org.w3c.dom.Document export(ViewContextCollection viewContCollec)
          Creates a new org.w3c.dom.Document describing a ViewContextCollection.
protected static void initDocBuilder()
          Convenience method for creating a common document builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static javax.xml.parsers.DocumentBuilderFactory factory

builder

protected static javax.xml.parsers.DocumentBuilder builder

document

protected static org.w3c.dom.Document document
Method Detail

initDocBuilder

protected static void initDocBuilder()
                              throws javax.xml.parsers.ParserConfigurationException
Convenience method for creating a common document builder. Implementation copied from XmlDocument (by tf and ap).

Throws:
javax.xml.parsers.ParserConfigurationException

createDocument

protected static org.w3c.dom.Document createDocument()
                                              throws javax.xml.parsers.ParserConfigurationException
Creates a new org.w3c.dom.Document using the internal document builder.

Returns:
new Document instance
Throws:
javax.xml.parsers.ParserConfigurationException

export

public static XMLFragment export(ViewContext viewContext)
                          throws javax.xml.parsers.ParserConfigurationException
Creates a new org.w3c.dom.Document describing a ViewContext.

Parameters:
viewContext - the ViewContext to be exported
Returns:
the xml dom-representation of the given viewContext.
Throws:
javax.xml.parsers.ParserConfigurationException - if an XML parser couldn't be found

export

public static org.w3c.dom.Document export(ViewContextCollection viewContCollec)
                                   throws javax.xml.parsers.ParserConfigurationException
Creates a new org.w3c.dom.Document describing a ViewContextCollection.

Parameters:
viewContCollec - the ViewContextCollection to be exported
Returns:
the xml dom-representation of the given viewContextCollection.
Throws:
javax.xml.parsers.ParserConfigurationException - if an XML parser couldn't be found

appendViewContext

protected static void appendViewContext(org.w3c.dom.Node toNode,
                                        ViewContext viewContxt)
                                 throws org.w3c.dom.DOMException,
                                        java.net.URISyntaxException
Appends the XML representation of a ViewContext to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
viewContxt - the ViewContext to be appended as new element
Throws:
java.net.URISyntaxException
org.w3c.dom.DOMException

appendGeneral

protected static void appendGeneral(org.w3c.dom.Node toNode,
                                    General gen)
                             throws org.w3c.dom.DOMException,
                                    java.net.URISyntaxException
Appends the XML representation of a General to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
gen - the General to be appended as new element contains illegal characters
Throws:
java.net.URISyntaxException
org.w3c.dom.DOMException

appendWindow

protected static void appendWindow(org.w3c.dom.Node toNode,
                                   java.awt.Rectangle r)
Appends the XML representation of a Rectangle to a Node using the namespace.

Note that the XML representation of a Rectangle is given by a <Window> element.

Parameters:
toNode - the Node to append the new element to
r - the Rectangle to be appended as new element contains illegal characters

appendBoundingBox

protected static void appendBoundingBox(org.w3c.dom.Node toNode,
                                        Point[] points)
Appends the XML representation of a GM_Point[] to a Node using the namespace.

Note that the XML representation of a GM_Point[] is given by a <BoundingBox> element.

Parameters:
toNode - the Node to append the new element to
points - the GM_Point[] to be appended as new element contains illegal characters

appendTitle

protected static void appendTitle(org.w3c.dom.Node toNode,
                                  java.lang.String title)
Appends the XML representation of a Title to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
title - the String to be appended as new element contains illegal characters

appendAbstract

protected static void appendAbstract(org.w3c.dom.Node toNode,
                                     java.lang.String abstr)
Appends the XML representation of an Abstract to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
abstr - the String to be appended as new element

appendLogoURL

protected static void appendLogoURL(org.w3c.dom.Node toNode,
                                    ImageURL logoURL)
Appends the XML representation of an ImageURL to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
logoURL - the ImageURL to be appended as new element contains illegal characters

appendKeywords

protected static void appendKeywords(org.w3c.dom.Node toNode,
                                     java.lang.String[] keywords)
Appends the XML representation of a keyword list as a String[] to a Node using the namespace.

Note that the keywords are appended to a <KeywordList> element.

Parameters:
toNode - the Node to append the new element to
keywords - the ImageURL to be appended as new element contains illegal characters

appendDescriptionURL

protected static void appendDescriptionURL(org.w3c.dom.Node toNode,
                                           BaseURL bURL)
Appends the XML representation of a BaseURL, the DescriptionURL, to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
bURL - the BaseURL to be appended as new element contains illegal characters

appendOnlineResource

protected static void appendOnlineResource(org.w3c.dom.Node toNode,
                                           java.net.URL onlineRes)
Appends the XML representation of a URL to a Node as a <OnlineResource> using the namespace.

Parameters:
toNode - the Node to append the new element to
onlineRes - the URL to be appended as new element contains illegal characters

appendContactInformation

protected static void appendContactInformation(org.w3c.dom.Node toNode,
                                               CitedResponsibleParty respParty)
Appends the XML representation of a ContactInformation to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
respParty -

appendContactPersonPrimary

protected static void appendContactPersonPrimary(org.w3c.dom.Node toNode,
                                                 CitedResponsibleParty respParty)
Appends the XML representation of a ContactPersonPrimary to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
respParty -

appendContactAddress

protected static void appendContactAddress(org.w3c.dom.Node toNode,
                                           ContactInfo ci)
Appends the XML representation of a ContactAddress to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
ci - the ContactAddress to be appended as new element

appendLayerList

protected static void appendLayerList(org.w3c.dom.Node toNode,
                                      LayerList lList)
Appends the XML representation of a LayerList to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
lList - the LayerList to be appended as new element

appendLayer

protected static void appendLayer(org.w3c.dom.Node toNode,
                                  Layer layer)
Appends the XML representation of a Layer to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
layer - the Layer to be appended as new element

appendServer

protected static void appendServer(org.w3c.dom.Node toNode,
                                   Server server)
Appends the XML representation of a Server to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
server - the Server to be appended as new element

appendSrs

protected static void appendSrs(org.w3c.dom.Node toNode,
                                java.lang.String[] srsList)
Appends the XML representation of a list of SRSs as a String[] to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
srsList - the String[] to be appended as new element

appendFormatList

protected static void appendFormatList(org.w3c.dom.Node toNode,
                                       FormatList formatList)
Appends the XML representation of a list of a FormatList to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
formatList - the FormatList to be appended as new element contains illegal characters

appendStyleList

protected static void appendStyleList(org.w3c.dom.Node toNode,
                                      StyleList styleList)
Appends the XML representation of a list of a StyleList to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
styleList - the StyleList to be appended as new element

appendViewContextCollection

protected static void appendViewContextCollection(org.w3c.dom.Node toNode,
                                                  ViewContextCollection vcc)
Appends the XML representation of a list of a ViewContextCollection to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
vcc - the ViewContextCollection to be appended as new element

appendContextReference

protected static void appendContextReference(org.w3c.dom.Node toNode,
                                             ViewContextReference vcr)
Appends the XML representation of a list of a ViewContextReference to a Node using the namespace.

// TODO implement ID in VCR

Parameters:
toNode - the Node to append the new element to
vcr - the ViewContextReference to be appended as new element

appendGeneralExtension

protected static void appendGeneralExtension(org.w3c.dom.Node toNode,
                                             GeneralExtension genExt)
                                      throws org.w3c.dom.DOMException,
                                             java.net.URISyntaxException
Appends the XML representation of a list of a GeneralExtension to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
genExt - the GeneralExtension to be appended as new element
Throws:
java.net.URISyntaxException
org.w3c.dom.DOMException

appendLayerTree

protected static void appendLayerTree(org.w3c.dom.Element e,
                                      Node layerTreeRoot)
Appends the XML representation of a LayerTree.

Parameters:
e - the Element to append the new element to
layerTreeRoot - the root Node of the LayerTree

appendAuthentificationSettings

protected static void appendAuthentificationSettings(org.w3c.dom.Node toNode,
                                                     AuthentificationSettings settings)
Parameters:
toNode -
settings -

appendIOSettings

protected static void appendIOSettings(org.w3c.dom.Node toNode,
                                       IOSettings ioSetts)
Appends the XML representation of a list of a IOSettings to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
ioSetts - the IOSettings to be appended as new element

appendDirectoryAccess

protected static void appendDirectoryAccess(org.w3c.dom.Node toNode,
                                            DirectoryAccess dirAcc,
                                            java.lang.String dirName)
Appends the XML representation of a list of a DirectoryAccess to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
dirAcc - the DirectoryAccess to be appended as new element
dirName -

appendFrontend

protected static void appendFrontend(org.w3c.dom.Node toNode,
                                     Frontend fEnd)
Appends the XML representation of a list of a Frontend to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
fEnd - the Frontend to be appended as new element

appendCommonJS

protected static void appendCommonJS(org.w3c.dom.Node toNode,
                                     java.lang.String[] commonJS)
Appends the XML representation of a list of a String[] to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
commonJS - the String[] to be appended as new element

appendButtons

protected static void appendButtons(org.w3c.dom.Node toNode,
                                    java.lang.String buttons)
Appends the XML representation of a list of a String to a Node using the namespace. // TODO

Parameters:
toNode - the Node to append the new element to
buttons - the String to be appended as new element

appendGUIArea

protected static void appendGUIArea(org.w3c.dom.Node toNode,
                                    GUIArea guiArea,
                                    java.lang.String name)
Appends the XML representation of a list of a GUIArea to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
guiArea - the GUIArea to be appended as new element
name -

appendModule

protected static void appendModule(org.w3c.dom.Node toNode,
                                   Module mod)
Appends the XML representation of a list of a GUIArea to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
mod -

appendModuleConfiguration

protected static void appendModuleConfiguration(org.w3c.dom.Node toNode,
                                                ModuleConfiguration modConf)
Appends the XML representation of a list of a ModuleConfiguration to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
modConf - the ModuleConfiguration to be appended as new element

appendParameterList

protected static void appendParameterList(org.w3c.dom.Node toNode,
                                          ParameterList parList)
Appends the XML representation of a list of a ParameterList to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
parList - the ParameterList to be appended as new element

appendMapParameter

protected static void appendMapParameter(org.w3c.dom.Node toNode,
                                         MapParameter mapPar)
Appends the XML representation of a list of a MapParameter to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
mapPar - the MapParameter to be appended as new element

appendFormats

protected static void appendFormats(org.w3c.dom.Node toNode,
                                    Format[] formats)
Appends the XML representation of a list of a Format[] to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
formats - the Format[] to be appended as new element

appendMapOperationFactors

protected static void appendMapOperationFactors(org.w3c.dom.Node toNode,
                                                MapOperationFactor[] mapOpFac,
                                                java.lang.String opName)
Appends the XML representation of a list of a MapOperationFactor to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
mapOpFac - the MapOperationFactor to be appended as new element
opName -

appendLayerExtension

protected static void appendLayerExtension(org.w3c.dom.Node toNode,
                                           LayerExtension layExt)
Appends the XML representation of a list of a LayerExtension to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
layExt - the LayerExtension to be appended as new element

appendDataService

protected static void appendDataService(org.w3c.dom.Node toNode,
                                        DataService dataServ)
Appends the XML representation of a list of a DataService to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
dataServ - the DataService to be appended as new element

appendModuleJSList

protected static void appendModuleJSList(org.w3c.dom.Node toNode,
                                         java.lang.String[] modJSList)
Appends the XML representation of a list of a ParameterList to a Node using the namespace.

Parameters:
toNode - the Node to append the new element to
modJSList - the modJSList to be appended as new element

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