public class SampleCoding extends MetadataElement
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
Constructor and Description |
---|
SampleCoding(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(MetadataAttribute attribute)
Adds an attribute to this node.
|
void |
addElement(MetadataElement element)
Overrides the base class
addElement in order to not add an element to this flag coding
because flag codings do not support inner elements. |
MetadataAttribute |
addSample(String name,
int value,
String description)
Adds a new coding value to this sample coding.
|
MetadataAttribute |
addSamples(String name,
int[] values,
String description)
Adds a new coding value to this sample coding.
|
int |
getSampleCount()
Gets the number of coded sample values.
|
String |
getSampleName(int index)
Gets the sample name at the specified attribute index.
|
int |
getSampleValue(int index)
Gets the sample value at the specified attribute index.
|
acceptVisitor, addElementAt, containsAttribute, containsElement, createDeepClone, dispose, getAttribute, getAttributeAt, getAttributeDouble, getAttributeDouble, getAttributeIndex, getAttributeInt, getAttributeInt, getAttributeNames, getAttributes, getAttributeString, getAttributeString, getAttributeUTC, getAttributeUTC, getElement, getElementAt, getElementGroup, getElementIndex, getElementNames, getElements, getNumAttributes, getNumElements, getParentElement, getRawStorageSize, removeAttribute, removeElement, setAttributeDouble, setAttributeInt, setAttributeString, setAttributeUTC, setModified
fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setName, setOwner, toString, updateExpression
getExtension
public SampleCoding(String name)
public void addElement(MetadataElement element)
addElement
in order to not add an element to this flag coding
because flag codings do not support inner elements.addElement
in class MetadataElement
element
- the element to be added, always ignoredpublic void addAttribute(MetadataAttribute attribute)
addAttribute
in class MetadataElement
attribute
- the attribute to be addedIllegalArgumentException
- if the attribute added is not an integer or does not have a scalar valuepublic MetadataAttribute addSample(String name, int value, String description)
name
- the coding namevalue
- the valuedescription
- the description textIllegalArgumentException
- if name
is nullpublic MetadataAttribute addSamples(String name, int[] values, String description)
name
- the coding namevalues
- the valuesdescription
- the description textIllegalArgumentException
- if name
is nullpublic int getSampleCount()
public String getSampleName(int index)
index
- the attribute index.public int getSampleValue(int index)
index
- the attribute index.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.