/** * Gets the <code>Transformer</code> created by the overriden method in * the superclass and adds it the DOCTYPE token pointing to the * DescribeLayer DTD on this server instance. * * <p> * The DTD is set at the fixed location given by the <code>schemaBaseUrl</code> * passed to the constructor <code>+ "wms/1.1.1/WMS_DescribeLayerResponse.dtd</code>. * </p> * * @return a Transformer propoerly configured to produce DescribeLayer responses. * * @throws TransformerException if it is thrown by <code>super.createTransformer()</code> */ public Transformer createTransformer() throws TransformerException { Transformer transformer = super.createTransformer(); String dtdUrl = RequestUtils.proxifiedBaseURL(baseUrl,geoserver.getProxyBaseUrl()); dtdUrl += "schemas/wms/1.1.1/WMS_DescribeLayerResponse.dtd"; transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, dtdUrl); return transformer; }
.getGeoServer().getProxyBaseUrl()); final String locationDef = WCS_URI + " " + proxifiedBaseUrl + "schemas/wcs/1.1.1/wcsCoverages.xsd";
protected String wfsSchemaLocation(WFS wfs, String baseUrl) { return ResponseUtils.appendPath(RequestUtils.proxifiedBaseURL(baseUrl, wfs.getGeoServer().getProxyBaseUrl()), "schemas/wfs/1.0.0/WFS-versioning.xsd"); }
/** * Gets the <code>Transformer</code> created by the overriden method in * the superclass and adds it the system DOCTYPE token pointing to the * Capabilities DTD on this server instance. * * <p> * The DTD is set at the fixed location given by the * <code>schemaBaseUrl</code> passed to the constructor <code>+ * "wms/1.1.1/WMS_MS_Capabilities.dtd</code>. * </p> * * @return a Transformer propoerly configured to produce DescribeLayer * responses. * * @throws TransformerException * if it is thrown by <code>super.createTransformer()</code> */ public Transformer createTransformer() throws TransformerException { Transformer transformer = super.createTransformer(); GeoServer gs = (GeoServer)GeoServerExtensions.extensions(GeoServer.class, applicationContext).get(0); String dtdUrl = RequestUtils.proxifiedBaseURL(this.baseUrl,gs.getProxyBaseUrl()) + "schemas/wms/1.1.1/WMS_MS_Capabilities.dtd"; // DJB: fixed this to // point to correct // location transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, dtdUrl); return transformer; }
.getGeoServer().getProxyBaseUrl()) + "schemas/wcs/1.0.0/wcsCapabilities.xsd";
/** * DOCUMENT ME! * * @return a Transformer propoerly configured to produce DescribeLayer * responses. * * @throws TransformerException * if it is thrown by <code>super.createTransformer()</code> */ public Transformer createTransformer() throws TransformerException { Transformer transformer = super.createTransformer(); GeoServer gs = (GeoServer) GeoServerExtensions.extensions( GeoServer.class, applicationContext).get(0); String dtdUrl = RequestUtils.proxifiedBaseURL(this.baseUrl, gs .getProxyBaseUrl()) + "schemas/wcs/1.0.0/wcsCapabilities.xsd"; // DJB: fixed // this to // point to correct // location //JD: disabling doctype because it throws off the cite test parser. // I do not beleive that a doctype def is necessary anyways since // there is a xml schema for wcs 1.0, and plus, this doctype url points tp // an xml schema, which is just plain wrong //transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, dtdUrl); return transformer; }
.getGeoServer().getProxyBaseUrl()); final String locationDef = WCS_URI + " " + proxifiedBaseUrl + "schemas/wcs/1.1.1/wcsDescribeCoverage.xsd";
protected String typeSchemaLocation(WFS wfs, FeatureTypeInfo meta, String baseUrl) { final String proxifiedBase = RequestUtils.proxifiedBaseURL(baseUrl, wfs.getGeoServer().getProxyBaseUrl()); return ResponseUtils.appendQueryString(proxifiedBase + "wfs", "service=WFSV&version=1.0.0&request=DescribeVersionedFeatureType&typeName=" + meta.getName()); }
/** * As currently GeoServer does not have support for nested layers, this * method declares a <code>LayerDescription</code> element for each * featuretype requested. * * @param req */ private void handleLayers(DescribeLayerRequest req) { MapLayerInfo layer; String url = RequestUtils.proxifiedBaseURL(req.getBaseUrl(),req.getServiceConfig().getGeoServer().getProxyBaseUrl()) + "wfs/WfsDispatcher?"; AttributesImpl layerAtts = new AttributesImpl(); layerAtts.addAttribute("", "name", "name", "", ""); layerAtts.addAttribute("", "wfs", "wfs", "", url); AttributesImpl queryAtts = new AttributesImpl(); queryAtts.addAttribute("", "typeName", "typeName", "", ""); for (Iterator it = req.getLayers().iterator(); it.hasNext();) { layer = (MapLayerInfo) it.next(); layerAtts.setAttribute(0, "", "name", "name", "", layer.getName()); start("LayerDescription", layerAtts); queryAtts.setAttribute(0, "", "typeName", "typeName", "", layer.getName()); element("Query", null, queryAtts); end("LayerDescription"); } } }
.getBaseUrl(), wfs.getGeoServer().getProxyBaseUrl()); encoder.setSchemaLocation(org.geoserver.wfsv.xml.v1_1_0.WFSV.NAMESPACE, ResponseUtils.appendPath(proxifiedBaseUrl,
new StringBuffer(RequestUtils.proxifiedBaseURL( request.getBaseUrl() ,request.getServiceConfig().getGeoServer().getProxyBaseUrl() )); onlineResource.append("wms/GetLegendGraphic?VERSION=");
.getGeoServer().getProxyBaseUrl()); final String locationDef = WCS_URI + " " + proxifiedBaseUrl + "schemas/wcs/1.1.1/wcsGetCapabilities.xsd";
proxifiedBaseUrl = RequestUtils.proxifiedBaseURL(proxifiedBaseUrl,gs.getProxyBaseUrl());
RequestUtils.proxifiedBaseURL(request.getBaseUrl(), request.getServiceConfig().getGeoServer().getProxyBaseUrl()) + "wms?SERVICE=WMS&";
final String proxifiedBaseUrl = RequestUtils.proxifiedBaseURL(request.getBaseUrl(), wcs.getGeoServer().getProxyBaseUrl()); final String coverageLocation = proxifiedBaseUrl + "temp/wcs/" + coverageFile.getName();
/** * Encodes the service metadata section of a WMS capabilities document. */ private void handleService() { WMS wms = (WMS) request.getServiceConfig(); start("Service"); element("Name", "OGC:WMS"); element("Title", wms.getTitle()); element("Abstract", wms.getAbstract()); handleKeywordList(wms.getKeywords()); AttributesImpl orAtts = new AttributesImpl(); orAtts.addAttribute("", "xmlns:xlink", "xmlns:xlink", "", XLINK_NS); orAtts.addAttribute(XLINK_NS, "xlink:type", "xlink:type", "", "simple"); orAtts.addAttribute("", "xlink:href", "xlink:href", "", RequestUtils.proxifiedBaseURL(request.getBaseUrl(),wms.getGeoServer().getProxyBaseUrl()) + "wms"); element("OnlineResource", null, orAtts); handleContactInfo(wms.getGeoServer()); element("Fees", wms.getFees()); element("AccessConstraints", wms.getAccessConstraints()); end("Service"); }
.getGeoServer().getProxyBaseUrl());
.getGeoServer().getProxyBaseUrl()); baseUrl = ResponseUtils.appendPath(baseUrl, "wcs");
public void write(Object value, OutputStream output, Operation describeFeatureType) throws IOException { VersionedDescribeResults results = (VersionedDescribeResults) value; // create the schema DescribeFeatureTypeType req = (DescribeFeatureTypeType) describeFeatureType .getParameters()[0]; String proxifiedBaseUrl = RequestUtils.proxifiedBaseURL(req .getBaseUrl(), wfs.getGeoServer().getProxyBaseUrl()); FeatureTypeSchemaBuilder builder = null; if (results.isVersioned()) { builder = new VersionedSchemaBuilder(wfs, catalog, resourceLoader, configuration); } else { builder = new FeatureTypeSchemaBuilder.GML3(wfs, catalog, resourceLoader); } XSDSchema schema = builder.build(results.getFeatureTypeInfo(), proxifiedBaseUrl); // serialize schema.updateElement(); XSDResourceImpl.serialize(output, schema.getElement()); }