Package org.apache.sis.storage.geotiff
Class XMLMetadata.Root
java.lang.Object
org.apache.sis.util.collection.DefaultTreeTable.Node
org.apache.sis.storage.geotiff.XMLMetadata.Root
- All Implemented Interfaces:
Serializable,Cloneable,TreeTable.Node
- Enclosing class:
- XMLMetadata
A tree-table representation of the XML document contained in the enclosing
XMLMetadata.
The root node contains the XML document as a user object.
It allows JavaFX application to support the "copy to clipboard" operation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TableColumn<CharSequence>Column for the name associated to the element.private static final TableColumn<Object>Column for the value associated to the element.private final StringA string representation of the XML document. -
Constructor Summary
ConstructorsConstructorDescriptionRoot(XMLMetadata source, DefaultTreeTable.Node parent, String name) Converts the XML document to a tree table. -
Method Summary
Modifier and TypeMethodDescriptionReturns the XML document as a user object.Methods inherited from class org.apache.sis.util.collection.DefaultTreeTable.Node
clone, equals, getChildren, getParent, getValue, hashCode, isEditable, isLeaf, newChild, setValue, toString
-
Field Details
-
NAME
Column for the name associated to the element. -
VALUE
Column for the value associated to the element. -
xml
A string representation of the XML document.- See Also:
-
-
Constructor Details
-
Root
Root(XMLMetadata source, DefaultTreeTable.Node parent, String name) Converts the XML document to a tree table. This method writes in theNativeMetadata.NAMEandNativeMetadata.VALUEcolumns. If an exception occurs during XML parsing, then the node content will be set to the raw XML and the only child will be theThrowable. The error message will appear as a single line when the tree node values are formatted byObject.toString(), but the full stack trace is available if the user invokesgetValue(NativeMetadata.VALUE). It allows GUI applications to provide details if requested.- Parameters:
source- the XML document to represent as a tree table.target- where to append this root node.name- name to assign to this root node.
-
-
Method Details
-
getUserObject
Returns the XML document as a user object. It allows JavaFX application to support the "copy to clipboard" operation.- Specified by:
getUserObjectin interfaceTreeTable.Node- Overrides:
getUserObjectin classDefaultTreeTable.Node- Returns:
- any object stored at this node by the user, or
nullif none.
-