public abstract class AbstractProductBuilder extends AbstractProductReader
Modifier and Type | Field and Description |
---|---|
protected Map<Band,RasterDataNode> |
bandMap |
protected String |
newProductDesc |
protected String |
newProductName |
protected int |
sceneRasterHeight |
protected int |
sceneRasterWidth |
protected Product |
sourceProduct |
protected boolean |
sourceProductOwner |
Constructor and Description |
---|
AbstractProductBuilder(boolean sourceProductOwner) |
Modifier and Type | Method and Description |
---|---|
protected static void |
addAttribString(String name,
String value,
MetadataElement subsetElem) |
protected void |
addFlagCodingsToProduct(Product product) |
protected void |
addIndexCodingsToProduct(Product product) |
protected void |
addMetadataToProduct(Product product) |
protected void |
cloneFlags(FlagCoding sourceFlagCoding,
FlagCoding destFlagCoding) |
protected void |
cloneIndexes(IndexCoding sourceFlagCoding,
IndexCoding destFlagCoding) |
protected void |
cloneMetadataAttributes(MetadataElement sourceRoot,
MetadataElement destRoot) |
protected void |
cloneMetadataElements(MetadataElement sourceRoot,
MetadataElement destRoot,
int level) |
protected void |
cloneMetadataElementsAndAttributes(MetadataElement sourceRoot,
MetadataElement destRoot,
int level) |
void |
close()
Closes the access to all currently opened resources such as file input streams and all resources of this children
directly owned by this reader.
|
protected void |
disposeBandMap() |
int |
getSceneRasterHeight() |
int |
getSceneRasterWidth() |
Product |
getSourceProduct() |
protected boolean |
isInstanceOfValidInputType(Object input)
Checks if the given object is an instance of one of the valid input types for this product reader.
|
boolean |
isSourceProductOwner() |
protected Product |
readProductNodes(Product sourceProduct,
ProductSubsetDef subsetDef,
String name,
String desc) |
protected abstract Product |
readProductNodesImpl()
Provides an implementation of the
readProductNodes interface method. |
void |
setNewProductDesc(String newProductDesc) |
void |
setNewProductName(String newProductName) |
configurePreferredTileSize, createTiePointGrid, getGridDiscontinutity, getInput, getProductComponents, getReaderPlugIn, getSubsetDef, isMetadataIgnored, isNodeAccepted, readBandRasterData, readBandRasterDataImpl, readProductNodes, setInput, setSubsetDef, toString
protected Product sourceProduct
protected boolean sourceProductOwner
protected int sceneRasterWidth
protected int sceneRasterHeight
protected String newProductName
protected String newProductDesc
protected Map<Band,RasterDataNode> bandMap
public Product getSourceProduct()
public boolean isSourceProductOwner()
public void setNewProductDesc(String newProductDesc)
public void setNewProductName(String newProductName)
public int getSceneRasterWidth()
public int getSceneRasterHeight()
protected Product readProductNodes(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) throws IOException
IOException
protected abstract Product readProductNodesImpl() throws IOException
AbstractProductReader
readProductNodes
interface method. Clients implementing this
method can be sure that the input object and eventually the subset information has already been set.
This method is called as a last step in the readProductNodes(input, subsetInfo)
method.
readProductNodesImpl
in class AbstractProductReader
IOException
- if an I/O error occurspublic void close() throws IOException
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 close()
are undefined.
Overrides of this method should always call super.close();
after disposing this instance.
close
in interface ProductReader
close
in class AbstractProductReader
IOException
- if an I/O error occursprotected void addFlagCodingsToProduct(Product product)
protected void addIndexCodingsToProduct(Product product)
protected static void addAttribString(String name, String value, MetadataElement subsetElem)
protected void cloneFlags(FlagCoding sourceFlagCoding, FlagCoding destFlagCoding)
protected void cloneIndexes(IndexCoding sourceFlagCoding, IndexCoding destFlagCoding)
protected void addMetadataToProduct(Product product)
protected void cloneMetadataElementsAndAttributes(MetadataElement sourceRoot, MetadataElement destRoot, int level)
protected void cloneMetadataElements(MetadataElement sourceRoot, MetadataElement destRoot, int level)
protected void cloneMetadataAttributes(MetadataElement sourceRoot, MetadataElement destRoot)
protected boolean isInstanceOfValidInputType(Object input)
AbstractProductReader
isInstanceOfValidInputType
in class AbstractProductReader
input
- the input object passed to AbstractProductReader.readProductNodes(Object, ProductSubsetDef)
true
if soProductReaderPlugIn.getInputTypes()
protected void disposeBandMap()
Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.