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 String
A 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.NAME
andNativeMetadata.VALUE
columns. 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.name
- name to assign to this root node.target
- where to append 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:
getUserObject
in interfaceTreeTable.Node
- Overrides:
getUserObject
in classDefaultTreeTable.Node
- Returns:
- any object stored at this node by the user, or
null
if none.
-