Package slash.common.type

Examples of slash.common.type.CompactCalendar


                (postalCode != null ? postalCode + " " : "") +
                (city != null ? city + ", " : "") +
                (street != null ? street + " " : "") +
                (houseNo != null ? houseNo : "");

        CompactCalendar calendar = parseTime(time);
        Wgs84Position position = new Wgs84Position(parseDouble(longitude), parseDouble(latitude),
                null, null, calendar, description);
        position.setStartDate(startDate);
        return position;
    }
View Full Code Here


                lastPathFragment("http://maps.google.de/maps?f=d&hl=de&geocode=14250095960720490931,54.0831601,13.475246%3B13832872253745319564,54.096925,13.383573%3B4731465831403354564,54.114440,13.528310&saddr=54.096925,+13.383573&daddr=54.08316,13.475246+to:54.114440,+13.528310&mra=ps&mrcr=0,1&sll=54.105307,13.490181&sspn=0.132448,0.318604&ie=UTF8&z=12", 60));
    }

    @Test
    public void testLastModified() throws IOException {
        CompactCalendar actual = getLastModified(file);
        assertEquals("UTC", actual.getTimeZoneId());
        assertEquals(fromMillis(file.lastModified()), actual);

        setLastModified(file, calendar(2010, 4, 12, 14, 41, 15, 0, "GMT+1"));
        CompactCalendar expected = calendar(2010, 4, 12, 13, 41, 15, 0, "UTC");
        assertEquals(expected, getLastModified(file));
        assertEquals(expected.getTimeInMillis(), file.lastModified());
    }
View Full Code Here

    private static final String NAVIGON6310_NAME = " 10:08:18, 509.49 meter ";

    @Test
    public void testParseTime() {
        KmlPosition position = new KmlPosition(null, null, null, null, null, null);
        CompactCalendar expectedCal = calendar(1970, 1, 1, 10, 8, 18);
        format.parseTime(position, NAVIGON6310_NAME, null);
        CompactCalendar actualCal = position.getTime();
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        String actual = DateFormat.getDateTimeInstance().format(actualCal.getTime());
        assertEquals(expected, actual);
        assertEquals(expectedCal, actualCal);
    }
View Full Code Here

    }

    @Test
    public void testParseTimeWithStartDate() {
        KmlPosition position = new KmlPosition(null, null, null, null, null, null);
        CompactCalendar startDate = calendar(2008, 7, 6, 5, 4, 3);
        CompactCalendar expectedCal = calendar(2008, 7, 6, 10, 8, 18);
        format.parseTime(position, NAVIGON6310_NAME, startDate);
        CompactCalendar actualCal = position.getTime();
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        String actual = DateFormat.getDateTimeInstance().format(actualCal.getTime());
        assertEquals(expected, actual);
        assertEquals(expectedCal, actualCal);
    }
View Full Code Here

        Wgs84Position position = format.parsePosition("113;7.0475000000;50.7500000000;PHE I;;53119;Bonn;Oppelner Str.;126;16:49;", null);
        assertDoubleEquals(7.0475000000, position.getLongitude());
        assertDoubleEquals(50.7500000000, position.getLatitude());
        assertNull(position.getElevation());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(1970, 1, 1, 16, 49, 0);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected,  actual);
        assertEquals(expectedCal, position.getTime());
        assertEquals("PHE I: 53119 Bonn, Oppelner Str. 126", position.getDescription());
    }
View Full Code Here

        Wgs84Position position = format.parsePosition("50.3965966666667;7.53247333333333;74.4000015258789;77.56176;1172932595;1;279", null);
        assertDoubleEquals(7.53247333333333, position.getLongitude());
        assertDoubleEquals(50.3965966666667, position.getLatitude());
        assertDoubleEquals(74.4000015258789, position.getElevation());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = utcCalendar(1172932595000L);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected,  actual);
        assertEquals(expectedCal, position.getTime());
        assertDoubleEquals(77.56176, position.getSpeed());
        assertDoubleEquals(279.0, position.getHeading());
        assertNull(position.getDescription());
View Full Code Here

        assertDoubleEquals(28.649061, position.getLatitude());
        assertDoubleEquals(513.863, position.getElevation());
        assertDoubleEquals(15.862, position.getSpeed());
        assertDoubleEquals(178.240250, position.getHeading());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(2010, 12, 9, 10, 59, 5);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected, actual);
        assertEquals(expectedCal, position.getTime());
    }
View Full Code Here

        assertDoubleEquals(334.4, position.getHeading());
        assertDoubleEquals(20.7424, position.getSpeed());
        assertDoubleEquals(1.000000, position.getHdop());
        assertEquals(new Integer(8), position.getSatellites());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(2010, 7, 19, 9, 22, 58);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected, actual);
        assertNull(position.getDescription());
    }
View Full Code Here

        assertDoubleEquals(8.0, position.getSpeed());
        assertDoubleEquals(206.0, position.getHeading());
        assertNull(position.getHdop());
        assertNull(position.getSatellites());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(2009, 4, 21, 6, 10, 58);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected, actual);
        assertEquals(expectedCal, position.getTime());
        assertEquals("VOX00006", position.getDescription());
    }
View Full Code Here

        assertDoubleEquals(9.0567266667, position.getLongitude());
        assertDoubleEquals(-48.6239566667, position.getLatitude());
        assertDoubleEquals(16.76, position.getElevation());
        assertEquals(new Integer(8), position.getSatellites());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(1970, 1, 1, 13, 4, 41, 89);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected, actual);
        assertEquals(expectedCal, position.getTime());
        assertNull(position.getDescription());
    }
View Full Code Here

TOP

Related Classes of slash.common.type.CompactCalendar

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.