@Override protected void wrapInternal(Map properties, SimpleHash model, WCSInfo wcsInfo) { WorkspaceInfo workspaceInfo = wcsInfo.getWorkspace(); properties.put("workspaceName", workspaceInfo != null ? workspaceInfo.getName() : "NO_WORKSPACE"); properties.put("enabled", wcsInfo.isEnabled() ? "true" : "false"); properties.put("name", wcsInfo.getName()); properties.put("title", wcsInfo.getTitle()); properties.put("maintainer", wcsInfo.getMaintainer()); properties.put("abstract", wcsInfo.getAbstract()); properties.put("accessConstraints", wcsInfo.getAccessConstraints()); properties.put("fees", wcsInfo.getFees()); properties.put("versions", wcsInfo.getVersions()); properties.put("keywords", wcsInfo.getKeywords()); properties.put("metadataLink", wcsInfo.getMetadataLink()); properties.put("citeCompliant", wcsInfo.isCiteCompliant() ? "true" : "false"); properties.put("onlineResource", wcsInfo.getOnlineResource()); properties.put("schemaBaseURL", wcsInfo.getSchemaBaseURL()); properties.put("verbose", wcsInfo.isVerbose() ? "true" : "false"); properties.put("isSubsamplingEnabled", wcsInfo.isSubsamplingEnabled() ? "true" : "false"); properties.put("overviewPolicy", wcsInfo.getOverviewPolicy()); properties.put("maxInputMemory", String.valueOf(wcsInfo.getMaxInputMemory())); properties.put("maxOutputMemory", String.valueOf(wcsInfo.getMaxOutputMemory())); } });
element("wcs:name", wcs.getName()); element("wcs:label", wcs.getTitle()); handleKeywords(wcs.getKeywords()); handleContact();
/** * Handles the service identification of the capabilities document. * * @param config The OGC service to transform. * @throws SAXException For any errors. */ protected void handleServiceIdentification() { start("ows:ServiceIdentification"); element("ows:Title", wcs.getTitle()); element("ows:Abstract", wcs.getAbstract()); handleKeywords(wcs.getKeywords()); element("ows:ServiceType", "WCS"); element("ows:ServiceTypeVersion", "1.1.0"); element("ows:ServiceTypeVersion", "1.1.1"); String fees = wcs.getFees(); if ((fees == null) || "".equals(fees)) { fees = "NONE"; } element("ows:Fees", fees); String accessConstraints = wcs.getAccessConstraints(); if ((accessConstraints == null) || "".equals(accessConstraints)) { accessConstraints = "NONE"; } element("ows:AccessConstraints", accessConstraints); end("ows:ServiceIdentification"); }
@Test public void test() throws Exception { login(); WCSInfo wcs = getGeoServerApplication().getGeoServer().getService(WCSInfo.class); // start the page tester.startPage(new WCSAdminPage()); tester.assertRenderedPage(WCSAdminPage.class); // test that components have been filled as expected tester.assertComponent("form:keywords", KeywordsEditor.class); tester.assertModelValue("form:keywords", wcs.getKeywords()); } }
element("ows:Abstract", wcs.getAbstract()); handleKeywords(wcs.getKeywords());