Package org.geoserver.wfsv

Examples of org.geoserver.wfsv.VersionedDescribeResults


        return delegate.getMimeType(value, operation);
    }

    public void write(Object value, OutputStream output, Operation operation)
            throws IOException, org.geoserver.platform.ServiceException {
        VersionedDescribeResults results = (VersionedDescribeResults) value;

        if (!results.isVersioned()) {
            delegate.write(results.getFeatureTypeInfo(), output, operation);
        } else {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            delegate.write(results.getFeatureTypeInfo(), bos, operation);
            String describe = bos.toString();

            // now let's do the transformation magic, sigh...
            for (int i = 0; i < REPLACEMENTS.length; i++) {
                describe = describe.replaceAll(REPLACEMENTS[i][0],
View Full Code Here


        return "text/xml; subtype=gml/3.1.1";
    }

    public void write(Object value, OutputStream output,
            Operation describeFeatureType) throws IOException {
        VersionedDescribeResults results = (VersionedDescribeResults) value;

        // create the schema
        DescribeFeatureTypeType req = (DescribeFeatureTypeType) describeFeatureType
                .getParameters()[0];
        FeatureTypeSchemaBuilder builder = null;
        if (results.isVersioned()) {
            builder = new VersionedSchemaBuilder(wfs.getGeoServer(), configuration);
        } else {
            builder = new FeatureTypeSchemaBuilder.GML3(wfs.getGeoServer());
        }

        XSDSchema schema = builder.build(results.getFeatureTypeInfo(), req.getBaseUrl());

        // serialize
        schema.updateElement();
        XSDResourceImpl.serialize(output, schema.getElement());
    }
View Full Code Here

        return "text/xml; subtype=gml/3.1.1";
    }

    public void write(Object value, OutputStream output,
            Operation describeFeatureType) throws IOException {
        VersionedDescribeResults results = (VersionedDescribeResults) value;

        // create the schema
        DescribeFeatureTypeType req = (DescribeFeatureTypeType) describeFeatureType
                .getParameters()[0];
        FeatureTypeSchemaBuilder builder = null;
        if (results.isVersioned()) {
            builder = new VersionedSchemaBuilder(wfs.getGeoServer(), configuration);
        } else {
            builder = new FeatureTypeSchemaBuilder.GML3(wfs.getGeoServer());
        }

        XSDSchema schema = builder.build(results.getFeatureTypeInfo(), req.getBaseUrl());

        // serialize
        schema.updateElement();
        XSDResourceImpl.serialize(output, schema.getElement());
    }
View Full Code Here

TOP

Related Classes of org.geoserver.wfsv.VersionedDescribeResults

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.