Package org.geotools.temporal.reference

Examples of org.geotools.temporal.reference.DefaultTemporalReferenceSystem


    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {

        String frameName = (String) node.getAttributeValue("frame", "#ISO-8601");
        NamedIdentifier frameID = new NamedIdentifier(Citations.CRS, frameName);
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(frameID, null);

        Instant begining = new DefaultInstant((Position) node.getChild("beginPosition").getValue());
        Instant ending = new DefaultInstant((Position) node.getChild("endPosition").getValue());

        Period timePeriod = new DefaultPeriod(begining, ending);
View Full Code Here


     * if not specified, it is assumed to be an association to the Gregorian calendar and UTC.
     * @return
     */
    public TemporalReferenceSystem getFrame() {
        if (frame == null) {
            frame = new DefaultTemporalReferenceSystem(new NamedIdentifier(
                    Citations.CRS, new SimpleInternationalString("Gregorian calendar")), null);
        }
        return frame;
    }
View Full Code Here

    private CalendarDate calendarDate2;

    @Before
    public void setUp() {
        NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Gregorian calendar");
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(name, null);
        int[] cal1 = {1981, 6, 25};
        int[] cal2 = {2000, 1, 1};
        InternationalString cal_era = new SimpleInternationalString("Cenozoic");
        calendarDate1 = new DefaultCalendarDate(frame, null, cal_era, cal1);
        calendarDate2 = new DefaultCalendarDate(frame, null, cal_era, cal2);
View Full Code Here

    @Before
    public void setUp() {
        NamedIdentifier name1 = new NamedIdentifier(Citations.CRS, "Gregorian calendar");
        NamedIdentifier name2 = new NamedIdentifier(Citations.CRS, "Julian calendar");
        TemporalReferenceSystem frame1 = new DefaultTemporalReferenceSystem(name1, null);
        TemporalReferenceSystem frame2 = new DefaultTemporalReferenceSystem(name2, null);
        temporalPosition1 = new DefaultTemporalPosition(frame1, IndeterminateValue.UNKNOWN);
        temporalPosition2 = new DefaultTemporalPosition(frame2, IndeterminateValue.NOW);
    }
View Full Code Here

     */
    @Test
    public void testSetFrame() {
        TemporalReferenceSystem result = ((DefaultTemporalPosition) temporalPosition1).getFrame();
        NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Babylonian calendar");
        ((DefaultTemporalPosition) temporalPosition1).setFrame(new DefaultTemporalReferenceSystem(name, null));
        assertFalse(((DefaultTemporalPosition) temporalPosition1).getFrame().equals(result));
    }
View Full Code Here

    private ClockTime clockTime2;

    @Before
    public void setUp() {
        NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Gregorian calendar");
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(name, null);
        Number[] clck1 = {8, 16, 25};
        Number[] clck2 = {15, 55, 1};
        clockTime1 = new DefaultClockTime(frame, null, clck1);
        clockTime2 = new DefaultClockTime(frame, null, clck2);
    }
View Full Code Here

    private Calendar cal = Calendar.getInstance();

    @Before
    public void setUp() {
        NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Gregorian calendar");
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(name, null);
       
        cal.set(500, 0, 1);
        Date beginning1 = cal.getTime();
        cal.set(1000, 0, 1);
        Date end1 = cal.getTime();
View Full Code Here

    private DateAndTime dateAndTime2;

    @Before
    public void setUp() {
        NamedIdentifier name = new NamedIdentifier(Citations.CRS, "Gregorian calendar");
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(name, null);
        int[] cal1 = {1981, 6, 25};
        int[] cal2 = {2000, 1, 1};
        Number[] clck1 = {8, 16, 25};
        Number[] clck2 = {15, 55, 1};
        InternationalString calendarEraName = new SimpleInternationalString("Cenozoic");
View Full Code Here

    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {

        String frameName = ((URI) node.getAttributeValue("frame", "#ISO-8601")).toString();
        NamedIdentifier frameID = new NamedIdentifier(Citations.CRS, frameName);
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(frameID, null);

        Instant begining = new DefaultInstant((Position) node.getChild("BeginPosition").getValue());
        Instant ending = new DefaultInstant((Position) node.getChild("EndPosition").getValue());

        Period timePeriod = new DefaultPeriod(begining, ending);
View Full Code Here

    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {

        String frameName = ((URI) node.getAttributeValue("frame", "#ISO-8601")).toString();
        NamedIdentifier frameID = new NamedIdentifier(Citations.CRS, frameName);
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(frameID, null);

        Instant begining = new DefaultInstant((Position) node.getChild("BeginPosition").getValue());
        Instant ending = new DefaultInstant((Position) node.getChild("EndPosition").getValue());

        Period timePeriod = new DefaultPeriod(begining, ending);
View Full Code Here

TOP

Related Classes of org.geotools.temporal.reference.DefaultTemporalReferenceSystem

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.