|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bc.ceres.core.ExtensibleObject
org.esa.beam.framework.datamodel.ProductNode
public abstract class ProductNode
The ProductNode is the base class for all nodes within a remote sensing data product and even the data
product itself.
| Field Summary | |
|---|---|
static String |
PROPERTY_NAME_DESCRIPTION
|
static String |
PROPERTY_NAME_NAME
|
| Constructor Summary | |
|---|---|
protected |
ProductNode(String name)
Constructs a new product node with the given name. |
protected |
ProductNode(String name,
String description)
Constructs a new product node with the given name and an optional description. |
| Method Summary | |
|---|---|
abstract void |
acceptVisitor(ProductVisitor visitor)
Accepts the given visitor. |
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children. |
void |
fireProductNodeChanged(String propertyName)
|
void |
fireProductNodeChanged(String propertyName,
Object oldValue,
Object newValue)
|
String |
getDescription()
Returns a short textual description for this products node. |
String |
getDisplayName()
Returns this node's display name. |
String |
getName()
|
ProductNode |
getOwner()
|
Product |
getProduct()
Returns the product to which this node belongs to. |
ProductReader |
getProductReader()
Returns the product reader for the product to which this node belongs to. |
protected ProductReader |
getProductReaderSafe()
Returns the product reader for the product to which this node belongs to. |
String |
getProductRefString()
Gets the product reference string. |
protected Product |
getProductSafe()
Returns safely the product to which this node belongs to. |
ProductWriter |
getProductWriter()
Returns the product writer for the product to which this node belongs to. |
protected ProductWriter |
getProductWriterSafe()
Returns the product writer for the product to which this node belongs to. |
long |
getRawStorageSize()
Gets an estimated, raw storage size in bytes of this product node. |
abstract long |
getRawStorageSize(ProductSubsetDef subsetDef)
Gets an estimated, raw storage size in bytes of this product node. |
boolean |
isModified()
Returns whether or not this node is modified. |
protected boolean |
isPartOfSubset(ProductSubsetDef subsetDef)
Returns whether or not this node is part of the given subset. |
static boolean |
isValidNodeName(String name)
Tests whether the given name is valid name for a node. |
void |
removeFromFile(ProductWriter productWriter)
Physically remove this node from the file associated with the given product writer. |
void |
setDescription(String description)
Sets a short textual description for this products node. |
void |
setModified(boolean modified)
Sets this node's modified flag. |
void |
setName(String name)
Sets this product's name. |
protected void |
setOwner(ProductNode owner)
Sets the the owner node of this node. |
String |
toString()
|
void |
updateExpression(String oldExternalName,
String newExternalName)
Asks a product node to replace all occurences of and references to the node name given by oldExternalName with oldExternalName. |
| Methods inherited from class com.bc.ceres.core.ExtensibleObject |
|---|
getExtension |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_NAME_NAME
public static final String PROPERTY_NAME_DESCRIPTION
| Constructor Detail |
|---|
protected ProductNode(String name)
name - the node name, must not be null
IllegalArgumentException - if the given name is not a valid node identifier
protected ProductNode(String name,
String description)
name - the node name, must not be nulldescription - a descriptive string, can be null
IllegalArgumentException - if the given name is not a valid node identifier| Method Detail |
|---|
protected void setOwner(ProductNode owner)
Overrides shall finally call super.setOwner(owner).
owner - the new ownerpublic ProductNode getOwner()
public String getName()
public void setName(String name)
name - The name.public String getDescription()
nullpublic void setDescription(String description)
description - a description, can be nullpublic boolean isModified()
true if sopublic void setModified(boolean modified)
modified - whether or not this node is beeing marked as modified.Product.fireNodeChanged(org.esa.beam.framework.datamodel.ProductNode, java.lang.String, java.lang.Object, java.lang.Object)public String toString()
toString in class Objectpublic void dispose()
This method should be called only if it is for sure that this object instance will never be used again. The
results of referencing an instance of this class after a call to dispose() are undefined.
Overrides of this method should always call super.dispose(); after disposing this instance.
public static boolean isValidNodeName(String name)
\/:*?"<>|
name - the name to test
true if the name is a valid node ifentifier, false otherwisepublic Product getProduct()
null if this node was not owned by a product at the time this method was
called
protected Product getProductSafe()
throws IllegalStateException
null
IllegalStateException - if this node does not belong to a productpublic ProductReader getProductReader()
null if no such existsprotected ProductReader getProductReaderSafe()
IllegalStateException if no such reader exists.
null
IllegalStateException - if the the product reader is nullpublic ProductWriter getProductWriter()
null if no such existsprotected ProductWriter getProductWriterSafe()
IllegalStateException if no such writer exists.
null
IllegalStateException - if the the product writer is nullpublic String getDisplayName()
Example: The string "[2] node-name" means node node-name of the
product with the reference number 2.
nullgetProductRefString()public String getProductRefString()
Example: The string "[2]" stands for a product with the reference number
2.
null if this node has no product null if its product reference number was inactivepublic long getRawStorageSize()
public abstract long getRawStorageSize(ProductSubsetDef subsetDef)
subsetDef - if not null the subset may limit the size returned
public void updateExpression(String oldExternalName,
String newExternalName)
oldExternalName with oldExternalName. Such references most often occur
in band arithmetic expressions.
oldExternalName - The old node name.newExternalName - The new node name.public void fireProductNodeChanged(String propertyName)
public void fireProductNodeChanged(String propertyName,
Object oldValue,
Object newValue)
public abstract void acceptVisitor(ProductVisitor visitor)
visitor - the visitorprotected boolean isPartOfSubset(ProductSubsetDef subsetDef)
subsetDef - The subset definition.
true if the subset is not null and it contains a node name equal to this node's
name.public void removeFromFile(ProductWriter productWriter)
productWriter - the product writer to be used to remove this node from the underlying file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||