@Test public void testDefaultPoint() throws Exception { SLDParser parser = new SLDParser(styleFactory, input(SLD_DEFAULT_POINT)); Style[] styles = parser.readXML(); assertEquals(1, styles.length); List<FeatureTypeStyle> fts = styles[0].featureTypeStyles(); assertEquals(1, fts.size()); List<Rule> rules = fts.get(0).rules(); assertEquals(1, rules.size()); List<Symbolizer> symbolizers = rules.get(0).symbolizers(); assertEquals(1, symbolizers.size()); PointSymbolizer ps = (PointSymbolizer) symbolizers.get(0); List<GraphicalSymbol> graphicalSymbols = ps.getGraphic().graphicalSymbols(); assertEquals(1, graphicalSymbols.size()); Mark mark = (Mark) graphicalSymbols.get(0); assertEquals(mark, CommonFactoryFinder.getStyleFactory(null).createMark()); }
public Style[] readXML() { try { dom = newDocumentBuilder(true).parse(source); } catch (javax.xml.parsers.ParserConfigurationException pce) { throw new RuntimeException(pce); } catch (org.xml.sax.SAXException se) { throw new RuntimeException(se); } catch (java.io.IOException ie) { throw new RuntimeException(ie); } finally { disposeInputSource(); } return readDOM(dom); }
SLDParser { public Style[] readXML() { try { dom = newDocumentBuilder(true).parse(source); } catch (javax.xml.parsers.ParserConfigurationException pce) { throw new RuntimeException(pce); } catch (org.xml.sax.SAXException se) { throw new RuntimeException(se); } catch (java.io.IOException ie) { throw new RuntimeException(ie); } finally { disposeInputSource(); } return readDOM(dom); } }
SLDParser { public Style[] readXML() { try { dom = newDocumentBuilder(true).parse(source); } catch (javax.xml.parsers.ParserConfigurationException pce) { throw new RuntimeException(pce); } catch (org.xml.sax.SAXException se) { throw new RuntimeException(se); } catch (java.io.IOException ie) { throw new RuntimeException(ie); } finally { disposeInputSource(); } return readDOM(dom); } SLDParser(StyleFactory factory);  SLDParser(StyleFactory factory, FilterFactory filterFactory);  SLDParser(StyleFactory factory, String filename);  SLDParser(StyleFactory factory, File f);  SLDParser(StyleFactory factory, java.net.URL url);  SLDParser(StyleFactory factory, java.io.InputStream s);  SLDParser(StyleFactory factory, java.io.Reader r); }
SLDParser { public Style[] readXML() { try { dom = newDocumentBuilder(true).parse(source); } catch (javax.xml.parsers.ParserConfigurationException pce) { throw new RuntimeException(pce); } catch (org.xml.sax.SAXException se) { throw new RuntimeException(se); } catch (java.io.IOException ie) { throw new RuntimeException(ie); } finally { disposeInputSource(); } return readDOM(dom); } SLDParser(StyleFactory factory);  SLDParser(StyleFactory factory, FilterFactory filterFactory);  SLDParser(StyleFactory factory, String filename);  SLDParser(StyleFactory factory, File f);  SLDParser(StyleFactory factory, java.net.URL url);  SLDParser(StyleFactory factory, java.io.InputStream s);  SLDParser(StyleFactory factory, java.io.Reader r); void setInput(String filename); void setInput(File f); void setInput(java.net.URL url); void setInput(java.io.InputStream in); void setInput(java.io.Reader in); void setOnLineResourceLocator(ResourceLocator onlineResourceLocator); void setEntityResolver(EntityResolver entityResolver); Style[] readXML(); Style[] readDOM(); Style[] readDOM(org.w3c.dom.Document document); StyledLayerDescriptor parseSLD(); StyledLayerDescriptor parseDescriptor(Node root); NamedStyle parseNamedStyle(Node n); Style parseStyle(Node n); }
SLDParser { public Style[] readXML() { try { dom = newDocumentBuilder(true).parse(source); } catch (javax.xml.parsers.ParserConfigurationException pce) { throw new RuntimeException(pce); } catch (org.xml.sax.SAXException se) { throw new RuntimeException(se); } catch (java.io.IOException ie) { throw new RuntimeException(ie); } finally { disposeInputSource(); } return readDOM(dom); } SLDParser(StyleFactory factory);  SLDParser(StyleFactory factory, FilterFactory filterFactory);  SLDParser(StyleFactory factory, String filename);  SLDParser(StyleFactory factory, File f);  SLDParser(StyleFactory factory, java.net.URL url);  SLDParser(StyleFactory factory, java.io.InputStream s);  SLDParser(StyleFactory factory, java.io.Reader r); void setInput(String filename); void setInput(File f); void setInput(java.net.URL url); void setInput(java.io.InputStream in); void setInput(java.io.Reader in); void setOnLineResourceLocator(ResourceLocator onlineResourceLocator); void setEntityResolver(EntityResolver entityResolver); Style[] readXML(); Style[] readDOM(); Style[] readDOM(org.w3c.dom.Document document); StyledLayerDescriptor parseSLD(); StyledLayerDescriptor parseDescriptor(Node root); NamedStyle parseNamedStyle(Node n); Style parseStyle(Node n);  }