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.citation; 019 020import java.net.URI; 021import org.opengis.util.InternationalString; 022import org.opengis.annotation.UML; 023import org.opengis.annotation.Profile; 024import org.opengis.annotation.Classifier; 025import org.opengis.annotation.Stereotype; 026 027import static org.opengis.annotation.Obligation.*; 028import static org.opengis.annotation.ComplianceLevel.*; 029import static org.opengis.annotation.Specification.*; 030 031 032/** 033 * Information about on-line sources from which the dataset, specification, or 034 * community profile name and extended metadata elements can be obtained. 035 * 036 * @author Martin Desruisseaux (IRD) 037 * @author Cory Horner (Refractions Research) 038 * @version 3.1 039 * @since 1.0 040 */ 041@Classifier(Stereotype.DATATYPE) 042@UML(identifier="CI_OnlineResource", specification=ISO_19115) 043public interface OnlineResource { 044 /** 045 * Location (address) for on-line access using a Uniform Resource Locator address or 046 * similar addressing scheme. 047 * 048 * <div class="note"><b>Example:</b> 049 * {@code "http://www.statkart.no/isotc211"}. 050 * </div> 051 * 052 * @return location for on-line access using a Uniform Resource Locator address or similar scheme. 053 */ 054 @Profile(level=CORE) 055 @UML(identifier="linkage", obligation=MANDATORY, specification=ISO_19115) 056 URI getLinkage(); 057 058 /** 059 * Connection protocol to be used. 060 * 061 * <div class="note"><b>Example:</b> 062 * ftp, http get KVP, http POST, <i>etc</i>. 063 * </div> 064 * 065 * @return connection protocol to be used, or {@code null}. 066 */ 067 @UML(identifier="protocol", obligation=OPTIONAL, specification=ISO_19115) 068 default String getProtocol() { 069 return null; 070 } 071 072 /** 073 * Name of an application profile that can be used with the online resource. 074 * 075 * @return application profile that can be used with the online resource, or {@code null}. 076 */ 077 @UML(identifier="applicationProfile", obligation=OPTIONAL, specification=ISO_19115) 078 default String getApplicationProfile() { 079 return null; 080 } 081 082 /** 083 * Name of the online resource. 084 * 085 * <div class="warning"><b>Upcoming API change — internationalization</b><br> 086 * The return type will be changed from {@code String} to {@code InternationalString} in GeoAPI 4.0. 087 * </div> 088 * 089 * @return name of the online resource, or {@code null}. 090 */ 091 @UML(identifier="name", obligation=OPTIONAL, specification=ISO_19115) 092 default String getName() { 093 return null; 094 } 095 096 /** 097 * Detailed text description of what the online resource is/does. 098 * 099 * @return text description of what the online resource is/does, or {@code null}. 100 */ 101 @UML(identifier="description", obligation=OPTIONAL, specification=ISO_19115) 102 default InternationalString getDescription() { 103 return null; 104 } 105 106 /** 107 * Code for function performed by the online resource. 108 * 109 * @return function performed by the online resource, or {@code null}. 110 */ 111 @UML(identifier="function", obligation=OPTIONAL, specification=ISO_19115) 112 default OnLineFunction getFunction() { 113 return null; 114 } 115 116 /** 117 * Request used to access the resource depending on the protocol. 118 * This is used mainly for POST requests. 119 * Example: 120 * 121 * {@snippet lang="xml" : 122 * <GetFeature service="WFS" version="2.0.0" 123 * outputFormat="application/gml+xml;version=3.2" 124 * xmlns="(…snip…)"> 125 * <Query typeNames="Roads"/> 126 * </GetFeature> 127 * } 128 * 129 * @return request used to access the resource, or {@code null}. 130 * 131 * @since 3.1 132 */ 133 @UML(identifier="protocolRequest", obligation=OPTIONAL, specification=ISO_19115) 134 default String getProtocolRequest() { 135 return null; 136 } 137}