Package org.geotools.ysld
Class Ysld
Object
Ysld
Parses, encodes, and transforms Ysld.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidencode(StyledLayerDescriptor sld, Object output) Encodes a GeoTools style object as Ysld.static voidencode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper) Encodes a GeoTools style object as Ysld.static StyledLayerDescriptorParses a Ysld stream into GeoTools style objects.static StyledLayerDescriptorparse(Object ysld, List<ZoomContextFinder> zCtxtFinders, ResourceLocator locator) Parses a Ysld stream into GeoTools style objects.static StyledLayerDescriptorparse(Object ysld, List<ZoomContextFinder> zCtxtFinders, ResourceLocator locator, UomMapper uomMapper) Parses a Ysld stream into GeoTools style objects.static voidtransform(InputStream sld, Writer ysld) Transforms an SLD stream to Ysld.static voidtransform(XMLStreamReader sld, Writer ysld) Transforms an SLD stream to Ysld.static List<MarkedYAMLException>Validates a Ysld stream.static List<MarkedYAMLException>validate(Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper) Validates a Ysld stream.static XMLStreamReaderCreates an XML reader from an input object.
-
Field Details
-
OPTION_PREFIX
-
-
Constructor Details
-
Ysld
public Ysld()
-
-
Method Details
-
xmlReader
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
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
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
Transforms an SLD stream to Ysld.- Parameters:
sld- SLD xml reader.ysld- Ysld writer.- Throws:
IOException
-
transform
Transforms an SLD stream to Ysld.- Parameters:
sld- SLD xml reader.ysld- Ysld writer.- Throws:
IOException
-
validate
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
-