Package net.opengis.wcs20

Examples of net.opengis.wcs20.RequestBaseType


        /**
         * Encode the object.
         */
        @Override
        public void encode(Object o) throws IllegalArgumentException {
            DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) o;

            List<CoverageInfo> coverages = getCoverages(dcs);
            List<CoverageGranules> coverageGranules = getCoverageGranules(dcs, coverages);
            int granuleCount = getGranuleCount(coverageGranules);
            Integer maxCoverages = getMaxCoverages(dcs);
            int returned;
            if(maxCoverages != null) {
                returned = granuleCount < maxCoverages ? granuleCount : maxCoverages;
            } else {
                returned = granuleCount;
            }

            String eoSchemaLocation = ResponseUtils.buildSchemaURL(dcs.getBaseUrl(),
                    "wcseo/1.0/wcsEOAll.xsd");
            Attributes atts = atts(
                    "xmlns:eop",
                    "http://www.opengis.net/eop/2.0", //
                    "xmlns:gml",
                    "http://www.opengis.net/gml/3.2", //
                    "xmlns:wcsgs",
                    "http://www.geoserver.org/wcsgs/2.0", //
                    "xmlns:gmlcov", "http://www.opengis.net/gmlcov/1.0", "xmlns:om",
                    "http://www.opengis.net/om/2.0", "xmlns:swe", "http://www.opengis.net/swe/2.0",
                    "xmlns:wcs", "http://www.opengis.net/wcs/2.0", "xmlns:wcseo",
                    "http://www.opengis.net/wcseo/1.0", "xmlns:xlink",
                    "http://www.w3.org/1999/xlink", "xmlns:xsi",
                    "http://www.w3.org/2001/XMLSchema-instance", "numberMatched",
                    String.valueOf(granuleCount), "numberReturned", String.valueOf(returned),
                    "xsi:schemaLocation", "http://www.opengis.net/wcseo/1.0 " + eoSchemaLocation);

            start("wcseo:EOCoverageSetDescription", atts);

            if(!coverageGranules.isEmpty()) {
                List<CoverageGranules> reducedGranules = coverageGranules;
                if(maxCoverages != null) {
                    reducedGranules = applyMaxCoverages(coverageGranules, maxCoverages);
                }

                boolean allSections = dcs.getSections() == null
                        || dcs.getSections().getSection() == null
                        || dcs.getSections().getSection().contains(Section.ALL);
                if (allSections
                        || dcs.getSections().getSection().contains(Section.COVERAGEDESCRIPTIONS)) {
                    handleCoverageDescriptions(reducedGranules);
                }
                if (allSections
                        || dcs.getSections().getSection().contains(Section.DATASETSERIESDESCRIPTIONS)) {
                    handleDatasetSeriesDescriptions(coverageGranules);
                }
            }

            end("wcseo:EOCoverageSetDescription");
View Full Code Here


        assertEquals("C0001", gc.getCoverageId());
       
        // slicing
        EList<DimensionSubsetType> dss = gc.getDimensionSubset();
        assertEquals(2, dss.size());
        DimensionSliceType ds1 = (DimensionSliceType) dss.get(0);
        assertEquals("Long", ds1.getDimension());
        assertEquals("1", ds1.getSlicePoint());
        DimensionSliceType ds2 = (DimensionSliceType) dss.get(1);
        assertEquals("Lat", ds2.getDimension());
        assertEquals("1", ds2.getSlicePoint());
       
        // format
        assertEquals("application/gml+xml", gc.getFormat());
    }
View Full Code Here

        assertEquals(2, dss.size());
        DimensionTrimType dt = (DimensionTrimType) dss.get(0);
        assertEquals("Long", dt.getDimension());
        assertEquals("20", dt.getTrimLow());
        assertEquals("29", dt.getTrimHigh());
        DimensionSliceType ds = (DimensionSliceType) dss.get(1);
        assertEquals("Lat", ds.getDimension());
        assertEquals("1", ds.getSlicePoint());

        // format
        assertEquals("application/gml+xml", gc.getFormat());
        assertEquals("multipart/related", gc.getMediaType());
    }
