Author: rhauch
Date: 2008-10-13 16:00:04 -0400 (Mon, 13 Oct 2008)
New Revision: 568
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java
Log:
DNA-215 - Graph API for working with repository content
http://jira.jboss.com/jira/browse/DNA-215
Removed the "readChildrenInBlock" and "readChildrenInRange" methods on
the Graph.Batch, as its much more unlikely that the children in particular blocks will be
read in batches. Instead, the "getChildrenInBlock" and
"getChildrenInRange" methods are more likely to be used for these purposes.
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java 2008-10-13 19:58:03 UTC
(rev 567)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java 2008-10-13 20:00:04 UTC
(rev 568)
@@ -1599,74 +1599,6 @@
}
/**
- * Request that the children in the specified index range be read on the node
defined via the <code>of(...)</code> method
- * on the returned {@link Of} object.
- * <p>
- * Like all other methods on the {@link Batch}, the request will be performed
when the {@link #execute()} method is
- * called.
- * </p>
- *
- * @param startingIndex the index of the first child to be read
- * @param endingIndex the index past the last the first child to be read
- * @return the object that is used to specified the node whose children are to be
read
- */
- public Of<BatchConjunction> readChildrenInRange( final int startingIndex,
- final int endingIndex ) {
- assertNotExecuted();
- CheckArg.isNonNegative(startingIndex, "startingIndex");
- CheckArg.isPositive(endingIndex, "endingIndex");
- int count = endingIndex - startingIndex;
- return readChildrenInBlock(startingIndex, count);
- }
-
- /**
- * Request that the children in the specified block be read on the node defined
via the <code>of(...)</code> method on the
- * returned {@link Of} object.
- * <p>
- * Like all other methods on the {@link Batch}, the request will be performed
when the {@link #execute()} method is
- * called.
- * </p>
- *
- * @param startingIndex the index of the first child to be read
- * @param blockSize the maximum number of children that should be read
- * @return the object that is used to specified the node whose children are to be
read
- */
- public Of<BatchConjunction> readChildrenInBlock( final int startingIndex,
- final int blockSize ) {
- assertNotExecuted();
- CheckArg.isNonNegative(startingIndex, "startingIndex");
- CheckArg.isPositive(blockSize, "blockSize");
- return new Of<BatchConjunction>() {
- public BatchConjunction of( String path ) {
- return of(new Location(createPath(path)));
- }
-
- public BatchConjunction of( Path path ) {
- return of(new Location(path));
- }
-
- public BatchConjunction of( Property idProperty ) {
- return of(new Location(idProperty));
- }
-
- public BatchConjunction of( Property firstIdProperty,
- Property... additionalIdProperties ) {
- return of(new Location(firstIdProperty, additionalIdProperties));
- }
-
- public BatchConjunction of( UUID uuid ) {
- return of(new Location(uuid));
- }
-
- public BatchConjunction of( Location at ) {
- ReadBlockOfChildrenRequest request = new
ReadBlockOfChildrenRequest(at, startingIndex, blockSize);
- queue().submit(request);
- return Batch.this.nextRequests;
- }
- };
- }
-
- /**
* Request to read a subgraph of the specified depth, rooted at a location that
will be specified via <code>at(...)</code>
* in the resulting {@link At} object.
* <p>