SymbologyParser { public org.deegree.style.se.unevaluated.Style parse( XMLStreamReader in ) throws XMLStreamException { if ( in.getEventType() == START_DOCUMENT ) { in.nextTag(); } if ( in.getLocalName().endsWith( "Symbolizer" ) ) { Triple<Symbolizer<?>, Continuation<StringBuffer>, String> pair = parseSymbolizer( in ); return new org.deegree.style.se.unevaluated.Style( pair.first, pair.second, pair.first.getName(), pair.third ); } if ( in.getLocalName().equals( "FeatureTypeStyle" ) ) { return parseFeatureTypeOrCoverageStyle( in ); } LOG.warn( "Symbology file '{}' did not contain symbolizer or feature type style.", in.getLocation().getSystemId() ); return null; } SymbologyParser();  SymbologyParser( boolean collectXMLSnippets );  SymbologyParser( ResourceLocation<StyleStore> location ); URL parseOnlineResource( XMLStreamReader in ); Symbolizer<PointStyling> parsePointSymbolizer( XMLStreamReader in, UOM uom ); Triple<Symbolizer<?>, Continuation<StringBuffer>, String> parseSymbolizer( XMLStreamReader in ); Symbolizer<RasterStyling> parseRasterSymbolizer( XMLStreamReader in, UOM uom ); Symbolizer<LineStyling> parseLineSymbolizer( XMLStreamReader in, UOM uom ); Symbolizer<PolygonStyling> parsePolygonSymbolizer( XMLStreamReader in, UOM uom ); Pair<String, Continuation<T>> updateOrContinue( XMLStreamReader in, String name, T obj,
                                                               final Updater<T> updater, Continuation<T> contn ); Triple<Symbolizer<TextStyling>, Continuation<StringBuffer>, String> parseTextSymbolizer( XMLStreamReader in,
                                                                                                    UOM uom ); org.deegree.style.se.unevaluated.Style parse( XMLStreamReader in ); org.deegree.style.se.unevaluated.Style parseFeatureTypeOrCoverageStyle( XMLStreamReader in ); static final ElseFilter ELSEFILTER; static final SymbologyParser INSTANCE; }
@Test public void singleTest() throws XMLStreamException, FactoryConfigurationError, FileNotFoundException, URISyntaxException { final XMLInputFactory fac = XMLInputFactory.newInstance(); final Class<SymbologyParserTest> cls = SymbologyParserTest.class; if ( file.endsWith( ".xml" ) ) { LOG.debug( "Expecting {} to parse fine.", file ); XMLStreamReader in = fac.createXMLStreamReader( cls.getResource( file ).toString(), cls.getResourceAsStream( file ) ); in.next(); assertNotNull( SymbologyParser.INSTANCE.parse( in ) ); } if ( file.endsWith( ".bad" ) ) { LOG.debug( "Expecting {} to fail.", file ); XMLStreamReader in = fac.createXMLStreamReader( cls.getResource( file ).toString(), cls.getResourceAsStream( file ) ); in.next(); try { SymbologyParser.INSTANCE.parse( in ); assertEquals( true, false ); } catch ( XMLStreamException e ) { assertNotNull( e ); } } }