"", /* "WGS84(DD)" */ "urn:ogc:def:crs:OGC:1.3:CRS84"); start("wcs:lonLatEnvelope", attributes); final StringBuffer minCP = new StringBuffer(Double.toString(referencedEnvelope.getMinX())) .append(referencedEnvelope.getMaxY()); element("gml:pos", minCP.toString()); element("gml:pos", maxCP.toString()); element("gml:timePosition", timeFormat.format(dimensions.getMinTime())); element("gml:timePosition", timeFormat.format(dimensions.getMaxTime())); end("wcs:lonLatEnvelope");
attributes.addAttribute( "", "updateSequence", "updateSequence", "", String.valueOf(updateSequence)); start("wcs:WCS_Capabilities", attributes); || section.equals( CapabilitiesSectionType.WCS_CAPABILITIES_SERVICE_LITERAL)) { handleService(allSections); || section.equals( CapabilitiesSectionType.WCS_CAPABILITIES_CAPABILITY_LITERAL)) handleCapabilities(allSections); handleContentMetadata(allSections); end("wcs:WCS_Capabilities");
|| ((contact.getContactOrganization() != null) && (contact.getContactOrganization() != ""))) { start("wcs:responsibleParty"); element("wcs:individualName", tmp); } else { element("wcs:individualName", ""); element("wcs:organisationName", tmp); element("wcs:positionName", tmp); start("wcs:contactInfo"); start("wcs:phone"); tmp = contact.getContactVoice(); element("wcs:voice", tmp); element("wcs:facsimile", tmp); end("wcs:phone"); start("wcs:address"); tmp = contact.getAddressType(); element("wcs:deliveryPoint", tmp + " " + addr);
start("wcs:CoverageOfferingBrief"); handleMetadataLink(mdl, "simple"); element("wcs:description", tmp); element("wcs:name", tmp); element("wcs:label", tmp); cv.getMetadata().get(ResourceInfo.TIME, DimensionInfo.class); ReaderDimensionsAccessor dimensions = new ReaderDimensionsAccessor(reader); handleEnvelope(cv.getLatLonBoundingBox(), timeInfo, dimensions); handleKeywords(cv.getKeywords()); end("wcs:CoverageOfferingBrief");
attributes.addAttribute("", "version", "version", "", CUR_VERSION); start("wcs:Service", attributes); if (wcs.getMetadataLink() != null) { handleMetadataLink(wcs.getMetadataLink(), "simple"); element("wcs:description", wcs.getAbstract()); element("wcs:name", wcs.getName()); element("wcs:label", wcs.getTitle()); handleKeywords(wcs.getKeywords()); handleContact(); element("wcs:fees", fees); element("wcs:accessConstraints", accessConstraints); end("wcs:Service");
private void handleCapability(String capabilityName) { AttributesImpl attributes = new AttributesImpl(); start(capabilityName); start("wcs:DCPType"); start("wcs:HTTP"); // String baseURL = RequestUtils.proxifiedBaseURL(request.getBaseUrl(), // wcs.getGeoServer().getGlobal().getProxyBaseUrl()); String url = buildURL(request.getBaseUrl(), "wcs", null, URLType.SERVICE); url = makeURLAppendable(url); attributes.addAttribute("", "xlink:href", "xlink:href", "", url); start("wcs:Get"); start("wcs:OnlineResource", attributes); end("wcs:OnlineResource"); end("wcs:Get"); end("wcs:HTTP"); end("wcs:DCPType"); attributes = new AttributesImpl(); attributes.addAttribute("", "xlink:href", "xlink:href", "", url); start("wcs:DCPType"); start("wcs:HTTP"); start("wcs:Post"); start("wcs:OnlineResource", attributes); end("wcs:OnlineResource"); end("wcs:Post"); end("wcs:HTTP"); end("wcs:DCPType"); end(capabilityName); }
private void handleMetadataLink(MetadataLinkInfo mdl, String linkType) { AttributesImpl attributes = new AttributesImpl(); if ((mdl.getAbout() != null) && (mdl.getAbout() != "")) { attributes.addAttribute("", "about", "about", "", mdl.getAbout()); } if ((linkType != null) && (linkType != "")) { attributes.addAttribute("", "xlink:type", "xlink:type", "", linkType); } if ((mdl.getMetadataType() != null) && (mdl.getMetadataType() != "")) { attributes.addAttribute( "", "metadataType", "metadataType", "", mdl.getMetadataType()); } if ((mdl.getContent() != null) && (mdl.getContent() != "")) { attributes.addAttribute( "", "xlink:href", "xlink:href", "", ResponseUtils.proxifyMetadataLink(mdl, request.getBaseUrl())); } if (attributes.getLength() > 0) { element("wcs:metadataLink", null, attributes); } }
/** * Handles the printing of the exceptions information, prints the formats that GeoServer can * return exceptions in. * * @param config The wms service global config. * @throws SAXException For any problems. */ private void handleExceptions() { start("wcs:Exception"); final List<String> exceptionFormats = wcs.getExceptionFormats(); if (exceptionFormats == null || exceptionFormats.isEmpty()) { exceptionFormats.add("application/vnd.ogc.se_xml"); } for (String format : exceptionFormats) { element("wcs:Format", format); } end("wcs:Exception"); }
/** * DOCUMENT ME! * * @param kwords DOCUMENT ME! * @throws SAXException DOCUMENT ME! */ private void handleKeywords(List kwords) { if (kwords == null || kwords.isEmpty()) { return; } start("wcs:keywords"); if (kwords != null) { for (Iterator it = kwords.iterator(); it.hasNext(); ) { element("wcs:keyword", it.next().toString()); } } end("wcs:keywords"); }
public Translator createTranslator(ContentHandler handler) { return new WCS100CapsTranslator(handler); }
/** * Handles the request portion of the document, printing out the capabilities and where to * bind to them. * * @param config The global wms. * @throws SAXException For any problems. */ private void handleRequest() { start("wcs:Request"); handleCapability("wcs:GetCapabilities"); handleCapability("wcs:DescribeCoverage"); handleCapability("wcs:GetCoverage"); end("wcs:Request"); }
/** * DOCUMENT ME! * * @param serviceConfig DOCUMENT ME! * @throws SAXException DOCUMENT ME! */ private void handleCapabilities(boolean allSections) { start("wcs:Capability"); handleRequest(); handleExceptions(); handleVendorSpecifics(); end("wcs:Capability"); }
/** * Writes the element if and only if the content is not null and not empty * * @param elementName * @param content */ private void elementIfNotEmpty(String elementName, String content) { if (content != null && !"".equals(content.trim())) element(elementName, content); } }