Package net.opengis.wcs10

Examples of net.opengis.wcs10.ClosureType


   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetAddress(AddressType newAddress, NotificationChain msgs) {
    AddressType oldAddress = address;
    address = newAddress;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.CONTACT_TYPE__ADDRESS, oldAddress, newAddress);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here


   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetAxisDescription(AxisDescriptionType newAxisDescription, NotificationChain msgs) {
    AxisDescriptionType oldAxisDescription = axisDescription;
    axisDescription = newAxisDescription;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs10Package.AXIS_DESCRIPTION_TYPE1__AXIS_DESCRIPTION, oldAxisDescription, newAxisDescription);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        AxisSubsetType axis = Wcs10Factory.eINSTANCE.createAxisSubsetType();
       
        AttributeInstance[] atts = instance.getAttributes();
        for (AttributeInstance attType : atts) {
            if (attType.getName().equals("name"))
                axis.setName(attType.getText());
        }
       
        Node singleValue = node.getChild("singleValue");
        if (singleValue != null) {
            TypedLiteralType theValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            theValue.setValue((String) singleValue.getValue());
            axis.getSingleValue().add(theValue);
        }

        Node interval = node.getChild("interval");
        if (interval != null) {
            IntervalType range = Wcs10Factory.eINSTANCE.createIntervalType();
            if (interval.getChild("min") != null) {
                TypedLiteralType theValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                theValue.setValue((String) interval.getChildValue("min"));
                range.setMin(theValue);
            }

            if (interval.getChild("max") != null) {
                TypedLiteralType theValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                theValue.setValue((String) interval.getChildValue("max"));
                range.setMax(theValue);
            }

            if (interval.getChild("res") != null) {
                TypedLiteralType theValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                theValue.setValue((String) interval.getChildValue("res"));
                range.setRes(theValue);
            }

            if (interval.getAttribute("atomic") != null)
                range.setAtomic((Boolean) interval.getAttributeValue("atomic"));
            else
                range.setAtomic(false);
           
            axis.getInterval().add(range);
        }

        return axis;
    }
View Full Code Here

                        interval.setMin(min);
                        interval.setMax(max);
                        interval.setRes(res);
                    }

                    final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

                    axisSubset.setName(axisName);

                    axisSubset.getInterval().add(interval);

                    rangeSubset.getAxisSubset().add(axisSubset);

                } else {
                    List<String> unparsed = KvpUtils.readFlat(bands, KvpUtils.INNER_DELIMETER);

                    if (unparsed.size() == 0) {
                        throw new WcsException(
                                "Requested axis subset contains wrong number of values (should have at least 1): "
                                        + unparsed.size(), WcsExceptionCode.InvalidParameterValue,
                                "band");
                    }

                    final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

                    axisSubset.setName(axisName);

                    for (String bandValue : unparsed) {
                        TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                        singleValue.setValue(bandValue);

                        axisSubset.getSingleValue().add(singleValue);

                    }
                    rangeSubset.getAxisSubset().add(axisSubset);
                }
            }
        } else if (axis instanceof Double || axis instanceof Integer) {
            final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

            axisSubset.setName(axisName);

            TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            singleValue.setValue(String.valueOf(axis));

            axisSubset.getSingleValue().add(singleValue);

            rangeSubset.getAxisSubset().add(axisSubset);
        }
    }
View Full Code Here

        assertEquals(0, gridLimits.getLow(1));
        assertEquals(544, gridLimits.getHigh(0));
        assertEquals(489, gridLimits.getHigh(1));

        RangeSubsetType rangeSet = gc.getRangeSubset();
        AxisSubsetType axisSubset = (AxisSubsetType) rangeSet.getAxisSubset().get(0);
        assertEquals("Band", axisSubset.getName());
        assertEquals(axisSubset.getSingleValue().size(), 0);
        assertEquals(axisSubset.getInterval().size(), 1);

        IntervalType interval = (IntervalType) axisSubset.getInterval().get(0);
        assertEquals("1", interval.getMin().getValue());
        assertEquals("3", interval.getMax().getValue());
        assertEquals("1", interval.getRes().getValue());
    }
