org.geotools.styling
Class XMLEncoder

java.lang.Object
  extended byorg.geotools.styling.XMLEncoder
All Implemented Interfaces:
StyleVisitor

Deprecated. Use org.geotools.styling.SLDTransformer

public class XMLEncoder
extends java.lang.Object
implements StyleVisitor

Exports a style as a OGC SLD document. This class is does not generate namespace compliant xml, even though it does print gml prefixes. It was also written before the 1.0 filter spec, so some of it may be not up to date.

Author:
Ian Turton, ccg
Task:
HACK: Logging errors, very bad! We need a style visitor exception, or have visit methods throw illegal filter exceptions, or io exceptions., TODO: Support full header information for new XML file, REVISIT: make filter utils class so that other encoders (like sql). It could also be nice to refactor common code from gml producer, as there is basically a GeometryProducer there., REVISIT: make namespace aware.

Constructor Summary
XMLEncoder(java.io.Writer out)
          Deprecated. Constructor with writer to write filters to.
XMLEncoder(java.io.Writer out, Style style)
          Deprecated. Creates a new instance of XMLEncoder
 
Method Summary
 void encode(Style style)
          Deprecated. Encodes the filter to the current writer.
 void encodeCssParam(java.lang.String name, Expression expression)
          Deprecated.  
 void visit(AnchorPoint ap)
          Deprecated. Called when accept is called on a anchor point
 void visit(Displacement dis)
          Deprecated. Called when accept is called on a displacement
 void visit(ExternalGraphic exgr)
          Deprecated. Called when accept is called on a external graphic
 void visit(FeatureTypeConstraint arg0)
          Deprecated. Called when accept is called on a FeatureTypeConstraint.
 void visit(FeatureTypeStyle fts)
          Deprecated. Called when accept is called on a fetauretypestyle
 void visit(Fill fill)
          Deprecated. Called when accept is called on a fill
 void visit(Graphic gr)
          Deprecated. Called when accept is called on a graphic
 void visit(Halo halo)
          Deprecated. Called when accept is called on a halo
 void visit(LinePlacement lp)
          Deprecated. Called when accept is called on a Line Placement
 void visit(LineSymbolizer sym)
          Deprecated. Called when accept is called on a linesymbolizer
 void visit(Mark mark)
          Deprecated. Called when accept is called on a mark
 void visit(NamedLayer arg0)
          Deprecated. Called when accept is called on a NamedLayer.
 void visit(PointPlacement pp)
          Deprecated. Called when accept is called on a Point Placement
 void visit(PointSymbolizer sym)
          Deprecated. Called when accept is called on a pointsymbolizer
 void visit(PolygonSymbolizer sym)
          Deprecated. Called when accept is called on a polygon symbolizer
 void visit(RasterSymbolizer raster)
          Deprecated. Called when accept is called on a rastersymbolizer
 void visit(Rule rule)
          Deprecated. Called when accept is called on a rule
 void visit(Stroke stroke)
          Deprecated. Called when accept is called on a stroke
 void visit(Style style)
          Deprecated. Called when accept is called on a Style.
 void visit(StyledLayerDescriptor arg0)
          Deprecated. Called when accept is called on a StyledLayerDescriptor.
 void visit(Symbolizer sym)
          Deprecated. since it is impossible to create a Symbolizer this method should generate an exception or warning.
 void visit(TextSymbolizer sym)
          Deprecated. Called when accept is called on a textsymbolizer
 void visit(UserLayer arg0)
          Deprecated. Called when accept is called on a UserLayer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEncoder

public XMLEncoder(java.io.Writer out)
Deprecated. 
Constructor with writer to write filters to.

Parameters:
out - where to write the xml representation of filters.

XMLEncoder

public XMLEncoder(java.io.Writer out,
                  Style style)
           throws java.io.IOException
Deprecated. 
Creates a new instance of XMLEncoder

Parameters:
out - The writer to write to.
style - the style to encode.
Throws:
java.io.IOException - - if a problem occurs with the writer
Method Detail

encode

public void encode(Style style)
            throws java.io.IOException
Deprecated. 
Encodes the filter to the current writer.

