/** * 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; }
/** * Encodes contact information in the WMS capabilities document * @param geoServer */ public void handleContactInfo(GeoServer geoServer) { start("ContactInformation"); start("ContactPersonPrimary"); element("ContactPerson", geoServer.getContactPerson()); element("ContactOrganization", geoServer.getContactOrganization()); end("ContactPersonPrimary"); element("ContactPosition", geoServer.getContactPosition()); start("ContactAddress"); element("AddressType", geoServer.getAddressType()); element("Address", geoServer.getAddress()); element("City", geoServer.getAddressCity()); element("StateOrProvince", geoServer.getAddressState()); element("PostCode", geoServer.getAddressPostalCode()); element("Country", geoServer.getAddressCountry()); end("ContactAddress"); element("ContactVoiceTelephone", geoServer.getContactVoice()); element("ContactFacsimileTelephone", geoServer.getContactFacsimile()); element("ContactElectronicMailAddress", geoServer.getContactEmail()); end("ContactInformation"); }
.getGeoServer().getProxyBaseUrl()) + "schemas/wcs/1.0.0/wcsCapabilities.xsd"; attributes.addAttribute("", "updateSequence", "updateSequence", "", wcs.getGeoServer().getUpdateSequence() + ""); start("WCS_Capabilities", attributes);
/** * Handles the service provider of the capabilities document. * * @param config * The OGC service to transform. * * @throws SAXException * For any errors. */ private void handleServiceProvider() { start("ows:ServiceProvider"); element("ows:ProviderName", wcs.getGeoServer().getContactOrganization()); AttributesImpl attributes = new AttributesImpl(); attributes.addAttribute("", "xlink:href", "xlink:href", "", wcs.getGeoServer() .getOnlineResource()); element("ows:ProviderSite", null, attributes); handleContact(); end("ows:ServiceProvider"); }
void encodeEntry(SimpleFeature feature, WMSMapContext map) { start("entry"); //title element("title", feature.getID()); start("author"); element("name", map.getRequest().getGeoServer().getContactPerson()); end("author"); //id element("id", AtomUtils.getEntryURI(feature, map)); AttributesImpl atts = new AttributesImpl(); atts.addAttribute(null, "href", "href", null, AtomUtils.getEntryURL(feature, map) ); atts.addAttribute(null, "rel", "rel", null, "self"); element("link", null, atts); //updated element("updated", AtomUtils.dateToRFC3339(new Date())); //content atts = new AttributesImpl(); atts.addAttribute(null, "type", "type", null, "html"); element("content", AtomUtils.getFeatureDescription(feature), atts); //where start("georss:where"); encodeGeometry(feature); end("georss:where"); end("entry"); } }
final int updateSequence = wcs.getGeoServer().getUpdateSequence(); int requestedUpdateSequence = -1; if (request.getUpdateSequence() != null) { .getGeoServer().getProxyBaseUrl()); final String locationDef = WCS_URI + " " + proxifiedBaseUrl + "schemas/wcs/1.1.1/wcsGetCapabilities.xsd";
start("ows:ServiceContact"); elementIfNotEmpty("ows:IndividualName", gs.getContactPerson()); elementIfNotEmpty("ows:PositionName", gs.getContactPosition()); elementIfNotEmpty("ows:Voice", gs.getContactVoice()); elementIfNotEmpty("ows:Facsimile", gs.getContactFacsimile()); end("ows:Phone"); start("ows:Address"); elementIfNotEmpty("ows:DeliveryPoint", gs.getAddress()); elementIfNotEmpty("ows:City", gs.getAddressCity()); elementIfNotEmpty("ows:AdministrativeArea", gs.getAddressState()); elementIfNotEmpty("ows:PostalCode", gs.getAddressPostalCode()); elementIfNotEmpty("ows:Country", gs.getAddressCountry()); elementIfNotEmpty("ows:ElectronicMailAddress", gs.getContactEmail()); end("ows:Address"); String or = gs.getOnlineResource(); if ((or != null) && !"".equals(or.trim())) { AttributesImpl attributes = new AttributesImpl();
.getGeoServer().getProxyBaseUrl()); final String locationDef = WCS_URI + " " + proxifiedBaseUrl + "schemas/wcs/1.1.1/wcsCoverages.xsd";
if (((config.getGeoServer().getContactPerson() != null) && (config.getGeoServer().getContactPerson() != "")) || ((config.getGeoServer().getContactOrganization() != null) && (config.getGeoServer().getContactOrganization() != ""))) { start("responsibleParty"); tmp = config.getGeoServer().getContactPerson(); tmp = config.getGeoServer().getContactOrganization(); tmp = config.getGeoServer().getContactOrganization(); tmp = config.getGeoServer().getContactPosition(); tmp = config.getGeoServer().getContactVoice(); tmp = config.getGeoServer().getContactFacsimile(); tmp = config.getGeoServer().getAddressType(); addr = config.getGeoServer().getAddress(); tmp = config.getGeoServer().getAddress(); tmp = config.getGeoServer().getAddressCity(); tmp = config.getGeoServer().getAddressState(); tmp = config.getGeoServer().getAddressPostalCode();
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; }
/** * 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=");
proxifiedBaseUrl = RequestUtils.proxifiedBaseURL(proxifiedBaseUrl,gs.getProxyBaseUrl());
final String proxifiedBaseUrl = RequestUtils.proxifiedBaseURL(request.getBaseUrl(), wcs.getGeoServer().getProxyBaseUrl()); final String coverageLocation = proxifiedBaseUrl + "temp/wcs/" + coverageFile.getName();
RequestUtils.proxifiedBaseURL(request.getBaseUrl(), request.getServiceConfig().getGeoServer().getProxyBaseUrl()) + "wms?SERVICE=WMS&";