if ("1.1.0".equals(version)) { capsTransformer = new CapabilitiesTransformer.WFS1_1( wfs, baseUrl, catalog, extendedCapabilitiesProviders); } else if ("2.0.0".equals(version)) {
boolean get, boolean post) { start("ows:Operation", attributes(new String[] {"name", name})); String serviceURL = buildURL(request.getBaseUrl(), "wfs", null, URLType.SERVICE); String[] pvalues = (String[]) parameters[i].getValue(); start("ows:Parameter", attributes(new String[] {"name", pname})); String[] cvalues = (String[]) constraints[i].getValue(); start("ows:Constraint", attributes(new String[] {"name", cname}));
protected void functions() { start("ogc:Functions"); Set<FunctionName> functions = getAvailableFunctionNames(); if (!functions.isEmpty()) { start("ogc:FunctionNames"); for (FunctionName fe : functions) { element( "ogc:FunctionName", fe.getName(), attributes(new String[] {"nArgs", "" + fe.getArgumentCount()})); } end("ogc:FunctionNames"); } end("ogc:Functions"); }
String uri = featureType.getNamespace().getURI(); start("FeatureType", attributes(new String[] {"xmlns:" + prefix, uri}));
element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Disjoint"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Equals"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "DWithin"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Beyond"})); element( "ogc:SpatialOperator", null, attributes(new String[] {"name", "Intersects"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Touches"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Crosses"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Within"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Contains"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "Overlaps"})); element("ogc:SpatialOperator", null, attributes(new String[] {"name", "BBOX"})); end("ogc:SpatialOperators");
public void encode(Object object) throws IllegalArgumentException { request = GetCapabilitiesRequest.adapt(object); verifyUpdateSequence(request); attributes( new String[] { "version", getNamespaceSupport().getURI(prefix)); registerNamespaces(attributes); updateSequence(attributes); Set<Sections> sections = getSections(request); if (sections.contains(Sections.ServiceIdentification)) { serviceIdentification();
delegate = (CapabilitiesTranslator1_1) wfs1_1.createTranslator(handler);
return; AttributesImpl mtAtts = attributes("type", metadataType, "format", format); element( "MetadataURL",
GetCapabilitiesType request = request(); CapabilitiesTransformer tx = new CapabilitiesTransformer.WFS1_1( getWFS(), request.getBaseUrl(),
GetCapabilitiesType request = request(); CapabilitiesTransformer tx = new CapabilitiesTransformer.WFS1_1( getWFS(), request.getBaseUrl(),
@Test public void test() throws Exception { GetCapabilitiesType request = request(); CapabilitiesTransformer tx = new CapabilitiesTransformer.WFS1_1( getWFS(), request.getBaseUrl(), getCatalog(), Collections.<WFSExtendedCapabilitiesProvider>emptyList()); ByteArrayOutputStream output = new ByteArrayOutputStream(); tx.transform(request, output); InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(output.toByteArray())); File f = new File("../web/src/main/webapp/schemas/wfs/1.1.0/wfs.xsd"); if (!f.exists()) { return; } ErrorHandler handler = new ErrorHandler(logger, Level.WARNING); // use the schema embedded in the web module ReaderUtils.validate( reader, handler, WFS.NAMESPACE, "../web/src/main/webapp/schemas/wfs/1.1.0/wfs.xsd"); assertTrue(handler.errors.isEmpty()); }
protected void operation(OperationMetadata operation) { start("ows:Operation", attributes(new String[] {"name", operation.getName()})); String serviceURL = buildURL(request.getBaseUrl(), "wfs", null, URLType.SERVICE); // dcp dcp(serviceURL, operation.isGet(), operation.isPost()); // parameters for (DomainType parameter : operation.getParameters()) { domainType("ows:Parameter", parameter); } // constraints for (DomainType constraint : operation.getConstraints()) { domainType("ows:Constraint", constraint); } end("ows:Operation"); }
protected String[] getoutputFormatNames() { return getAvailableOutputFormatNames(GML_3_1_1_FORMAT); }
protected void domainType(String elementName, DomainType domainType) { start(elementName, attributes(new String[] {"name", domainType.getName()})); if (domainType.getDefaultValue() != null) { element("ows:Value", domainType.getDefaultValue()); } if (!domainType.getAllowedValues().isEmpty()) { for (String v : domainType.getAllowedValues()) { element("ows:Value", v); } } end(elementName); } }
protected void dcp(String serviceURL, boolean get, boolean post) { start("ows:DCP"); start("ows:HTTP"); if (get) { element("ows:Get", null, attributes(new String[] {"xlink:href", serviceURL})); } if (post) { element("ows:Post", null, attributes(new String[] {"xlink:href", serviceURL})); } end("ows:HTTP"); end("ows:DCP"); }