Class DefaultBand
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
,org.opengis.metadata.content.Band
,org.opengis.metadata.content.RangeDimension
- Direct Known Subclasses:
MI_Band
public class DefaultBand
extends DefaultSampleDimension
implements org.opengis.metadata.content.Band
Range of wavelengths in the electromagnetic spectrum.
The following property is conditional (i.e. mandatory under some circumstances)
in a well-formed metadata according ISO 19115:
MD_Band
└─units……
Units of data in each dimension included in the resource.Limitations
- Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
- Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases.
Serialization support is appropriate for short term storage or RMI between applications running the
same version of Apache SIS. For long term storage, use
XML
instead.
- Since:
- 0.3
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.metadata.ModifiableMetadata
ModifiableMetadata.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.metadata.content.BandDefinition
Designation of criterion for defining maximum and minimum wavelengths for a spectral band.private Double
Longest wavelength that the sensor is capable of collecting within a designated band.private Double
Shortest wavelength that the sensor is capable of collecting within a designated band.private javax.measure.Unit
<javax.measure.quantity.Length> Units in which sensor wavelengths are expressed.private org.opengis.metadata.content.PolarizationOrientation
Polarization of the radiation detected.private Double
Wavelength at which the response is the highest.private static final long
Serial number for inter-operability with different versions.private Integer
Number of discrete numerical values in the grid data.private org.opengis.metadata.content.PolarizationOrientation
Polarization of the radiation transmitted.Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an initially empty band.DefaultBand
(org.opengis.metadata.content.Band object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultBand
castOrCopy
(org.opengis.metadata.content.Band object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.org.opengis.metadata.content.BandDefinition
Returns the designation of criterion for defining maximum and minimum wavelengths for a spectral band.Returns the longest wavelength that the sensor is capable of collecting within a designated band.Returns the shortest wavelength that the sensor is capable of collecting within a designated band.javax.measure.Unit
<javax.measure.quantity.Length> Returns units in which sensor wavelengths are expressed.org.opengis.metadata.content.PolarizationOrientation
Returns polarization of the radiation detected.Returns the smallest distance between which separate points can be distinguished, as specified in instrument design.Returns the wavelength at which the response is the highest.Returns the number of discrete numerical values in the grid data.org.opengis.metadata.content.TransferFunctionType
Returns type of transfer function to be used when scaling a physical value for a given element.org.opengis.metadata.content.PolarizationOrientation
Returns the polarization of the radiation transmitted.javax.measure.Unit
<javax.measure.quantity.Length> getUnits()
Returns the units of data as a unit of length.void
setBandBoundaryDefinition
(org.opengis.metadata.content.BandDefinition newValue) Sets designation of criterion for defining maximum and minimum wavelengths for a spectral band.void
setBoundMax
(Double newValue) Sets the longest wavelength that the sensor is capable of collecting within a designated band.void
setBoundMin
(Double newValue) Sets the shortest wavelength that the sensor is capable of collecting within a designated band.void
setBoundUnits
(javax.measure.Unit<javax.measure.quantity.Length> newValue) Sets a new units in which sensor wavelengths are expressed.void
setDetectedPolarization
(org.opengis.metadata.content.PolarizationOrientation newValue) Sets the polarization of the radiation detected.void
setNominalSpatialResolution
(Double newValue) Sets the smallest distance between which separate points can be distinguished, as specified in instrument design.void
setPeakResponse
(Double newValue) Sets the wavelength at which the response is the highest.void
setToneGradation
(Integer newValue) Sets the number of discrete numerical values in the grid data.void
setTransferFunctionType
(org.opengis.metadata.content.TransferFunctionType newValue) Sets the type of transfer function to be used when scaling a physical value for a given element.void
setTransmittedPolarization
(org.opengis.metadata.content.PolarizationOrientation newValue) Sets the polarization of the radiation transmitted.void
setUnits
(javax.measure.Unit<?> newValue) Sets the units of data as a unit of length.Methods inherited from class org.apache.sis.metadata.iso.content.DefaultSampleDimension
getBitsPerValue, getMaxValue, getMeanValue, getMinValue, getNumberOfValues, getOffset, getOtherProperty, getOtherPropertyType, getRangeElementDescriptions, getScaleFactor, getStandardDeviation, setBitsPerValue, setMaxValue, setMeanValue, setMinValue, setNumberOfValues, setOffset, setOtherProperty, setOtherPropertyType, setRangeElementDescriptions, setScaleFactor, setStandardDeviation
Methods inherited from class org.apache.sis.metadata.iso.content.DefaultRangeDimension
castOrCopy, getDescription, getDescriptor, getNames, getSequenceIdentifier, setDescription, setDescriptor, setNames, setSequenceIdentifier
Methods inherited from class org.apache.sis.metadata.iso.ISOMetadata
getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionTo
Methods inherited from class org.apache.sis.metadata.ModifiableMetadata
checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, deepCopy, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSet
Methods inherited from class org.apache.sis.metadata.AbstractMetadata
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.metadata.content.Band
getBitsPerValue, getMaxValue, getMinValue, getOffset, getScaleFactor
Methods inherited from interface org.opengis.metadata.content.RangeDimension
getDescriptor, getSequenceIdentifier
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
boundMin
Shortest wavelength that the sensor is capable of collecting within a designated band. -
boundMax
Longest wavelength that the sensor is capable of collecting within a designated band. -
boundUnits
private javax.measure.Unit<javax.measure.quantity.Length> boundUnitsUnits in which sensor wavelengths are expressed. -
bandBoundaryDefinition
private org.opengis.metadata.content.BandDefinition bandBoundaryDefinitionDesignation of criterion for defining maximum and minimum wavelengths for a spectral band. -
peakResponse
Wavelength at which the response is the highest. -
toneGradation
Number of discrete numerical values in the grid data. -
transmittedPolarization
private org.opengis.metadata.content.PolarizationOrientation transmittedPolarizationPolarization of the radiation transmitted. -
detectedPolarization
private org.opengis.metadata.content.PolarizationOrientation detectedPolarizationPolarization of the radiation detected.
-
-
Constructor Details
-
DefaultBand
public DefaultBand()Constructs an initially empty band. -
DefaultBand
public DefaultBand(org.opengis.metadata.content.Band object) Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, because the other metadata contained in the given object are not recursively copied.Note on properties validation: This constructor does not verify the property values of the given metadata (e.g. whether it contains unexpected negative values). This is because invalid metadata exist in practice, and verifying their validity in this copy constructor is often too late. Note that this is not the only hole, as invalid metadata instances can also be obtained by unmarshalling an invalid XML document.- Parameters:
object
- the metadata to copy values from, ornull
if none.- See Also:
-
-
Method Details
-
castOrCopy
Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:- If the given object is
null
, then this method returnsnull
. - Otherwise if the given object is already an instance of
DefaultBand
, then it is returned unchanged. - Otherwise a new
DefaultBand
instance is created using the copy constructor and returned. Note that this is a shallow copy operation, because the other metadata contained in the given object are not recursively copied.
- Parameters:
object
- the object to get as a SIS implementation, ornull
if none.- Returns:
- a SIS implementation containing the values of the given object (may be the
given object itself), or
null
if the argument was null.
- If the given object is
-
getBoundMin
@ValueRange(minimum=0.0) @UML(identifier="boundMin", obligation=OPTIONAL, specification=ISO_19115) public Double getBoundMin()Returns the shortest wavelength that the sensor is capable of collecting within a designated band. The units of measurement is given bygetBoundUnits()
.- Returns:
- Shortest wavelength that the sensor is capable of collecting within a designated band,
or
null
if unspecified. - Since:
- 0.5
-
setBoundMin
Sets the shortest wavelength that the sensor is capable of collecting within a designated band.- Parameters:
newValue
- the new shortest wavelength, ornull
.- Throws:
IllegalArgumentException
- if the given value is negative.- Since:
- 0.5
-
getBoundMax
@ValueRange(minimum=0.0) @UML(identifier="boundMax", obligation=OPTIONAL, specification=ISO_19115) public Double getBoundMax()Returns the longest wavelength that the sensor is capable of collecting within a designated band. The units of measurement is given bygetUnits()
.- Returns:
- longest wavelength that the sensor is capable of collecting within a designated band,
or
null
if unspecified. - Since:
- 0.5
-
setBoundMax
Sets the longest wavelength that the sensor is capable of collecting within a designated band.- Parameters:
newValue
- the new longest wavelength, ornull
.- Throws:
IllegalArgumentException
- if the given value is negative.- Since:
- 0.5
-
getBoundUnits
@UML(identifier="boundUnits", obligation=OPTIONAL, specification=ISO_19115) public javax.measure.Unit<javax.measure.quantity.Length> getBoundUnits()Returns units in which sensor wavelengths are expressed.- Returns:
- units in which sensor wavelengths are expressed.
- Since:
- 0.5
- See Also:
-
setBoundUnits
public void setBoundUnits(javax.measure.Unit<javax.measure.quantity.Length> newValue) Sets a new units in which sensor wavelengths are expressed.- Parameters:
newValue
- the new unit.- Since:
- 0.5
-
getBandBoundaryDefinition
public org.opengis.metadata.content.BandDefinition getBandBoundaryDefinition()Returns the designation of criterion for defining maximum and minimum wavelengths for a spectral band.- Specified by:
getBandBoundaryDefinition
in interfaceorg.opengis.metadata.content.Band
- Returns:
- criterion for defining maximum and minimum wavelengths, or
null
.
-
setBandBoundaryDefinition
public void setBandBoundaryDefinition(org.opengis.metadata.content.BandDefinition newValue) Sets designation of criterion for defining maximum and minimum wavelengths for a spectral band.- Parameters:
newValue
- the new band definition.
-
getUnits
public javax.measure.Unit<javax.measure.quantity.Length> getUnits()Returns the units of data as a unit of length.Upcoming API change — generalization
As of ISO 19115:2014, the units of wavelength is ratherboundUnits
. The restriction for units of length in thisunits
property may be relaxed in GeoAPI 4.0.- Specified by:
getUnits
in interfaceorg.opengis.metadata.content.Band
- Overrides:
getUnits
in classDefaultSampleDimension
- Returns:
- The units of data.
-
setUnits
public void setUnits(javax.measure.Unit<?> newValue) Sets the units of data as a unit of length.Upcoming precondition change — relaxation
The current implementation requires the unit to be an instance ofUnit<Length>
, otherwise aClassCastException
is thrown. This is because the value returned bygetUnits()
was restricted by ISO 19115:2003 to units of length. However this restriction may be relaxed in GeoAPI 4.0.- Overrides:
setUnits
in classDefaultSampleDimension
- Parameters:
newValue
- The new units of data as an instance ofUnit<Length>
.
-
getPeakResponse
Returns the wavelength at which the response is the highest. The units of measurement is given bygetBoundUnits()
.- Specified by:
getPeakResponse
in interfaceorg.opengis.metadata.content.Band
- Returns:
- wavelength at which the response is the highest, or
null
if unspecified.
-
setPeakResponse
Sets the wavelength at which the response is the highest.- Parameters:
newValue
- the new peak response, ornull
.- Throws:
IllegalArgumentException
- if the given value is negative.
-
getToneGradation
Returns the number of discrete numerical values in the grid data.- Specified by:
getToneGradation
in interfaceorg.opengis.metadata.content.Band
- Returns:
- number of discrete numerical values in the grid data, or
null
if none.
-
setToneGradation
Sets the number of discrete numerical values in the grid data.- Parameters:
newValue
- the new tone gradation.
-
getNominalSpatialResolution
Returns the smallest distance between which separate points can be distinguished, as specified in instrument design.- Specified by:
getNominalSpatialResolution
in interfaceorg.opengis.metadata.content.Band
- Overrides:
getNominalSpatialResolution
in classDefaultSampleDimension
- Returns:
- smallest distance between which separate points can be distinguished, or
null
.
-
setNominalSpatialResolution
Sets the smallest distance between which separate points can be distinguished, as specified in instrument design.- Overrides:
setNominalSpatialResolution
in classDefaultSampleDimension
- Parameters:
newValue
- the new nominal spatial resolution.
-
getTransferFunctionType
public org.opengis.metadata.content.TransferFunctionType getTransferFunctionType()Returns type of transfer function to be used when scaling a physical value for a given element.- Specified by:
getTransferFunctionType
in interfaceorg.opengis.metadata.content.Band
- Overrides:
getTransferFunctionType
in classDefaultSampleDimension
- Returns:
- type of transfer function, or
null
.
-
setTransferFunctionType
public void setTransferFunctionType(org.opengis.metadata.content.TransferFunctionType newValue) Sets the type of transfer function to be used when scaling a physical value for a given element.- Overrides:
setTransferFunctionType
in classDefaultSampleDimension
- Parameters:
newValue
- the new transfer function value.
-
getTransmittedPolarization
public org.opengis.metadata.content.PolarizationOrientation getTransmittedPolarization()Returns the polarization of the radiation transmitted.Upcoming API change
This method may be renamedgetTransmittedPolarization
and its return type replaced byPolarisationOrientation
("z" letter replaced by "s" letter) in GeoAPI 4.0 for compliance with ISO 19115-2:2019.- Specified by:
getTransmittedPolarization
in interfaceorg.opengis.metadata.content.Band
- Returns:
- polarization of the radiation transmitted, or
null
.
-
setTransmittedPolarization
public void setTransmittedPolarization(org.opengis.metadata.content.PolarizationOrientation newValue) Sets the polarization of the radiation transmitted.Upcoming API change
This method may be renamedsetTransmittedPolarization
and its argument type replaced byPolarisationOrientation
("z" letter replaced by "s" letter) in GeoAPI 4.0 for compliance with ISO 19115-2:2019.- Parameters:
newValue
- the new transmitted polarization.
-
getDetectedPolarization
public org.opengis.metadata.content.PolarizationOrientation getDetectedPolarization()Returns polarization of the radiation detected.Upcoming API change
This method may be renamedgetDetectedPolarization
and its return type replaced byPolarisationOrientation
("z" letter replaced by "s" letter) in GeoAPI 4.0 for compliance with ISO 19115-2:2019.- Specified by:
getDetectedPolarization
in interfaceorg.opengis.metadata.content.Band
- Returns:
- polarization of the radiation detected, or
null
.
-
setDetectedPolarization
public void setDetectedPolarization(org.opengis.metadata.content.PolarizationOrientation newValue) Sets the polarization of the radiation detected.Upcoming API change
This method may be renamedsetDetectedPolarization
and its argument type replaced byPolarisationOrientation
("z" letter replaced by "s" letter) in GeoAPI 4.0 for compliance with ISO 19115-2:2019.- Parameters:
newValue
- the new detected polarization.
-