001/*
002 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
003 * Copyright (C) 2006 - JScience (http://jscience.org/)
004 * All rights reserved.
005 * 
006 * Permission to use, copy, modify, and distribute this software is
007 * freely granted, provided that this notice is preserved.
008 */
009package org.jscience.geography.coordinates.crs;
010
011import java.util.Collection;
012import java.util.Set;
013
014import javax.measure.unit.SI;
015
016import org.jscience.geography.coordinates.Coordinates;
017import org.opengis.metadata.Identifier;
018import org.opengis.referencing.cs.AxisDirection;
019import org.opengis.referencing.cs.CoordinateSystem;
020import org.opengis.referencing.cs.CoordinateSystemAxis;
021import org.opengis.util.InternationalString;
022
023
024/**
025 * This class represents a 1 dimensional temporal reference system.
026 * 
027 * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
028 * @version 3.0, February 13, 2006
029 */
030public abstract class TemporalCRS<C extends Coordinates<?>> extends CoordinateReferenceSystem<C> {
031
032    /**
033     * Holds the time coordinate system.
034     */
035    public static final CoordinateSystem TIME_CS = new CoordinateSystem() {
036
037        Axis timeAxis = new Axis("Time", "Time", SI.SECOND,
038                AxisDirection.FUTURE);
039
040        public int getDimension() {
041            return 1;
042        }
043
044        public CoordinateSystemAxis getAxis(int dimension)
045                throws IndexOutOfBoundsException {
046            if (dimension == 0) {
047                return timeAxis;
048            } else {
049                throw new IndexOutOfBoundsException();
050            }
051        }
052
053        public Identifier getName() {
054            throw new UnsupportedOperationException();
055        }
056
057        public Collection<String> getAlias() {
058            return EMPTY_SET;
059        }
060
061        public Set<String> getIdentifiers() {
062            return EMPTY_SET;
063        }
064
065        public InternationalString getRemarks() {
066            throw new UnsupportedOperationException();
067        }
068
069        public String toWKT() throws UnsupportedOperationException {
070            throw new UnsupportedOperationException();
071        }
072    };
073   
074}