|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.styling.SLDParser
TODO: This really needs to be container ready
| Field Summary | |
protected StyleFactory |
factory
|
protected org.xml.sax.InputSource |
source
|
| Constructor Summary | |
SLDParser(StyleFactory factory)
Create a Stylereader - use if you already have a dom to parse. |
|
SLDParser(StyleFactory factory,
java.io.File f)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
java.io.InputStream s)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
java.io.Reader r)
Creates a new SLDStyle object. |
|
SLDParser(StyleFactory factory,
java.lang.String filename)
Creates a new instance of SLDStyler |
|
SLDParser(StyleFactory factory,
java.net.URL url)
Creates a new SLDStyle object. |
|
| Method Summary | |
StyledLayerDescriptor |
parseDescriptor(org.w3c.dom.Node root)
|
NamedStyle |
parseNamedStyle(org.w3c.dom.Node n)
Parses a NamedStyle from node. |
StyledLayerDescriptor |
parseSLD()
|
Style |
parseStyle(org.w3c.dom.Node n)
build a style for the Node provided |
Style[] |
readDOM(org.w3c.dom.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(java.io.File f)
Sets the file to use to read the SLD from |
void |
setInput(java.io.InputStream in)
Sets the input stream to read the SLD from |
void |
setInput(java.io.Reader in)
Sets the input stream to read the SLD from |
void |
setInput(java.lang.String filename)
set the file to read the SLD from |
void |
setInput(java.net.URL url)
sets an URL to read the SLD from |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.xml.sax.InputSource source
protected StyleFactory factory
| Constructor Detail |
public SLDParser(StyleFactory factory)
factory - The StyleFactory to use to build the style
public SLDParser(StyleFactory factory,
java.lang.String filename)
throws java.io.FileNotFoundException
factory - The StyleFactory to use to read the filefilename - The file to be read.
java.io.FileNotFoundException - -
if the file is missing
public SLDParser(StyleFactory factory,
java.io.File f)
throws java.io.FileNotFoundException
factory - The StyleFactory to use to read the filef - the File to be read
java.io.FileNotFoundException - -
if the file is missing
public SLDParser(StyleFactory factory,
java.net.URL url)
throws java.io.IOException
factory - The StyleFactory to use to read the fileurl - the URL to be read.
java.io.IOException - -
if something goes wrong reading the file
public SLDParser(StyleFactory factory,
java.io.InputStream s)
factory - The StyleFactory to use to read the files - The inputstream to be read
public SLDParser(StyleFactory factory,
java.io.Reader r)
factory - The StyleFactory to use to read the file| Method Detail |
public void setInput(java.lang.String filename)
throws java.io.FileNotFoundException
filename - the file to read the SLD from
java.io.FileNotFoundException - if the file is missing
public void setInput(java.io.File f)
throws java.io.FileNotFoundException
f - the file to use
java.io.FileNotFoundException - if the file is missing
public void setInput(java.net.URL url)
throws java.io.IOException
url - the url to read the SLD from
java.io.IOException - If anything goes wrong opening the urlpublic void setInput(java.io.InputStream in)
in - the inputstream used to read the SLD frompublic void setInput(java.io.Reader in)
in - the inputstream used to read the SLD frompublic Style[] readXML()
java.lang.RuntimeException - if a parsing error occurspublic Style[] readDOM(org.w3c.dom.Document document)
document - a dom containing the SLD
public StyledLayerDescriptor parseSLD()
public StyledLayerDescriptor parseDescriptor(org.w3c.dom.Node root)
public NamedStyle parseNamedStyle(org.w3c.dom.Node n)
A NamedStyle is used to refer to a style that has a name in a WMS, and is defined as:
A NamedStyle is used to refer to a style that has a name in a WMS.
n -
public Style parseStyle(org.w3c.dom.Node n)
n - the node which contains the style to be parsed.
java.lang.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 | ||||||||||