public abstract class XmlMetadata extends GenericXmlMetadata
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected int |
numBands |
protected int |
width |
attributeMap, logger, MISSING_ELEMENT_WARNING, name, NO_SUCH_PATH_WARNING, path, rootElement
Constructor and Description |
---|
XmlMetadata(String name)
Constructs an instance of metadata class and assigns a name to the root
MetadataElement . |
Modifier and Type | Method and Description |
---|---|
protected float |
asFloat(String value)
Silently converts a string to a float (i.e. without throwing exception for unconvertible values)
|
protected float[] |
asFloatArray(String value,
String separator)
Converts the value to a float array.
|
protected int |
asInt(String value)
Silently converts a string to a int (i.e. without throwing exception for unconvertible values)
|
abstract ProductData.UTC |
getCenterTime()
Returns the product center time in UTC format.
|
abstract String |
getFormatName()
Returns the name of the raster format (for example: TIFF, NITF, etc).
|
abstract int |
getNumBands()
Returns the number of bands of the product.
|
abstract String |
getProductDescription()
Returns the product description, preferably from metadata
|
abstract ProductData.UTC |
getProductEndTime()
Returns the product end time in UTC format.
|
abstract String |
getProductName()
Returns the name of the product, as found in metadata.
|
abstract ProductData.UTC |
getProductStartTime()
Returns the product start time in UTC format.
|
abstract String[] |
getRasterFileNames()
Returns the names of raster files for the product.
|
abstract int |
getRasterHeight()
Returns the height of the product, in pixels.
|
abstract int |
getRasterWidth()
Returns the width of the product, in pixels.
|
void |
setName(String value)
Sets the name of this metadata (and also the name of the root element).
|
CopyChildElements, create, create, create, ensureAttributeTagPresent, getAttributeSiblingValue, getAttributeValue, getAttributeValue, getAttributeValues, getFileName, getMetadataProfile, getPath, getRootElement, indexAttribute, loadMetadata, setFileName, setPath, warn
public XmlMetadata(String name)
MetadataElement
.name
- The name of this instance, and also the initial name of the root element.public abstract int getNumBands()
public abstract String getProductName()
public abstract String getFormatName()
This getter should be overridden in all derived classes because each metadata type may have a different hierarchy of nodes for getting this value.
public abstract int getRasterWidth()
public abstract int getRasterHeight()
public abstract String[] getRasterFileNames()
public void setName(String value)
setName
in class GenericXmlMetadata
value
- The name of the metadata file.public abstract ProductData.UTC getProductStartTime()
public abstract ProductData.UTC getProductEndTime()
public abstract ProductData.UTC getCenterTime()
public abstract String getProductDescription()
protected float[] asFloatArray(String value, String separator)
value
- The string list of valuesseparator
- The items separatorprotected float asFloat(String value)
value
- The value to be convertedFloat.NaN
if the conversion cannot be performed.protected int asInt(String value)
value
- The value to be converted0
if the conversion cannot be performed.Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.