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 classStyleSLDParser.FlatOpacityAdapter
-
Field Summary
Fields Modifier and Type Field Description static StringJAXP_SCHEMA_LANGUAGEstatic StringJAXP_SCHEMA_SOURCEstatic StringOUTPUT_ENCODINGstatic StringSLD_SCHEMAstatic StringW3C_XML_SCHEMA
-
Constructor Summary
Constructors Constructor Description StyleSLDParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapImagecreateImage(File xmlFile)Create an image given an XML file containing an SLD document.static MapImagecreateImage(String xmlString)Create an image given an XML string containing an SLD documentstatic voidregisterSymbolizer(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:
FileNotFoundExceptionSLDException
-
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.
-
-