001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2003-2023 Open Geospatial Consortium, Inc.
004 *    http://www.geoapi.org
005 *
006 *    Licensed under the Apache License, Version 2.0 (the "License");
007 *    you may not use this file except in compliance with the License.
008 *    You may obtain a copy of the License at
009 *
010 *        http://www.apache.org/licenses/LICENSE-2.0
011 *
012 *    Unless required by applicable law or agreed to in writing, software
013 *    distributed under the License is distributed on an "AS IS" BASIS,
014 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 *    See the License for the specific language governing permissions and
016 *    limitations under the License.
017 */
018package org.opengis.referencing.datum;
019
020import java.util.Map;
021import java.util.Date;
022import java.time.temporal.Temporal;
023import org.opengis.annotation.UML;
024
025import static org.opengis.annotation.Obligation.*;
026import static org.opengis.annotation.Specification.*;
027
028
029/**
030 * Definition of the relationship of a temporal coordinate system to an object.
031 * The object is usually time on Earth.
032 *
033 * @author  OGC Topic 2 (for abstract model and documentation)
034 * @author  Martin Desruisseaux (IRD, Geomatys)
035 * @version 3.1
036 * @since   1.0
037 *
038 * @see DatumAuthorityFactory#createTemporalDatum(String)
039 * @see DatumFactory#createTemporalDatum(Map, Temporal)
040 *
041 * @departure integration
042 *   The {@code calendar} attribute is omitted because the handling of calendar systems
043 *   is delegated to the {@link java.time} framework.
044 */
045@UML(identifier="TemporalDatum", specification=ISO_19111)
046public interface TemporalDatum extends Datum {
047    /**
048     * Date and time to which temporal coordinates are referenced.
049     *
050     * <div class="warning"><b>Upcoming API change — temporal schema</b><br>
051     * As of Java 8, the {@code java.time} package is a better match for the different
052     * types of date defined by ISO 19108 (<cite>Temporal Schema</cite>) or ISO 19103.
053     * The return value of this method may be changed to {@link java.time.temporal.Temporal} in GeoAPI 4.0.
054     * </div>
055     *
056     * @return date and time to which temporal coordinates are referenced.
057     */
058    @UML(identifier="origin", obligation=MANDATORY, specification=ISO_19111)
059    Date getOrigin();
060}