jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1342299 - in /jackrabbit/oak/trunk: oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
Date Thu, 24 May 2012 15:37:00 GMT
Author: stefan
Date: Thu May 24 15:37:00 2012
New Revision: 1342299

URL: http://svn.apache.org/viewvc?rev=1342299&view=rev
Log:
OAK-116: MicroKernel API: clarify semantics of getNodes depth, offset and count parameters
(WIP)

Modified:
    jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java

Modified: jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java?rev=1342299&r1=1342298&r2=1342299&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Thu May 24 15:37:00 2012
@@ -470,7 +470,8 @@ public class MicroKernelIT extends Abstr
         assertNotNull(child);
         assertEquals(child.size(), 0);
 
-        // depth = 1: properties, child nodes and their properties (including :childNodeCount)
+        // depth = 1: properties, child nodes, their properties (including :childNodeCount)
+        // and their empty child node objects
         obj = parseJSONObject(mk.getNodes("/testRoot", null, 1, 0, -1, null));
         assertPropertyValue(obj, "depth", 0l);
         assertPropertyValue(obj, ":childNodeCount", 1l);

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java?rev=1342299&r1=1342298&r2=1342299&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
Thu May 24 15:37:00 2012
@@ -43,7 +43,7 @@ import java.io.InputStream;
  * <li>supported property types: string, number, boolean, array</li>
  * <li>a property value is stored and used as an opaque, unparsed character sequence</li>
  * </ul>
- * TODO specify retention policy for old revisions (i.e. minimal guaranteed retention period)
+ * TODO specify retention policy for old revisions, i.e. minimal guaranteed retention period
(OAK-114)
  */
 public interface MicroKernel {
 
@@ -260,7 +260,8 @@ public interface MicroKernel {
      * <tr>
      * <td>depth = 1</td>
      * <td>properties, child nodes and their properties (including
-     * {@code :childNodeCount})</td>
+     * {@code :childNodeCount}) and their child node names
+     * (i.e. empty child node objects)</td>
      * </tr>
      * <tr>
      * <td>depth = 2</td>
@@ -268,19 +269,30 @@ public interface MicroKernel {
      * </tr>
      * </table>
      * <p/>
+     * Example (depth=0):
+     * <pre>
+     * {
+     *   "someprop" : "someval",
+     *   ":childNodeCount" : 2,
+     *   "child1" : {},
+     *   "child2" : {}
+     * }
+     * </pre>
      * Example (depth=1):
      * <pre>
      * {
      *   "someprop" : "someval",
      *   ":childNodeCount" : 2,
      *   "child1" : {
-     *      "prop1" : 123,
-     *      ":childNodeCount" : 2
-     *    },
-     *    "child2" : {
-     *      "prop1" : "bar",
-     *      ":childNodeCount" : 0
-     *    }
+     *     "prop1" : 123,
+     *     ":childNodeCount" : 2,
+     *     "grandchild1" : {},
+     *     "grandchild2" : {}
+     *   },
+     *   "child2" : {
+     *     "prop1" : "bar",
+     *     ":childNodeCount" : 0
+     *   }
      * }
      * </pre>
      * Remarks:



Mime
View raw message