Parameters:
style - the filter to encode.
Throws:
java.io.IOException - if there are problems writing to out.

encodeCssParam

public void encodeCssParam(java.lang.String name,
                           Expression expression)
Deprecated. 

visit

public void visit(Style style)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a Style.

Specified by:
visit in interface StyleVisitor
Parameters:
style - The style to visit

visit

public void visit(FeatureTypeStyle fts)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a fetauretypestyle

Specified by:
visit in interface StyleVisitor
Parameters:
fts - the feature type styler to visit

visit

public void visit(Rule rule)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a rule

Specified by:
visit in interface StyleVisitor
Parameters:
rule - the rule to visit

visit

public void visit(Graphic gr)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a graphic

Specified by:
visit in interface StyleVisitor
Parameters:
gr - the graphic to visit

visit

public void visit(PointSymbolizer sym)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a pointsymbolizer

Specified by:
visit in interface StyleVisitor
Parameters:
sym - the point symbolizer to visit

visit

public void visit(LineSymbolizer sym)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a linesymbolizer

Specified by:
visit in interface StyleVisitor
Parameters:
sym - the line symbolizer to visit

visit

public void visit(Symbolizer sym)
Deprecated. 
Description copied from interface: StyleVisitor
since it is impossible to create a Symbolizer this method should generate an exception or warning.

Specified by:
visit in interface StyleVisitor
Parameters:
sym - the symbolizer to visit

visit

public void visit(Fill fill)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a fill

Specified by:
visit in interface StyleVisitor
Parameters:
fill - the fill to be visited

visit

public void visit(Stroke stroke)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a stroke

Specified by:
visit in interface StyleVisitor
Parameters:
stroke - the stroke to visit

visit

public void visit(TextSymbolizer sym)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a textsymbolizer

Specified by:
visit in interface StyleVisitor
Parameters:
sym - the text symbolizer to visit

visit

public void visit(PolygonSymbolizer sym)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a polygon symbolizer

Specified by:
visit in interface StyleVisitor
Parameters:
sym - the polygon symbolizer to visit

visit

public void visit(Mark mark)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a mark

Specified by:
visit in interface StyleVisitor
Parameters:
mark - the mark to visit

visit

public void visit(ExternalGraphic exgr)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a external graphic

Specified by:
visit in interface StyleVisitor
Parameters:
exgr - the external graphic to visit

visit

public void visit(PointPlacement pp)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a Point Placement

Specified by:
visit in interface StyleVisitor
Parameters:
pp - the point placement to visit

visit

public void visit(AnchorPoint ap)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a anchor point

Specified by:
visit in interface StyleVisitor
Parameters:
ap - the anchor point to visit

visit

public void visit(Displacement dis)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a displacement

Specified by:
visit in interface StyleVisitor
Parameters:
dis - the displacement to visit

visit

public void visit(LinePlacement lp)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a Line Placement

Specified by:
visit in interface StyleVisitor
Parameters:
lp - the line placement to visit

visit

public void visit(Halo halo)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a halo

Specified by:
visit in interface StyleVisitor
Parameters:
halo - the halo to visit

visit

public void visit(RasterSymbolizer raster)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a rastersymbolizer

Specified by:
visit in interface StyleVisitor
Parameters:
raster - the raster symbolizer to visit

visit

public void visit(StyledLayerDescriptor arg0)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a StyledLayerDescriptor.

Specified by:
visit in interface StyleVisitor
Parameters:
arg0 - The StyledLayerDescriptor to visit

visit

public void visit(NamedLayer arg0)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a NamedLayer.

Specified by:
visit in interface StyleVisitor
Parameters:
arg0 - The NamedLayer to visit

visit

public void visit(UserLayer arg0)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a UserLayer.

Specified by:
visit in interface StyleVisitor
Parameters:
arg0 - The UserLayer to visit

visit

public void visit(FeatureTypeConstraint arg0)
Deprecated. 
Description copied from interface: StyleVisitor
Called when accept is called on a FeatureTypeConstraint.

Specified by:
visit in interface StyleVisitor
Parameters:
arg0 - The FeatureTypeConstraint to visit


Copyright © GeoTools. All Rights Reserved.