@Test public void testWFS1_2FeatureCollection() throws Exception { URL url = TestData.getResource(this, "states.xml"); InputStream in = url.openStream(); GML gml = new GML(Version.WFS1_1); SimpleFeatureCollection featureCollection = gml.decodeFeatureCollection(in); assertNotNull(featureCollection); assertEquals(2, featureCollection.size()); }
public SimpleFeatureCollection decodeFeatureCollection(InputStream in) throws IOException, SAXException, ParserConfigurationException { if (Version.GML2 == version || Version.WFS1_0 == version || Version.GML2 == version || Version.GML3 == version || Version.WFS1_0 == version || Version.WFS1_1 == version) { Parser parser = new Parser(gmlConfiguration); Object obj = parser.parse(in); SimpleFeatureCollection collection = toFeatureCollection(obj); return collection; } return null; }
GML { public SimpleFeatureCollection decodeFeatureCollection(InputStream in) throws IOException, SAXException, ParserConfigurationException { if (Version.GML2 == version || Version.WFS1_0 == version || Version.GML2 == version || Version.GML3 == version || Version.WFS1_0 == version || Version.WFS1_1 == version) { Parser parser = new Parser(gmlConfiguration); Object obj = parser.parse(in); SimpleFeatureCollection collection = toFeatureCollection(obj); return collection; } return null; } }
GML { public SimpleFeatureCollection decodeFeatureCollection(InputStream in) throws IOException, SAXException, ParserConfigurationException { if (Version.GML2 == version || Version.WFS1_0 == version || Version.GML2 == version || Version.GML3 == version || Version.WFS1_0 == version || Version.WFS1_1 == version) { Parser parser = new Parser(gmlConfiguration); Object obj = parser.parse(in); SimpleFeatureCollection collection = toFeatureCollection(obj); return collection; } return null; } GML(Version version); }
GML { public SimpleFeatureCollection decodeFeatureCollection(InputStream in) throws IOException, SAXException, ParserConfigurationException { if (Version.GML2 == version || Version.WFS1_0 == version || Version.GML2 == version || Version.GML3 == version || Version.WFS1_0 == version || Version.WFS1_1 == version) { Parser parser = new Parser(gmlConfiguration); Object obj = parser.parse(in); SimpleFeatureCollection collection = toFeatureCollection(obj); return collection; } return null; } GML(Version version); void setLegacy(boolean legacy); void setNamespace(String prefix, String namespace); void setEncoding(Charset encoding); void setBaseURL(URL baseURL); void setCoordinateReferenceSystem(CoordinateReferenceSystem crs); @SuppressWarnings("unchecked") void encode(OutputStream out, SimpleFeatureCollection collection); void encode(OutputStream out, SimpleFeatureType simpleFeatureType); SimpleFeatureType decodeSimpleFeatureType(URL schemaLocation, Name typeName); SimpleFeatureCollection decodeFeatureCollection(InputStream in); SimpleFeatureIterator decodeFeatureIterator(InputStream in); SimpleFeatureIterator decodeFeatureIterator(InputStream in, QName elementName); }
GML { public SimpleFeatureCollection decodeFeatureCollection(InputStream in) throws IOException, SAXException, ParserConfigurationException { if (Version.GML2 == version || Version.WFS1_0 == version || Version.GML2 == version || Version.GML3 == version || Version.WFS1_0 == version || Version.WFS1_1 == version) { Parser parser = new Parser(gmlConfiguration); Object obj = parser.parse(in); SimpleFeatureCollection collection = toFeatureCollection(obj); return collection; } return null; } GML(Version version); void setLegacy(boolean legacy); void setNamespace(String prefix, String namespace); void setEncoding(Charset encoding); void setBaseURL(URL baseURL); void setCoordinateReferenceSystem(CoordinateReferenceSystem crs); @SuppressWarnings("unchecked") void encode(OutputStream out, SimpleFeatureCollection collection); void encode(OutputStream out, SimpleFeatureType simpleFeatureType); SimpleFeatureType decodeSimpleFeatureType(URL schemaLocation, Name typeName); SimpleFeatureCollection decodeFeatureCollection(InputStream in); SimpleFeatureIterator decodeFeatureIterator(InputStream in); SimpleFeatureIterator decodeFeatureIterator(InputStream in, QName elementName);  }