Examples of WCSInfo


Examples of org.geoserver.wcs.WCSInfo

            if (wms == null) {
                LOGGER.warning("Missing WMS service. Creating default one.");
                HibDefaultsFactoryImpl.createWMS(global, geoserver);
            }

            WCSInfo wcs = geoserver.getService(WCSInfo.class);
            if (wcs == null) {
                LOGGER.warning("Missing WCS service. Creating default one.");
                HibDefaultsFactoryImpl.createWCS(global, geoserver);
            }
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

public class WCSAdminPageTest extends GeoServerWicketCoverageTestSupport {

    public void test() throws Exception {
        login();
        WCSInfo wcs = getGeoServerApplication().getGeoServer().getService(WCSInfo.class);
       
        // start the page
        tester.startPage(new WCSAdminPage());
       
        // test that components have been filled as expected
        tester.assertComponent("form:keywords", KeywordsEditor.class);
        tester.assertModelValue("form:keywords", wcs.getKeywords());
    }
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

                throw new IllegalArgumentException(new StringBuffer("Not a CapabilitiesRequest: ").append(
                        o).toString());
            }

            this.request = (CapabilitiesRequest) o;
      final WCSInfo wcs = (WCSInfo) request.getServiceConfig();

            final AttributesImpl attributes = new AttributesImpl();
            attributes.addAttribute("", "version", "version", "", CUR_VERSION);
            attributes.addAttribute("", "xmlns", "xmlns", "", WCS_URI);

            attributes.addAttribute("", "xmlns:xlink", "xmlns:xlink", "",
                "http://www.w3.org/1999/xlink");
            attributes.addAttribute("", "xmlns:ogc", "xmlns:ogc", "", "http://www.opengis.net/ogc");
            attributes.addAttribute("", "xmlns:gml", "xmlns:gml", "", "http://www.opengis.net/gml");

            final String prefixDef = new StringBuffer("xmlns:").append(XSI_PREFIX).toString();
            attributes.addAttribute("", prefixDef, prefixDef, "", XSI_URI);

            final String locationAtt = new StringBuffer(XSI_PREFIX).append(":schemaLocation")
                                                                   .toString();

            GeoServerInfo gsInfo = wcs.getGeoServer().getGlobal();
      final String locationDef = WCS_URI + " " +
          buildURL(request.getBaseUrl(), appendPath(SCHEMAS, "schemas/wcs/1.0.0/wcsCapabilities.xsd"), null, URLType.RESOURCE);

            attributes.addAttribute("", locationAtt, locationAtt, "", locationDef);
            attributes.addAttribute("", "updateSequence", "updateSequence", "", gsInfo.getUpdateSequence() + "");
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

         *
         * @throws SAXException
         *             For any errors.
         */
        private void handleService() {
            final WCSInfo wcs = (WCSInfo) request.getServiceConfig();
            AttributesImpl attributes = new AttributesImpl();
            //attributes.addAttribute("", "version", "version", "", CUR_VERSION);
            start("Service", attributes);
            if(wcs.getMetadataLink() != null)
                handleMetadataLink(Collections.singletonList(wcs.getMetadataLink()));
            element("description", wcs.getAbstract());
            element("name", wcs.getName());
            element("label", wcs.getTitle());
            handleKeywords(wcs.getKeywords());
            handleContact(wcs);

            String fees = wcs.getFees();

            if ((fees == null) || "".equals(fees)) {
                fees = "NONE";
            }

            element("fees", fees);

            String accessConstraints = wcs.getAccessConstraints();

            if ((accessConstraints == null) || "".equals(accessConstraints)) {
                accessConstraints = "NONE";
            }

View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

         *
         * @throws SAXException
         *             DOCUMENT ME!
         */
        private void handleCapabilities() {
            final WCSInfo wcs = (WCSInfo) request.getServiceConfig();
            start("Capability");
            handleRequest(wcs);
            handleExceptions(wcs);
            handleVendorSpecifics(wcs);
            end("Capability");
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

        return null;
    }

    public void writeTo(Object value, String mimeType, OutputStream os) throws IOException {
        CoveragesData data = (CoveragesData) value;
        final WCSInfo wcs = ((GeoServer) GeoServerExtensions.bean("geoServer")).getService(WCSInfo.class);
        CoveragesTransformer ct = new CoveragesTransformer(wcs, data.request);
        try {
            ct.transform(data.info, os);
        } catch (TransformerException e) {
            IOException io = new IOException("Error occurred during wcs:coverage encoding");
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

    }
   
    @Test
    public void testBasicNoMaxCount() throws Exception {
        // remove the max count config
        WCSInfo wcs = getGeoServer().getService(WCSInfo.class);
        wcs.getMetadata().remove(WCSEOMetadata.COUNT_DEFAULT.key);
        getGeoServer().save(wcs);
       
        Document dom = getAsDOM("wcs?request=DescribeEOCoverageSet&version=2.0.1&service=WCS&eoid=sf__timeranges_dss");
//         print(dom);
       
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

    }
   
    @Test
    public void testDefaultCount() throws Exception {
        // set the default count to 1
        WCSInfo wcs = getGeoServer().getService(WCSInfo.class);
        wcs.getMetadata().put(WCSEOMetadata.COUNT_DEFAULT.key, 1);
        getGeoServer().save(wcs);
       
        Document dom = getAsDOM("wcs?request=DescribeEOCoverageSet&version=2.0.1&service=WCS&eoid=sf__watertemp_dss");
        // print(dom);
       
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

        setupRasterDimension(coverageName, ResourceInfo.TIME, DimensionPresentation.LIST, null);
    }

    @Before
    public void enableWCSEO() {
        WCSInfo wcs = getGeoServer().getService(WCSInfo.class);
        wcs.getMetadata().put(WCSEOMetadata.ENABLED.key, true);
        wcs.getMetadata().put(WCSEOMetadata.COUNT_DEFAULT.key, String.valueOf(20));
        wcs.getSRS().clear();
        wcs.getSRS().add("4326");
        wcs.getSRS().add("3857");
        getGeoServer().save(wcs);
       
        wcs = getGeoServer().getService(WCSInfo.class);
        assertTrue(wcs.getMetadata().get(WCSEOMetadata.ENABLED.key, Boolean.class));
    }
View Full Code Here

Examples of org.geoserver.wcs.WCSInfo

    }
   
    @Test
    public void testDisableEOExtensions() throws Exception {
        // disable EO extensions
        WCSInfo wcs = getGeoServer().getService(WCSInfo.class);
        wcs.getMetadata().put(WCSEOMetadata.ENABLED.key, false);
        getGeoServer().save(wcs);

        Document dom = getAsDOM("wcs?request=GetCapabilities&version=2.0.1&service=WCS");
       
        assertEquals("0", xpath.evaluate("count(//ows:Operation[@name='DescribeEOCoverageSet'])", dom));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.