@Test public void testTreatStringAsGeoJson() throws Exception { Configuration configuration = configurationFactory.getConfig(getFile("geojson/config.yaml")); MfClientHttpRequestFactory configRequestFactory = new ConfigFileResolvingHttpRequestFactory(requestFactory, configuration, "test"); FeaturesParser featuresParser = new FeaturesParser(configRequestFactory, false); for (File geojsonExample: getGeoJsonExamples()) { try { int numFeatures = getNumExpectedFeatures(geojsonExample); final String geojson = new String(java.nio.file.Files.readAllBytes(geojsonExample.toPath()), Constants.DEFAULT_CHARSET); final SimpleFeatureCollection simpleFeatureCollection = featuresParser.treatStringAsGeoJson(geojson); assertEquals(geojsonExample.getName(), numFeatures, simpleFeatureCollection.size()); } catch (AssertionError e) { throw e; } catch (Throwable t) { t.printStackTrace(); throw new AssertionError( "Exception raised when processing: " + geojsonExample.getName() + "\n" + t.getMessage()); } } }
public final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString) throws IOException { return readFeatureCollection(geoJsonString); }
FeaturesParser { public final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString) throws IOException { return readFeatureCollection(geoJsonString); } }
FeaturesParser { public final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString) throws IOException { return readFeatureCollection(geoJsonString); } FeaturesParser(
            final MfClientHttpRequestFactory httpRequestFactory, final boolean forceLongitudeFirst); }
FeaturesParser { public final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString) throws IOException { return readFeatureCollection(geoJsonString); } FeaturesParser(
            final MfClientHttpRequestFactory httpRequestFactory, final boolean forceLongitudeFirst); final SimpleFeatureCollection autoTreat(final Template template, final String features); final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl); final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString); }
FeaturesParser { public final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString) throws IOException { return readFeatureCollection(geoJsonString); } FeaturesParser(
            final MfClientHttpRequestFactory httpRequestFactory, final boolean forceLongitudeFirst); final SimpleFeatureCollection autoTreat(final Template template, final String features); final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl); final SimpleFeatureCollection treatStringAsGeoJson(final String geoJsonString);  }