This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new ad86df60e5 In the tree of GeoHEIF nodes, move the nodes derived from 
`flags` below the "flags" node.
ad86df60e5 is described below

commit ad86df60e5461b78f70afda4a03a04b8d63b1871
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Wed May 13 12:43:00 2026 +0200

    In the tree of GeoHEIF nodes, move the nodes derived from `flags` below the 
"flags" node.
---
 .../main/org/apache/sis/storage/isobmff/FullBox.java       | 10 +++++++++-
 .../main/org/apache/sis/storage/isobmff/TreeNode.java      | 14 ++++++++------
 .../org/apache/sis/storage/isobmff/base/TrackHeader.java   |  9 +++------
 .../sis/storage/isobmff/geo/TiledImageConfiguration.java   |  9 +++------
 4 files changed, 23 insertions(+), 19 deletions(-)

diff --git 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/FullBox.java
 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/FullBox.java
index b53d2f7cb2..f6a87fbafe 100644
--- 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/FullBox.java
+++ 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/FullBox.java
@@ -95,7 +95,15 @@ public abstract class FullBox extends Box {
             Tree.addNode(target, "version", version, String.valueOf(version));
         }
         if (options != 0) {
-            Tree.addNode(target, "flags", options, 
Integer.toBinaryString(options));
+            appendFlagDescriptions(Tree.addNode(target, "flags", options, 
Integer.toBinaryString(options)));
         }
     }
+
+    /**
+     * Appends a description of the flags.
+     *
+     * @param  target  the {@code flag} node where to add properties.
+     */
+    protected void appendFlagDescriptions(final TreeTable.Node target) {
+    }
 }
diff --git 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/TreeNode.java
 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/TreeNode.java
index ac16b1c35d..a57fe8e0f2 100644
--- 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/TreeNode.java
+++ 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/TreeNode.java
@@ -387,16 +387,18 @@ public abstract class TreeNode {
         /**
          * Convenience method for adding a child node.
          *
-         * @param target       where to add the node.
-         * @param name         the programmatic (camel-case) name of the node.
-         * @param value        value of the node. Should not be null.
-         * @param valueAsText  string representation of the value.
+         * @param  target       where to add the node.
+         * @param  name         the programmatic (camel-case) name of the node.
+         * @param  value        value of the node. Should not be null.
+         * @param  valueAsText  string representation of the value.
+         * @return the node which has been added.
          */
-        public static void addNode(final TreeTable.Node target, String name, 
Object value, String valueAsText) {
-            TreeTable.Node child = target.newChild();
+        public static TreeTable.Node addNode(final TreeTable.Node target, 
String name, Object value, String valueAsText) {
+            final TreeTable.Node child = target.newChild();
             child.setValue(TableColumn.NAME,  
CharSequences.camelCaseToWords(name, true).toString());
             child.setValue(TableColumn.VALUE, value);
             child.setValue(TableColumn.VALUE_AS_TEXT, valueAsText);
+            return child;
         }
     }
 
diff --git 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/base/TrackHeader.java
 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/base/TrackHeader.java
index 8232d2d177..3b25217fa6 100644
--- 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/base/TrackHeader.java
+++ 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/base/TrackHeader.java
@@ -103,15 +103,12 @@ public final class TrackHeader extends HeaderBox {
     }
 
     /**
-     * Appends properties other than the ones defined by public fields.
-     * Those properties will be shown first in the tree.
+     * Appends a description of the flags.
      *
-     * @param  context  the tree being formatted. Can be used for fetching 
contextual information.
-     * @param  target   the node where to add properties.
+     * @param  target  the {@code flag} node where to add properties.
      */
     @Override
-    protected void prependTreeNodes(final Tree context, final TreeTable.Node 
target) {
-        super.prependTreeNodes(context, target);
+    protected void appendFlagDescriptions(final TreeTable.Node target) {
         Tree.addNode(target, "enabled", isEnabled());
     }
 }
diff --git 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/geo/TiledImageConfiguration.java
 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/geo/TiledImageConfiguration.java
index 843c211537..bbd9ca8367 100644
--- 
a/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/geo/TiledImageConfiguration.java
+++ 
b/incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/geo/TiledImageConfiguration.java
@@ -150,17 +150,14 @@ public final class TiledImageConfiguration extends 
FullBox {
     }
 
     /**
-     * Appends properties other than the ones defined by public fields.
-     * Those properties will be shown last in the tree.
+     * Appends a description of the flags.
      *
-     * @param  context  the tree being formatted. Can be used for fetching 
contextual information.
-     * @param  target   the node where to add properties.
+     * @param  target  the {@code flag} node where to add properties.
      */
     @Override
-    protected void appendTreeNodes(final Tree context, final TreeTable.Node 
target) {
+    protected void appendFlagDescriptions(final TreeTable.Node target) {
         Tree.addNode(target, "offsetFieldLength", offsetFieldLength());
         Tree.addNode(target, "sizeFieldLength",   sizeFieldLength());
         Tree.addNode(target, "sequential",        sequential());
-        super.appendTreeNodes(context, target);
     }
 }

Reply via email to