|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSLDParser
public class SLDParser
TODO: This really needs to be container ready
Field Summary | |
---|---|
protected StyleFactory |
factory
|
protected InputSource |
source
|
Constructor Summary | |
---|---|
SLDParser(StyleFactory factory)
Create a Stylereader - use if you already have a dom to parse. |
|
SLDParser(StyleFactory factory,
File f)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
FilterFactory filterFactory)
|
|
SLDParser(StyleFactory factory,
InputStream s)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
Reader r)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
String filename)
Creates a new instance of SLDStyler |
|
SLDParser(StyleFactory factory,
URL url)
Creates a new SLDStyle object. |
Method Summary | |
---|---|
protected DocumentBuilder |
newDocumentBuilder(boolean namespaceAware)
|
protected AnchorPoint |
parseAnchorPoint(Node root)
Internal method to parse an AnchorPoint node; protected visibility for testing. |
protected ChannelSelection |
parseChannelSelection(Node root)
Internal parse method - made protected for unit testing |
protected ColorMap |
parseColorMap(Node root)
Internal parse method - made protected for unit testing |
protected ColorMapEntry |
parseColorMapEntry(Node root)
Internal parse method - made protected for unit testing |
protected ContrastEnhancement |
parseContrastEnhancement(Node root)
Internal parse method - made protected for unit testing |
StyledLayerDescriptor |
parseDescriptor(Node root)
|
protected Displacement |
parseDisplacement(Node root)
Internal parse method - made protected for unit testing |
protected ExternalGraphic |
parseExternalGraphic(Node root)
Internal parse method - made protected for unit testing |
protected FeatureTypeConstraint |
parseFeatureTypeConstraint(Node root)
|
protected FeatureTypeStyle |
parseFeatureTypeStyle(Node style)
Internal parse method - made protected for unit testing |
protected Fill |
parseFill(Node root)
Internal parse method - made protected for unit testing |
protected Filter |
parseFilter(Node child)
Internal parse method - made protected for unit testing |
protected Font |
parseFont(Node root)
Internal method to parse a Font Node; protected to allow for unit testing |
protected Expression |
parseGeometry(Node root)
Internal parse method - made protected for unit testing |
protected String |
parseGeometryName(Node root)
Internal parse method - made protected for unit testing |
protected Graphic |
parseGraphic(Node root)
Internal parse method - made protected for unit testing |
protected Halo |
parseHalo(Node root)
Internal parse method - made protected for unit testing |
protected LabelPlacement |
parseLabelPlacement(Node root)
Internal parse method - made protected for unit testing |
protected LinePlacement |
parseLinePlacement(Node root)
Internal parse method - made protected for unit testing |
protected LineSymbolizer |
parseLineSymbolizer(Node root)
parses the SLD for a linesymbolizer |
protected Mark |
parseMark(Node root)
Internal parse method - made protected for unit testing |
NamedStyle |
parseNamedStyle(Node n)
Parses a NamedStyle from node. |
protected String |
parseOnlineResource(Node root)
Internal parse method - made protected for unit testing |
protected OtherText |
parseOtherText(Node root)
|
protected PointPlacement |
parsePointPlacement(Node root)
Internal parse method - made protected for unit testing |
protected PointSymbolizer |
parsePointSymbolizer(Node root)
parses the SLD for a point symbolizer |
protected PolygonSymbolizer |
parsePolygonSymbolizer(Node root)
parses the SLD for a polygonsymbolizer |
protected RasterSymbolizer |
parseRasterSymbolizer(Node root)
parses the SLD for a text symbolizer |
protected RemoteOWS |
parseRemoteOWS(Node root)
|
protected Rule |
parseRule(Node ruleNode)
Internal parse method - made protected for unit testing |
protected SelectedChannelType |
parseSelectedChannel(Node root)
Internal parse method - made protected for unit testing |
protected ShadedRelief |
parseShadedRelief(Node root)
Internal parse method - made protected for unit testing |
StyledLayerDescriptor |
parseSLD()
|
protected Stroke |
parseStroke(Node root)
Internal parse method - made protected for unit testing |
Style |
parseStyle(Node n)
build a style for the Node provided |
protected TextSymbolizer |
parseTextSymbolizer(Node root)
parses the SLD for a text symbolizer |
Style[] |
readDOM()
Read styles from the dom that was previously parsed. |
Style[] |
readDOM(Document document)
Read the DOM provided and create a Style object for each user style found |
Style[] |
readXML()
Read the xml inputsource provided and create a Style object for each user style found |
void |
setEntityResolver(EntityResolver entityResolver)
Sets the EntityResolver implementation that will be used by DocumentBuilder to resolve XML external entities. |
void |
setInput(File f)
Sets the file to use to read the SLD from |
void |
setInput(InputStream in)
Sets the input stream to read the SLD from |
void |
setInput(Reader in)
Sets the input stream to read the SLD from |
void |
setInput(String filename)
set the file to read the SLD from |
void |
setInput(URL url)
sets an URL to read the SLD from |
void |
setOnLineResourceLocator(ResourceLocator onlineResourceLocator)
Sets the resource loader implementation for parsing online resources. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected InputSource source
protected StyleFactory factory
Constructor Detail |
---|
public SLDParser(StyleFactory factory)
factory
- The StyleFactory to use to build the stylepublic SLDParser(StyleFactory factory, FilterFactory filterFactory)
public SLDParser(StyleFactory factory, String filename) throws FileNotFoundException
factory
- The StyleFactory to use to read the filefilename
- The file to be read.
FileNotFoundException
- - if the file is missingpublic SLDParser(StyleFactory factory, File f) throws FileNotFoundException
factory
- The StyleFactory to use to read the filef
- the File to be read
FileNotFoundException
- - if the file is missingpublic SLDParser(StyleFactory factory, URL url) throws IOException
factory
- The StyleFactory to use to read the fileurl
- the URL to be read.
IOException
- - if something goes wrong reading the filepublic SLDParser(StyleFactory factory, InputStream s)
factory
- The StyleFactory to use to read the files
- The inputstream to be readpublic SLDParser(StyleFactory factory, Reader r)
factory
- The StyleFactory to use to read the filer
- The inputstream to be readMethod Detail |
---|
public void setInput(String filename) throws FileNotFoundException
filename
- the file to read the SLD from
FileNotFoundException
- if the file is missingpublic void setInput(File f) throws FileNotFoundException
f
- the file to use
FileNotFoundException
- if the file is missingpublic void setInput(URL url) throws IOException
url
- the url to read the SLD from
IOException
- If anything goes wrong opening the urlpublic void setInput(InputStream in)
in
- the inputstream used to read the SLD frompublic void setInput(Reader in)
in
- the inputstream used to read the SLD frompublic void setOnLineResourceLocator(ResourceLocator onlineResourceLocator)
public void setEntityResolver(EntityResolver entityResolver)
entityResolver
- protected DocumentBuilder newDocumentBuilder(boolean namespaceAware) throws ParserConfigurationException
ParserConfigurationException
public Style[] readXML()
RuntimeException
- if a parsing error occurspublic Style[] readDOM()
public Style[] readDOM(Document document)
document
- a dom containing the SLD
public StyledLayerDescriptor parseSLD()
public StyledLayerDescriptor parseDescriptor(Node root)
protected FeatureTypeConstraint parseFeatureTypeConstraint(Node root)
protected RemoteOWS parseRemoteOWS(Node root)
public NamedStyle parseNamedStyle(Node n)
A NamedStyle is used to refer to a style that has a name in a WMS, and is defined as:
<code> <xsd:element name="NamedStyle"> <xsd:annotation> <xsd:documentation> A NamedStyle is used to refer to a style that has a name in a WMS. </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element ref="sld:Name"/> </xsd:sequence> </xsd:complexType> </xsd:element> </code>
n
- public Style parseStyle(Node n)
n
- the node which contains the style to be parsed.
RuntimeException
- if an error occurs setting up the parserprotected FeatureTypeStyle parseFeatureTypeStyle(Node style)
protected Rule parseRule(Node ruleNode)
protected Filter parseFilter(Node child)
protected LineSymbolizer parseLineSymbolizer(Node root)
root
- a w2c Dom Node
protected PolygonSymbolizer parsePolygonSymbolizer(Node root)
root
- w3c dom node
protected TextSymbolizer parseTextSymbolizer(Node root)
root
- w3c dom node
protected OtherText parseOtherText(Node root)
protected RasterSymbolizer parseRasterSymbolizer(Node root)
root
- w3c dom node
protected ColorMapEntry parseColorMapEntry(Node root)
protected ColorMap parseColorMap(Node root)
protected SelectedChannelType parseSelectedChannel(Node root)
protected ChannelSelection parseChannelSelection(Node root)
protected ContrastEnhancement parseContrastEnhancement(Node root)
protected ShadedRelief parseShadedRelief(Node root)
protected PointSymbolizer parsePointSymbolizer(Node root)
root
- a w3c dom node
protected Graphic parseGraphic(Node root)
protected String parseGeometryName(Node root)
protected Expression parseGeometry(Node root)
protected Mark parseMark(Node root)
protected ExternalGraphic parseExternalGraphic(Node root)
protected String parseOnlineResource(Node root)
protected Stroke parseStroke(Node root)
protected Fill parseFill(Node root)
protected Font parseFont(Node root)
protected LabelPlacement parseLabelPlacement(Node root)
protected PointPlacement parsePointPlacement(Node root)
protected LinePlacement parseLinePlacement(Node root)
protected AnchorPoint parseAnchorPoint(Node root)
root
-
protected Displacement parseDisplacement(Node root)
protected Halo parseHalo(Node root)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |