01: package it.geosolutions.imageio.plugins.jhdf.tovs;
02:
03: import it.geosolutions.imageio.plugins.jhdf.BaseHDFImageMetadata;
04: import it.geosolutions.imageio.plugins.jhdf.SubDatasetInfo;
05:
06: import javax.imageio.metadata.IIOInvalidTreeException;
07: import javax.imageio.metadata.IIOMetadataNode;
08:
09: import org.w3c.dom.Node;
10:
11: public class TOVSImageMetadata extends BaseHDFImageMetadata {
12: public static final String nativeMetadataFormatName = "it.geosolutions.imageio.plugins.jhdf.tovs.TOVSImageMetadata_1.0";
13:
14: public static final String[] metadataFormatNames = { nativeMetadataFormatName };
15:
16: protected final int[] mapMutex = new int[1];
17:
18: /**
19: * private fields for metadata node building
20: */
21:
22: public Node getAsTree(String formatName) {
23: if (formatName.equals(nativeMetadataFormatName)) {
24: return getNativeTree();
25: } else {
26: throw new IllegalArgumentException(
27: "Not a recognized format!");
28: }
29: }
30:
31: private Node getNativeTree() {
32: final IIOMetadataNode root = new IIOMetadataNode(
33: nativeMetadataFormatName);
34: /**
35: * Setting Dataset Properties common to any sub-format
36: */
37:
38: root.appendChild(getCommonDatasetNode());
39: return root;
40: }
41:
42: public TOVSImageMetadata() {
43: super (false, nativeMetadataFormatName, null, null, null);
44: }
45:
46: public TOVSImageMetadata(SubDatasetInfo sdInfo) {
47: this ();
48: initializeFromDataset(sdInfo);
49: }
50:
51: /**
52: * Initialize Metadata from a raster
53: *
54: * @param raster
55: * the <code>SwanRaster</code> from which retrieve data
56: * @param imageIndex
57: * the imageIndex relying the required subdataset
58: */
59: private void initializeFromDataset(final SubDatasetInfo sdInfo) {
60: //Initializing common properties to each HDF dataset.
61: initializeCommonDatasetProperties(sdInfo);
62: }
63:
64: public boolean isReadOnly() {
65: // TODO Auto-generated method stub
66: return false;
67: }
68:
69: public void mergeTree(String formatName, Node root)
70: throws IIOInvalidTreeException {
71: // TODO Auto-generated method stub
72:
73: }
74:
75: public void reset() {
76: // TODO Auto-generated method stub
77:
78: }
79: }
|