Package org.geoserver.platform

Examples of org.geoserver.platform.Operation


        }

        // this is a dummy wrapper around our 'request' object so that the new Dispatcher will
        // accept it.
        Service serviceDesc = new Service("wms", null, null, Collections.EMPTY_LIST);
        Operation opDescriptor = new Operation("", serviceDesc, null, new Object[] { gfreq });

        final GeoServer gs = wms.getGeoServer();
               
        FeatureTypeSchemaBuilder sb = new FeatureTypeSchemaBuilder.GML3(gs);
        WFSConfiguration configuration = new WFSConfiguration(gs, sb, new WFS(sb));
View Full Code Here


    @Before
    public void init() {
        gft = WfsFactory.eINSTANCE.createGetFeatureType();
        format = new GeoPackageGetFeatureOutputFormat(getGeoServer());
        op = new Operation("GetFeature", getServiceDescriptor10(), null, new Object[] { gft });
    }
View Full Code Here

            }
        }
       

        // prepare the fake operation we're providing to the source output format
        final Operation sourceOperation = buildSourceOperation(operation, info);

        // lookup the operation we are going to use
        final Response sourceResponse = findSourceResponse(sourceOperation, info);
        if (sourceResponse == null) {
            throw new WFSException(
View Full Code Here

    private Operation buildSourceOperation(Operation operation, TransformInfo info) {
        try {
            EObject originalParam = (EObject) operation.getParameters()[0];
            EObject copy = EcoreUtil.copy(originalParam);
            BeanUtils.setProperty(copy, "outputFormat", info.getSourceFormat());
            final Operation sourceOperation = new Operation(operation.getId(),
                    operation.getService(), operation.getMethod(), new Object[] { copy });
            return sourceOperation;
        } catch (Exception e) {
            throw new WFSException(
                    "Failed to create the source operation for XSLT, this is unexpected", e);
View Full Code Here

        ogr.setGdalData(Ogr2OgrTestUtil.getGdalData());

        // the EMF objects used to talk with the output format
        gft = WfsFactory.eINSTANCE.createGetFeatureType();
        fct = WfsFactory.eINSTANCE.createFeatureCollectionType();
        op = new Operation("GetFeature", new Service("WFS", null, new Version("1.0.0"),
                Arrays.asList("GetFeature")), null, new Object[] { gft });
    }
View Full Code Here

            default:
                schemaEncoder = new XmlSchemaEncoder.V20(geoServer);
            }

            //build a "dummy" operation descriptor and call the encoder
            Operation op = new Operation("DescribeFeatureType", new Service("WFS",null,null,null),
                null, new Object[]{request.getAdaptee()});
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            schemaEncoder.write(featureTypes, bout, op);

            return new ByteArrayInputStream(bout.toByteArray());
View Full Code Here

        for (QName name : names) {
            QueryType queryType = WfsFactory.eINSTANCE.createQueryType();
            queryType.setTypeName(Collections.singletonList(name));
            type.getQuery().add(queryType);
        }
        Operation request = new Operation("wfs", service, null, new Object[] { type });
        return request;
    }
View Full Code Here

    Operation request() {
        Service service = getServiceDescriptor10();
        DescribeFeatureTypeType type = WfsFactory.eINSTANCE.createDescribeFeatureTypeType();
        type.setBaseUrl("http://localhost:8080/geoserver");
       
        Operation request = new Operation("wfs", service, null, new Object[] { type });
        return request;
    }
View Full Code Here

        final String format = responseFormat.getFormat();
        final String mimeType = responseFormat.getMimeType();

        Response response = cachedTileEncoders.get(format);
        if (response == null) {
            final Operation operation;
            {
                GetMapRequest getMap = new GetMapRequest();
                getMap.setFormat(mimeType);
                Object[] parameters = { getMap };
                org.geoserver.platform.Service service = (org.geoserver.platform.Service) GeoServerExtensions
                        .bean("wms-1_1_1-ServiceDescriptor");
                if (service == null) {
                    throw new IllegalStateException(
                            "Didn't find service descriptor 'wms-1_1_1-ServiceDescriptor'");
                }
                operation = new Operation("GetMap", service, (Method) null, parameters);
            }

            final List<Response> extensions = GeoServerExtensions.extensions(Response.class);
            final Class<?> webMapClass = metaTileMap.getClass();
            for (Response r : extensions) {
View Full Code Here

        }

        // this is a dummy wrapper around our 'request' object so that the new Dispatcher will
        // accept it.
        Service serviceDesc = new Service("wms", null, null, Collections.EMPTY_LIST);
        Operation opDescriptor = new Operation("", serviceDesc, null, new Object[] { gfreq });

        final GeoServer gs = wms.getGeoServer();
        GML2OutputFormat format = new GML2OutputFormat(gs);
        format.write(features, out, opDescriptor);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.platform.Operation

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.