Package org.geotools.data.wfs.v1_1_0.DataTestSupport

Examples of org.geotools.data.wfs.v1_1_0.DataTestSupport.TestHttpProtocol


               
                postURL = new URL(url);
            }
        }

        RequestComponents reqParts = strategy.createGetFeatureRequest(this, request);
        GetFeatureType serverRequest = reqParts.getServerRequest();

        Encoder encoder = new Encoder(strategy.getWfsConfiguration());

        // If the typeName is of the form prefix:typeName we better declare the namespace since we
        // don't know how picky the server parser will be
        String typeName = reqParts.getKvpParameters().get("TYPENAME");
        QName fullName = getFeatureTypeName(typeName);
        String prefix = fullName.getPrefix();
        String namespace = fullName.getNamespaceURI();
        if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) {
            encoder.getNamespaces().declarePrefix(prefix, namespace);
View Full Code Here


    @Test
    public void testCreateGetFeatureRequest() throws IOException {
        GetFeature query = new GetFeatureQueryAdapter(new Query(
                CUBEWERX_GOVUNITCE.FEATURETYPENAME), "GML2", "EPSG:4326", ResultType.RESULTS);
        RequestComponents getFeatureRequest = strategy.createGetFeatureRequest(wfs, query);
        GetFeatureType serverRequest = getFeatureRequest.getServerRequest();
        ResultTypeType resultType = serverRequest.getResultType();
        assertNull(resultType);
        Map<String, String> kvpParameters = getFeatureRequest.getKvpParameters();
        assertNull(kvpParameters.get("RESULTTYPE"));
    }
View Full Code Here

            WFSStrategy strategy = determineCorrectStrategy(getCapabilitiesRequest, capsDoc, wfsStrategy );
           
            WFS_1_1_0_Protocol wfs = new WFS_1_1_0_Protocol(capsIn, http, defaultEncoding, strategy);

            dataStore = new WFS_1_1_0_DataStore(wfs);
            dataStore.setMaxFeatures(maxFeatures);
            dataStore.setPreferPostOverGet(protocol);
            dataStore.setUseDefaultSRS(useDefaultSRS);
            ((WFS_1_1_0_DataStore) dataStore).setAxisOrder(axisOrder,
                    axisOrderFilter);
View Full Code Here

        } else {
            InputStream capsIn = new ByteArrayInputStream(wfsCapabilitiesRawData);

            WFSStrategy strategy = determineCorrectStrategy(getCapabilitiesRequest, capsDoc, wfsStrategy );
           
            WFS_1_1_0_Protocol wfs = new WFS_1_1_0_Protocol(capsIn, http, defaultEncoding, strategy);

            dataStore = new WFS_1_1_0_DataStore(wfs);
            dataStore.setMaxFeatures(maxFeatures);
            dataStore.setPreferPostOverGet(protocol);
            dataStore.setUseDefaultSRS(useDefaultSRS);
View Full Code Here

    @Override
    protected GetFeatureParser getParser(final QName featureName, final String schemaLocation,
            final SimpleFeatureType featureType, final URL getFeaturesRequest) throws IOException {

        InputStream inputStream = new BufferedInputStream(getFeaturesRequest.openStream());
        GetFeatureParser parser = new XmlSimpleFeatureParser(inputStream,
                featureType, featureName, WFSDataStore.AXIS_ORDER_COMPLIANT,
                new HashMap<String, String>());
        return parser;
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.wfs.v1_1_0.DataTestSupport.TestHttpProtocol

Copyright © 2018 www.massapicom. 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.