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.crs;
019
020import java.util.Map;
021import org.opengis.referencing.cs.TimeCS;
022import org.opengis.referencing.datum.DatumEnsemble;
023import org.opengis.referencing.datum.TemporalDatum;
024import org.opengis.annotation.UML;
025
026import static org.opengis.annotation.Obligation.*;
027import static org.opengis.annotation.Specification.*;
028
029
030/**
031 * A 1-dimensional <abbr>CRS</abbr> used for the recording of time.
032 * Any <abbr>CRS</abbr> can be associate with a temporal <abbr>CRS</abbr> to form a spatio-temporal {@link CompoundCRS}.
033 * More than one temporal <abbr>CRS</abbr> may be included if these axes represent different time quantities.
034 *
035 * <h2>Permitted coordinate systems</h2>
036 * This type of <abbr>CRS</abbr> can be used with coordinate systems of type {@link TimeCS} only.
037 *
038 * @author  OGC Topic 2 (for abstract model and documentation)
039 * @author  Martin Desruisseaux (IRD, Geomatys)
040 * @version 3.1
041 * @since   1.0
042 *
043 * @see CRSAuthorityFactory#createTemporalCRS(String)
044 * @see CRSFactory#createTemporalCRS(Map, TemporalDatum, DatumEnsemble, TimeCS)
045 */
046@UML(identifier="TemporalCRS", specification=ISO_19111)
047public interface TemporalCRS extends SingleCRS {
048    /**
049     * Returns the coordinate system, which shall be temporal.
050     *
051     * @return the temporal coordinate system.
052     */
053    @Override
054    @UML(identifier="coordinateSystem", obligation=MANDATORY, specification=ISO_19111)
055    TimeCS getCoordinateSystem();
056
057    /**
058     * Returns the datum, which shall be temporal.
059     * This property may be null if this <abbr>CRS</abbr> is related to an object
060     * identified only by a {@linkplain #getDatumEnsemble() datum ensemble}.
061     *
062     * @return the temporal datum, or {@code null} if this <abbr>CRS</abbr> is related to
063     *         an object identified only by a {@linkplain #getDatumEnsemble() datum ensemble}.
064     *
065     * @condition Mandatory if the {@linkplain #getDatumEnsemble() datum ensemble} is not documented.
066     */
067    @Override
068    @UML(identifier="datum", obligation=CONDITIONAL, specification=ISO_19111)
069    TemporalDatum getDatum();
070
071    /**
072     * Returns the datum ensemble, which shall have temporal datum members.
073     * This property may be null if this <abbr>CRS</abbr> is related to an object
074     * identified only by a single {@linkplain #getDatum() datum}.
075     *
076     * <p>The default implementation returns {@code null}.</p>
077     *
078     * @return the datum ensemble, or {@code null} if this <abbr>CRS</abbr> is related
079     *         to an object identified only by a single {@linkplain #getDatum() datum}.
080     *
081     * @condition Mandatory if the {@linkplain #getDatum() datum} is not documented.
082     * @since 3.1
083     */
084    @Override
085    @UML(identifier="datum", obligation=CONDITIONAL, specification=ISO_19111)
086    default DatumEnsemble<TemporalDatum> getDatumEnsemble() {
087        return null;
088    }
089}