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 SummaryNested Classes Modifier and Type Class Description static classStyleSLDParser.FlatOpacityAdapter
 - 
Field SummaryFields Modifier and Type Field Description static StringJAXP_SCHEMA_LANGUAGEstatic StringJAXP_SCHEMA_SOURCEstatic StringOUTPUT_ENCODINGstatic StringSLD_SCHEMAstatic StringW3C_XML_SCHEMA
 - 
Constructor SummaryConstructors Constructor Description StyleSLDParser()
 - 
Method SummaryAll 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_ENCODINGpublic static final String OUTPUT_ENCODING - See Also:
- Constant Field Values
 
 - 
JAXP_SCHEMA_LANGUAGEpublic static final String JAXP_SCHEMA_LANGUAGE - See Also:
- Constant Field Values
 
 - 
W3C_XML_SCHEMApublic static final String W3C_XML_SCHEMA - See Also:
- Constant Field Values
 
 - 
JAXP_SCHEMA_SOURCEpublic static final String JAXP_SCHEMA_SOURCE - See Also:
- Constant Field Values
 
 - 
SLD_SCHEMApublic static final String SLD_SCHEMA - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
createImagepublic 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
 
 - 
createImagepublic static MapImage createImage(String xmlString) throws SLDException Create an image given an XML string containing an SLD document- Parameters:
- xmlString-
- Returns:
- Image
- Throws:
- SLDException
 
 - 
registerSymbolizerpublic 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.
 
 
- 
 
-