private void service(StringBuilder str) { ServiceInformation servInfo = tld.getServiceInformation(); str.append("<Service>\n"); str.append(" <Name>OGC:WMS</Name>\n"); if (servInfo == null) { str.append(" <Title>Web Map Service - GeoWebCache</Title>\n"); } else { str.append(" <Title>" + servInfo.getTitle() + "</Title>\n"); str.append(" <Abstract>" + servInfo.getDescription() + "</Abstract>\n"); if (servInfo.getKeywords() != null) { str.append(" <KeywordList>\n"); Iterator<String> keywordIter = servInfo.getKeywords().iterator(); while (keywordIter.hasNext()) { str.append(" <Keyword>" + keywordIter.next() + "</Keyword>\n"); } str.append(" </KeywordList>\n"); } } str.append(" <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:href=\"" + urlStr + "\"/>\n"); serviceContact(str); if (servInfo != null) { str.append(" <Fees>" + servInfo.getFees() + "</Fees>\n"); str.append(" <AccessConstraints>" + servInfo.getAccessConstraints() + "</AccessConstraints>\n"); } str.append("</Service>\n"); }
/** Composes service information using information provided by extensions. */ private ServiceInformation getServiceInformation() { ServiceInformation servInfo = tld.getServiceInformation(); for (WMTSExtension extension : extensions) { ServiceInformation serviceInformation = extension.getServiceInformation(); if (serviceInformation != null) { if (servInfo == null) { servInfo = new ServiceInformation(); } mergeServiceInformation(servInfo, serviceInformation); } } return servInfo; }
private void serviceContact(StringBuilder str) { ServiceInformation servInfo = tld.getServiceInformation(); if (servInfo == null) { return;
expect(servInfo.getFees()).andStubReturn("NONE"); expect(servInfo.getAccessConstraints()).andStubReturn("NONE"); expect(tld.getServiceInformation()).andStubReturn(servInfo);
private void service(XMLBuilder xml) throws IOException { ServiceInformation servInfo = tld.getServiceInformation(); xml.indentElement("Service"); xml.indentElement("Name").text("OGC:WMS").endElement(); if (servInfo == null) { xml.indentElement("Title").text("Web Map Service - GeoWebCache").endElement(); } else { xml.indentElement("Title").text(servInfo.getTitle()).endElement(); xml.indentElement("Abstract").text(servInfo.getDescription()).endElement(); if (servInfo.getKeywords() != null) { xml.indentElement("KeywordList"); Iterator<String> keywordIter = servInfo.getKeywords().iterator(); while (keywordIter.hasNext()) { xml.indentElement("Keyword").text(keywordIter.next()).endElement(); } xml.endElement(); } } onlineResource(xml, urlStr); serviceContact(xml); if (servInfo != null) { xml.indentElement("Fees").text(servInfo.getFees()).endElement(); xml.indentElement("AccessConstraints") .text(servInfo.getAccessConstraints()) .endElement(); } xml.endElement(); }
private void serviceContact(XMLBuilder xml) throws IOException { ServiceInformation servInfo = tld.getServiceInformation(); if (servInfo == null) { return;