public class FlagCoding extends SampleCoding
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
Constructor and Description |
---|
FlagCoding(String name)
Constructs a new flag coding object with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(ProductVisitor visitor)
Accepts the given visitor.
|
MetadataAttribute |
addFlag(String name,
int flagMask,
int flagValue,
String description)
Adds a new flag definition to this flags coding.
|
MetadataAttribute |
addFlag(String name,
int flagMask,
String description)
Adds a new flag definition to this flags coding.
|
MetadataAttribute |
getFlag(String name)
Returns a metadata attribute wich is the representation of the flag with the given name.
|
int |
getFlagMask(String name)
Returns the flag mask value for the specified flag name.
|
String[] |
getFlagNames()
Returns a string array which contains the names of all flags contained in this
FlagCoding object. |
addAttribute, addElement, addSample, addSamples, getSampleCount, getSampleName, getSampleValue
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 FlagCoding(String name)
name
- the namepublic MetadataAttribute getFlag(String name)
name
- the flag namepublic String[] getFlagNames()
FlagCoding
object.FlagCoding
.FlagCoding
does not contain any flag, null
is returnedpublic MetadataAttribute addFlag(String name, int flagMask, String description)
name
- the flag nameflagMask
- the flag's bit maskdescription
- the description textIllegalArgumentException
- if name
is nullpublic MetadataAttribute addFlag(String name, int flagMask, int flagValue, String description)
name
- the flag nameflagMask
- the flag's bit maskdescription
- the description textIllegalArgumentException
- if name
is nullpublic int getFlagMask(String name)
name
- the flag nameIllegalArgumentException
- if name
is null, or a flag with the name does not existpublic void acceptVisitor(ProductVisitor visitor)
The method simply calls visitor.visit(this)
.
acceptVisitor
in class MetadataElement
visitor
- the visitor, must not be null
Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.