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.constraint; 019 020import java.util.Collection; 021import java.util.Collections; 022import org.opengis.util.InternationalString; 023import org.opengis.metadata.citation.Citation; 024import org.opengis.metadata.citation.Responsibility; 025import org.opengis.metadata.identification.BrowseGraphic; 026import org.opengis.metadata.maintenance.Scope; 027import org.opengis.annotation.UML; 028 029import static org.opengis.annotation.Obligation.*; 030import static org.opengis.annotation.Specification.*; 031 032 033/** 034 * Restrictions on the access and use of a resource or metadata. 035 * 036 * @author Martin Desruisseaux (IRD) 037 * @author Rémi Maréchal (Geomatys) 038 * @version 3.1 039 * @since 2.0 040 */ 041@UML(identifier="MD_Constraints", specification=ISO_19115) 042public interface Constraints { 043 /** 044 * Limitation affecting the fitness for use of the resource. 045 * Returns an empty collection if none. 046 * 047 * <div class="note"><b>Example:</b> not to be used for navigation.</div> 048 * 049 * @return limitation affecting the fitness for use of the resource. 050 */ 051 @UML(identifier="useLimitation", obligation=OPTIONAL, specification=ISO_19115) 052 default Collection<? extends InternationalString> getUseLimitations() { 053 return Collections.emptyList(); 054 } 055 056 /** 057 * Spatial and / or temporal extents and or levels of the application of the constraints restrictions. 058 * 059 * @return extents or levels of the application of the constraints restrictions, or {@code null} if none. 060 * 061 * @since 3.1 062 */ 063 @UML(identifier="constraintApplicationScope", obligation=OPTIONAL, specification=ISO_19115) 064 default Scope getConstraintApplicationScope() { 065 return null; 066 } 067 068 /** 069 * Graphics / symbols indicating the constraint. 070 * Returns an empty collection if none. 071 * 072 * @return graphics or symbols indicating the constraint. 073 * 074 * @since 3.1 075 */ 076 @UML(identifier="graphic", obligation=OPTIONAL, specification=ISO_19115) 077 default Collection<? extends BrowseGraphic> getGraphics() { 078 return Collections.emptyList(); 079 } 080 081 /** 082 * Citations for the limitation of constraint. 083 * Returns an empty collection if none. 084 * 085 * <div class="note"><b>Example:</b> copyright statement, license agreement, <i>etc</i>.</div> 086 * 087 * @return citations for the limitation of constraint, or {@code null} if none. 088 * 089 * @since 3.1 090 */ 091 @UML(identifier="reference", obligation=OPTIONAL, specification=ISO_19115) 092 default Collection<? extends Citation> getReferences() { 093 return Collections.emptyList(); 094 } 095 096 /** 097 * Information concerning the parties to whom the resource can or cannot be released. 098 * 099 * @return information concerning the parties to whom the resource can or cannot be released, or {@code null} if none. 100 * 101 * @since 3.1 102 */ 103 @UML(identifier="releasability", obligation=OPTIONAL, specification=ISO_19115) 104 default Releasability getReleasability() { 105 return null; 106 } 107 108 /** 109 * Parties responsible for the resource constraints. 110 * Returns an empty collection if none. 111 * 112 * @return parties responsible for the resource constraints. 113 * 114 * @since 3.1 115 */ 116 @UML(identifier="responsibleParty", obligation=OPTIONAL, specification=ISO_19115) 117 default Collection<? extends Responsibility> getResponsibleParties() { 118 return Collections.emptyList(); 119 } 120}