Package org.geotools.xml

Examples of org.geotools.xml.Configuration


                FeatureId featureId = ff.featureId(addedId);
                inserted.getFeatureId().add(featureId);
            }
        }

        Configuration configuration = getStrategy().getWfsConfiguration();
        Encoder enc = new Encoder(configuration);
        enc.setEncoding(Charset.forName("UTF-8"));
        enc.setIndenting(true);
        enc.setIndentSize(1);
View Full Code Here


            final HTTPResponse httpResponse) throws ServiceException, IOException {

        super(request, httpResponse);

        final WFSStrategy strategy = request.getStrategy();
        final Configuration wfsConfiguration = strategy.getWfsConfiguration();
        final QName remoteTypeName = request.getTypeName();
        final FeatureTypeInfo featureTypeInfo = strategy.getFeatureTypeInfo(remoteTypeName);
        final CoordinateReferenceSystem defaultCrs = featureTypeInfo.getCRS();

        InputStream responseStream = httpResponse.getResponseStream();
View Full Code Here

        inserted = new ArrayList<FeatureId>();

        Object parsed;
        try {
            WFSStrategy strategy = originatingRequest.getStrategy();
            Configuration wfsConfiguration = strategy.getWfsConfiguration();
            Parser parser = new Parser(wfsConfiguration);
            InputStream input = response.getResponseStream();
            parsed = parser.parse(input);
        } catch (SAXException e) {
            throw new IOException(e);
View Full Code Here

     * Returns a single-line string containing the xml representation of the given filter, as
     * appropriate for the {@code FILTER} parameter in a GetFeature request.
     */
    protected String encodeGetFeatureGetFilter(final Filter filter) throws IOException {

        final Configuration filterConfig = getFilterConfiguration();
        final QName encName;

        if (filterConfig instanceof org.geotools.filter.v1_0.OGCConfiguration
                || filterConfig instanceof org.geotools.filter.v1_1.OGCConfiguration) {
            encName = org.geotools.filter.v1_0.OGC.Filter;
View Full Code Here

    // }
    // return null;
    // }

    protected Encoder prepareEncoder(WFSRequest request) {
        final Configuration configuration = getWfsConfiguration();
        Charset charset = getConfig().getDefaultEncoding();
        if (null == charset) {
            charset = Charset.forName("UTF-8");
        }
        Encoder encoder = new Encoder(configuration);
View Full Code Here

    /**
     * Returns a single-line string containing the xml representation of the given filter, as
     * appropriate for the {@code FILTER} parameter in a GetFeature request.
     */
    protected String encodeGetFeatureGetFilter(final Filter filter) throws IOException {
        Configuration filterConfig = getFilterConfiguration();
        Encoder encoder = new Encoder(filterConfig);
        // do not write the xml declaration
        encoder.setOmitXMLDeclaration(true);
        encoder.setEncoding(Charset.forName("UTF-8"));

View Full Code Here

    public StreamingParserFeatureReader(final Configuration wfsConfiguration,
            final InputStream getFeatureResponseStream, final QName featureName,
            final URL describeFeatureTypeRequest) throws DataSourceException {
        this.inputStream = getFeatureResponseStream;
        try {
            Configuration appSchemaConfiguration;
            String namespaceURI = featureName.getNamespaceURI();
            String schemaLocation = describeFeatureTypeRequest.toExternalForm();
            appSchemaConfiguration = new WFSAppSchemaConfiguration(wfsConfiguration, namespaceURI,
                    schemaLocation);
View Full Code Here

    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

        return typeInfos.get(typeName);
    }

    protected WFSCapabilitiesType parseCapabilities(InputStream capabilitiesReader)
            throws IOException {
        final Configuration wfsConfig = strategy.getWfsConfiguration();
        final Parser parser = new Parser(wfsConfig);
        final Object parsed;
        try {
            parsed = parser.parse(capabilitiesReader);
        } catch (SAXException e) {
View Full Code Here

            }else{
                describeUrl = getDescribeFeatureTypeURLGet(prefixedTypeName);
            }
        }
       
        final Configuration wfsConfiguration = strategy.getWfsConfiguration();
        final QName featureDescriptorName = getFeatureTypeName(prefixedTypeName);

       
        SimpleFeatureType featureType;
        try {
View Full Code Here

TOP

Related Classes of org.geotools.xml.Configuration

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.