01: package it.geosolutions.imageio.plugins.jhdf.aps;
02:
03: import javax.imageio.ImageTypeSpecifier;
04: import javax.imageio.metadata.IIOMetadataFormat;
05: import javax.imageio.metadata.IIOMetadataFormatImpl;
06:
07: public class APSHDFImageMetadataFormat extends IIOMetadataFormatImpl {
08:
09: public APSHDFImageMetadataFormat() {
10: super (APSImageMetadata.nativeMetadataFormatName,
11: IIOMetadataFormatImpl.CHILD_POLICY_ALL);
12:
13: addElement("DatasetProperties",
14: APSImageMetadata.nativeMetadataFormatName,
15: CHILD_POLICY_EMPTY);
16: addAttribute("DatasetProperties", "Name", DATATYPE_STRING,
17: true, null);
18: addAttribute("DatasetProperties", "Rank", DATATYPE_STRING,
19: true, null);
20: addAttribute("DatasetProperties", "Dims", DATATYPE_STRING,
21: true, null);
22: addAttribute("DatasetProperties", "ChunkSize", DATATYPE_STRING,
23: true, null);
24:
25: addElement("ProductDataSetAttributes",
26: APSImageMetadata.nativeMetadataFormatName,
27: CHILD_POLICY_EMPTY);
28:
29: //TODO: Should Set to false attributes required?
30: addAttribute("ProductDataSetAttributes",
31: APSProperties.PDSA_CREATESOFTWARE, DATATYPE_STRING,
32: true, null);
33: addAttribute("ProductDataSetAttributes",
34: APSProperties.PDSA_CREATETIME, DATATYPE_STRING, true,
35: null);
36: addAttribute("ProductDataSetAttributes",
37: APSProperties.PDSA_CREATEPLATFORM, DATATYPE_STRING,
38: true, null);
39: addAttribute("ProductDataSetAttributes",
40: APSProperties.PDSA_PRODUCTNAME, DATATYPE_STRING, true,
41: null);
42: addAttribute("ProductDataSetAttributes",
43: APSProperties.PDSA_PRODUCTALGORITHM, DATATYPE_STRING,
44: true, null);
45: addAttribute("ProductDataSetAttributes",
46: APSProperties.PDSA_PRODUCTUNITS, DATATYPE_STRING, true,
47: null);
48: addAttribute("ProductDataSetAttributes",
49: APSProperties.PDSA_PRODUCTVERSION, DATATYPE_STRING,
50: true, null);
51: addAttribute("ProductDataSetAttributes",
52: APSProperties.PDSA_PRODUCTTYPE, DATATYPE_STRING, true,
53: null);
54: addAttribute("ProductDataSetAttributes",
55: APSProperties.PDSA_ADDITIONALUNITS, DATATYPE_STRING,
56: true, null);
57: addAttribute("ProductDataSetAttributes",
58: APSProperties.PDSA_PRODUCTSTATUS, DATATYPE_STRING,
59: true, null);
60: addAttribute("ProductDataSetAttributes",
61: APSProperties.PDSA_VALIDRANGE, DATATYPE_STRING, true,
62: null);
63: addAttribute("ProductDataSetAttributes",
64: APSProperties.PDSA_INVALID, DATATYPE_STRING, true, null);
65: addAttribute("ProductDataSetAttributes",
66: APSProperties.PDSA_PRODUCTSCALING, DATATYPE_STRING,
67: true, null);
68: addAttribute("ProductDataSetAttributes",
69: APSProperties.PDSA_SCALINGSLOPE, DATATYPE_STRING, true,
70: null);
71: addAttribute("ProductDataSetAttributes",
72: APSProperties.PDSA_SCALINGINTERCEPT, DATATYPE_STRING,
73: true, null);
74: addAttribute("ProductDataSetAttributes",
75: APSProperties.PDSA_BROWSEFUNC, DATATYPE_STRING, true,
76: null);
77: addAttribute("ProductDataSetAttributes",
78: APSProperties.PDSA_BROWSERANGES, DATATYPE_STRING, true,
79: null);
80:
81: addElement("AdditionalAttributes",
82: APSImageMetadata.nativeMetadataFormatName,
83: CHILD_POLICY_EMPTY);
84: addAttribute("AdditionalAttributes", "additionals",
85: DATATYPE_STRING, false, null);
86: }
87:
88: private static IIOMetadataFormat instance = null;
89:
90: public boolean canNodeAppear(String elementName,
91: ImageTypeSpecifier imageType) {
92: // @todo @task TODO
93: return true;
94: }
95:
96: }
|