Package org.geotools.temporal.object

Examples of org.geotools.temporal.object.DefaultCalendarDate


     * Test of dateTrans method, of class DefaultCalendar.
     */
    @Test
    public void testDateTrans_CalendarDate_ClockTime() {
        int[] cal = {2012, 9, 10};
        CalendarDate calendarDate = new DefaultCalendarDate(calendar1, IndeterminateValue.NOW, new SimpleInternationalString("new Era"), cal);
        Number[] clock = {12, 10, 5.488};
        ClockTime clockTime = new DefaultClockTime(calendar1, IndeterminateValue.NOW, clock);
        JulianDate result = calendar1.dateTrans(calendarDate, clockTime);
        assertTrue(calendar2.dateTrans(calendarDate, clockTime).equals(result));
    }
View Full Code Here


    public void testSetBasis() throws ParseException {
        Collection<CalendarEra> result = calendar1.getBasis();
        int[] calendarDate = {1, 1, 1};
        CalendarEra calendarEra = new DefaultCalendarEra(new SimpleInternationalString("Babylonian calendar"),
                new SimpleInternationalString("Ascension of Nebuchadnezzar II to the throne of Babylon"),
                new DefaultCalendarDate(calendar1, null, null, calendarDate),
                new DefaultJulianDate(calendar1, null, 1721423.25),
                new DefaultPeriod(new DefaultInstant(new DefaultPosition(new DefaultJulianDate(calendar1, null, 2087769))),
                new DefaultInstant(new DefaultPosition(new DefaultJulianDate(calendar1, null, 2299160)))));
        Collection<CalendarEra> collection = new ArrayList<CalendarEra>();
        collection.add(calendarEra);
View Full Code Here

        NamedIdentifier name2 = new NamedIdentifier(Citations.CRS, "Babylonian calendar");
        TemporalReferenceSystem frame1 = new DefaultTemporalReferenceSystem(name1, null);
        TemporalReferenceSystem frame2 = new DefaultTemporalReferenceSystem(name2, null);
        int[] calendarDate1 = {1900, 1, 1};
        int[] calendarDate2 = {400, 1, 1};
        CalendarDate referenceDate1 = new DefaultCalendarDate(frame1, IndeterminateValue.BEFORE, new SimpleInternationalString("Gregorian calendar"), calendarDate1);
        CalendarDate referenceDate2 = new DefaultCalendarDate(frame2, IndeterminateValue.NOW, new SimpleInternationalString("Babylonian calendar"), calendarDate2);
        JulianDate julianReference = new DefaultJulianDate(frame1, IndeterminateValue.NOW, 123456789);
       
        cal.set(1900, 0, 1);
        Instant begining1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
        cal.set(2000, 9, 17);
View Full Code Here

     */
    @Test
    public void testSetReferenceDate() {
        CalendarDate result = calendarEra1.getReferenceDate();
        int[] date = {1950,6,10};
        ((DefaultCalendarEra)calendarEra1).setReferenceDate(new DefaultCalendarDate(null, null, null, date));
        assertFalse(calendarEra1.getReferenceDate().equals(result));
    }
View Full Code Here

        }
        if (year <= 0) {
            year--;
        }
        int[] calendarDate = {year, month, day};
        response = new DefaultCalendarDate(this, null, null, calendarDate);
        return response;
    }
View Full Code Here

TOP

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

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.