Package org.openjump.util
Class SLDImporter
- java.lang.Object
-
- org.openjump.util.SLDImporter
-
public class SLDImporter extends Object
SLDImporter- Version:
- $Revision:$, $Date:$
- Author:
- Andreas Schmitz, last edited by: $Author:$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSLDImporter.FillStyleFillStylestatic interfaceSLDImporter.SizedStrokeFillStyleSizedStrokeFillStylestatic interfaceSLDImporter.SizedStyleSizedStylestatic interfaceSLDImporter.StrokeFillStyleStrokeFillStylestatic interfaceSLDImporter.StrokeStyleStrokeStyle
-
Constructor Summary
Constructors Constructor Description SLDImporter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BasicStylegetBasicStyle(String name, Document doc)static XBasicStylegetBasicStyle(Element rule)Ignores any filters, and uses the information from Point-, Line- and PolygonSymbolizers.static ColorThemingStylegetColorThemingStyle(String name, Document doc)static LabelStylegetLabelStyle(String name, Document doc)Converts a TextSymbolizer.static LinkedList<String>getPossibleColorThemingStyleNames(Document doc)static LinkedList<String>getRuleNames(Document doc)static LinkedList<String>getRuleNamesWithGeometrySymbolizers(Document doc)static LinkedList<String>getRuleNamesWithTextSymbolizers(Document doc)static VertexStylegetVertexStyle(String name, Document doc)
-
-
-
Field Detail
-
SLDNS
public static final String SLDNS
The SLD namespace URI.- See Also:
- Constant Field Values
-
OGCNS
public static final String OGCNS
The OGC namespace URI.- See Also:
- Constant Field Values
-
NSCONTEXT
public static final NamespaceContext NSCONTEXT
Namespace context with sld and ogc namespaces.
-
-
Method Detail
-
getRuleNames
public static LinkedList<String> getRuleNames(Document doc)
- Parameters:
doc- the XML (SLD) document containing the style definition- Returns:
- a list of SLD rule names
-
getRuleNamesWithGeometrySymbolizers
public static LinkedList<String> getRuleNamesWithGeometrySymbolizers(Document doc)
- Parameters:
doc- the XML (SLD) document containing the style definition- Returns:
- a list of SLD rule names
-
getPossibleColorThemingStyleNames
public static LinkedList<String> getPossibleColorThemingStyleNames(Document doc)
- Parameters:
doc- the XML (SLD) document containing the style definition- Returns:
- a list of SLD FeatureTypeStyle names
-
getRuleNamesWithTextSymbolizers
public static LinkedList<String> getRuleNamesWithTextSymbolizers(Document doc)
- Parameters:
doc- the XML (SLD) document containing the style definition- Returns:
- a list of SLD rule names
-
getBasicStyle
public static BasicStyle getBasicStyle(String name, Document doc)
- Parameters:
name- name of the style to retrievedoc- the XML (SLD) document containing the style definition- Returns:
- a corresponding BasicStyle
- See Also:
getBasicStyle(Element)
-
getBasicStyle
public static XBasicStyle getBasicStyle(Element rule)
Ignores any filters, and uses the information from Point-, Line- and PolygonSymbolizers.- Parameters:
rule- rule element describing a symbolizer- Returns:
- a corresponding XBasicStyle
-
getVertexStyle
public static VertexStyle getVertexStyle(String name, Document doc)
- Parameters:
name- style namedoc- the XML (SLD) document containing the style definition- Returns:
- a vertex style, if a special one was found (use the basic style from #getBasicStyle if this is null)
-
getLabelStyle
public static LabelStyle getLabelStyle(String name, Document doc)
Converts a TextSymbolizer.- Parameters:
name- style namedoc- the XML (SLD) document containing the style definition- Returns:
- the label style or null, if none was found
-
getColorThemingStyle
public static ColorThemingStyle getColorThemingStyle(String name, Document doc)
- Parameters:
name- style namedoc- the XML (SLD) document containing the style definition- Returns:
- the color theming style
-
-