001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2014-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.citation;
019
020import java.util.Collection;
021import java.util.Collections;
022import org.opengis.annotation.UML;
023import org.opengis.annotation.Profile;
024import org.opengis.metadata.extent.Extent;
025
026import static org.opengis.annotation.Obligation.*;
027import static org.opengis.annotation.ComplianceLevel.CORE;
028import static org.opengis.annotation.Specification.ISO_19115;
029
030
031/**
032 * Information about the party and their role.
033 *
034 * @author  Rémi Maréchal (Geomatys)
035 * @version 3.1
036 * @since   3.1
037 */
038@UML(identifier="CI_Responsibility", specification=ISO_19115)
039public interface Responsibility {
040    /**
041     * Function performed by the responsible party.
042     *
043     * @return function performed by the responsible party.
044     */
045    @Profile(level=CORE)
046    @UML(identifier="role", obligation=MANDATORY, specification=ISO_19115)
047    Role getRole();
048
049    /**
050     * Spatial or temporal extents of the role.
051     * Returns an empty collection if none.
052     *
053     * @return spatial or temporal extent of the role.
054     */
055    @UML(identifier="extent", obligation=OPTIONAL, specification=ISO_19115)
056    default Collection<? extends Extent> getExtents() {
057        return Collections.emptyList();
058    }
059
060    /**
061     * Information about the parties.
062     * Returns an empty collection if none.
063     *
064     * @return information about the parties.
065     */
066    @UML(identifier="party", obligation=MANDATORY, specification=ISO_19115)
067    Collection<? extends Party> getParties();
068}