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.distribution; 019 020import java.util.Collection; 021import java.util.Collections; 022import org.opengis.annotation.UML; 023import org.opengis.annotation.Profile; 024import org.opengis.util.InternationalString; 025 026import static org.opengis.annotation.Obligation.*; 027import static org.opengis.annotation.Specification.*; 028import static org.opengis.annotation.ComplianceLevel.*; 029 030 031/** 032 * Information about the distributor of and options for obtaining the resource. 033 * 034 * @author Martin Desruisseaux (IRD) 035 * @version 3.1 036 * @since 2.0 037 */ 038@UML(identifier="MD_Distribution", specification=ISO_19115) 039public interface Distribution { 040 /** 041 * Brief description of a set of distribution options. 042 * 043 * @return brief description of a set of distribution options. 044 * 045 * @since 3.1 046 */ 047 @UML(identifier="description", obligation=OPTIONAL, specification=ISO_19115) 048 default InternationalString getDescription() { 049 return null; 050 } 051 052 /** 053 * Provides a description of the format of the data to be distributed. 054 * 055 * @return description of the format of the data to be distributed. 056 * 057 * @condition Mandatory if {@link Distributor#getDistributorFormats()} is empty. 058 * 059 * @see org.opengis.metadata.identification.Identification#getResourceFormats() 060 */ 061 @Profile(level=CORE) 062 @UML(identifier="distributionFormat", obligation=CONDITIONAL, specification=ISO_19115) 063 Collection<? extends Format> getDistributionFormats(); 064 065 /** 066 * Provides information about the distributor. 067 * 068 * @return information about the distributor. 069 */ 070 @UML(identifier="distributor", obligation=OPTIONAL, specification=ISO_19115) 071 default Collection<? extends Distributor> getDistributors() { 072 return Collections.emptyList(); 073 } 074 075 /** 076 * Provides information about technical means and media by which a resource is obtained 077 * from the distributor. 078 * 079 * @return technical means and media by which a resource is obtained from the distributor. 080 */ 081 @Profile(level=CORE) 082 @UML(identifier="transferOptions", obligation=OPTIONAL, specification=ISO_19115) 083 default Collection<? extends DigitalTransferOptions> getTransferOptions() { 084 return Collections.emptyList(); 085 } 086}