Package net.opengis.wcs11.impl

Examples of net.opengis.wcs11.impl.ContentsTypeImpl


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetSpatialDomain(SpatialDomainType newSpatialDomain, NotificationChain msgs) {
        SpatialDomainType oldSpatialDomain = spatialDomain;
        spatialDomain = newSpatialDomain;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__SPATIAL_DOMAIN, oldSpatialDomain, newSpatialDomain);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


                for (Node timePeriodNode : timePeriods) {
                    Instant begining = new DefaultInstant((Position) timePeriodNode.getChild("BeginPosition").getValue());
                    Instant ending = new DefaultInstant((Position) timePeriodNode.getChild("EndPosition").getValue());

                    //Period timePeriod = new DefaultPeriod(begining, ending);
                    TimePeriodType timePeriod = Wcs111Factory.eINSTANCE.createTimePeriodType();
                    Date beginPosition = cvtToGmt(begining.getPosition().getDate());
                    Date endPosition = cvtToGmt(ending.getPosition().getDate());
                   
                    timePeriod.setBeginPosition(beginPosition);
                    timePeriod.setEndPosition(endPosition);

                    results.getTimePeriod().add(timePeriod);
                }

                return results;
View Full Code Here

                    timeValues.add(tp);
                }
            } else if (temporalSubset != null &&  temporalSubset.getTimePeriod() != null
                    && temporalSubset.getTimePeriod().size() > 0) {
                for (Iterator it = temporalSubset.getTimePeriod().iterator(); it.hasNext(); ) {
                    TimePeriodType tp = (TimePeriodType) it.next();
                    Date beginning = (Date)tp.getBeginPosition();
                    Date ending = (Date)tp.getEndPosition();

                    timeValues.add(beginning);
                    timeValues.add(ending);
                }
            }
View Full Code Here

    private DomainSubsetType parseDomainSubset(Map kvp) {
        final DomainSubsetType domainSubset = Wcs111Factory.eINSTANCE.createDomainSubsetType();

        // either bbox or timesequence must be there
        BoundingBoxType bbox = (BoundingBoxType) kvp.get("BoundingBox");
        TimeSequenceType timeSequence = (TimeSequenceType) kvp.get("TemporalSubset");
        if (timeSequence == null && bbox == null)
            throw new WcsException(
                    "Bounding box cannot be null, TimeSequence has not been specified",
                    WcsExceptionCode.MissingParameterValue, "BoundingBox");
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTemporalDomain(TimeSequenceType newTemporalDomain, NotificationChain msgs) {
        TimeSequenceType oldTemporalDomain = temporalDomain;
        temporalDomain = newTemporalDomain;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.COVERAGE_DOMAIN_TYPE__TEMPORAL_DOMAIN, oldTemporalDomain, newTemporalDomain);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTemporalSubset(TimeSequenceType newTemporalSubset, NotificationChain msgs) {
        TimeSequenceType oldTemporalSubset = temporalSubset;
        temporalSubset = newTemporalSubset;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wcs111Package.DOMAIN_SUBSET_TYPE__TEMPORAL_SUBSET, oldTemporalSubset, newTemporalSubset);
            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 {
        List<Node> timePositions = node.getChildren("timePosition");
        TimeSequenceType results = Wcs111Factory.eINSTANCE.createTimeSequenceType();
       
        if (timePositions != null && !timePositions.isEmpty()) {
            for (Node timePositionNode : timePositions) {
                Date positionDate = ((Position) timePositionNode.getValue()).getDate();
                results.getTimePosition().add(cvtToGmt(positionDate));
            }

            return results;
        } else {
            List<Node> timePeriods = node.getChildren("TimePeriod");
            if (timePeriods != null && !timePeriods.isEmpty()) {
                for (Node timePeriodNode : timePeriods) {
                    Instant begining = new DefaultInstant((Position) timePeriodNode.getChild("BeginPosition").getValue());
                    Instant ending = new DefaultInstant((Position) timePeriodNode.getChild("EndPosition").getValue());

                    //Period timePeriod = new DefaultPeriod(begining, ending);
                    TimePeriodType timePeriod = Wcs111Factory.eINSTANCE.createTimePeriodType();
                    Date beginPosition = cvtToGmt(begining.getPosition().getDate());
                    Date endPosition = cvtToGmt(ending.getPosition().getDate());
                   
                    timePeriod.setBeginPosition(beginPosition);
                    timePeriod.setEndPosition(endPosition);

                    results.getTimePeriod().add(timePeriod);
                }

                return results;
            }
        }
View Full Code Here

    private DomainSubsetType parseDomainSubset(Map kvp) {
        final DomainSubsetType domainSubset = Wcs111Factory.eINSTANCE.createDomainSubsetType();

        // either bbox or timesequence must be there
        BoundingBoxType bbox = (BoundingBoxType) kvp.get("BoundingBox");
        TimeSequenceType timeSequence = (TimeSequenceType) kvp.get("TimeSequence");
        if (timeSequence == null && bbox == null)
            throw new WcsException(
                    "Bounding box cannot be null, TimeSequence has not been specified",
                    WcsExceptionCode.MissingParameterValue, "BoundingBox");
View Full Code Here

       
    }

    @Override
    public Object parse(String value) throws Exception {
        TimeSequenceType timeSequence = Wcs111Factory.eINSTANCE.createTimeSequenceType();
        TimeKvpParser parser = new TimeKvpParser("WCS1_1");
       
        List<Date> timePositions = (List<Date>)parser.parse(value);
        for (Date tp : timePositions) {
            timeSequence.getTimePosition().add(tp);
        }
       
        return timeSequence;
    }
View Full Code Here

            //
            //   TIME Values
            //
            final List<Date> timeValues = new LinkedList<Date>();

            TimeSequenceType temporalSubset = request.getDomainSubset().getTemporalSubset();
           
            if (temporalSubset != null && temporalSubset.getTimePosition() != null
                    && temporalSubset.getTimePosition().size() > 0) {
                for (Iterator it = temporalSubset.getTimePosition().iterator(); it.hasNext(); ) {
                    Date tp = (Date) it.next();
                    timeValues.add(tp);
                }
            } else if (temporalSubset != null &&  temporalSubset.getTimePeriod() != null
                    && temporalSubset.getTimePeriod().size() > 0) {
                for (Iterator it = temporalSubset.getTimePeriod().iterator(); it.hasNext(); ) {
                    TimePeriodType tp = (TimePeriodType) it.next();
                    Date beginning = (Date)tp.getBeginPosition();
                    Date ending = (Date)tp.getEndPosition();

                    timeValues.add(beginning);
View Full Code Here

TOP

Related Classes of net.opengis.wcs11.impl.ContentsTypeImpl

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.