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

static final class XMLMetadata.Root extends DefaultTreeTable.Node
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 Details

    • NAME

      private static final TableColumn<CharSequence> NAME
      Column for the name associated to the element.
    • VALUE

      private static final TableColumn<Object> VALUE
      Column for the value associated to the element.
    • xml

      private final String 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 the NativeMetadata.NAME and NativeMetadata.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 the Throwable. The error message will appear as a single line when the tree node values are formatted by Object.toString(), but the full stack trace is available if the user invokes getValue(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

      public Object getUserObject()
      Returns the XML document as a user object. It allows JavaFX application to support the "copy to clipboard" operation.
      Specified by:
      getUserObject in interface TreeTable.Node
      Overrides:
      getUserObject in class DefaultTreeTable.Node
      Returns:
      any object stored at this node by the user, or null if none.