001/* 002 * GeoAPI - Java interfaces for OGC/ISO standards 003 * Copyright © 2004-2024 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.quality; 019 020import java.util.Collection; 021import org.opengis.metadata.lineage.Lineage; 022import org.opengis.annotation.UML; 023import org.opengis.annotation.Profile; 024 025import static org.opengis.annotation.Obligation.*; 026import static org.opengis.annotation.Specification.*; 027import static org.opengis.annotation.ComplianceLevel.*; 028 029 030/** 031 * Quality information for the data specified by a data quality scope. 032 * 033 * @author Martin Desruisseaux (IRD) 034 * @author Alexis Gaillard (Geomatys) 035 * @version 3.1 036 * @since 2.0 037 */ 038@UML(identifier="DQ_DataQuality", specification=ISO_19157) 039public interface DataQuality { 040 /** 041 * The specific data to which the data quality information applies. 042 * The scope specifies the extent, spatial and/or temporal, and/or common characteristic(s) 043 * that identify the data on which data quality is to be evaluated. 044 * Examples: 045 * <ul> 046 * <li>a data set series;</li> 047 * <li>a data set;</li> 048 * <li>a subset of data defined by one or more of the following characteristics: 049 * <ul> 050 * <li>types of items (sets of feature types);</li> 051 * <li>specific items (sets of feature instances);</li> 052 * <li>geographic extent;</li> 053 * <li>temporal extent.</li> 054 * </ul> 055 * </li> 056 * </ul> 057 * 058 * <div class="warning"><b>Upcoming API change — renaming</b><br> 059 * As of ISO 19115:2014, {@code DQ_Scope} (from {@link org.opengis.metadata.quality}) is replaced by 060 * {@code MD_Scope} (from {@link org.opengis.metadata.maintenance}). 061 * This change may be applied in GeoAPI 4.0. 062 * </div> 063 * 064 * @return the specific data to which the data quality information applies. 065 */ 066 @UML(identifier="scope", obligation=MANDATORY, specification=ISO_19157) 067 Scope getScope(); 068 069 /** 070 * Quality information for the data specified by the scope. 071 * The quality of a data set can be measured using a variety of methods; 072 * a single data quality measure might be insufficient for fully evaluating 073 * the quality of the data specified by the {@linkplain #getScope() scope}. 074 * Therefore multiple data quality measures may be reported. 075 * The data quality report should then include one instance of {@link Element} for each measure applied. 076 * 077 * @return quality information for the data specified by the scope. 078 */ 079 @UML(identifier="report", obligation=MANDATORY, specification=ISO_19157) 080 Collection<? extends Element> getReports(); 081 082 /** 083 * Non-quantitative quality information about the lineage of the data specified by the scope. 084 * 085 * @return non-quantitative quality information about the lineage of the data specified, 086 * or {@code null}. 087 * 088 * @deprecated Removed from ISO 19157:2013. 089 */ 090 @Profile(level=CORE) 091 @Deprecated(since="3.1") 092 @UML(identifier="lineage", obligation=CONDITIONAL, specification=ISO_19115, version=2003) 093 default Lineage getLineage() { 094 return null; 095 } 096 097 /** 098 * Reference to an external standalone quality report. 099 * Can be used for providing more details than reported as standard metadata. 100 * 101 * @return reference to an external standalone quality report, or {@code null} if none. 102 * 103 * @since 3.1 104 * 105 * @todo Renamed in 19157:2022: {@code QualityEvaluationReport}. 106 */ 107 @UML(identifier="standaloneQualityReport", obligation=OPTIONAL, specification=ISO_19157) 108 default StandaloneQualityReportInformation getStandaloneQualityReport() { 109 return null; 110 } 111}