View Full Code Here

        super("band", AxisSubsetType.class);
        setService("wcs");
    }

    public Object parse(String value) throws Exception {
        final AxisSubsetType axisSubset = Wcs10Factory.eINSTANCE.createAxisSubsetType();

        axisSubset.setName("Band");

        if (value.contains("/")) {
            List<String> unparsed = KvpUtils.readFlat(value, new Tokenizer("/"));

            IntervalType interval = Wcs10Factory.eINSTANCE.createIntervalType();
            TypedLiteralType min = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            TypedLiteralType max = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            TypedLiteralType res = Wcs10Factory.eINSTANCE.createTypedLiteralType();
            if (unparsed.size() == 2) {
                min.setValue(unparsed.get(0));
                max.setValue(unparsed.get(1));

                interval.setMin(min);
                interval.setMax(max);
            } else {
                min.setValue(unparsed.get(0));
                max.setValue(unparsed.get(1));
                res.setValue(unparsed.get(2));

                interval.setMin(min);
                interval.setMax(max);
                interval.setRes(res);
            }

            axisSubset.getInterval().add(interval);
        } else {
            List<String> unparsed = KvpUtils.readFlat(value, KvpUtils.INNER_DELIMETER);

            if (unparsed.size() == 0) {
                throw new WcsException(
                        "Requested axis subset contains wrong number of values (should have at least 1): "
                                + unparsed.size(), WcsExceptionCode.InvalidParameterValue, "band");
            }

            for (String bandValue : unparsed) {
                TypedLiteralType singleValue = Wcs10Factory.eINSTANCE.createTypedLiteralType();
                singleValue.setValue(bandValue);

                axisSubset.getSingleValue().add(singleValue);
            }
        }

        return axisSubset;
    }
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public void setSection(CapabilitiesSectionType newSection) {
    CapabilitiesSectionType oldSection = section;
    section = newSection == null ? SECTION_EDEFAULT : newSection;
    boolean oldSectionESet = sectionESet;
    sectionESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.GET_CAPABILITIES_TYPE__SECTION, oldSection, section, !oldSectionESet));
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public void unsetSection() {
    CapabilitiesSectionType oldSection = section;
    boolean oldSectionESet = sectionESet;
    section = SECTION_EDEFAULT;
    sectionESet = false;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.UNSET, Wcs10Package.GET_CAPABILITIES_TYPE__SECTION, oldSection, SECTION_EDEFAULT, oldSectionESet));
View Full Code Here

                    .valueOf(updateSequence));
            start("wcs:WCS_Capabilities", attributes);

            // handle the sections directive
            boolean allSections;
            CapabilitiesSectionType section;
            if (request.getSection() == null) {
                allSections = true;
                section = CapabilitiesSectionType.get("/");
            } else {
                section = request.getSection();
                allSections = (section.get("/").equals(section));
            }
            final Set<String> knownSections = new HashSet<String>(Arrays.asList("/",
                    "/WCS_Capabilities/Service", "/WCS_Capabilities/Capability",
                    "/WCS_Capabilities/ContentMetadata"));

            if (!knownSections.contains(section.getLiteral()))
                throw new WcsException("Unknown section " + section,
                        WcsExceptionCode.InvalidParameterValue, "Sections");

            // encode the actual capabilities contents taking into consideration
            // the sections
            if (requestedUpdateSequence < updateSequence) {
                if (allSections
                        || section.equals(CapabilitiesSectionType.WCS_CAPABILITIES_SERVICE_LITERAL)) {
                    handleService(allSections);
                }

                if (allSections
                        || section
                                .equals(CapabilitiesSectionType.WCS_CAPABILITIES_CAPABILITY_LITERAL))
                    handleCapabilities(allSections);

                if (allSections
                        || section
                                .equals(CapabilitiesSectionType.WCS_CAPABILITIES_CONTENT_METADATA_LITERAL))
                    handleContentMetadata(allSections);
            }

            end("wcs:WCS_Capabilities");
View Full Code Here

   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public void setClosure(ClosureType newClosure) {
    ClosureType oldClosure = closure;
    closure = newClosure == null ? CLOSURE_EDEFAULT : newClosure;
    boolean oldClosureESet = closureESet;
    closureESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, Wcs10Package.DOCUMENT_ROOT__CLOSURE, oldClosure, closure, !oldClosureESet));
View Full Code Here

TOP

Related Classes of net.opengis.wcs10.ClosureType

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.