Package org.opengis.temporal

Examples of org.opengis.temporal.CalendarDate


     * 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


        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 of getReferenceDate method, of class DefaultCalendarEra.
     */
    @Test
    public void testGetReferenceDate() {
        CalendarDate result = calendarEra1.getReferenceDate();
        assertFalse(calendarEra2.getReferenceDate().equals(result));

    }
View Full Code Here

    /**
     * Test of setReferenceDate method, of class DefaultCalendarEra.
     */
    @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

     */
    public CalendarDate julTrans(JulianDate jdt) {
        if (jdt == null)
            return null;
       
        CalendarDate response = null;

        int JGREG = 15 + 31 * (10 + 12 * 1582);
        int jalpha, ja, jb, jc, jd, je, year, month, day;
        ja = (int) jdt.getCoordinateValue().intValue();
        if (ja >= JGREG) {
View Full Code Here

TOP

Related Classes of org.opengis.temporal.CalendarDate

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.