/** * Creates the coverage description object if it does not already exists, then returns it. * * @return the coverage description (never {@code null}). * @see #newCoverage(boolean) */ private DefaultCoverageDescription coverageDescription() { if (coverageDescription == null) { coverageDescription = electromagnetic ? new DefaultImageDescription() : new DefaultCoverageDescription(); } return coverageDescription; }
/** Updates the legacy value in an existing instance of the new kind of value. */ @Override protected boolean update(final DefaultAttributeGroup container, final RangeDimension value) { if (container instanceof DefaultAttributeGroup) { container.setAttributes(asCollection(value)); return true; } return false; } }.validOrNull();
/** Stores a legacy value into the new kind of value. */ @Override protected DefaultAttributeGroup wrap(final RangeDimension value) { final DefaultAttributeGroup container = new DefaultAttributeGroup(); container.setAttributes(asCollection(value)); return container; }
/** Extracts the legacy value from the new kind of value. */ @Override protected RangeDimension unwrap(final DefaultAttributeGroup container) { return getSingleton(container.getAttributes(), RangeDimension.class, this, DefaultCoverageDescription.class, "getDimensions"); }
/** * {@inheritDoc} */ @Override public void setScaleFactor(final Double newValue) { super.setScaleFactor(newValue); }
/** * Sets the scale factor which has been applied to the cell value. * * @param newValue the new scale factor which has been applied to the cell value. */ public void setScaleFactor(final Double newValue) { checkWritePermission(); scaleFactor = newValue; }
/** * Sets the designation associated with a set of range elements. * * @param newValue the new name value. */ public void setName(final InternationalString newValue) { checkWritePermission(); name = newValue; }
/** * Sets designation of criterion for defining maximum and minimum wavelengths for a spectral band. * * @param newValue the new band definition. */ public void setBandBoundaryDefinition(final BandDefinition newValue) { checkWritePermission(); bandBoundaryDefinition = newValue; }
/** * {@inheritDoc} */ @Override public void setNominalSpatialResolution(final Double newValue) { super.setNominalSpatialResolution(newValue); }
/** * Constructs an attribute group initialized to the given values. * * @param contentType type of information represented by the value, or {@code null}. * @param attribute the attribute, or {@code null}. */ public DefaultAttributeGroup(final CoverageContentType contentType, final RangeDimension attribute) { contentTypes = singleton(contentType, CoverageContentType.class); attributes = singleton(attribute, RangeDimension.class); }
/** * Sets information on an attribute of the resource. * * @param newValues the new attributes. */ public void setAttributes(final Collection<? extends RangeDimension> newValues) { attributes = writeCollection(newValues, attributes, RangeDimension.class); } }
/** * Sets the identifier for the level of processing that has been applied to the resource. * * @param newValue the new identifier for the level of processing. * * @since 0.5 */ public void setProcessingLevelCode(final Identifier newValue) { checkWritePermission(); processingLevelCode = newValue; }
/** * Sets the description of the specific range elements of a coverage. * * @param newValues the new range element description. */ public void setRangeElementDescriptions(final Collection<? extends RangeElementDescription> newValues) { rangeElementDescriptions = writeCollection(newValues, rangeElementDescriptions, RangeElementDescription.class); } }
/** * Sets the indication of whether or not triangulation has been performed upon the image. * * @param newValue the new triangulation indicator. */ public void setTriangulationIndicator(final Boolean newValue) { checkWritePermission(); triangulationIndicator = newValue; }
/** * Creates the coverage description object if it does not already exists, then returns it. * * @return the coverage description (never {@code null}). * @see #newCoverage(boolean) */ private DefaultCoverageDescription coverageDescription() { if (coverageDescription == null) { coverageDescription = electromagnetic ? new DefaultImageDescription() : new DefaultCoverageDescription(); } return coverageDescription; }
/** Stores a legacy value into the new kind of value. */ @Override protected DefaultAttributeGroup wrap(final RangeDimension value) { final DefaultAttributeGroup container = new DefaultAttributeGroup(); container.setAttributes(asCollection(value)); return container; }
/** Extracts the legacy value from the new kind of value. */ @Override protected RangeDimension unwrap(final DefaultAttributeGroup container) { return getSingleton(container.getAttributes(), RangeDimension.class, this, DefaultCoverageDescription.class, "getDimensions"); }
/** Updates the legacy value in an existing instance of the new kind of value. */ @Override protected boolean update(final DefaultAttributeGroup container, final RangeDimension value) { if (container instanceof DefaultAttributeGroup) { container.setAttributes(asCollection(value)); return true; } return false; } }.validOrNull();
/** * Sets the type of transfer function to be used when scaling a physical value for a given element. * * @param newValue the new transfer function value. */ public void setTransferFunctionType(final TransferFunctionType newValue) { checkWritePermission(); transferFunctionType = newValue; }
/** * Sets a new type of other attribute description. * * @param newValue the new type of other attribute description. */ public void setOtherPropertyType(final RecordType newValue) { checkWritePermission(); otherPropertyType = newValue; }