001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2009-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 java.util.Collections;
022import org.opengis.annotation.UML;
023import org.opengis.metadata.distribution.Format;
024import org.opengis.metadata.distribution.DataFile;
025import org.opengis.metadata.content.RangeDimension;
026import org.opengis.metadata.content.CoverageDescription;
027import org.opengis.metadata.spatial.SpatialRepresentation;
028import org.opengis.metadata.spatial.SpatialRepresentationType;
029
030import static org.opengis.annotation.Obligation.*;
031import static org.opengis.annotation.Specification.*;
032
033
034/**
035 * Result of a data quality measure organizing the measured values as a coverage.
036 *
037 * @author  Cédric Briançon (Geomatys)
038 * @author  Martin Desruisseaux (Geomatys)
039 * @version 3.1
040 * @since   2.3
041 */
042@UML(identifier="DQ_CoverageResult", specification=ISO_19157)
043public interface CoverageResult extends Result {
044    /**
045     * Method used to spatially represent the coverage result.
046     *
047     * @return spatial representation of the coverage result.
048     */
049    @UML(identifier="spatialRepresentationType", obligation=MANDATORY, specification=ISO_19157)
050    SpatialRepresentationType getSpatialRepresentationType();
051
052    /**
053     * Provides the digital representation of data quality measures composing the coverage result.
054     *
055     * @return digital representation of data quality measures composing the coverage result.
056     */
057    @UML(identifier="resultSpatialRepresentation", obligation=MANDATORY, specification=ISO_19157)
058    SpatialRepresentation getResultSpatialRepresentation();
059
060    /**
061     * Provides the description of the content of the result coverage.
062     * This is the semantic definition of the data quality measures.
063     *
064     * @return description of the content of the result coverage.
065     *
066     * @deprecated Replaced by {@link #getResultContent()}.
067     */
068    @Deprecated(since="3.1")
069    @UML(identifier="resultContentDescription", obligation=MANDATORY, specification=ISO_19115_2, version=2009)
070    default CoverageDescription getResultContentDescription() {
071        return null;
072    }
073
074    /**
075     * Provides the description of the content of the result coverage.
076     * This is the semantic definition of the data quality measures.
077     *
078     * @return description of the content of the result coverage.
079     *
080     * @condition Mandatory if {@linkplain #getResultFormat() result format}
081     *            and {@link #getResultFile() result file} are not provided.
082     */
083    @UML(identifier="resultContent", obligation=CONDITIONAL, specification=ISO_19157)
084    default Collection<? extends RangeDimension> getResultContent() {
085        return Collections.emptyList();
086    }
087
088    /**
089     * Provides information about the format of the result coverage data.
090     *
091     * @return format of the result coverage data.
092     *
093     * @condition Mandatory if {@linkplain #getResultContent() result content} is not provided.
094     */
095    @UML(identifier="resultFormat", obligation=CONDITIONAL, specification=ISO_19157)
096    default Format getResultFormat() {
097        return null;
098    }
099
100    /**
101     * Provides information about the data file containing the result coverage data.
102     *
103     * @return data file containing the result coverage data.
104     *
105     * @condition Mandatory if {@linkplain #getResultContent() result content} is not provided.
106     */
107    @UML(identifier="resultFile", obligation=CONDITIONAL, specification=ISO_19157)
108    default DataFile getResultFile() {
109        return null;
110    }
111}