View Full Code Here

        // split on all commas not contained in quotes
        String[] vpElements = valuePoint.split(",\\s*(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
        if (vpElements.length == 1) {
            // point
            String point = parsePoint(vpElements[0], false);
            DimensionSliceType slice = Wcs20Factory.eINSTANCE.createDimensionSliceType();
            slice.setDimension(dimension);
            slice.setCRS(crs);
            slice.setSlicePoint(point);
            return slice;
        } else if (vpElements.length == 2) {
            String low = parsePoint(vpElements[0], true);
            String high = parsePoint(vpElements[1], true);

View Full Code Here

        assertEquals(Section.COVERAGEDESCRIPTIONS, sections.get(0));
        assertEquals(Section.DATASETSERIESDESCRIPTIONS, sections.get(1));
       
        EList<DimensionTrimType> trims = dcs.getDimensionTrim();
        assertEquals(3, trims.size());
        DimensionTrimType lonTrim = trims.get(0);
        assertEquals("Long", lonTrim.getDimension());
        assertEquals("16", lonTrim.getTrimLow());
        assertEquals("18", lonTrim.getTrimHigh());
        DimensionTrimType latTrim = trims.get(1);
        assertEquals("Lat", latTrim.getDimension());
        assertEquals("46", latTrim.getTrimLow());
        assertEquals("48", latTrim.getTrimHigh());
        DimensionTrimType timeTrim = trims.get(2);
        assertEquals("phenomenonTime", timeTrim.getDimension());
        assertEquals("2011-01-18T22:21:52Z", timeTrim.getTrimLow());
        assertEquals("2011-01-18T22:22:52Z", timeTrim.getTrimHigh());

    }
View Full Code Here

        assertEquals("C0001", gc.getCoverageId());
       
        // trimming
        EList<DimensionSubsetType> dss = gc.getDimensionSubset();
        assertEquals(2, dss.size());
        DimensionTrimType dt1 = (DimensionTrimType) dss.get(0);
        assertEquals("Long", dt1.getDimension());
        assertEquals("1", dt1.getTrimLow());
        assertEquals("2", dt1.getTrimHigh());
        DimensionTrimType dt2 = (DimensionTrimType) dss.get(1);
        assertEquals("Lat", dt2.getDimension());
        assertEquals("1", dt2.getTrimLow());
        assertEquals("2", dt2.getTrimHigh());

        // format
        assertEquals("application/gml+xml", gc.getFormat());
        assertEquals("multipart/related", gc.getMediaType());
    }
View Full Code Here

        assertEquals("C0001", gc.getCoverageId());
       
        // trimming
        EList<DimensionSubsetType> dss = gc.getDimensionSubset();
        assertEquals(2, dss.size());
        DimensionTrimType dt = (DimensionTrimType) dss.get(0);
        assertEquals("Long", dt.getDimension());
        assertEquals("20", dt.getTrimLow());
        assertEquals("29", dt.getTrimHigh());
        DimensionSliceType ds = (DimensionSliceType) dss.get(1);
        assertEquals("Lat", ds.getDimension());
        assertEquals("1", ds.getSlicePoint());

        // format
View Full Code Here

            return slice;
        } else if (vpElements.length == 2) {
            String low = parsePoint(vpElements[0], true);
            String high = parsePoint(vpElements[1], true);

            DimensionTrimType trim = Wcs20Factory.eINSTANCE.createDimensionTrimType();
            trim.setDimension(dimension);
            trim.setCRS(crs);
            trim.setTrimLow(low);
            trim.setTrimHigh(high);
            return trim;
        } else {
            throw new OWS20Exception("Invalid syntax, dimension [ , crs ] ( intervalOrPoint ) "
                    + "where interval or point has either 1 or two elements",
                    WCS20ExceptionCode.InvalidEncodingSyntax, "subset");
View Full Code Here

            Node child = (Node) o;
            String name = child.getComponent().getName();
            String namespace = child.getComponent().getNamespace();
            Object v = child.getValue();
           
            ExtensionItemType item = Wcs20Factory.eINSTANCE.createExtensionItemType();
            item.setName(name);
            item.setNamespace(namespace);
            if(v instanceof String) {
                item.setSimpleContent((String) v);
            } else {
                item.setObjectContent(v);
            }
           
            contents.add(item);
        }
       
View Full Code Here

    private void parseSimpleContentList(GetCoverageType gc, Map kvp, List<String> geoTiffParams,
            String namespace) {
        for (String param : geoTiffParams) {
            String value = KvpUtils.firstValue(kvp, param);
            if (value != null) {
                ExtensionItemType item = WCS20_FACTORY.createExtensionItemType();
                item.setNamespace(namespace);
                item.setName(param);
                item.setSimpleContent(value);

                gc.getExtension().getContents().add(item);
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.RequestBaseType

Copyright © 2018 www.massapicom. 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.