001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2009-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.metadata.acquisition;
019
020import java.util.Date;
021import org.opengis.annotation.UML;
022import org.opengis.annotation.Classifier;
023import org.opengis.annotation.Stereotype;
024
025import static org.opengis.annotation.Obligation.*;
026import static org.opengis.annotation.Specification.*;
027
028
029/**
030 * Range of date validity.
031 *
032 * @author  Cédric Briançon (Geomatys)
033 * @version 3.1
034 * @since   2.3
035 */
036@Classifier(Stereotype.DATATYPE)
037@UML(identifier="MI_RequestedDate", specification=ISO_19115_2)
038public interface RequestedDate {
039    /**
040     * Preferred date and time of collection.
041     *
042     * <div class="warning"><b>Upcoming API change — temporal schema</b><br>
043     * As of Java 8, the {@code java.time} package is a better match for the different
044     * types of date defined by ISO 19108 (<cite>Temporal Schema</cite>) or ISO 19103.
045     * The return value of this method may be changed to {@link java.time.temporal.Temporal} in GeoAPI 4.0.
046     * </div>
047     *
048     * @return preferred date and time.
049     */
050    @UML(identifier="requestedDateOfCollection", obligation=MANDATORY, specification=ISO_19115_2)
051    Date getRequestedDateOfCollection();
052
053    /**
054     * Latest date and time collection must be completed.
055     *
056     * <div class="warning"><b>Upcoming API change — temporal schema</b><br>
057     * As of Java 8, the {@code java.time} package is a better match for the different
058     * types of date defined by ISO 19108 (<cite>Temporal Schema</cite>) or ISO 19103.
059     * The return value of this method may be changed to {@link java.time.temporal.Temporal} in GeoAPI 4.0.
060     * </div>
061     *
062     * @return latest date and time.
063     */
064    @UML(identifier="latestAcceptableDate", obligation=MANDATORY, specification=ISO_19115_2)
065    Date getLatestAcceptableDate();
066}