Examples of WFSConfiguration


Examples of org.geotools.wfs.v1_0.WFSConfiguration

                + "</wps:RawDataOutput>" + "</wps:ResponseForm>" + "</wps:Execute>";

        MockHttpServletResponse response = postAsServletResponse(root(), xml);
        // System.out.println(response.getOutputStreamContent());
       
        Parser p = new Parser(new WFSConfiguration());
        FeatureCollectionType fct = (FeatureCollectionType) p.parse(new ByteArrayInputStream(
                response.getOutputStreamContent().getBytes()));
        FeatureCollection fc = (FeatureCollection) fct.getFeature().get(0);

        assertEquals(1, fc.size());
View Full Code Here

Examples of org.geotools.wfs.v1_0.WFSConfiguration

        // that we want to be consistently reproduced for GetFeatureInfo as well
        final InputStream is = ml.getFeatureInfo(bbox, width, height, x, y,
                "application/vnd.ogc.gml", maxFeatures);
        List<FeatureCollection> results = null;
        try {
            Parser parser = new Parser(new WFSConfiguration());
            parser.setStrict(false);
            Object result = parser.parse(is);
            if (result instanceof FeatureCollectionType) {
                FeatureCollectionType fcList = (FeatureCollectionType) result;
                results = fcList.getFeature();
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

     *            a response handle to a service exception report
     * @return a {@link WFSException} containing the server returned exception report messages
     * @see WFSResponseParser#parse(WFSProtocol, WFSResponse)
     */
    public Object parse(WFS_1_1_0_DataStore wfs, WFSResponse response) {
        WFSConfiguration configuration = new WFSConfiguration();
        Parser parser = new Parser(configuration);
        InputStream responseStream = response.getInputStream();
        Charset responseCharset = response.getCharacterEncoding();
        Reader reader = new InputStreamReader(responseStream, responseCharset);
        Object parsed;
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

    private SimpleFeatureType testParseDescribeSimpleFeatureType(final QName featureTypeName,
            final URL schemaLocation, int expectedAttributeCount) throws IOException {
        assertNotNull(schemaLocation);
        final CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;

        Configuration configuration = new WFSConfiguration();

        SimpleFeatureType featureType;
        featureType = EmfAppSchemaParser.parseSimpleFeatureType(configuration, featureTypeName,
                schemaLocation, crs, new HashMap<String, String>(), null, false);
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

    @Override
    protected GetFeatureParser getParser( QName featureName, String schemaLocation,
            SimpleFeatureType featureType, URL getFeaturesRequest ) throws IOException {
        URL schemaLocationUrl = TestData.getResource(this, schemaLocation);

        Configuration configuration = new WFSConfiguration();
        final InputStream inputStream = new BufferedInputStream(getFeaturesRequest.openStream());
        final StreamingParserFeatureReader featureReader;
        featureReader = new StreamingParserFeatureReader(configuration, inputStream, featureName,
                schemaLocationUrl);
        return featureReader;
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

    private SimpleFeatureType testParseDescribeSimpleFeatureType(final QName featureTypeName,
            final URL schemaLocation, int expectedAttributeCount) throws IOException {
        assertNotNull(schemaLocation);
        final CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;

        Configuration configuration = new WFSConfiguration();

        SimpleFeatureType featureType;
        featureType = EmfAppSchemaParser.parseSimpleFeatureType(configuration, featureTypeName,
                schemaLocation, crs);
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

                FileUtils.writeStringToFile(target, url);
            } else {
                org.geotools.xml.Configuration cfg = null;
                QName elementName = null;
                if(gft.getVersion().equals("1.1.0")) {
                    cfg = new WFSConfiguration();
                    elementName = WFS.GetFeature;
                } else {
                    cfg = new org.geotools.wfs.v1_0.WFSConfiguration();
                    elementName = org.geotools.wfs.v1_0.WFS.GetFeature;
                }
View Full Code Here

Examples of org.geotools.wfs.v1_1.WFSConfiguration

                FileUtils.writeStringToFile(target, url.toString());
            } else {
                org.geotools.xml.Configuration cfg = null;
                QName elementName = null;
                if(gft.getVersion().equals("1.1.0")) {
                    cfg = new WFSConfiguration();
                    elementName = WFS.GetFeature;
                } else {
                    cfg = new org.geotools.wfs.v1_0.WFSConfiguration();
                    elementName = org.geotools.wfs.v1_0.WFS.GetFeature;
                }
View Full Code Here

Examples of org.geotools.wfs.v2_0.WFSConfiguration

    @Override
    public void write(Object value, OutputStream output, Operation operation) throws IOException,
            ServiceException {

        Encoder encoder = new Encoder(new WFSConfiguration());
        encoder.setEncoding(Charset.forName( getInfo().getGeoServer().getSettings().getCharset()) );
        encoder.setOmitXMLDeclaration(Dispatcher.REQUEST.get().isSOAP());

        String baseURL = (String) EMFUtils.get((EObject)operation.getParameters()[0], "baseUrl");
       
View Full Code Here

Examples of org.geotools.wfs.v2_0.WFSConfiguration

    /**
     * Lists all the stored queries provided.
     */
    public List<StoredQuery> listStoredQueries() {
        Parser p = new Parser(new WFSConfiguration());
       
        List<StoredQuery> queries = new ArrayList();

        //add the default as mandated by spec
        queries.add(StoredQuery.DEFAULT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.