deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.portal.context
Class XMLFactory

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

public class XMLFactory
extends Object

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

Version:
$Revision: 18195 $, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Field Summary
protected static DocumentBuilder builder
           
protected static Document document
           
protected static DocumentBuilderFactory factory
           
 
Method Summary
protected static void appendAbstract(Node toNode, String abstr)
          Appends the XML representation of an Abstract to a Node using the namespace.
protected static void appendAuthentificationSettings(Node toNode, AuthentificationSettings settings)
           
protected static void appendBoundingBox(Node toNode, Point[] points)
          Appends the XML representation of a GM_Point[] to a Node using the namespace.
protected static void appendButtons(Node toNode, String buttons)
          Appends the XML representation of a list of a String to a Node using the namespace. // TODO
protected static void appendCommonJS(Node toNode, String[] commonJS)
          Appends the XML representation of a list of a String[] to a Node using the namespace.
protected static void appendContactAddress(Node toNode, ContactInfo ci)
          Appends the XML representation of a ContactAddress to a Node using the namespace.
protected static void appendContactInformation(Node toNode, CitedResponsibleParty respParty)
          Appends the XML representation of a ContactInformation to a Node using the namespace.
protected static void appendContactPersonPrimary(Node toNode, CitedResponsibleParty respParty)
          Appends the XML representation of a ContactPersonPrimary to a Node using the namespace.
protected static void appendContextReference(Node toNode, ViewContextReference vcr)
          Appends the XML representation of a list of a ViewContextReference to a Node using the namespace.
protected static void appendDataService(Node toNode, DataService dataServ)
          Appends the XML representation of a list of a DataService to a Node using the namespace.
protected static void appendDescriptionURL(Node toNode, BaseURL bURL)
          Appends the XML representation of a BaseURL, the DescriptionURL, to a Node using the namespace.
protected static void appendDirectoryAccess(Node toNode, DirectoryAccess dirAcc, String dirName)
          Appends the XML representation of a list of a DirectoryAccess to a Node using the namespace.
protected static void appendFormatList(Node toNode, FormatList formatList)
          Appends the XML representation of a list of a FormatList to a Node using the namespace.
protected static void appendFormats(Node toNode, Format[] formats)
          Appends the XML representation of a list of a Format[] to a Node using the namespace.
protected static void appendFrontend(Node toNode, Frontend fEnd)
          Appends the XML representation of a list of a Frontend to a Node using the namespace.
protected static void appendGeneral(Node toNode, General gen)
          Appends the XML representation of a General to a Node using the namespace.
protected static void appendGeneralExtension(Node toNode, GeneralExtension genExt)
          Appends the XML representation of a list of a GeneralExtension to a Node using the namespace.
protected static void appendGUIArea(Node toNode, GUIArea guiArea, String name)
          Appends the XML representation of a list of a GUIArea to a Node using the namespace.
protected static void appendIOSettings(Node toNode, IOSettings ioSetts)
          Appends the XML representation of a list of a IOSettings to a Node using the namespace.
protected static void appendKeywords(Node toNode, String[] keywords)
          Appends the XML representation of a keyword list as a String[] to a Node using the namespace.
protected static void appendLayer(Node toNode, Layer layer)
          Appends the XML representation of a Layer to a Node using the namespace.
protected static void appendLayerExtension(Node toNode, LayerExtension layExt)
          Appends the XML representation of a list of a LayerExtension to a Node using the namespace.
protected static void appendLayerList(Node toNode, LayerList lList)
          Appends the XML representation of a LayerList to a Node using the namespace.
protected static void appendLayerTree(Element e, Node layerTreeRoot)
          Appends the XML representation of a LayerTree.
protected static void appendLogoURL(Node toNode, ImageURL logoURL)
          Appends the XML representation of an ImageURL to a Node using the namespace.
protected static void appendMapOperationFactors(Node toNode, MapOperationFactor[] mapOpFac, String opName)
          Appends the XML representation of a list of a MapOperationFactor to a Node using the namespace.
protected static void appendMapParameter(Node toNode, MapParameter mapPar)
          Appends the XML representation of a list of a MapParameter to a Node using the namespace.
protected static void appendModule(Node toNode, Module mod)
          Appends the XML representation of a list of a GUIArea to a Node using the namespace.
protected static void appendModuleConfiguration(Node toNode, ModuleConfiguration modConf)
          Appends the XML representation of a list of a ModuleConfiguration to a Node using the namespace.
protected static void appendModuleJSList(Node toNode, String[] modJSList)
          Appends the XML representation of a list of a ParameterList to a Node using the namespace.
protected static void appendOnlineResource(Node toNode, URL onlineRes)
          Appends the XML representation of a URL to a Node as a <OnlineResource> using the namespace.
protected static void appendParameterList(Node toNode, ParameterList parList)
          Appends the XML representation of a list of a ParameterList to a Node using the namespace.
protected static void appendServer(Node toNode, Server server)
          Appends the XML representation of a Server to a Node using the namespace.
protected static void appendSrs(Node toNode, String[] srsList)
          Appends the XML representation of a list of SRSs as a String[] to a Node using the namespace.
protected static void appendStyleList(Node toNode, StyleList styleList)
          Appends the XML representation of a list of a StyleList to a Node using the namespace.
protected static void appendTitle(Node toNode, String title)
          Appends the XML representation of a Title to a Node using the namespace.
protected static void appendViewContext(Node toNode, ViewContext viewContxt)
          Appends the XML representation of a ViewContext to a Node using the namespace.
protected static void appendViewContextCollection(Node toNode, ViewContextCollection vcc)
          Appends the XML representation of a list of a ViewContextCollection to a Node using the namespace.
protected static void appendWindow(Node toNode, Rectangle r)
          Appends the XML representation of a Rectangle to a Node using the namespace.
protected static 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 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 DocumentBuilderFactory factory

builder

protected static DocumentBuilder builder

document

protected static Document document
Method Detail

initDocBuilder

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

Throws:
ParserConfigurationException

createDocument

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

Returns:
new Document instance
Throws:
ParserConfigurationException

export

public static XMLFragment export(ViewContext viewContext)
                          throws 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:
ParserConfigurationException - if an XML parser couldn't be found

export

public static Document export(ViewContextCollection viewContCollec)
                       throws 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:
ParserConfigurationException - if an XML parser couldn't be found

appendViewContext

protected static void appendViewContext(Node toNode,
                                        ViewContext viewContxt)
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

appendGeneral

protected static void appendGeneral(Node toNode,
                                    General gen)
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

appendWindow

protected static void appendWindow(Node toNode,
                                   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(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(Node toNode,
                                  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(Node toNode,
                                     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(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(Node toNode,
                                     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(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(Node toNode,
                                           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(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(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(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(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(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(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(Node toNode,
                                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(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(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(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(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(Node toNode,
                                             GeneralExtension genExt)
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

appendLayerTree

protected static void appendLayerTree(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(Node toNode,
                                                     AuthentificationSettings settings)
Parameters:
toNode -
settings -

appendIOSettings

protected static void appendIOSettings(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(Node toNode,
                                            DirectoryAccess dirAcc,
                                            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(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(Node toNode,
                                     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(Node toNode,
                                    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(Node toNode,
                                    GUIArea guiArea,
                                    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(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(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(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(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(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(Node toNode,
                                                MapOperationFactor[] mapOpFac,
                                                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(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(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(Node toNode,
                                         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.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org