Package net.opengis.wcs20

Examples of net.opengis.wcs20.Wcs20Package


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ContainmentType createContainmentTypeFromString(EDataType eDataType, String initialValue) {
        ContainmentType result = ContainmentType.get(initialValue);
        if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
        return result;
    }
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetContents(ContentsType newContents, NotificationChain msgs) {
        ContentsType oldContents = contents;
        contents = newContents;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs20Package.CAPABILITIES_TYPE__CONTENTS, oldContents, newContents);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetCoverageSubtypeParent(CoverageSubtypeParentType newCoverageSubtypeParent, NotificationChain msgs) {
        CoverageSubtypeParentType oldCoverageSubtypeParent = coverageSubtypeParent;
        coverageSubtypeParent = newCoverageSubtypeParent;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs20Package.SERVICE_PARAMETERS_TYPE__COVERAGE_SUBTYPE_PARENT, oldCoverageSubtypeParent, newCoverageSubtypeParent);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetCoverageSubtypeParent(CoverageSubtypeParentType newCoverageSubtypeParent, NotificationChain msgs) {
        CoverageSubtypeParentType oldCoverageSubtypeParent = coverageSubtypeParent;
        coverageSubtypeParent = newCoverageSubtypeParent;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs20Package.COVERAGE_SUBTYPE_PARENT_TYPE__COVERAGE_SUBTYPE_PARENT, oldCoverageSubtypeParent, newCoverageSubtypeParent);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetCoverageSubtypeParent(CoverageSubtypeParentType newCoverageSubtypeParent, NotificationChain msgs) {
        CoverageSubtypeParentType oldCoverageSubtypeParent = coverageSubtypeParent;
        coverageSubtypeParent = newCoverageSubtypeParent;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs20Package.COVERAGE_SUMMARY_TYPE__COVERAGE_SUBTYPE_PARENT, oldCoverageSubtypeParent, newCoverageSubtypeParent);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

    Parser parser = new Parser(new WCSConfiguration());

    @Test
    public void testParseDescribeCoverage() throws Exception {
        String capRequestPath = "requestDescribeCoverage.xml";
        DescribeCoverageType dc = (DescribeCoverageType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
        assertEquals("WCS", dc.getService());
        assertEquals("2.0.1", dc.getVersion());

        List<String> ids = dc.getCoverageId();
        assertEquals(2, ids.size());
        assertEquals("C0001", ids.get(0));
        assertEquals("C0002", ids.get(1));
    }
View Full Code Here

    Parser parser = new Parser(new WCSEOConfiguration());

    @Test
    public void testParseDescribeCoverage() throws Exception {
        String capRequestPath = "requestDescribeEOCoverageSet.xml";
        DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) parser.parse(getClass()
                .getResourceAsStream(capRequestPath));
        assertEquals("WCS", dcs.getService());
        assertEquals("2.0.0", dcs.getVersion());

        List<String> ids = dcs.getEoId();
        assertEquals(1, ids.size());
        assertEquals("someDatasetSeries", ids.get(0));
       
        assertEquals(100, dcs.getCount());
       
        EList<Section> sections = dcs.getSections().getSection();
        assertEquals(2, sections.size());
        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());
View Full Code Here

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        if (invocation.getMethod().getName().equals("describeEOCoverageSet") && isEarthObservationEnabled()) {
            try {
                DescribeEOCoverageSetType dcs = (DescribeEOCoverageSetType) invocation
                        .getArguments()[0];
                return describeEOCoverageSet(dcs);
            } catch (Exception e) {
                if (e instanceof ServiceException) {
                    throw e;
View Full Code Here

        /**
         * 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

TOP

Related Classes of net.opengis.wcs20.Wcs20Package

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.