001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2004-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.extent;
019
020import java.util.Collection;
021import org.opengis.annotation.UML;
022
023import static org.opengis.annotation.Obligation.*;
024import static org.opengis.annotation.Specification.*;
025
026
027/**
028 * Extent with respect to date/time and spatial boundaries.
029 *
030 * @author  Martin Desruisseaux (IRD)
031 * @author  Rémi Maréchal (Geomatys)
032 * @version 3.1
033 * @since   1.0
034 */
035@UML(identifier="EX_SpatialTemporalExtent", specification=ISO_19115)
036public interface SpatialTemporalExtent extends TemporalExtent {
037    /**
038     * The spatial extent components of composite spatial and temporal extent.
039     *
040     * @return the list of geographic extents (never {@code null}).
041     */
042    @UML(identifier="spatialExtent", obligation=MANDATORY, specification=ISO_19115)
043    Collection<? extends GeographicExtent> getSpatialExtent();
044    /*
045     * Missing trailing "s" in the method name (because the return type is a collection),
046     * but this is probably not worth a compatibility break. Note also that the vertical
047     * and temporal extents are both singleton, so while not strictly correct at least
048     * the current name provides a uniform naming pattern in this interface.
049     */
050
051    /**
052     * The vertical extent component.
053     *
054     * @return vertical extent component, or {@code null} if none.
055     *
056     * @since 3.1
057     */
058    @UML(identifier="verticalExtent", obligation=OPTIONAL, specification=ISO_19115)
059    default VerticalExtent getVerticalExtent() {
060        return null;
061    }
062}