Class StyleSLDParser
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.style.sld.StyleSLDParser
-
public class StyleSLDParser extends Object
Reads in an XML file encoded with Styled Layer Descriptor and Symbology Encoding and parses the document to create a corresponding image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StyleSLDParser.FlatOpacityAdapter
-
Field Summary
Fields Modifier and Type Field Description static String
JAXP_SCHEMA_LANGUAGE
static String
JAXP_SCHEMA_SOURCE
static String
OUTPUT_ENCODING
static String
SLD_SCHEMA
static String
W3C_XML_SCHEMA
-
Constructor Summary
Constructors Constructor Description StyleSLDParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapImage
createImage(File xmlFile)
Create an image given an XML file containing an SLD document.static MapImage
createImage(String xmlString)
Create an image given an XML string containing an SLD documentstatic void
registerSymbolizer(String symbolizerTag, Class<? extends SLDSymbolizer> symbolizerClass)
Register a new symbolizer class on a map of symbolizers.
-
-
-
Field Detail
-
OUTPUT_ENCODING
public static final String OUTPUT_ENCODING
- See Also:
- Constant Field Values
-
JAXP_SCHEMA_LANGUAGE
public static final String JAXP_SCHEMA_LANGUAGE
- See Also:
- Constant Field Values
-
W3C_XML_SCHEMA
public static final String W3C_XML_SCHEMA
- See Also:
- Constant Field Values
-
JAXP_SCHEMA_SOURCE
public static final String JAXP_SCHEMA_SOURCE
- See Also:
- Constant Field Values
-
SLD_SCHEMA
public static final String SLD_SCHEMA
- See Also:
- Constant Field Values
-
-
Method Detail
-
createImage
public static MapImage createImage(File xmlFile) throws FileNotFoundException, SLDException
Create an image given an XML file containing an SLD document.- Parameters:
xmlFile
-- Returns:
- Image
- Throws:
FileNotFoundException
SLDException
-
createImage
public static MapImage createImage(String xmlString) throws SLDException
Create an image given an XML string containing an SLD document- Parameters:
xmlString
-- Returns:
- Image
- Throws:
SLDException
-
registerSymbolizer
public static void registerSymbolizer(String symbolizerTag, Class<? extends SLDSymbolizer> symbolizerClass) throws IllegalArgumentException
Register a new symbolizer class on a map of symbolizers.- Parameters:
symbolizerTag
- - the symbolizer tag as a string.symbolizerClass
- - the class type of the new symbolizer.- Throws:
IllegalArgumentException
- - if either argument is null this exception is thrown.
-
-