use of org.apache.sis.metadata.iso.content.DefaultRangeElementDescription in project sis by apache.
the class MetadataBuilder method addSampleValueDescription.
/**
* Adds a description of a particular sample value.
* Storage location is:
*
* <ul>
* <li>{@code metadata/contentInfo/rangeElementDescription}</li>
* </ul>
*
* <div class="note"><b>Note:</b>
* ISO 19115 range elements are approximatively equivalent to
* {@code org.apache.sis.coverage.Category} in the {@code sis-coverage} module.</div>
*
* @param name designation associated with a set of range elements, or {@code null} if none.
* @param definition description of a set of specific range elements, or {@code null} if none.
*/
public void addSampleValueDescription(final CharSequence name, final CharSequence definition) {
final InternationalString i18n = trim(name);
final InternationalString def = trim(definition);
if (i18n != null && def != null) {
final DefaultRangeElementDescription element = new DefaultRangeElementDescription();
element.setName(i18n);
element.setDefinition(def);
addIfNotPresent(coverageDescription().getRangeElementDescriptions(), element);
}
}
Aggregations