use of javax.imageio.metadata.IIOMetadataNode in project imageio-ext by geosolutions-it.
the class BaseJP2KBox method getNativeNode.
/**
* Creates an <code>IIOMetadataNode</code> from this box. The format of
* this node is defined in the XML dtd and xsd for the JP2 image file.
*/
public IIOMetadataNode getNativeNode() {
String name = BoxUtilities.getName(getType());
if (name == null)
name = "unknown";
IIOMetadataNode node = new IIOMetadataNode(name);
setDefaultAttributes(node);
IIOMetadataNode child = new IIOMetadataNode("Content");
child.setUserObject(data);
child.setNodeValue(ImageUtil.convertObjectToString(data));
node.appendChild(child);
return node;
}
use of javax.imageio.metadata.IIOMetadataNode in project imageio-ext by geosolutions-it.
the class JP2KImageMetadata method createNativeTree.
private Node createNativeTree() {
IIOMetadataNode rootNode = new IIOMetadataNode(nativeMetadataFormatName);
IIOMetadataNode child;
child = new IIOMetadataNode(HEIGHT);
child.setUserObject(Integer.valueOf(height));
child.setNodeValue(Integer.toString(height));
rootNode.appendChild(child);
child = new IIOMetadataNode(WIDTH);
child.setUserObject(Integer.valueOf(width));
child.setNodeValue(Integer.toString(width));
rootNode.appendChild(child);
child = new IIOMetadataNode(TILE_HEIGHT);
child.setUserObject(Integer.valueOf(tileHeight));
child.setNodeValue(Integer.toString(tileHeight));
rootNode.appendChild(child);
child = new IIOMetadataNode(TILE_WIDTH);
child.setUserObject(Integer.valueOf(tileWidth));
child.setNodeValue(Integer.toString(tileWidth));
rootNode.appendChild(child);
child = new IIOMetadataNode(NUM_COMPONENTS);
child.setUserObject(Integer.valueOf(numComponents));
child.setNodeValue(Integer.toString(numComponents));
rootNode.appendChild(child);
child = new IIOMetadataNode(BITS_PER_COMPONENT);
child.setUserObject(bitsPerComponent);
child.setNodeValue(ImageUtil.convertObjectToString(bitsPerComponent));
rootNode.appendChild(child);
child = new IIOMetadataNode(COMPONENT_INDEXES);
child.setUserObject(componentIndexes);
child.setNodeValue(ImageUtil.convertObjectToString(componentIndexes));
rootNode.appendChild(child);
child = new IIOMetadataNode(IS_SIGNED);
child.setUserObject(Boolean.valueOf(isSigned));
child.setNodeValue(Boolean.toString(isSigned));
rootNode.appendChild(child);
child = new IIOMetadataNode(MAX_QUALITY_LAYERS);
child.setUserObject(Integer.valueOf(maxAvailableQualityLayers));
child.setNodeValue(Integer.toString(maxAvailableQualityLayers));
rootNode.appendChild(child);
child = new IIOMetadataNode(DWT_LEVELS);
child.setUserObject(Integer.valueOf(sourceDWTLevels));
child.setNodeValue(Integer.toString(sourceDWTLevels));
rootNode.appendChild(child);
return rootNode;
}
use of javax.imageio.metadata.IIOMetadataNode in project imageio-ext by geosolutions-it.
the class IPRBox method getNativeNode.
public IIOMetadataNode getNativeNode() {
String name = BoxUtilities.getName(getType());
IIOMetadataNode node = new IIOMetadataNode(name);
return node;
}
use of javax.imageio.metadata.IIOMetadataNode in project imageio-ext by geosolutions-it.
the class JP2KFileBox method getNativeNode.
public IIOMetadataNode getNativeNode() {
String name = BoxUtilities.getName(getType());
IIOMetadataNode node = new IIOMetadataNode(name);
return node;
}
use of javax.imageio.metadata.IIOMetadataNode in project imageio-ext by geosolutions-it.
the class CompositingLayerHeaderBox method getNativeNode.
public IIOMetadataNode getNativeNode() {
String name = BoxUtilities.getName(getType());
if (name == null)
name = "unknown";
IIOMetadataNode node = new IIOMetadataNode(name);
return node;
}
Aggregations