Package org.geotools.temporal.object

Examples of org.geotools.temporal.object.DefaultPeriodDuration


                    if(resolution == null) {
                        resolution = new BigDecimal(dimensions.getMaxTime().getTime() -
                                dimensions.getMinTime().getTime());
                    }
                    // this will format the time period properly
                    element("wcs:timeResolution", new DefaultPeriodDuration(resolution.longValue()).toString());
                }
                end("wcs:timePeriod");
            }
            end("wcs:temporalDomain");
        }
View Full Code Here


            buff.append("/");
           
            final BigDecimal resolution = dimension.getResolution();
            if (resolution != null) {
                // resolution has been provided
                buff.append(new DefaultPeriodDuration(resolution.longValue()).toString());
            } else {
                if (values.size() >= 2 && allDates(values)) {
                    int count = 2, i = 2;
                    Date[] timePositions = new Date[count];
                    for (Object date : values) {
                        timePositions[count - i--] = (Date) date;
                        if (i == 0)
                            break;
                    }
                    long durationInMilliSeconds = timePositions[count - 1].getTime()
                            - timePositions[count - 2].getTime();
                    buff.append(new DefaultPeriodDuration(durationInMilliSeconds).toString());
                } else {
                    // assume 1 second and be done with it...
                    buff.append("PT1S");
                }
            }
View Full Code Here

TOP

Related Classes of org.geotools.temporal.object.DefaultPeriodDuration

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.