An operation is identified by an id,service pair. Two operation descriptors are considred equal if they have the same id, service pair.
7475767778798081
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 }); }
106107108109110111112113114115116
} //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 = wmsConfig.getGeoServer(); GML2OutputFormat format = new GML2OutputFormat(gs); format.write(features, out, opDescriptor); }
222223224225226227228229230231232
if (request.getError() != null) { throw request.getError(); } //dispatch the operation Operation operation = dispatch(request, service); //execute it Object result = execute(request, operation); //write the response
550551552553554555556557
"MissingParameterValue", "service"); } } } Operation op = new Operation(req.getRequest(), serviceDescriptor, operation, parameters); return fireOperationDispatchedCallback(req,op); }
556557558559560561562563564565
return fireOperationDispatchedCallback(req,op); } Operation fireOperationDispatchedCallback(Request req, Operation op ) { for ( DispatcherCallback cb : callbacks ) { Operation o = cb.operationDispatched( req, op ); op = o != null ? o : op; } return op; }
3031323334353637
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; }
64656667686970
@Override protected void setUpInternal() throws Exception { super.setUpInternal(); gft = WfsFactory.eINSTANCE.createGetFeatureType(); op = new Operation("GetFeature", getServiceDescriptor10(), null, new Object[] {gft}); }
5556575859606162
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; }
7475767778798081828384
data.addFeature(f2); FeatureSource<SimpleFeatureType, SimpleFeature> fs = data.getFeatureSource("funnyLabels"); // build the request objects and feed the output format GetFeatureType gft = WfsFactory.eINSTANCE.createGetFeatureType(); Operation op = new Operation("GetFeature", getServiceDescriptor10(), null, new Object[] {gft}); ByteArrayOutputStream bos = new ByteArrayOutputStream(); FeatureCollectionType fct = WfsFactory.eINSTANCE.createFeatureCollectionType(); fct.getFeature().add(fs.getFeatures()); // write out the results
9596979899100101102103104105
} // 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); }