SLDParser { @Deprecated public static Triple<LinkedList<LayerRef>, LinkedList<StyleRef>, LinkedList<OperatorFilter>> parse( XMLStreamReader in, RequestBase gm ) throws XMLStreamException, OWSException, ParseException { StylesContainer styleInformations = parse( in ); for ( Pair<String, List<?>> dimension : styleInformations.getDimensions() ) { gm.addDimensionValue( dimension.first, dimension.second ); } LinkedList<LayerRef> layerRefs = new LinkedList<LayerRef>(); LinkedList<StyleRef> styleRefs = new LinkedList<StyleRef>(); LinkedList<OperatorFilter> filters = new LinkedList<OperatorFilter>(); List<StyleContainer> styles = styleInformations.getStyles(); for ( StyleContainer styleInformation : styles ) { layerRefs.add( styleInformation.getLayerRef() ); styleRefs.add( styleInformation.getStyleRef() ); filters.add( styleInformation.getFilter() ); } return new Triple<LinkedList<LayerRef>, LinkedList<StyleRef>, LinkedList<OperatorFilter>>( layerRefs, styleRefs, filters ); }  @Deprecated static Triple<LinkedList<LayerRef>, LinkedList<StyleRef>, LinkedList<OperatorFilter>> parse( XMLStreamReader in,
                                                                                                        RequestBase gm ); static StylesContainer parse( XMLStreamReader in ); static Pair<LinkedList<Filter>, LinkedList<StyleRef>> getStyles( XMLStreamReader in, String layerName,
                                                                            Map<String, String> styleNames );  }
@Test public void testParse() throws Exception { XMLStreamReader in = retrieveSldAsStream( "example-sld.xml" ); RequestBase gm = mockRequestBase(); Triple<LinkedList<LayerRef>, LinkedList<StyleRef>, LinkedList<OperatorFilter>> sld = SLDParser.parse( in, gm ); LinkedList<LayerRef> layerRefs = sld.first; assertThat( layerRefs.size(), is( 1 ) ); assertThat( layerRefs.get( 0 ).getName(), is( "OCEANSEA_1M:Foundation" ) ); LinkedList<StyleRef> styleRefs = sld.second; assertThat( styleRefs.size(), is( 1 ) ); assertThat( styleRefs.get( 0 ).getStyle().getFeatureType(), is( new QName( "Foundation" ) ) ); assertThat( styleRefs.get( 0 ).getStyle().getRules().size(), is( 1 ) ); LinkedList<OperatorFilter> operatorFilters = sld.third; assertThat( operatorFilters.size(), is( 1 ) ); assertThat( operatorFilters.get( 0 ), is( nullValue() ) ); }