|
||||||||||
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
trunk/gt/modules
(gt-modules.jar
) (Maven report) (SVN head)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 | |
---|---|
StyledLayerDescriptor |
parseDescriptor(Node root)
|
NamedStyle |
parseNamedStyle(Node n)
Parses a NamedStyle from node. |
StyledLayerDescriptor |
parseSLD()
|
Style |
parseStyle(Node n)
build a style for the Node provided |
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 |
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 |
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 Style[] readXML()
RuntimeException
- if a parsing error occurspublic Style[] readDOM(Document document)
document
- a dom containing the SLD
public StyledLayerDescriptor parseSLD()
public StyledLayerDescriptor parseDescriptor(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:
<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>
n
- public Style parseStyle(Node n)
n
- the node which contains the style to be parsed.
RuntimeException
- if an error occurs setting up the parser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |