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

org.deegree.graphics.sld
Class SLDFactory

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

public class SLDFactory
extends 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: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
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(Element element)
          Creates a FeatureTypeStyle-instance according to the contents of the DOM-subtree starting at the given 'FeatureTypeStyle'-Element.
static LayerFeatureConstraints createLayerFeatureConstraints(Element element)
          Creates a LayerFeatureConstraints-instance according to the contents of the DOM-subtree starting at the given 'LayerFeatureConstraints'-Element.
static NamedLayer createNamedLayer(String name, LayerFeatureConstraints layerFeatureConstraints, AbstractStyle[] styles)
           
static NamedStyle createNamedStyle(String name)
           
static StyledLayerDescriptor createSLD(String s)
          Creates a StyledLayerDescriptor-instance from the given XML-representation.
static StyledLayerDescriptor createSLD(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(Element symbolizerElement)
           
static UserStyle createUserStyle(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(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(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(String name)

createNamedLayer

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

createLayerFeatureConstraints

public static LayerFeatureConstraints createLayerFeatureConstraints(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(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(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(Element symbolizerElement)
                                   throws XMLParsingException
Parameters:
symbolizerElement -
Returns:
Symbolizer
Throws:
XMLParsingException

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