org.deegree.style.se.parser
Class SymbologyParser

java.lang.Object
  extended by org.deegree.style.se.parser.SymbologyParser

public class SymbologyParser
extends Object

SymbologyParser parses the SE part of 1.1.0 and the corresponding SLD 1.0.0 part.

Version:
$Revision: 31398 $, $Date: 2011-08-02 09:03:40 +0200 (Tue, 02 Aug 2011) $
Author:
Andreas Schmitz, last edited by: $Author: aschmitz $

Nested Class Summary
static class SymbologyParser.Common
          Common
static class SymbologyParser.FilterContinuation
          FilterContinuation
 
Field Summary
static org.deegree.style.se.parser.SymbologyParser.ElseFilter ELSEFILTER
          A static elsefilter instance (think of it as a marker).
static SymbologyParser INSTANCE
          A default instance.
 
Constructor Summary
SymbologyParser()
          Constructs one which does not collect source snippets.
SymbologyParser(boolean collectXMLSnippets)
           
 
Method Summary
 Style parse(XMLStreamReader in)
           
 Style parseFeatureTypeOrCoverageStyle(XMLStreamReader in)
           
 Symbolizer<LineStyling> parseLineSymbolizer(XMLStreamReader in, UOM uom)
           
static URL parseOnlineResource(XMLStreamReader in)
           
 Symbolizer<PointStyling> parsePointSymbolizer(XMLStreamReader in, UOM uom)
           
 Symbolizer<PolygonStyling> parsePolygonSymbolizer(XMLStreamReader in, UOM uom)
           
 Symbolizer<RasterStyling> parseRasterSymbolizer(XMLStreamReader in, UOM uom)
           
 Triple<Symbolizer<?>,Continuation<StringBuffer>,String> parseSymbolizer(XMLStreamReader in)
           
 Triple<Symbolizer<TextStyling>,Continuation<StringBuffer>,String> parseTextSymbolizer(XMLStreamReader in, UOM uom)
           
<T> Pair<String,Continuation<T>>
updateOrContinue(XMLStreamReader in, String name, T obj, Continuation.Updater<T> updater, Continuation<T> contn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELSEFILTER

public static final org.deegree.style.se.parser.SymbologyParser.ElseFilter ELSEFILTER
A static elsefilter instance (think of it as a marker).


INSTANCE

public static final SymbologyParser INSTANCE
A default instance.

Constructor Detail

SymbologyParser

public SymbologyParser()
Constructs one which does not collect source snippets.


SymbologyParser

public SymbologyParser(boolean collectXMLSnippets)
Parameters:
collectXMLSnippets - if true, some source snippets are collected (which can be used for re-export)
Method Detail

parseOnlineResource

public static URL parseOnlineResource(XMLStreamReader in)
                               throws XMLStreamException,
                                      MalformedURLException
Parameters:
in -
Returns:
the resolved href attribute
Throws:
XMLStreamException
MalformedURLException

parsePointSymbolizer

public Symbolizer<PointStyling> parsePointSymbolizer(XMLStreamReader in,
                                                     UOM uom)
                                              throws XMLStreamException
Parameters:
in -
uom -
Returns:
a new symbolizer
Throws:
XMLStreamException

parseSymbolizer

public Triple<Symbolizer<?>,Continuation<StringBuffer>,String> parseSymbolizer(XMLStreamReader in)
                                                                        throws XMLStreamException
Parameters:
in -
Returns:
the symbolizer
Throws:
XMLStreamException

parseRasterSymbolizer

public Symbolizer<RasterStyling> parseRasterSymbolizer(XMLStreamReader in,
                                                       UOM uom)
                                                throws XMLStreamException
Parameters:
in -
uom -
Returns:
the symbolizer
Throws:
XMLStreamException

parseLineSymbolizer

public Symbolizer<LineStyling> parseLineSymbolizer(XMLStreamReader in,
                                                   UOM uom)
                                            throws XMLStreamException
Parameters:
in -
uom -
Returns:
the symbolizer
Throws:
XMLStreamException

parsePolygonSymbolizer

public Symbolizer<PolygonStyling> parsePolygonSymbolizer(XMLStreamReader in,
                                                         UOM uom)
                                                  throws XMLStreamException
Parameters:
in -
uom -
Returns:
the symbolizer
Throws:
XMLStreamException

updateOrContinue

public <T> Pair<String,Continuation<T>> updateOrContinue(XMLStreamReader in,
                                                         String name,
                                                         T obj,
                                                         Continuation.Updater<T> updater,
                                                         Continuation<T> contn)
                                              throws XMLStreamException
Type Parameters:
T -
Parameters:
in -
name -
obj -
updater -
contn -
Returns:
either contn, or a new continuation which updates obj, also the XML snippet (w/ filter expressions re-exported) which was parsed (or null, if none was parsed)
Throws:
XMLStreamException

parseTextSymbolizer

public Triple<Symbolizer<TextStyling>,Continuation<StringBuffer>,String> parseTextSymbolizer(XMLStreamReader in,
                                                                                             UOM uom)
                                                                                      throws XMLStreamException
Parameters:
in -
uom -
Returns:
the symbolizer
Throws:
XMLStreamException

parse

public Style parse(XMLStreamReader in)
            throws XMLStreamException
Parameters:
in -
Returns:
null, if no symbolizer and no Feature type style was found
Throws:
XMLStreamException

parseFeatureTypeOrCoverageStyle

public Style parseFeatureTypeOrCoverageStyle(XMLStreamReader in)
                                      throws XMLStreamException
Parameters:
in -
Returns:
a new style
Throws:
XMLStreamException


Copyright © 2011. All Rights Reserved.