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

org.deegree.graphics.sld
Class SLDFactory

java.lang.Object
  extended by org.deegree.graphics.sld.SLDFactory

public class SLDFactory
extends java.lang.Object

Factory class for all mapped SLD-elements.

TODO: Default values for omitted elements (such as fill color) should better not be used in the construction of the corresponding objects (Fill), but marked as left out (to make it possible to differentiate between explicitly given values and default values).

Version:
$Revision: 25265 $ $Date: 2010-07-13 08:45:57 +0200 (Di, 13 Jul 2010) $
Author:
Andreas Poth, Markus Schneider

Nested Class Summary
static class SLDFactory.Method
          Method is the MethodType from the Symbology encoding Schema.
static class SLDFactory.Mode
          Mode is the ModeType from the Symbology Encoding Schema.
static class SLDFactory.ThresholdsBelongTo
          TresholdsBelongTo enumerates values possibly belonging to ThreshholdsBelongToType.
 
Constructor Summary
SLDFactory()
           
 
Method Summary
static FeatureTypeStyle createFeatureTypeStyle(org.w3c.dom.Element element)
          Creates a FeatureTypeStyle-instance according to the contents of the DOM-subtree starting at the given 'FeatureTypeStyle'-Element.
static LayerFeatureConstraints createLayerFeatureConstraints(org.w3c.dom.Element element)
          Creates a LayerFeatureConstraints-instance according to the contents of the DOM-subtree starting at the given 'LayerFeatureConstraints'-Element.
static NamedLayer createNamedLayer(java.lang.String name, LayerFeatureConstraints layerFeatureConstraints, AbstractStyle[] styles)
           
static NamedStyle createNamedStyle(java.lang.String name)
           
static StyledLayerDescriptor createSLD(java.lang.String s)
          Creates a StyledLayerDescriptor-instance from the given XML-representation.
static StyledLayerDescriptor createSLD(java.net.URL url)
          Creates a StyledLayerDescriptor-instance from a SLD document read from the passed URL
static StyledLayerDescriptor createSLD(XMLFragment sldDoc)
          Creates a StyledLayerDescriptor-instance according to the contents of the DOM-subtree starting at the given 'StyledLayerDescriptor'-Element.
static Symbolizer createSymbolizer(org.w3c.dom.Element symbolizerElement)
           
static UserStyle createUserStyle(org.w3c.dom.Element element)
          Creates a UserStyle-instance according to the contents of the DOM-subtree starting at the given 'UserStyle'-Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLDFactory

public SLDFactory()
Method Detail

createSLD

public static StyledLayerDescriptor createSLD(java.lang.String s)
                                       throws XMLParsingException
Creates a StyledLayerDescriptor-instance from the given XML-representation.

Parameters:
s - contains the XML document
Returns:
the constructed StyledLayerDescriptor-instance
Throws:
XMLParsingException - if a syntactic or semantic error in the XML document is encountered

createSLD

public static StyledLayerDescriptor createSLD(java.net.URL url)
                                       throws XMLParsingException
Creates a StyledLayerDescriptor-instance from a SLD document read from the passed URL

Parameters:
url -
Returns:
the SLD bean
Throws:
XMLParsingException

createSLD

public static StyledLayerDescriptor createSLD(XMLFragment sldDoc)
                                       throws XMLParsingException
Creates a StyledLayerDescriptor-instance according to the contents of the DOM-subtree starting at the given 'StyledLayerDescriptor'-Element.

Parameters:
sldDoc -
Returns:
the constructed StyledLayerDescriptor-instance
Throws:
XMLParsingException - if a syntactic or semantic error in the DOM-subtree is encountered

createNamedStyle

public static NamedStyle createNamedStyle(java.lang.String name)

createNamedLayer

public static NamedLayer createNamedLayer(java.lang.String name,
                                          LayerFeatureConstraints layerFeatureConstraints,
                                          AbstractStyle[] styles)

createLayerFeatureConstraints

public static LayerFeatureConstraints createLayerFeatureConstraints(org.w3c.dom.Element element)
                                                             throws XMLParsingException
Creates a LayerFeatureConstraints-instance according to the contents of the DOM-subtree starting at the given 'LayerFeatureConstraints'-Element.

Parameters:
element - the 'LayerFeatureConstraints'-Element
Returns:
the constructed LayerFeatureConstraints-instance
Throws:
XMLParsingException - if a syntactic or semantic error in the DOM-subtree is encountered

createUserStyle

public static UserStyle createUserStyle(org.w3c.dom.Element element)
                                 throws XMLParsingException
Creates a UserStyle-instance according to the contents of the DOM-subtree starting at the given 'UserStyle'-Element.

Parameters:
element - the 'UserStyle'-Element
Returns:
the constructed UserStyle-instance
Throws:
XMLParsingException - if a syntactic or semantic error in the DOM-subtree is encountered

createFeatureTypeStyle

public static FeatureTypeStyle createFeatureTypeStyle(org.w3c.dom.Element element)
                                               throws XMLParsingException
Creates a FeatureTypeStyle-instance according to the contents of the DOM-subtree starting at the given 'FeatureTypeStyle'-Element.

TODO: The ElseFilter currently does not work correctly with FeatureFilters.

Parameters:
element - the 'FeatureTypeStyle'-Element
Returns:
the constructed FeatureTypeStyle-instance
Throws:
XMLParsingException - if a syntactic or semantic error in the DOM-subtree is encountered

createSymbolizer

public static Symbolizer createSymbolizer(org.w3c.dom.Element symbolizerElement)
                                   throws XMLParsingException
Parameters:
symbolizerElement -
Returns:
Symbolizer
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