Package org.geotools.ysld
Class Ysld
- Object
-
- Ysld
-
public class Ysld extends Object
Parses, encodes, and transforms Ysld.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OPTION_PREFIX
-
Constructor Summary
Constructors Constructor Description Ysld()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
encode(StyledLayerDescriptor sld, Object output)
Encodes a GeoTools style object as Ysld.static void
encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper)
Encodes a GeoTools style object as Ysld.static StyledLayerDescriptor
parse(Object ysld)
Parses a Ysld stream into GeoTools style objects.static StyledLayerDescriptor
parse(Object ysld, List<ZoomContextFinder> zCtxtFinders, ResourceLocator locator)
Parses a Ysld stream into GeoTools style objects.static StyledLayerDescriptor
parse(Object ysld, List<ZoomContextFinder> zCtxtFinders, ResourceLocator locator, UomMapper uomMapper)
Parses a Ysld stream into GeoTools style objects.static void
transform(InputStream sld, Writer ysld)
Transforms an SLD stream to Ysld.static void
transform(XMLStreamReader sld, Writer ysld)
Transforms an SLD stream to Ysld.static List<MarkedYAMLException>
validate(Object ysld)
Validates a Ysld stream.static List<MarkedYAMLException>
validate(Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper)
Validates a Ysld stream.static XMLStreamReader
xmlReader(Object input)
Creates an XML reader from an input object.
-
-
-
Field Detail
-
OPTION_PREFIX
public static String OPTION_PREFIX
-
-
Method Detail
-
xmlReader
public static XMLStreamReader xmlReader(Object input) throws IOException
Creates an XML reader from an input object.- Parameters:
input
- THe input object, seereader(Object)
for details.- Throws:
IOException
-
parse
public static StyledLayerDescriptor parse(Object ysld, @Nullable List<ZoomContextFinder> zCtxtFinders, @Nullable ResourceLocator locator) throws IOException
Parses a Ysld stream into GeoTools style objects.- Parameters:
ysld
- The Ysld content, anything accepted byreader(Object)
.locator
- Resource locator for resolving relative URIs.- Returns:
- The GeoTools SLD object.
- Throws:
IOException
-
parse
public static StyledLayerDescriptor parse(Object ysld, @Nullable List<ZoomContextFinder> zCtxtFinders, @Nullable ResourceLocator locator, @Nullable UomMapper uomMapper) throws IOException
Parses a Ysld stream into GeoTools style objects.- Parameters:
ysld
- The Ysld content, anything accepted byreader(Object)
.locator
- Resource locator for resolving relative URIs.- Returns:
- The GeoTools SLD object.
- Throws:
IOException
-
parse
public static StyledLayerDescriptor parse(Object ysld) throws IOException
Parses a Ysld stream into GeoTools style objects.- Parameters:
ysld
- The Ysld content, anything accepted byreader(Object)
.- Returns:
- The GeoTools SLD object.
- Throws:
IOException
-
encode
public static void encode(StyledLayerDescriptor sld, Object output) throws IOException
Encodes a GeoTools style object as Ysld.- Parameters:
sld
- The sld to encode.output
- The output object, anything accepted bywriter(Object)
- Throws:
IOException
-
encode
public static void encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper) throws IOException
Encodes a GeoTools style object as Ysld.- Parameters:
sld
- The sld to encode.output
- The output object, anything accepted bywriter(Object)
- Throws:
IOException
-
transform
public static void transform(XMLStreamReader sld, Writer ysld) throws IOException
Transforms an SLD stream to Ysld.- Parameters:
sld
- SLD xml reader.ysld
- Ysld writer.- Throws:
IOException
-
transform
public static void transform(InputStream sld, Writer ysld) throws IOException
Transforms an SLD stream to Ysld.- Parameters:
sld
- SLD xml reader.ysld
- Ysld writer.- Throws:
IOException
-
validate
public static List<MarkedYAMLException> validate(Object ysld) throws IOException
Validates a Ysld stream.- Parameters:
ysld
- The Ysld.- Returns:
- List of marked exceptions corresponding to validation errors.
- Throws:
IOException
-
validate
public static List<MarkedYAMLException> validate(Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper) throws IOException
Validates a Ysld stream.- Parameters:
ysld
- The Ysld.zContextFinders
- additional zoom context finders in order of priority.- Returns:
- List of marked exceptions corresponding to validation errors.
- Throws:
IOException
-
-