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.content; 019 020import java.util.Collection; 021import java.util.Collections; 022import java.util.Iterator; 023import org.opengis.util.RecordType; 024import org.opengis.metadata.Identifier; 025import org.opengis.annotation.UML; 026 027import static org.opengis.annotation.Obligation.*; 028import static org.opengis.annotation.Specification.*; 029 030 031/** 032 * Information about the content of a grid data cell. 033 * 034 * @author Martin Desruisseaux (IRD) 035 * @author Cory Horner (Refractions Research) 036 * @author Cédric Briançon (Geomatys) 037 * @author Rémi Maréchal (Geomatys) 038 * @version 3.1 039 * @since 2.0 040 */ 041@UML(identifier="MD_CoverageDescription", specification=ISO_19115) 042public interface CoverageDescription extends ContentInformation { 043 /** 044 * Description of the attribute described by the measurement value. 045 * 046 * @return description of the attribute. 047 */ 048 @UML(identifier="attributeDescription", obligation=MANDATORY, specification=ISO_19115) 049 RecordType getAttributeDescription(); 050 051 /** 052 * Identifier for the level of processing that has been applied to the resource. 053 * May be {@code null} if unspecified. 054 * 055 * @return identifier for the level of processing that has been applied to the resource, or {@code null} if none. 056 * 057 * @since 3.1 058 * 059 * @see org.opengis.metadata.identification.Identification#getProcessingLevel() 060 */ 061 @UML(identifier="processingLevelCode", obligation=OPTIONAL, specification=ISO_19115) 062 default Identifier getProcessingLevelCode() { 063 return null; 064 } 065 066 /** 067 * Information on attribute groups of the resource. 068 * 069 * @return information on attribute groups of the resource. 070 * 071 * @since 3.1 072 */ 073 @UML(identifier="attributeGroup", obligation=OPTIONAL, specification=ISO_19115) 074 default Collection<? extends AttributeGroup> getAttributeGroups() { 075 return Collections.emptyList(); 076 } 077 078 /** 079 * Type of information represented by the cell value. 080 * 081 * @return type of information represented by the cell value. 082 * 083 * @deprecated As of ISO 19115:2014, moved to {@link AttributeGroup#getContentTypes()}. 084 */ 085 @Deprecated(since="3.1") 086 @UML(identifier="contentType", obligation=MANDATORY, specification=ISO_19115, version=2003) 087 default CoverageContentType getContentType() { 088 for (AttributeGroup group : getAttributeGroups()) { 089 Iterator<CoverageContentType> it = group.getContentTypes().iterator(); 090 if (it.hasNext()) return it.next(); 091 } 092 return null; 093 } 094 095 /** 096 * Information on the dimensions of the cell measurement value. 097 * 098 * @return dimensions of the cell measurement value. 099 * 100 * @deprecated As of ISO 19115:2014, moved to {@link AttributeGroup#getAttributes()}. 101 */ 102 @Deprecated(since="3.1") 103 @UML(identifier="dimension", obligation=OPTIONAL, specification=ISO_19115, version=2003) 104 default Collection<? extends RangeDimension> getDimensions() { 105 return Collections.emptyList(); 106 } 107 108 /** 109 * Provides the description of the specific range elements of a coverage. 110 * 111 * @return description of the specific range elements. 112 */ 113 @UML(identifier="rangeElementDescription", obligation=OPTIONAL, specification=ISO_19115_2) 114 default Collection<? extends RangeElementDescription> getRangeElementDescriptions() { 115 return Collections.emptyList(); 116 } 117}