[dna-commits] DNA SVN: r731 - in trunk: dna-graph/src/main/java/org/jboss/dna/graph/connector/inmemory and 19 other directories.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Fri Feb 20 11:20:01 EST 2009


Author: rhauch
Date: 2009-02-20 11:20:00 -0500 (Fri, 20 Feb 2009)
New Revision: 731

Modified:
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/Location.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/inmemory/InMemoryRequestProcessor.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadAllChildrenRequest.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadBlockOfChildrenRequest.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNextBlockOfChildrenRequest.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNodeRequest.java
   trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/processor/RequestProcessor.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphImporterTest.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/RepositorySourceLoadHarness.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/AbstractConnectorTest.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/request/AbstractRequestTest.java
   trunk/dna-graph/src/test/java/org/jboss/dna/graph/xml/XmlHandlerTest.java
   trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/FederatingRequestProcessor.java
   trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategy.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatedRepositorySourceIntegrationTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatingRequestProcessorTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiChildContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiPropertyContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/NodeContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OneChildContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OnePropertyContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/ThreePropertyContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoChildContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoPropertyContributionTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/FederatedNodeTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/OneContributionMergeStrategyTest.java
   trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategyTest.java
   trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemRequestProcessor.java
   trunk/extensions/dna-connector-jbosscache/src/main/java/org/jboss/dna/connector/jbosscache/JBossCacheRequestProcessor.java
   trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java
   trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/SubgraphQuery.java
   trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/util/RequestProcessorCacheTest.java
   trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
   trunk/extensions/dna-connector-svn/src/test/java/org/jboss/dna/connector/svn/SVNRepositoryConnectionTest.java
Log:
DNA-280 Create optimized versions of Location

Applied the patch to change from a constructor-based Location to a static factory method style.  This will allow us to create specialized subclasses, optimized for the different combinations of attributes.  Using a static factory method isn't much different than using a constructor - the caller still refers to the class at compile-time.  The factory methods are not there to allow someone else to replace or specialize the Location; it is there so that we can hide which of our implementations we want to use.

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	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -442,7 +442,7 @@
      *         be moved
      */
     public Move<Conjunction<Graph>> move( String fromPath ) {
-        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, new Location(createPath(fromPath)));
+        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, Location.create(createPath(fromPath)));
     }
 
     /**
@@ -458,7 +458,7 @@
      *         be moved
      */
     public Move<Conjunction<Graph>> move( Path from ) {
-        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, new Location(from));
+        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, Location.create(from));
     }
 
     /**
@@ -474,7 +474,7 @@
      *         be moved
      */
     public Move<Conjunction<Graph>> move( UUID from ) {
-        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, new Location(from));
+        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, Location.create(from));
     }
 
     /**
@@ -491,7 +491,7 @@
      *         be moved
      */
     public Move<Conjunction<Graph>> move( Property idProperty ) {
-        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, new Location(idProperty));
+        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, Location.create(idProperty));
     }
 
     /**
@@ -510,7 +510,7 @@
      */
     public Move<Conjunction<Graph>> move( Property firstIdProperty,
                                           Property... additionalIdProperties ) {
-        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, new Location(firstIdProperty,
+        return new MoveAction<Conjunction<Graph>>(this.nextGraph, this.requestQueue, Location.create(firstIdProperty,
                                                                                                   additionalIdProperties));
     }
 
@@ -559,7 +559,7 @@
      *         be copied
      */
     public Copy<Graph> copy( String fromPath ) {
-        return new CopyAction<Graph>(this, this.requestQueue, new Location(createPath(fromPath)));
+        return new CopyAction<Graph>(this, this.requestQueue, Location.create(createPath(fromPath)));
     }
 
     /**
@@ -575,7 +575,7 @@
      *         be copied
      */
     public Copy<Graph> copy( Path from ) {
-        return new CopyAction<Graph>(this, this.requestQueue, new Location(from));
+        return new CopyAction<Graph>(this, this.requestQueue, Location.create(from));
     }
 
     /**
@@ -591,7 +591,7 @@
      *         be copied
      */
     public Copy<Graph> copy( UUID from ) {
-        return new CopyAction<Graph>(this, this.requestQueue, new Location(from));
+        return new CopyAction<Graph>(this, this.requestQueue, Location.create(from));
     }
 
     /**
@@ -608,7 +608,7 @@
      *         be copied
      */
     public Copy<Graph> copy( Property idProperty ) {
-        return new CopyAction<Graph>(this, this.requestQueue, new Location(idProperty));
+        return new CopyAction<Graph>(this, this.requestQueue, Location.create(idProperty));
     }
 
     /**
@@ -627,7 +627,7 @@
      */
     public Copy<Graph> copy( Property firstIdProperty,
                              Property... additionalIdProperties ) {
-        return new CopyAction<Graph>(this, this.requestQueue, new Location(firstIdProperty, additionalIdProperties));
+        return new CopyAction<Graph>(this, this.requestQueue, Location.create(firstIdProperty, additionalIdProperties));
     }
 
     /**
@@ -659,7 +659,7 @@
      * @return an object that may be used to start another request
      */
     public Conjunction<Graph> delete( String atPath ) {
-        this.requestQueue.submit(new DeleteBranchRequest(new Location(createPath(atPath)), getCurrentWorkspaceName()));
+        this.requestQueue.submit(new DeleteBranchRequest(Location.create(createPath(atPath)), getCurrentWorkspaceName()));
         return nextGraph;
     }
 
@@ -670,7 +670,7 @@
      * @return an object that may be used to start another request
      */
     public Conjunction<Graph> delete( Path at ) {
-        this.requestQueue.submit(new DeleteBranchRequest(new Location(at), getCurrentWorkspaceName()));
+        this.requestQueue.submit(new DeleteBranchRequest(Location.create(at), getCurrentWorkspaceName()));
         return nextGraph;
     }
 
@@ -681,7 +681,7 @@
      * @return an object that may be used to start another request
      */
     public Conjunction<Graph> delete( UUID at ) {
-        this.requestQueue.submit(new DeleteBranchRequest(new Location(at), getCurrentWorkspaceName()));
+        this.requestQueue.submit(new DeleteBranchRequest(Location.create(at), getCurrentWorkspaceName()));
         return nextGraph;
     }
 
@@ -693,7 +693,7 @@
      * @return an object that may be used to start another request
      */
     public Conjunction<Graph> delete( Property idProperty ) {
-        this.requestQueue.submit(new DeleteBranchRequest(new Location(idProperty), getCurrentWorkspaceName()));
+        this.requestQueue.submit(new DeleteBranchRequest(Location.create(idProperty), getCurrentWorkspaceName()));
         return nextGraph;
     }
 
@@ -707,7 +707,7 @@
      */
     public Conjunction<Graph> delete( Property firstIdProperty,
                                       Property... additionalIdProperties ) {
-        this.requestQueue.submit(new DeleteBranchRequest(new Location(firstIdProperty, additionalIdProperties),
+        this.requestQueue.submit(new DeleteBranchRequest(Location.create(firstIdProperty, additionalIdProperties),
                                                          getCurrentWorkspaceName()));
         return nextGraph;
     }
@@ -727,7 +727,7 @@
         Path at = createPath(atPath);
         Path parent = at.getParent();
         Name child = at.getLastSegment().getName();
-        this.requestQueue.submit(new CreateNodeRequest(new Location(parent), getCurrentWorkspaceName(), child));
+        this.requestQueue.submit(new CreateNodeRequest(Location.create(parent), getCurrentWorkspaceName(), child));
         return nextGraph;
     }
 
@@ -748,7 +748,7 @@
         Path at = createPath(atPath);
         Path parent = at.getParent();
         Name child = at.getLastSegment().getName();
-        this.requestQueue.submit(new CreateNodeRequest(new Location(parent), getCurrentWorkspaceName(), child, properties));
+        this.requestQueue.submit(new CreateNodeRequest(Location.create(parent), getCurrentWorkspaceName(), child, properties));
         return nextGraph;
     }
 
@@ -767,7 +767,7 @@
         CheckArg.isNotNull(at, "at");
         Path parent = at.getParent();
         Name child = at.getLastSegment().getName();
-        this.requestQueue.submit(new CreateNodeRequest(new Location(parent), getCurrentWorkspaceName(), child));
+        this.requestQueue.submit(new CreateNodeRequest(Location.create(parent), getCurrentWorkspaceName(), child));
         return nextGraph;
     }
 
@@ -788,7 +788,7 @@
         CheckArg.isNotNull(at, "at");
         Path parent = at.getParent();
         Name child = at.getLastSegment().getName();
-        this.requestQueue.submit(new CreateNodeRequest(new Location(parent), getCurrentWorkspaceName(), child, properties));
+        this.requestQueue.submit(new CreateNodeRequest(Location.create(parent), getCurrentWorkspaceName(), child, properties));
         return nextGraph;
     }
 
@@ -809,7 +809,7 @@
         CheckArg.isNotNull(at, "at");
         Path parent = at.getParent();
         Name child = at.getLastSegment().getName();
-        this.requestQueue.submit(new CreateNodeRequest(new Location(parent), getCurrentWorkspaceName(), child, properties));
+        this.requestQueue.submit(new CreateNodeRequest(Location.create(parent), getCurrentWorkspaceName(), child, properties));
         return nextGraph;
     }
 
@@ -870,28 +870,28 @@
             }
 
             public Conjunction<Graph> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Conjunction<Graph> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Conjunction<Graph> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Conjunction<Graph> on( Property firstIdProperty,
                                           Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Conjunction<Graph> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Conjunction<Graph> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
         };
     }
@@ -1072,28 +1072,28 @@
             }
 
             public SetValuesTo<Conjunction<Graph>> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public SetValuesTo<Conjunction<Graph>> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public SetValuesTo<Conjunction<Graph>> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public SetValuesTo<Conjunction<Graph>> on( Property firstIdProperty,
                                                        Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public SetValuesTo<Conjunction<Graph>> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public SetValuesTo<Conjunction<Graph>> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
 
             public On<Conjunction<Graph>> to( Node node ) {
@@ -1240,28 +1240,28 @@
             }
 
             public Conjunction<Graph> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Conjunction<Graph> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Conjunction<Graph> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Conjunction<Graph> on( Property firstIdProperty,
                                           Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Conjunction<Graph> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Conjunction<Graph> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
         };
     }
@@ -1287,28 +1287,28 @@
             }
 
             public Conjunction<Graph> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Conjunction<Graph> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Conjunction<Graph> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Conjunction<Graph> on( Property firstIdProperty,
                                           Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Conjunction<Graph> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Conjunction<Graph> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
         };
     }
@@ -1328,28 +1328,28 @@
             }
 
             public Collection<Property> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Collection<Property> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Collection<Property> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Collection<Property> on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Collection<Property> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Collection<Property> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
         };
     }
@@ -1370,28 +1370,28 @@
             }
 
             public Map<Name, Property> on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Map<Name, Property> on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Map<Name, Property> on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Map<Name, Property> on( Property firstIdProperty,
                                            Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Map<Name, Property> on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Map<Name, Property> on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
         };
     }
@@ -1406,28 +1406,28 @@
     public Children<List<Location>> getChildren() {
         return new Children<List<Location>>() {
             public List<Location> of( String path ) {
-                return of(new Location(createPath(path)));
+                return of(Location.create(createPath(path)));
             }
 
             public List<Location> of( Path path ) {
-                return of(new Location(path));
+                return of(Location.create(path));
             }
 
             public List<Location> of( Property idProperty ) {
-                return of(new Location(idProperty));
+                return of(Location.create(idProperty));
             }
 
             public List<Location> of( Property firstIdProperty,
                                       Property... additionalIdProperties ) {
-                return of(new Location(firstIdProperty, additionalIdProperties));
+                return of(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public List<Location> of( Iterable<Property> idProperties ) {
-                return of(new Location(idProperties));
+                return of(Location.create(idProperties));
             }
 
             public List<Location> of( UUID uuid ) {
-                return of(new Location(uuid));
+                return of(Location.create(uuid));
             }
 
             public List<Location> of( Location at ) {
@@ -1441,24 +1441,24 @@
                     public Under<List<Location>> startingAt( final int startingIndex ) {
                         return new Under<List<Location>>() {
                             public List<Location> under( String path ) {
-                                return under(new Location(createPath(path)));
+                                return under(Location.create(createPath(path)));
                             }
 
                             public List<Location> under( Path path ) {
-                                return under(new Location(path));
+                                return under(Location.create(path));
                             }
 
                             public List<Location> under( Property idProperty ) {
-                                return under(new Location(idProperty));
+                                return under(Location.create(idProperty));
                             }
 
                             public List<Location> under( Property firstIdProperty,
                                                          Property... additionalIdProperties ) {
-                                return under(new Location(firstIdProperty, additionalIdProperties));
+                                return under(Location.create(firstIdProperty, additionalIdProperties));
                             }
 
                             public List<Location> under( UUID uuid ) {
-                                return under(new Location(uuid));
+                                return under(Location.create(uuid));
                             }
 
                             public List<Location> under( Location at ) {
@@ -1480,24 +1480,24 @@
                     }
 
                     public List<Location> startingAfter( String pathOfPreviousSibling ) {
-                        return startingAfter(new Location(createPath(pathOfPreviousSibling)));
+                        return startingAfter(Location.create(createPath(pathOfPreviousSibling)));
                     }
 
                     public List<Location> startingAfter( Path pathOfPreviousSibling ) {
-                        return startingAfter(new Location(pathOfPreviousSibling));
+                        return startingAfter(Location.create(pathOfPreviousSibling));
                     }
 
                     public List<Location> startingAfter( UUID uuidOfPreviousSibling ) {
-                        return startingAfter(new Location(uuidOfPreviousSibling));
+                        return startingAfter(Location.create(uuidOfPreviousSibling));
                     }
 
                     public List<Location> startingAfter( Property idPropertyOfPreviousSibling ) {
-                        return startingAfter(new Location(idPropertyOfPreviousSibling));
+                        return startingAfter(Location.create(idPropertyOfPreviousSibling));
                     }
 
                     public List<Location> startingAfter( Property firstIdProperyOfPreviousSibling,
                                                          Property... additionalIdPropertiesOfPreviousSibling ) {
-                        return startingAfter(new Location(firstIdProperyOfPreviousSibling,
+                        return startingAfter(Location.create(firstIdProperyOfPreviousSibling,
                                                           additionalIdPropertiesOfPreviousSibling));
                     }
                 };
@@ -1527,28 +1527,28 @@
     public On<Property> getProperty( final Name name ) {
         return new On<Property>() {
             public Property on( String path ) {
-                return on(new Location(createPath(path)));
+                return on(Location.create(createPath(path)));
             }
 
             public Property on( Path path ) {
-                return on(new Location(path));
+                return on(Location.create(path));
             }
 
             public Property on( Property idProperty ) {
-                return on(new Location(idProperty));
+                return on(Location.create(idProperty));
             }
 
             public Property on( Property firstIdProperty,
                                 Property... additionalIdProperties ) {
-                return on(new Location(firstIdProperty, additionalIdProperties));
+                return on(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Property on( Iterable<Property> idProperties ) {
-                return on(new Location(idProperties));
+                return on(Location.create(idProperties));
             }
 
             public Property on( UUID uuid ) {
-                return on(new Location(uuid));
+                return on(Location.create(uuid));
             }
 
             public Property on( Location at ) {
@@ -1566,7 +1566,7 @@
      * @return the node that is read from the repository
      */
     public Node getNodeAt( UUID uuid ) {
-        return getNodeAt(new Location(uuid));
+        return getNodeAt(Location.create(uuid));
     }
 
     /**
@@ -1588,7 +1588,7 @@
      * @return the node that is read from the repository
      */
     public Node getNodeAt( String path ) {
-        return getNodeAt(new Location(createPath(path)));
+        return getNodeAt(Location.create(createPath(path)));
     }
 
     /**
@@ -1598,7 +1598,7 @@
      * @return the node that is read from the repository
      */
     public Node getNodeAt( Path path ) {
-        return getNodeAt(new Location(path));
+        return getNodeAt(Location.create(path));
     }
 
     /**
@@ -1608,7 +1608,7 @@
      * @return the node that is read from the repository
      */
     public Node getNodeAt( Property idProperty ) {
-        return getNodeAt(new Location(idProperty));
+        return getNodeAt(Location.create(idProperty));
     }
 
     /**
@@ -1620,7 +1620,7 @@
      */
     public Node getNodeAt( Property firstIdProperty,
                            Property... additionalIdProperties ) {
-        return getNodeAt(new Location(firstIdProperty, additionalIdProperties));
+        return getNodeAt(Location.create(firstIdProperty, additionalIdProperties));
     }
 
     /**
@@ -1630,7 +1630,7 @@
      * @return the node that is read from the repository
      */
     public Node getNodeAt( Iterable<Property> idProperties ) {
-        return getNodeAt(new Location(idProperties));
+        return getNodeAt(Location.create(idProperties));
     }
 
     /**
@@ -1664,28 +1664,28 @@
             }
 
             public Subgraph at( String path ) {
-                return at(new Location(createPath(path)));
+                return at(Location.create(createPath(path)));
             }
 
             public Subgraph at( Path path ) {
-                return at(new Location(path));
+                return at(Location.create(path));
             }
 
             public Subgraph at( UUID uuid ) {
-                return at(new Location(uuid));
+                return at(Location.create(uuid));
             }
 
             public Subgraph at( Property idProperty ) {
-                return at(new Location(idProperty));
+                return at(Location.create(idProperty));
             }
 
             public Subgraph at( Property firstIdProperty,
                                 Property... additionalIdProperties ) {
-                return at(new Location(firstIdProperty, additionalIdProperties));
+                return at(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Subgraph at( Iterable<Property> idProperties ) {
-                return at(new Location(idProperties));
+                return at(Location.create(idProperties));
             }
         };
     }
@@ -1708,28 +1708,28 @@
             }
 
             public Conjunction<Graph> into( String path ) throws IOException, SAXException {
-                return into(new Location(createPath(path)));
+                return into(Location.create(createPath(path)));
             }
 
             public Conjunction<Graph> into( Path path ) throws IOException, SAXException {
-                return into(new Location(path));
+                return into(Location.create(path));
             }
 
             public Conjunction<Graph> into( Property idProperty ) throws IOException, SAXException {
-                return into(new Location(idProperty));
+                return into(Location.create(idProperty));
             }
 
             public Conjunction<Graph> into( Property firstIdProperty,
                                             Property... additionalIdProperties ) throws IOException, SAXException {
-                return into(new Location(firstIdProperty, additionalIdProperties));
+                return into(Location.create(firstIdProperty, additionalIdProperties));
             }
 
             public Conjunction<Graph> into( Iterable<Property> idProperties ) throws IOException, SAXException {
-                return into(new Location(idProperties));
+                return into(Location.create(idProperties));
             }
 
             public Conjunction<Graph> into( UUID uuid ) throws IOException, SAXException {
-                return into(new Location(uuid));
+                return into(Location.create(uuid));
             }
 
             @SuppressWarnings( "synthetic-access" )
@@ -1892,7 +1892,7 @@
          */
         public Move<BatchConjunction> move( String fromPath ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(createPath(fromPath)));
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(createPath(fromPath)));
         }
 
         /**
@@ -1909,7 +1909,7 @@
          */
         public Move<BatchConjunction> move( Path from ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(from));
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(from));
         }
 
         /**
@@ -1926,7 +1926,7 @@
          */
         public Move<BatchConjunction> move( UUID from ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(from));
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(from));
         }
 
         /**
@@ -1944,7 +1944,7 @@
          */
         public Move<BatchConjunction> move( Property idProperty ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(idProperty));
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(idProperty));
         }
 
         /**
@@ -1964,7 +1964,7 @@
         public Move<BatchConjunction> move( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(firstIdProperty,
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(firstIdProperty,
                                                                                                        additionalIdProperties));
         }
 
@@ -1983,7 +1983,7 @@
          */
         public Move<BatchConjunction> move( Iterable<Property> idProperties ) {
             assertNotExecuted();
-            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, new Location(idProperties));
+            return new MoveAction<BatchConjunction>(this.nextRequests, this.requestQueue, Location.create(idProperties));
         }
 
         /**
@@ -2034,7 +2034,7 @@
          */
         public Copy<BatchConjunction> copy( String fromPath ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(createPath(fromPath)));
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(createPath(fromPath)));
         }
 
         /**
@@ -2051,7 +2051,7 @@
          */
         public Copy<BatchConjunction> copy( Path from ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(from));
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(from));
         }
 
         /**
@@ -2068,7 +2068,7 @@
          */
         public Copy<BatchConjunction> copy( UUID from ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(from));
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(from));
         }
 
         /**
@@ -2086,7 +2086,7 @@
          */
         public Copy<BatchConjunction> copy( Property idProperty ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(idProperty));
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(idProperty));
         }
 
         /**
@@ -2106,7 +2106,7 @@
         public Copy<BatchConjunction> copy( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(firstIdProperty,
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(firstIdProperty,
                                                                                                   additionalIdProperties));
         }
 
@@ -2125,7 +2125,7 @@
          */
         public Copy<BatchConjunction> copy( Iterable<Property> idProperties ) {
             assertNotExecuted();
-            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, new Location(idProperties));
+            return new CopyAction<BatchConjunction>(nextRequests, this.requestQueue, Location.create(idProperties));
         }
 
         /**
@@ -2172,7 +2172,7 @@
          */
         public BatchConjunction delete( String atPath ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(createPath(atPath)), getCurrentWorkspaceName()));
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(createPath(atPath)), getCurrentWorkspaceName()));
             return nextRequests;
         }
 
@@ -2188,7 +2188,7 @@
          */
         public BatchConjunction delete( Path at ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(at), getCurrentWorkspaceName()));
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(at), getCurrentWorkspaceName()));
             return nextRequests;
         }
 
@@ -2204,7 +2204,7 @@
          */
         public BatchConjunction delete( UUID at ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(at), getCurrentWorkspaceName()));
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(at), getCurrentWorkspaceName()));
             return nextRequests;
         }
 
@@ -2220,7 +2220,7 @@
          */
         public BatchConjunction delete( Property idProperty ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(idProperty), getCurrentWorkspaceName()));
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(idProperty), getCurrentWorkspaceName()));
             return nextRequests;
         }
 
@@ -2239,7 +2239,7 @@
         public BatchConjunction delete( Property firstIdProperty,
                                         Property... additionalIdProperties ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(firstIdProperty, additionalIdProperties),
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(firstIdProperty, additionalIdProperties),
                                                              getCurrentWorkspaceName()));
             return nextRequests;
         }
@@ -2257,7 +2257,7 @@
          */
         public BatchConjunction delete( Iterable<Property> idProperties ) {
             assertNotExecuted();
-            this.requestQueue.submit(new DeleteBranchRequest(new Location(idProperties), getCurrentWorkspaceName()));
+            this.requestQueue.submit(new DeleteBranchRequest(Location.create(idProperties), getCurrentWorkspaceName()));
             return nextRequests;
         }
 
@@ -2277,7 +2277,7 @@
             Path at = createPath(atPath);
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name);
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name);
         }
 
         /**
@@ -2298,7 +2298,7 @@
             Path at = createPath(atPath);
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name).with(property);
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name).with(property);
         }
 
         /**
@@ -2321,7 +2321,7 @@
             Path at = createPath(atPath);
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name).with(firstProperty,
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name).with(firstProperty,
                                                                                                                            additionalProperties);
         }
 
@@ -2341,7 +2341,7 @@
             CheckArg.isNotNull(at, "at");
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name);
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name);
         }
 
         /**
@@ -2362,7 +2362,7 @@
             CheckArg.isNotNull(at, "at");
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            CreateAction<Batch> action = new CreateAction<Batch>(this, requestQueue, new Location(parent),
+            CreateAction<Batch> action = new CreateAction<Batch>(this, requestQueue, Location.create(parent),
                                                                  getCurrentWorkspaceName(), name);
             for (Property property : properties) {
                 action.and(property);
@@ -2388,7 +2388,7 @@
             CheckArg.isNotNull(at, "at");
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name).with(property);
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name).with(property);
         }
 
         /**
@@ -2411,7 +2411,7 @@
             CheckArg.isNotNull(at, "at");
             Path parent = at.getParent();
             Name name = at.getLastSegment().getName();
-            return new CreateAction<Batch>(this, requestQueue, new Location(parent), getCurrentWorkspaceName(), name).with(firstProperty,
+            return new CreateAction<Batch>(this, requestQueue, Location.create(parent), getCurrentWorkspaceName(), name).with(firstProperty,
                                                                                                                            additionalProperties);
         }
 
@@ -2442,28 +2442,28 @@
                 }
 
                 public BatchConjunction on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public BatchConjunction on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public BatchConjunction on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public BatchConjunction on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
             };
         }
@@ -2644,28 +2644,28 @@
                 }
 
                 public SetValuesTo<BatchConjunction> on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public SetValuesTo<BatchConjunction> on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public SetValuesTo<BatchConjunction> on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public SetValuesTo<BatchConjunction> on( Property firstIdProperty,
                                                          Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public SetValuesTo<BatchConjunction> on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public SetValuesTo<BatchConjunction> on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
 
                 public On<BatchConjunction> to( Node value ) {
@@ -2812,28 +2812,28 @@
                 }
 
                 public BatchConjunction on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public BatchConjunction on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public BatchConjunction on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public BatchConjunction on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
             };
         }
@@ -2858,28 +2858,28 @@
                 }
 
                 public BatchConjunction on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public BatchConjunction on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public BatchConjunction on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public BatchConjunction on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
             };
         }
@@ -2895,7 +2895,7 @@
          * @return the interface that can either execute the batched requests or continue to add additional requests to the batch
          */
         public BatchConjunction read( UUID uuid ) {
-            return read(new Location(uuid));
+            return read(Location.create(uuid));
         }
 
         /**
@@ -2926,7 +2926,7 @@
          * @return the interface that can either execute the batched requests or continue to add additional requests to the batch
          */
         public BatchConjunction read( String path ) {
-            return read(new Location(createPath(path)));
+            return read(Location.create(createPath(path)));
         }
 
         /**
@@ -2940,7 +2940,7 @@
          * @return the interface that can either execute the batched requests or continue to add additional requests to the batch
          */
         public BatchConjunction read( Path path ) {
-            return read(new Location(path));
+            return read(Location.create(path));
         }
 
         /**
@@ -2954,7 +2954,7 @@
          * @return the interface that can either execute the batched requests or continue to add additional requests to the batch
          */
         public BatchConjunction read( Property idProperty ) {
-            return read(new Location(idProperty));
+            return read(Location.create(idProperty));
         }
 
         /**
@@ -2971,7 +2971,7 @@
          */
         public BatchConjunction read( Property firstIdProperty,
                                       Property... additionalIdProperties ) {
-            return read(new Location(firstIdProperty, additionalIdProperties));
+            return read(Location.create(firstIdProperty, additionalIdProperties));
         }
 
         /**
@@ -2985,7 +2985,7 @@
          * @return the interface that can either execute the batched requests or continue to add additional requests to the batch
          */
         public BatchConjunction read( Iterable<Property> idProperties ) {
-            return read(new Location(idProperties));
+            return read(Location.create(idProperties));
         }
 
         /**
@@ -3020,28 +3020,28 @@
             assertNotExecuted();
             return new On<BatchConjunction>() {
                 public BatchConjunction on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public BatchConjunction on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public BatchConjunction on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public BatchConjunction on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
 
                 public BatchConjunction on( Location at ) {
@@ -3072,28 +3072,28 @@
                 }
 
                 public BatchConjunction on( String path ) {
-                    return on(new Location(createPath(path)));
+                    return on(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction on( Path path ) {
-                    return on(new Location(path));
+                    return on(Location.create(path));
                 }
 
                 public BatchConjunction on( Property idProperty ) {
-                    return on(new Location(idProperty));
+                    return on(Location.create(idProperty));
                 }
 
                 public BatchConjunction on( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return on(new Location(firstIdProperty, additionalIdProperties));
+                    return on(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction on( Iterable<Property> idProperties ) {
-                    return on(new Location(idProperties));
+                    return on(Location.create(idProperties));
                 }
 
                 public BatchConjunction on( UUID uuid ) {
-                    return on(new Location(uuid));
+                    return on(Location.create(uuid));
                 }
             };
         }
@@ -3112,28 +3112,28 @@
             assertNotExecuted();
             return new Of<BatchConjunction>() {
                 public BatchConjunction of( String path ) {
-                    return of(new Location(createPath(path)));
+                    return of(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction of( Path path ) {
-                    return of(new Location(path));
+                    return of(Location.create(path));
                 }
 
                 public BatchConjunction of( Property idProperty ) {
-                    return of(new Location(idProperty));
+                    return of(Location.create(idProperty));
                 }
 
                 public BatchConjunction of( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return of(new Location(firstIdProperty, additionalIdProperties));
+                    return of(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction of( Iterable<Property> idProperties ) {
-                    return of(new Location(idProperties));
+                    return of(Location.create(idProperties));
                 }
 
                 public BatchConjunction of( UUID uuid ) {
-                    return of(new Location(uuid));
+                    return of(Location.create(uuid));
                 }
 
                 public BatchConjunction of( Location at ) {
@@ -3165,28 +3165,28 @@
                 }
 
                 public BatchConjunction at( String path ) {
-                    return at(new Location(createPath(path)));
+                    return at(Location.create(createPath(path)));
                 }
 
                 public BatchConjunction at( Path path ) {
-                    return at(new Location(path));
+                    return at(Location.create(path));
                 }
 
                 public BatchConjunction at( UUID uuid ) {
-                    return at(new Location(uuid));
+                    return at(Location.create(uuid));
                 }
 
                 public BatchConjunction at( Property idProperty ) {
-                    return at(new Location(idProperty));
+                    return at(Location.create(idProperty));
                 }
 
                 public BatchConjunction at( Property firstIdProperty,
                                             Property... additionalIdProperties ) {
-                    return at(new Location(firstIdProperty, additionalIdProperties));
+                    return at(Location.create(firstIdProperty, additionalIdProperties));
                 }
 
                 public BatchConjunction at( Iterable<Property> idProperties ) {
-                    return at(new Location(idProperties));
+                    return at(Location.create(idProperties));
                 }
             };
         }
@@ -3384,7 +3384,7 @@
      */
     public interface To<Next> {
         /**
-         * Finish the request by specifying the new location where the node should be copied/moved. Unlike
+         * Finish the request by specifying the Location.create where the node should be copied/moved. Unlike
          * {@link Into#into(Location)}, which specifies the location of the parent and which assumes the new node should have the
          * same name as the original, this method allows the caller to specify a new name for the new node.
          * 
@@ -3395,7 +3395,7 @@
         Next to( Location desiredLocation );
 
         /**
-         * Finish the request by specifying the new location where the node should be copied/moved. Unlike
+         * Finish the request by specifying the Location.create where the node should be copied/moved. Unlike
          * {@link Into#into(String)}, which specifies the location of the parent and which assumes the new node should have the
          * same name as the original, this method allows the caller to specify a new name for the new node.
          * 
@@ -3406,7 +3406,7 @@
         Next to( String desiredPath );
 
         /**
-         * Finish the request by specifying the new location where the node should be copied/moved. Unlike {@link Into#into(Path)}
+         * Finish the request by specifying the Location.create where the node should be copied/moved. Unlike {@link Into#into(Path)}
          * , which specifies the location of the parent and which assumes the new node should have the same name as the original,
          * this method allows the caller to specify a new name for the new node.
          * 
@@ -4284,7 +4284,7 @@
         ImportInto<Next> skippingRootElement( boolean skip );
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param to the location of the new parent
          * @return the interface for additional requests or actions
@@ -4294,7 +4294,7 @@
         Next into( Location to ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param toPath the path of the new parent
          * @return the interface for additional requests or actions
@@ -4304,7 +4304,7 @@
         Next into( String toPath ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param to the path of the new parent
          * @return the interface for additional requests or actions
@@ -4314,7 +4314,7 @@
         Next into( Path to ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param to the UUID of the new parent
          * @return the interface for additional requests or actions
@@ -4324,7 +4324,7 @@
         Next into( UUID to ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param idProperty the property that uniquely identifies the new parent
          * @return the interface for additional requests or actions
@@ -4334,7 +4334,7 @@
         Next into( Property idProperty ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param firstIdProperty the first property that, with the <code>additionalIdProperties</code>, uniquely identifies the
          *        new parent
@@ -4348,7 +4348,7 @@
                    Property... additionalIdProperties ) throws IOException, SAXException;
 
         /**
-         * Finish the import by specifying the new location into which the node should be copied/moved.
+         * Finish the import by specifying the Location.create into which the node should be copied/moved.
          * 
          * @param idProperties the properties that uniquely identifies the new parent
          * @return the interface for additional requests or actions
@@ -4985,33 +4985,33 @@
         }
 
         public Move<T> and( String from ) {
-            this.from.add(new Location(createPath(from)));
+            this.from.add(Location.create(createPath(from)));
             return this;
         }
 
         public Move<T> and( Path from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
         public Move<T> and( Property firstFrom,
                             Property... additionalFroms ) {
-            this.from.add(new Location(firstFrom, additionalFroms));
+            this.from.add(Location.create(firstFrom, additionalFroms));
             return this;
         }
 
         public Move<T> and( Iterable<Property> idPropertiesFrom ) {
-            this.from.add(new Location(idPropertiesFrom));
+            this.from.add(Location.create(idPropertiesFrom));
             return this;
         }
 
         public Move<T> and( Property from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
         public Move<T> and( UUID from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
@@ -5043,24 +5043,24 @@
         }
 
         public T into( Path into ) {
-            return submit(new Location(into));
+            return submit(Location.create(into));
         }
 
         public T into( UUID into ) {
-            return submit(new Location(into));
+            return submit(Location.create(into));
         }
 
         public T into( Property firstIdProperty,
                        Property... additionalIdProperties ) {
-            return submit(new Location(firstIdProperty, additionalIdProperties));
+            return submit(Location.create(firstIdProperty, additionalIdProperties));
         }
 
         public T into( Property into ) {
-            return submit(new Location(into));
+            return submit(Location.create(into));
         }
 
         public T into( String into ) {
-            return submit(new Location(createPath(into)));
+            return submit(Location.create(createPath(into)));
         }
 
         @Override
@@ -5086,33 +5086,33 @@
         }
 
         public Copy<T> and( String from ) {
-            this.from.add(new Location(createPath(from)));
+            this.from.add(Location.create(createPath(from)));
             return this;
         }
 
         public Copy<T> and( Path from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
         public Copy<T> and( Property firstFrom,
                             Property... additionalFroms ) {
-            this.from.add(new Location(firstFrom, additionalFroms));
+            this.from.add(Location.create(firstFrom, additionalFroms));
             return this;
         }
 
         public Copy<T> and( Iterable<Property> idProperties ) {
-            this.from.add(new Location(idProperties));
+            this.from.add(Location.create(idProperties));
             return this;
         }
 
         public Copy<T> and( Property from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
         public Copy<T> and( UUID from ) {
-            this.from.add(new Location(from));
+            this.from.add(Location.create(from));
             return this;
         }
 
@@ -5146,24 +5146,24 @@
         }
 
         public T into( Path into ) {
-            return submit(new Location(into), null);
+            return submit(Location.create(into), null);
         }
 
         public T into( UUID into ) {
-            return submit(new Location(into), null);
+            return submit(Location.create(into), null);
         }
 
         public T into( Property firstIdProperty,
                        Property... additionalIdProperties ) {
-            return submit(new Location(firstIdProperty, additionalIdProperties), null);
+            return submit(Location.create(firstIdProperty, additionalIdProperties), null);
         }
 
         public T into( Property into ) {
-            return submit(new Location(into), null);
+            return submit(Location.create(into), null);
         }
 
         public T into( String into ) {
-            return submit(new Location(createPath(into)), null);
+            return submit(Location.create(createPath(into)), null);
         }
 
         public T to( Location desiredLocation ) {
@@ -5175,7 +5175,7 @@
                 throw new IllegalArgumentException(GraphI18n.unableToCopyToTheRoot.text(this.from, desiredLocation));
             }
             Path parent = desiredPath.getParent();
-            return submit(new Location(parent), desiredPath.getLastSegment().getName());
+            return submit(Location.create(parent), desiredPath.getLastSegment().getName());
         }
 
         public T to( Path desiredPath ) {
@@ -5183,7 +5183,7 @@
                 throw new IllegalArgumentException(GraphI18n.unableToCopyToTheRoot.text(this.from, desiredPath));
             }
             Path parent = desiredPath.getParent();
-            return submit(new Location(parent), desiredPath.getLastSegment().getName());
+            return submit(Location.create(parent), desiredPath.getLastSegment().getName());
         }
 
         public T to( String desiredPath ) {

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/Location.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/Location.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/Location.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -47,6 +47,9 @@
 @Immutable
 public class Location implements Iterable<Property> {
 
+    /**
+     * Simple shared iterator instance that is used when there are no properties.
+     */
     private static final Iterator<Property> NO_ID_PROPERTIES_ITERATOR = new Iterator<Property>() {
         public boolean hasNext() {
             return false;
@@ -61,32 +64,31 @@
         }
     };
 
-    private final Path path;
-    private final List<Property> idProperties;
-
     /**
      * Create a location defined by a path.
      * 
      * @param path the path
+     * @return a new <code>Location</code> with the given path and no identification properties
      * @throws IllegalArgumentException if <code>path</code> is null
      */
-    public Location( Path path ) {
+    public static Location create( Path path ) {
         CheckArg.isNotNull(path, "path");
-        this.path = path;
-        this.idProperties = null;
+
+        return new Location(path, null);
     }
 
     /**
      * Create a location defined by a UUID.
      * 
      * @param uuid the UUID
+     * @return a new <code>Location</code> with no path and a single identification property with the name {@link DnaLexicon#UUID}
+     *         and the given <code>uuid</code> for a value.
      * @throws IllegalArgumentException if <code>uuid</code> is null
      */
-    public Location( UUID uuid ) {
+    public static Location create( UUID uuid ) {
         CheckArg.isNotNull(uuid, "uuid");
-        this.path = null;
         Property idProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
-        this.idProperties = Collections.singletonList(idProperty);
+        return new Location(null, Collections.singletonList(idProperty));
     }
 
     /**
@@ -94,18 +96,20 @@
      * 
      * @param path the path
      * @param uuid the UUID, or null if there is no UUID
+     * @return a new <code>Location</code> with the given path (if any) and a single identification property with the name
+     *         {@link DnaLexicon#UUID} and the given <code>uuid</code> (if it is present) for a value.
      * @throws IllegalArgumentException if <code>path</code> is null
      */
-    public Location( Path path,
-                     UUID uuid ) {
+    public static Location create( Path path,
+                                   UUID uuid ) {
         CheckArg.isNotNull(uuid, "uuid");
-        this.path = path;
+        List<Property> idProperties = null;
         if (uuid != null) {
             Property idProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
-            this.idProperties = Collections.singletonList(idProperty);
-        } else {
-            this.idProperties = null;
+            idProperties = Collections.singletonList(idProperty);
         }
+
+        return new Location(path, idProperties);
     }
 
     /**
@@ -113,14 +117,14 @@
      * 
      * @param path the path
      * @param idProperty the identification property
+     * @return a new <code>Location</code> with the given path and identification property (if it is present).
      * @throws IllegalArgumentException if <code>path</code> or <code>idProperty</code> is null
      */
-    public Location( Path path,
-                     Property idProperty ) {
+    public static Location create( Path path,
+                                   Property idProperty ) {
         CheckArg.isNotNull(path, "path");
         CheckArg.isNotNull(idProperty, "idProperty");
-        this.path = path;
-        this.idProperties = idProperty != null ? Collections.singletonList(idProperty) : null;
+        return new Location(path, idProperty != null ? Collections.singletonList(idProperty) : null);
     }
 
     /**
@@ -129,21 +133,21 @@
      * @param path the path
      * @param firstIdProperty the first identification property
      * @param remainingIdProperties the remaining identification property
+     * @return a new <code>Location</code> with the given path and identification properties.
      * @throws IllegalArgumentException if any of the arguments are null
      */
-    public Location( Path path,
-                     Property firstIdProperty,
-                     Property... remainingIdProperties ) {
+    public static Location create( Path path,
+                                   Property firstIdProperty,
+                                   Property... remainingIdProperties ) {
         CheckArg.isNotNull(path, "path");
         CheckArg.isNotNull(firstIdProperty, "firstIdProperty");
         CheckArg.isNotNull(remainingIdProperties, "remainingIdProperties");
-        this.path = path;
         List<Property> idProperties = new ArrayList<Property>(1 + remainingIdProperties.length);
         idProperties.add(firstIdProperty);
         for (Property property : remainingIdProperties) {
             idProperties.add(property);
         }
-        this.idProperties = Collections.unmodifiableList(idProperties);
+        return new Location(path, Collections.unmodifiableList(idProperties));
     }
 
     /**
@@ -151,30 +155,30 @@
      * 
      * @param path the path
      * @param idProperties the iterator over the identification properties
+     * @return a new <code>Location</code> with the given path and identification properties
      * @throws IllegalArgumentException if any of the arguments are null
      */
-    public Location( Path path,
-                     Iterable<Property> idProperties ) {
+    public static Location create( Path path,
+                                   Iterable<Property> idProperties ) {
         CheckArg.isNotNull(path, "path");
         CheckArg.isNotNull(idProperties, "idProperties");
-        this.path = path;
         List<Property> idPropertiesList = new ArrayList<Property>();
         for (Property property : idProperties) {
             idPropertiesList.add(property);
         }
-        this.idProperties = Collections.unmodifiableList(idPropertiesList);
+        return new Location(path, Collections.unmodifiableList(idPropertiesList));
     }
 
     /**
      * Create a location defined by a single identification property.
      * 
      * @param idProperty the identification property
+     * @return a new <code>Location</code> with no path and the given identification property.
      * @throws IllegalArgumentException if <code>idProperty</code> is null
      */
-    public Location( Property idProperty ) {
+    public static Location create( Property idProperty ) {
         CheckArg.isNotNull(idProperty, "idProperty");
-        this.path = null;
-        this.idProperties = Collections.singletonList(idProperty);
+        return new Location(null, Collections.singletonList(idProperty));
     }
 
     /**
@@ -182,47 +186,47 @@
      * 
      * @param firstIdProperty the first identification property
      * @param remainingIdProperties the remaining identification property
+     * @return a new <code>Location</code> with no path and the given and identification properties.
      * @throws IllegalArgumentException if any of the arguments are null
      */
-    public Location( Property firstIdProperty,
-                     Property... remainingIdProperties ) {
+    public static Location create( Property firstIdProperty,
+                                   Property... remainingIdProperties ) {
         CheckArg.isNotNull(firstIdProperty, "firstIdProperty");
         CheckArg.isNotNull(remainingIdProperties, "remainingIdProperties");
-        this.path = null;
         List<Property> idProperties = new ArrayList<Property>(1 + remainingIdProperties.length);
         idProperties.add(firstIdProperty);
         for (Property property : remainingIdProperties) {
             idProperties.add(property);
         }
-        this.idProperties = Collections.unmodifiableList(idProperties);
+        return new Location(null, Collections.unmodifiableList(idProperties));
     }
 
     /**
      * Create a location defined by a path and an iterator over identification properties.
      * 
      * @param idProperties the iterator over the identification properties
+     * @return a new <code>Location</code> with no path and the given identification properties.
      * @throws IllegalArgumentException if any of the arguments are null
      */
-    public Location( Iterable<Property> idProperties ) {
+    public static Location create( Iterable<Property> idProperties ) {
         CheckArg.isNotNull(idProperties, "idProperties");
-        this.path = null;
         List<Property> idPropertiesList = new ArrayList<Property>();
         for (Property property : idProperties) {
             idPropertiesList.add(property);
         }
-        this.idProperties = Collections.unmodifiableList(idPropertiesList);
+        return new Location(null, Collections.unmodifiableList(idPropertiesList));
     }
 
     /**
      * Create a location defined by multiple identification properties.
      * 
      * @param idProperties the identification properties
+     * @return a new <code>Location</code> with no path and the given identification properties.
      * @throws IllegalArgumentException if <code>idProperties</code> is null or empty
      */
-    public Location( List<Property> idProperties ) {
+    public static Location create( List<Property> idProperties ) {
         CheckArg.isNotEmpty(idProperties, "idProperties");
-        this.path = null;
-        this.idProperties = idProperties;
+        return new Location(null, idProperties);
     }
 
     /**
@@ -230,12 +234,27 @@
      * 
      * @param path the path
      * @param idProperties the identification properties
+     * @return a new <code>Location</code> with the given path and identification properties
      * @throws IllegalArgumentException if <code>path</code> is null, or if <code>idProperties</code> is empty
      */
+    protected static Location create( Path path,
+                                      List<Property> idProperties ) {
+        CheckArg.isNotNull(path, "path");
+        CheckArg.isNotEmpty(idProperties, "idProperties");
+        return new Location(path, idProperties);
+    }
+
+    private final Path path;
+    private final List<Property> idProperties;
+
+    /**
+     * Create a new location with a given path and set of identification properties.
+     * 
+     * @param path the path
+     * @param idProperties the identification properties
+     */
     protected Location( Path path,
                         List<Property> idProperties ) {
-        CheckArg.isNotNull(path, "path");
-        CheckArg.isNotEmpty(idProperties, "idProperties");
         this.path = path;
         this.idProperties = idProperties;
     }
@@ -250,7 +269,6 @@
      */
     protected Location( Location original,
                         Property newIdProperty ) {
-        CheckArg.isNotNull(original, "original");
         this.path = original.getPath();
         if (original.hasIdProperties()) {
             List<Property> originalIdProperties = original.getIdProperties();
@@ -279,7 +297,6 @@
      */
     protected Location( Location original,
                         Path newPath ) {
-        CheckArg.isNotNull(original, "original");
         this.path = newPath != null ? newPath : original.getPath();
         this.idProperties = original.idProperties;
     }

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/inmemory/InMemoryRequestProcessor.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/inmemory/InMemoryRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/inmemory/InMemoryRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -130,7 +130,7 @@
                                                   copyMap);
         Path newPath = getExecutionContext().getValueFactories().getPathFactory().create(newParentPath, newNode.getName());
         Location oldLocation = getActualLocation(request.from().getPath(), node);
-        Location newLocation = new Location(newPath, newNode.getUuid());
+        Location newLocation = Location.create(newPath, newNode.getUuid());
         request.setActualLocations(oldLocation, newLocation);
     }
 
@@ -198,7 +198,7 @@
         node.setParent(newParent);
         newPath = getExecutionContext().getValueFactories().getPathFactory().create(newParentPath, node.getName());
         Location oldLocation = getActualLocation(request.from().getPath(), node);
-        Location newLocation = new Location(newPath, node.getUuid());
+        Location newLocation = Location.create(newPath, node.getUuid());
         request.setActualLocations(oldLocation, newLocation);
     }
 
@@ -238,7 +238,7 @@
             request.setError(new InvalidWorkspaceException(msg));
         } else {
             InMemoryNode root = workspace.getRoot();
-            request.setActualRootLocation(new Location(pathFactory.createRootPath(), root.getUuid()));
+            request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
             request.setActualWorkspaceName(workspace.getName());
         }
     }
@@ -278,7 +278,7 @@
         InMemoryRepository.Workspace original = getWorkspace(request, request.workspaceName());
         if (original != null) {
             Path path = getExecutionContext().getValueFactories().getPathFactory().createRootPath();
-            request.setActualRootLocation(new Location(path, original.getRoot().getUuid()));
+            request.setActualRootLocation(Location.create(path, original.getRoot().getUuid()));
             request.setActualWorkspaceName(original.getName());
         }
     }
@@ -310,7 +310,7 @@
                         request.setError(new InvalidWorkspaceException(msg));
                     } else {
                         InMemoryNode root = target.getRoot();
-                        request.setActualRootLocation(new Location(pathFactory.createRootPath(), root.getUuid()));
+                        request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
                         request.setActualWorkspaceName(target.getName());
                     }
                     return;
@@ -328,7 +328,7 @@
             request.setError(new InvalidWorkspaceException(msg));
         } else {
             InMemoryNode root = target.getRoot();
-            request.setActualRootLocation(new Location(pathFactory.createRootPath(), root.getUuid()));
+            request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
             request.setActualWorkspaceName(target.getName());
         }
     }
@@ -346,7 +346,7 @@
             }
             path = pathFactory.createAbsolutePath(segments);
         }
-        return new Location(path, node.getUuid());
+        return Location.create(path, node.getUuid());
     }
 
     protected InMemoryRepository.Workspace getWorkspace( Request request,

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadAllChildrenRequest.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadAllChildrenRequest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadAllChildrenRequest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -137,7 +137,7 @@
     public void addChild( Path pathToChild,
                           Property firstIdProperty,
                           Property... remainingIdProperties ) {
-        Location child = new Location(pathToChild, firstIdProperty, remainingIdProperties);
+        Location child = Location.create(pathToChild, firstIdProperty, remainingIdProperties);
         this.children.add(child);
     }
 
@@ -153,7 +153,7 @@
      */
     public void addChild( Path pathToChild,
                           Property idProperty ) {
-        Location child = new Location(pathToChild, idProperty);
+        Location child = Location.create(pathToChild, idProperty);
         this.children.add(child);
     }
 

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadBlockOfChildrenRequest.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadBlockOfChildrenRequest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadBlockOfChildrenRequest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -184,7 +184,7 @@
     public void addChild( Path pathToChild,
                           Property firstIdProperty,
                           Property... remainingIdProperties ) {
-        Location child = new Location(pathToChild, firstIdProperty, remainingIdProperties);
+        Location child = Location.create(pathToChild, firstIdProperty, remainingIdProperties);
         this.children.add(child);
     }
 
@@ -200,7 +200,7 @@
      */
     public void addChild( Path pathToChild,
                           Property idProperty ) {
-        Location child = new Location(pathToChild, idProperty);
+        Location child = Location.create(pathToChild, idProperty);
         this.children.add(child);
     }
 

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNextBlockOfChildrenRequest.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNextBlockOfChildrenRequest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNextBlockOfChildrenRequest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -152,7 +152,7 @@
     public void addChild( Path pathToChild,
                           Property firstIdProperty,
                           Property... remainingIdProperties ) {
-        Location child = new Location(pathToChild, firstIdProperty, remainingIdProperties);
+        Location child = Location.create(pathToChild, firstIdProperty, remainingIdProperties);
         this.children.add(child);
     }
 
@@ -168,7 +168,7 @@
      */
     public void addChild( Path pathToChild,
                           Property idProperty ) {
-        Location child = new Location(pathToChild, idProperty);
+        Location child = Location.create(pathToChild, idProperty);
         this.children.add(child);
     }
 

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNodeRequest.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNodeRequest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/ReadNodeRequest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -184,7 +184,7 @@
     public void addChild( Path pathToChild,
                           Property firstIdProperty,
                           Property... remainingIdProperties ) {
-        Location child = new Location(pathToChild, firstIdProperty, remainingIdProperties);
+        Location child = Location.create(pathToChild, firstIdProperty, remainingIdProperties);
         this.children.add(child);
     }
 
@@ -200,7 +200,7 @@
      */
     public void addChild( Path pathToChild,
                           Property idProperty ) {
-        Location child = new Location(pathToChild, idProperty);
+        Location child = Location.create(pathToChild, idProperty);
         this.children.add(child);
     }
 

Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/processor/RequestProcessor.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/processor/RequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/request/processor/RequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -433,7 +433,7 @@
         assert parentPath != null;
 
         // Convert the request to a ReadAllChildrenRequest and execute it ...
-        ReadAllChildrenRequest readAll = new ReadAllChildrenRequest(new Location(parentPath), request.inWorkspace());
+        ReadAllChildrenRequest readAll = new ReadAllChildrenRequest(Location.create(parentPath), request.inWorkspace());
         process(readAll);
         if (readAll.hasError()) {
             request.setError(readAll.getError());
@@ -649,7 +649,7 @@
      * This method does nothing if the request is null. Unless overridden, this method converts the rename into a
      * {@link MoveBranchRequest move}. However, this only works if the <code>request</code> has a {@link Location#hasPath() path}
      * for its {@link RenameNodeRequest#at() location}. (If not, this method throws an {@link UnsupportedOperationException} and
-     * must be overriddent.)
+     * must be overridden.)
      * </p>
      * 
      * @param request the rename request
@@ -661,7 +661,7 @@
             throw new UnsupportedOperationException();
         }
         Path newPath = getExecutionContext().getValueFactories().getPathFactory().create(from.getPath(), request.toName());
-        Location to = new Location(newPath);
+        Location to = Location.create(newPath);
         MoveBranchRequest move = new MoveBranchRequest(from, to, request.inWorkspace());
         process(move);
         // Set the actual locations ...

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphImporterTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphImporterTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphImporterTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -88,7 +88,7 @@
     @Test
     public void shouldImportXmlContentAndGenerateTheCorrectCommands() throws Exception {
         System.out.println(xmlContent);
-        Graph.Batch batch = importer.importXml(xmlContent, new Location(destinationPath));
+        Graph.Batch batch = importer.importXml(xmlContent, Location.create(destinationPath));
         batch.execute();
         // 'lastExecutedCommand'
         assertThat(lastExecutedRequest, is(instanceOf(CompositeRequest.class)));
@@ -156,7 +156,7 @@
             lastExecutedRequest = request;
             if (request instanceof VerifyWorkspaceRequest) {
                 VerifyWorkspaceRequest workspaceRequest = (VerifyWorkspaceRequest)request;
-                workspaceRequest.setActualRootLocation(new Location(context.getValueFactories().getPathFactory().createRootPath()));
+                workspaceRequest.setActualRootLocation(Location.create(context.getValueFactories().getPathFactory().createRootPath()));
                 workspaceRequest.setActualWorkspaceName("default");
             }
         }

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -123,7 +123,7 @@
         Name idProperty2Name = createName("id2");
         validIdProperty1 = context.getPropertyFactory().create(idProperty1Name, "1");
         validIdProperty2 = context.getPropertyFactory().create(idProperty2Name, "2");
-        validLocation = new Location(validPath);
+        validLocation = Location.create(validPath);
 
         properties = new HashMap<Location, Collection<Property>>();
         children = new HashMap<Location, List<Location>>();
@@ -330,17 +330,17 @@
     public void shouldMoveNode() {
         graph.move(validPath).into(validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.move(validPathString).into(validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.move(validUuid).into(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsMove(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
     }
 
@@ -348,17 +348,17 @@
     public void shouldCopyNode() {
         graph.copy(validPath).into(validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.copy(validPathString).into(validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.copy(validUuid).into(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsCopy(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
     }
 
@@ -366,27 +366,27 @@
     public void shouldDeleteNode() {
         graph.delete(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsDelete(new Location(validPath));
+        assertNextRequestIsDelete(Location.create(validPath));
         assertNoMoreRequests();
 
         graph.delete(validPathString);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsDelete(new Location(validPath));
+        assertNextRequestIsDelete(Location.create(validPath));
         assertNoMoreRequests();
 
         graph.delete(validUuid);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsDelete(new Location(validUuid));
+        assertNextRequestIsDelete(Location.create(validUuid));
         assertNoMoreRequests();
 
         graph.delete(validIdProperty1);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsDelete(new Location(validIdProperty1));
+        assertNextRequestIsDelete(Location.create(validIdProperty1));
         assertNoMoreRequests();
 
         graph.delete(validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsDelete(new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsDelete(Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
     }
 
@@ -394,32 +394,32 @@
     public void shouldCreateNode() {
         graph.create(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c");
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c");
         assertNoMoreRequests();
 
         graph.create(validPath, validIdProperty1);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c", validIdProperty1);
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1);
         assertNoMoreRequests();
 
         graph.create(validPath, validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
         assertNoMoreRequests();
 
         graph.create(validPathString);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c");
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c");
         assertNoMoreRequests();
 
         graph.create(validPathString, validIdProperty1);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c", validIdProperty1);
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1);
         assertNoMoreRequests();
 
         graph.create(validPathString, validIdProperty1, validIdProperty2);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCreate(new Location(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
+        assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
         assertNoMoreRequests();
     }
 
@@ -432,107 +432,107 @@
 
     @Test
     public void shouldGetPropertiesOnNode() {
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         Collection<Property> props = graph.getProperties().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath), validIdProperty1, validIdProperty2);
+        assertNextRequestReadProperties(Location.create(validPath), validIdProperty1, validIdProperty2);
         assertNoMoreRequests();
         assertThat(props, hasItems(validIdProperty1, validIdProperty2));
 
-        setPropertiesToReadOn(new Location(validPath));
+        setPropertiesToReadOn(Location.create(validPath));
         props = graph.getProperties().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath));
+        assertNextRequestReadProperties(Location.create(validPath));
         assertNoMoreRequests();
         assertThat(props.size(), is(0));
     }
 
     @Test
     public void shouldGetPropertiesByNameOnNode() {
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         Map<Name, Property> propsByName = graph.getPropertiesByName().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath), validIdProperty1, validIdProperty2);
+        assertNextRequestReadProperties(Location.create(validPath), validIdProperty1, validIdProperty2);
         assertNoMoreRequests();
         assertThat(propsByName.get(validIdProperty1.getName()), is(validIdProperty1));
         assertThat(propsByName.get(validIdProperty2.getName()), is(validIdProperty2));
 
-        setPropertiesToReadOn(new Location(validPath));
+        setPropertiesToReadOn(Location.create(validPath));
         propsByName = graph.getPropertiesByName().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath));
+        assertNextRequestReadProperties(Location.create(validPath));
         assertNoMoreRequests();
         assertThat(propsByName.isEmpty(), is(true));
     }
 
     @Test
     public void shouldGetPropertyOnNode() {
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         graph.getProperty(validIdProperty2.getName()).on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperty(new Location(validPath), validIdProperty2);
+        assertNextRequestReadProperty(Location.create(validPath), validIdProperty2);
         assertNoMoreRequests();
 
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         graph.getProperty(validIdProperty2.getName().getString(context.getNamespaceRegistry())).on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperty(new Location(validPath), validIdProperty2);
+        assertNextRequestReadProperty(Location.create(validPath), validIdProperty2);
         assertNoMoreRequests();
     }
 
     @Test
     public void shouldGetChildrenOnNode() {
-        Location child1 = new Location(createPath(validPath, "x"));
-        Location child2 = new Location(createPath(validPath, "y"));
-        Location child3 = new Location(createPath(validPath, "z"));
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
+        Location child1 = Location.create(createPath(validPath, "x"));
+        Location child2 = Location.create(createPath(validPath, "y"));
+        Location child3 = Location.create(createPath(validPath, "z"));
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
         List<Location> children = graph.getChildren().of(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadChildren(new Location(validPath), child1, child2, child3);
+        assertNextRequestReadChildren(Location.create(validPath), child1, child2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child1, child2, child3));
 
-        setChildrenToReadOn(new Location(validPath));
+        setChildrenToReadOn(Location.create(validPath));
         children = graph.getChildren().of(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadChildren(new Location(validPath));
+        assertNextRequestReadChildren(Location.create(validPath));
         assertNoMoreRequests();
         assertThat(children.isEmpty(), is(true));
     }
 
     @Test
     public void shouldGetChildrenInBlockAtStartingIndex() {
-        Location child1 = new Location(createPath(validPath, "x"));
-        Location child2 = new Location(createPath(validPath, "y"));
-        Location child3 = new Location(createPath(validPath, "z"));
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
+        Location child1 = Location.create(createPath(validPath, "x"));
+        Location child2 = Location.create(createPath(validPath, "y"));
+        Location child3 = Location.create(createPath(validPath, "z"));
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
         List<Location> children = graph.getChildren().inBlockOf(2).startingAt(0).under(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadBlockOfChildren(new Location(validPath), 0, 2, child1, child2);
+        assertNextRequestReadBlockOfChildren(Location.create(validPath), 0, 2, child1, child2);
         assertNoMoreRequests();
         assertThat(children, hasItems(child1, child2));
 
         children = graph.getChildren().inBlockOf(2).startingAt(1).under(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadBlockOfChildren(new Location(validPath), 1, 2, child2, child3);
+        assertNextRequestReadBlockOfChildren(Location.create(validPath), 1, 2, child2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child2, child3));
 
         children = graph.getChildren().inBlockOf(2).startingAt(2).under(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadBlockOfChildren(new Location(validPath), 2, 2, child3);
+        assertNextRequestReadBlockOfChildren(Location.create(validPath), 2, 2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child3));
 
         children = graph.getChildren().inBlockOf(2).startingAt(20).under(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadBlockOfChildren(new Location(validPath), 20, 2);
+        assertNextRequestReadBlockOfChildren(Location.create(validPath), 20, 2);
         assertNoMoreRequests();
         assertThat(children.isEmpty(), is(true));
 
         children = graph.getChildren().inBlockOf(20).startingAt(0).under(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadBlockOfChildren(new Location(validPath), 0, 20, child1, child2, child3);
+        assertNextRequestReadBlockOfChildren(Location.create(validPath), 0, 20, child1, child2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child1, child2, child3));
     }
@@ -542,26 +542,26 @@
         Path pathX = createPath(validPath, "x");
         Path pathY = createPath(validPath, "y");
         Path pathZ = createPath(validPath, "z");
-        Location child1 = new Location(pathX);
-        Location child2 = new Location(pathY);
-        Location child3 = new Location(pathZ);
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
+        Location child1 = Location.create(pathX);
+        Location child2 = Location.create(pathY);
+        Location child3 = Location.create(pathZ);
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
 
         List<Location> children = graph.getChildren().inBlockOf(2).startingAfter(pathX);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadNextBlockOfChildren(new Location(pathX), 2, child2, child3);
+        assertNextRequestReadNextBlockOfChildren(Location.create(pathX), 2, child2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child2, child3));
 
         children = graph.getChildren().inBlockOf(3).startingAfter(pathX);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadNextBlockOfChildren(new Location(pathX), 3, child2, child3);
+        assertNextRequestReadNextBlockOfChildren(Location.create(pathX), 3, child2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child2, child3));
 
         children = graph.getChildren().inBlockOf(2).startingAfter(pathY);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadNextBlockOfChildren(new Location(pathY), 2, child3);
+        assertNextRequestReadNextBlockOfChildren(Location.create(pathY), 2, child3);
         assertNoMoreRequests();
         assertThat(children, hasItems(child3));
     }
@@ -569,86 +569,86 @@
     @Test
     public void shouldSetPropertiesWithEitherOnOrToMethodsCalledFirst() {
         graph.set("propName").on(validPath).to(3.0f);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", 3.0f));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", 3.0f));
 
         graph.set("propName").to(3.0f).on(validPath);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", 3.0f));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", 3.0f));
     }
 
     @Test
     public void shouldSetPropertyValueToPrimitiveTypes() {
         graph.set("propName").on(validPath).to(3.0F);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", new Float(3.0f)));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", new Float(3.0f)));
 
         graph.set("propName").on(validPath).to(1.0D);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", new Double(1.0)));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", new Double(1.0)));
 
         graph.set("propName").on(validPath).to(false);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", Boolean.FALSE));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", Boolean.FALSE));
 
         graph.set("propName").on(validPath).to(3);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", new Integer(3)));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", new Integer(3)));
 
         graph.set("propName").on(validPath).to(5L);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", new Long(5)));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", new Long(5)));
 
         graph.set("propName").on(validPath).to(validPath);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", validPath));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", validPath));
 
         graph.set("propName").on(validPath).to(validPath.getLastSegment().getName());
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName",
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName",
                                                                                   validPath.getLastSegment().getName()));
         Date now = new Date();
         graph.set("propName").on(validPath).to(now);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", now));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", now));
 
         DateTime dtNow = context.getValueFactories().getDateFactory().create(now);
         graph.set("propName").on(validPath).to(dtNow);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", dtNow));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", dtNow));
 
         Calendar calNow = Calendar.getInstance();
         calNow.setTime(now);
         graph.set("propName").on(validPath).to(calNow);
-        assertNextRequestUpdateProperties(new Location(validPath), createProperty("propName", dtNow));
+        assertNextRequestUpdateProperties(Location.create(validPath), createProperty("propName", dtNow));
 
     }
 
     @Test
     public void shouldReadNode() {
-        Location child1 = new Location(createPath(validPath, "x"));
-        Location child2 = new Location(createPath(validPath, "y"));
-        Location child3 = new Location(createPath(validPath, "z"));
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        Location child1 = Location.create(createPath(validPath, "x"));
+        Location child2 = Location.create(createPath(validPath, "y"));
+        Location child3 = Location.create(createPath(validPath, "z"));
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         Node node = graph.getNodeAt(validPath);
         assertThat(node, is(notNullValue()));
         assertThat(node.getChildren(), hasItems(child1, child2));
         assertThat(node.getProperties(), hasItems(validIdProperty1, validIdProperty2));
-        assertThat(node.getLocation(), is(new Location(validPath)));
+        assertThat(node.getLocation(), is(Location.create(validPath)));
         assertThat(node.getGraph(), is(sameInstance(graph)));
         assertThat(node.getPropertiesByName().get(validIdProperty1.getName()), is(validIdProperty1));
         assertThat(node.getPropertiesByName().get(validIdProperty2.getName()), is(validIdProperty2));
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadNode(new Location(validPath));
+        assertNextRequestReadNode(Location.create(validPath));
         assertNoMoreRequests();
     }
 
     @Test
     public void shouldReadSubgraph() {
-        Location child1 = new Location(createPath(validPath, "x"));
-        Location child2 = new Location(createPath(validPath, "y"));
-        Location child3 = new Location(createPath(validPath, "z"));
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
-        Location child11 = new Location(createPath(child1.getPath(), "h"));
-        Location child12 = new Location(createPath(child1.getPath(), "i"));
-        Location child13 = new Location(createPath(child1.getPath(), "j"));
+        Location child1 = Location.create(createPath(validPath, "x"));
+        Location child2 = Location.create(createPath(validPath, "y"));
+        Location child3 = Location.create(createPath(validPath, "z"));
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
+        Location child11 = Location.create(createPath(child1.getPath(), "h"));
+        Location child12 = Location.create(createPath(child1.getPath(), "i"));
+        Location child13 = Location.create(createPath(child1.getPath(), "j"));
         setChildrenToReadOn(child1, child11, child12, child13);
-        Location child121 = new Location(createPath(child12.getPath(), "m"));
-        Location child122 = new Location(createPath(child12.getPath(), "n"));
-        Location child123 = new Location(createPath(child12.getPath(), "o"));
+        Location child121 = Location.create(createPath(child12.getPath(), "m"));
+        Location child122 = Location.create(createPath(child12.getPath(), "n"));
+        Location child123 = Location.create(createPath(child12.getPath(), "o"));
         setChildrenToReadOn(child12, child121, child122, child123);
 
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         setPropertiesToReadOn(child1, validIdProperty1);
         setPropertiesToReadOn(child2, validIdProperty2);
         setPropertiesToReadOn(child11, validIdProperty1);
@@ -659,10 +659,10 @@
         Subgraph subgraph = graph.getSubgraphOfDepth(2).at(validPath);
         assertThat(subgraph, is(notNullValue()));
         assertThat(subgraph.getMaximumDepth(), is(2));
-        assertThat(subgraph.getLocation(), is(new Location(validPath)));
+        assertThat(subgraph.getLocation(), is(Location.create(validPath)));
 
         // Get nodes by absolute path
-        Node root = subgraph.getNode(new Location(validPath));
+        Node root = subgraph.getNode(Location.create(validPath));
         assertThat(root.getChildren(), hasItems(child1, child2, child3));
         assertThat(root.getProperties(), hasItems(validIdProperty1, validIdProperty2));
 
@@ -707,26 +707,26 @@
     public void shouldMoveNodeInBatches() {
         graph.batch().move(validPath).into(validIdProperty1, validIdProperty2).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.batch().move(validPathString).into(validIdProperty1, validIdProperty2).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.batch().move(validUuid).into(validPath).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsMove(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
 
         graph.batch().move(validPath).into(validIdProperty1, validIdProperty2).and().move(validPathString).into(validIdProperty1,
                                                                                                                 validIdProperty2).and().move(validUuid).into(validPath).execute();
         assertThat(numberOfExecutions, is(1));
         extractRequestsFromComposite();
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
-        assertNextRequestIsMove(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
     }
 
@@ -734,45 +734,45 @@
     public void shouldCopyNodeInBatches() {
         graph.batch().copy(validPath).into(validIdProperty1, validIdProperty2).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.batch().copy(validPathString).into(validIdProperty1, validIdProperty2).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
         assertNoMoreRequests();
 
         graph.batch().copy(validUuid).into(validPath).execute();
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsCopy(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsCopy(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
 
         graph.batch().copy(validPath).into(validIdProperty1, validIdProperty2).and().copy(validPathString).into(validIdProperty1,
                                                                                                                 validIdProperty2).and().copy(validUuid).into(validPath).execute();
         assertThat(numberOfExecutions, is(1));
         extractRequestsFromComposite();
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
-        assertNextRequestIsCopy(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
-        assertNextRequestIsCopy(new Location(validUuid), new Location(validPath));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
+        assertNextRequestIsCopy(Location.create(validUuid), Location.create(validPath));
         assertNoMoreRequests();
     }
 
     @Test
     public void shouldReadNodesInBatches() {
-        Location child1 = new Location(createPath(validPath, "x"));
-        Location child2 = new Location(createPath(validPath, "y"));
-        Location child3 = new Location(createPath(validPath, "z"));
-        setChildrenToReadOn(new Location(validPath), child1, child2, child3);
-        Location child11 = new Location(createPath(child1.getPath(), "h"));
-        Location child12 = new Location(createPath(child1.getPath(), "i"));
-        Location child13 = new Location(createPath(child1.getPath(), "j"));
+        Location child1 = Location.create(createPath(validPath, "x"));
+        Location child2 = Location.create(createPath(validPath, "y"));
+        Location child3 = Location.create(createPath(validPath, "z"));
+        setChildrenToReadOn(Location.create(validPath), child1, child2, child3);
+        Location child11 = Location.create(createPath(child1.getPath(), "h"));
+        Location child12 = Location.create(createPath(child1.getPath(), "i"));
+        Location child13 = Location.create(createPath(child1.getPath(), "j"));
         setChildrenToReadOn(child1, child11, child12, child13);
-        Location child121 = new Location(createPath(child12.getPath(), "m"));
-        Location child122 = new Location(createPath(child12.getPath(), "n"));
-        Location child123 = new Location(createPath(child12.getPath(), "o"));
+        Location child121 = Location.create(createPath(child12.getPath(), "m"));
+        Location child122 = Location.create(createPath(child12.getPath(), "n"));
+        Location child123 = Location.create(createPath(child12.getPath(), "o"));
         setChildrenToReadOn(child12, child121, child122, child123);
 
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1, validIdProperty2);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1, validIdProperty2);
         setPropertiesToReadOn(child1, validIdProperty1);
         setPropertiesToReadOn(child2, validIdProperty2);
         setPropertiesToReadOn(child11, validIdProperty1);
@@ -783,7 +783,7 @@
         results = graph.batch().read(validPath).and().read(child11).and().read(child12).execute();
         assertThat(numberOfExecutions, is(1));
         extractRequestsFromComposite();
-        assertNextRequestReadNode(new Location(validPath));
+        assertNextRequestReadNode(Location.create(validPath));
         assertNextRequestReadNode(child11);
         assertNextRequestReadNode(child12);
         assertNoMoreRequests();
@@ -793,7 +793,7 @@
         assertThat(node, is(notNullValue()));
         assertThat(node.getChildren(), hasItems(child1, child2, child3));
         assertThat(node.getProperties(), hasItems(validIdProperty1, validIdProperty2));
-        assertThat(node.getLocation(), is(new Location(validPath)));
+        assertThat(node.getLocation(), is(Location.create(validPath)));
         assertThat(node.getGraph(), is(sameInstance(graph)));
         assertThat(node.getPropertiesByName().get(validIdProperty1.getName()), is(validIdProperty1));
         assertThat(node.getPropertiesByName().get(validIdProperty2.getName()), is(validIdProperty2));
@@ -820,17 +820,17 @@
     // ----------------------------------------------------------------------------------------------------------------
     @Test( expected = AssertionError.class )
     public void shouldPropertyCheckReadPropertiesUsingTestHarness1() {
-        setPropertiesToReadOn(new Location(validPath), validIdProperty1);
+        setPropertiesToReadOn(Location.create(validPath), validIdProperty1);
         graph.getProperties().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath), validIdProperty1, validIdProperty2); // wrong!
+        assertNextRequestReadProperties(Location.create(validPath), validIdProperty1, validIdProperty2); // wrong!
     }
 
     @Test( expected = AssertionError.class )
     public void shouldPropertyCheckReadPropertiesUsingTestHarness2() {
         graph.getProperties().on(validPath);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestReadProperties(new Location(validPath), validIdProperty1, validIdProperty2); // wrong!
+        assertNextRequestReadProperties(Location.create(validPath), validIdProperty1, validIdProperty2); // wrong!
     }
 
     // ----------------------------------------------------------------------------------------------------------------
@@ -863,8 +863,8 @@
     public void shouldMoveNodesThroughMultipleMoveRequests() {
         graph.move(validPath).into(validIdProperty1, validIdProperty2).and().move(validUuid).into(validPathString);
         assertThat(numberOfExecutions, is(2));
-        assertNextRequestIsMove(new Location(validPath), new Location(validIdProperty1, validIdProperty2));
-        assertNextRequestIsMove(new Location(validUuid), new Location(createPath(validPathString)));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validIdProperty1, validIdProperty2));
+        assertNextRequestIsMove(Location.create(validUuid), Location.create(createPath(validPathString)));
         assertNoMoreRequests();
     }
 
@@ -875,7 +875,7 @@
 
         graph.move(validPath).into(validUuid);
         assertThat(numberOfExecutions, is(1));
-        assertNextRequestIsMove(new Location(validPath), new Location(validUuid));
+        assertNextRequestIsMove(Location.create(validPath), Location.create(validUuid));
         assertNoMoreRequests();
     }
 
@@ -946,7 +946,7 @@
                 Name childName = request.desiredName();
                 if (childName == null) childName = createName("child");
                 Path childPath = context.getValueFactories().getPathFactory().create(request.into().getPath(), childName);
-                Location newChild = actualLocationOf(new Location(childPath));
+                Location newChild = actualLocationOf(Location.create(childPath));
                 // Just update the actual location
                 request.setActualLocations(actualLocationOf(request.from()), newChild);
             } else {
@@ -961,7 +961,7 @@
             Location parent = actualLocationOf(request.under()); // just make sure it has a path ...
             Name name = request.named();
             Path childPath = context.getValueFactories().getPathFactory().create(parent.getPath(), name);
-            request.setActualLocationOfNode(new Location(childPath));
+            request.setActualLocationOfNode(Location.create(childPath));
         }
 
         @Override
@@ -1012,7 +1012,7 @@
             String workspaceName = request.workspaceName();
             if (workspaceName == null) workspaceName = "default";
             request.setActualWorkspaceName(workspaceName);
-            request.setActualRootLocation(new Location(context.getValueFactories().getPathFactory().createRootPath()));
+            request.setActualRootLocation(Location.create(context.getValueFactories().getPathFactory().createRootPath()));
         }
 
         @Override
@@ -1021,7 +1021,7 @@
             String workspaceName = request.desiredNameOfNewWorkspace();
             if (workspaceName == null) workspaceName = "default";
             request.setActualWorkspaceName(workspaceName);
-            request.setActualRootLocation(new Location(context.getValueFactories().getPathFactory().createRootPath()));
+            request.setActualRootLocation(Location.create(context.getValueFactories().getPathFactory().createRootPath()));
         }
 
         @Override
@@ -1039,7 +1039,7 @@
             String workspaceName = request.desiredNameOfTargetWorkspace();
             assert workspaceName != null;
             request.setActualWorkspaceName(workspaceName);
-            request.setActualRootLocation(new Location(context.getValueFactories().getPathFactory().createRootPath()));
+            request.setActualRootLocation(Location.create(context.getValueFactories().getPathFactory().createRootPath()));
         }
 
         private Location actualLocationOf( Location location ) {
@@ -1047,7 +1047,7 @@
             if (location.hasPath()) return location;
             // Otherwise, create a new location with an artificial path ...
             Path path = context.getValueFactories().getPathFactory().create("/a/b/c/d");
-            return new Location(path, location.getIdProperties());
+            return Location.create(path, location.getIdProperties());
         }
     }
 

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/RepositorySourceLoadHarness.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/RepositorySourceLoadHarness.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/RepositorySourceLoadHarness.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -217,7 +217,7 @@
                 if (i % 2 == 0) {
                     Thread.yield();
                 }
-                connection.execute(context, new ReadNodeRequest(new Location(RootPath.INSTANCE), "workspace1"));
+                connection.execute(context, new ReadNodeRequest(Location.create(RootPath.INSTANCE), "workspace1"));
                 int int2 = random(this.hashCode() ^ (int)System.nanoTime() + i);
                 total += Math.min(Math.abs(Math.max(int1, int2) + int1 * int2 / 3), count);
             }

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/AbstractConnectorTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/AbstractConnectorTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/AbstractConnectorTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -278,7 +278,7 @@
      * @return the location
      */
     protected Location location( String path ) {
-        return new Location(path(path));
+        return Location.create(path(path));
     }
 
     /**
@@ -288,7 +288,7 @@
      * @return the location
      */
     protected Location location( UUID uuid ) {
-        return new Location(uuid);
+        return Location.create(uuid);
     }
 
     protected UUID getRootNodeUuid() {

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/request/AbstractRequestTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/request/AbstractRequestTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/request/AbstractRequestTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -65,21 +65,21 @@
         Name idProperty2Name = createName("id2");
         Property idProperty1 = context.getPropertyFactory().create(idProperty1Name, "1");
         Property idProperty2 = context.getPropertyFactory().create(idProperty2Name, "2");
-        validPathLocation = new Location(validPath);
-        validUuidLocation = new Location(validUuid);
-        validPropsLocation = new Location(idProperty1, idProperty2);
+        validPathLocation = Location.create(validPath);
+        validUuidLocation = Location.create(validUuid);
+        validPropsLocation = Location.create(idProperty1, idProperty2);
 
-        validPathLocation1 = new Location(validPath);
-        validUuidLocation1 = new Location(validUuid);
-        validPropsLocation1 = new Location(idProperty1, idProperty2);
+        validPathLocation1 = Location.create(validPath);
+        validUuidLocation1 = Location.create(validUuid);
+        validPropsLocation1 = Location.create(idProperty1, idProperty2);
 
         validPath = createPath("/a/c/d");
         validUuid = UUID.randomUUID();
         idProperty1 = context.getPropertyFactory().create(idProperty1Name, "3");
         idProperty2 = context.getPropertyFactory().create(idProperty2Name, "4");
-        validPathLocation2 = new Location(validPath);
-        validUuidLocation2 = new Location(validUuid);
-        validPropsLocation2 = new Location(idProperty1, idProperty2);
+        validPathLocation2 = Location.create(validPath);
+        validUuidLocation2 = Location.create(validUuid);
+        validPropsLocation2 = Location.create(idProperty1, idProperty2);
 
         validProperty1 = context.getPropertyFactory().create(createName("fooProperty"), "foo");
         validProperty2 = context.getPropertyFactory().create(createName("barProperty"), "bar");

Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/xml/XmlHandlerTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/xml/XmlHandlerTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/xml/XmlHandlerTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -441,7 +441,7 @@
             assert path != null;
             Path parent = path.getParent();
             Name child = path.getLastSegment().getName();
-            requests.add(new CreateNodeRequest(new Location(parent), workspace, child, properties));
+            requests.add(new CreateNodeRequest(Location.create(parent), workspace, child, properties));
         }
 
         public void create( final Path path,
@@ -449,7 +449,7 @@
                             final Property... additionalProperties ) {
             Path parent = path.getParent();
             Name child = path.getLastSegment().getName();
-            Location location = new Location(parent);
+            Location location = Location.create(parent);
             if (firstProperty == null) {
                 requests.add(new CreateNodeRequest(location, workspace, child));
             } else {

Modified: trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/FederatingRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/FederatingRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/FederatingRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -299,7 +299,7 @@
         FederatedWorkspace workspace = getWorkspace(request, request.workspaceName());
         if (workspace != null) {
             request.setActualWorkspaceName(workspace.getName());
-            Location root = new Location(getExecutionContext().getValueFactories().getPathFactory().createRootPath());
+            Location root = Location.create(getExecutionContext().getValueFactories().getPathFactory().createRootPath());
             ReadNodeRequest nodeInfo = getNode(root, workspace);
             if (nodeInfo.hasError()) return;
             request.setActualRootLocation(nodeInfo.getActualLocationOfNode());
@@ -385,7 +385,7 @@
                     // Load the nodes along the path below the existing ancestor, down to (but excluding) the desired path
                     Path pathToLoad = ancestor;
                     while (!pathToLoad.equals(lowestExistingAncestor)) {
-                        Location locationToLoad = new Location(pathToLoad);
+                        Location locationToLoad = Location.create(pathToLoad);
                         loadContributionsFromSources(locationToLoad, workspace, null, contributions); // sourceNames may be
                         // null or empty
                         FederatedNode mergedNode = createFederatedNode(locationToLoad, workspace, contributions, true);
@@ -584,14 +584,14 @@
                 // use those to figure out the children of the nodes.
                 Contribution contribution = null;
                 List<Path> topLevelPaths = projection.getTopLevelPathsInRepository(pathFactory);
-                Location input = new Location(path);
+                Location input = Location.create(path);
                 switch (topLevelPaths.size()) {
                     case 0:
                         break;
                     case 1: {
                         Path topLevelPath = topLevelPaths.iterator().next();
                         if (path.isAncestorOf(topLevelPath)) {
-                            Location child = new Location(topLevelPath);
+                            Location child = Location.create(topLevelPath);
                             contribution = Contribution.createPlaceholder(source, workspace, input, expirationTime, child);
                         }
                         break;
@@ -601,7 +601,7 @@
                         List<Location> children = new ArrayList<Location>(topLevelPaths.size());
                         for (Path topLevelPath : topLevelPaths) {
                             if (path.isAncestorOf(topLevelPath)) {
-                                children.add(new Location(topLevelPath));
+                                children.add(Location.create(topLevelPath));
                             }
                         }
                         if (children.size() > 0) {
@@ -618,7 +618,7 @@
                 final int numPaths = pathsInSource.size();
                 if (numPaths == 1) {
                     Path pathInSource = pathsInSource.iterator().next();
-                    ReadNodeRequest fromSource = new ReadNodeRequest(new Location(pathInSource), workspace);
+                    ReadNodeRequest fromSource = new ReadNodeRequest(Location.create(pathInSource), workspace);
                     sourceConnection.execute(getExecutionContext(), fromSource);
                     if (!fromSource.hasError()) {
                         Collection<Property> properties = fromSource.getProperties();
@@ -657,7 +657,7 @@
                 } else {
                     List<Request> fromSourceCommands = new ArrayList<Request>(numPaths);
                     for (Path pathInSource : pathsInSource) {
-                        fromSourceCommands.add(new ReadNodeRequest(new Location(pathInSource), workspace));
+                        fromSourceCommands.add(new ReadNodeRequest(Location.create(pathInSource), workspace));
                     }
                     Request request = CompositeRequest.with(fromSourceCommands);
                     sourceConnection.execute(context, request);
@@ -721,7 +721,7 @@
         Name childName = null;
         if (!path.isRoot()) {
             // This is not the root node, so we need to create the node ...
-            final Location parentLocation = new Location(path.getParent());
+            final Location parentLocation = Location.create(path.getParent());
             childName = path.getLastSegment().getName();
             requests.add(new CreateNodeRequest(parentLocation, cacheWorkspace, childName, NodeConflictBehavior.REPLACE,
                                                mergedNode.getProperties()));

Modified: trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategy.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategy.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/main/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategy.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -110,7 +110,7 @@
                     if (!childNames.containsKey(childName)) {
                         childNames.put(childName, 1);
                         Path pathToChild = pathFactory.create(location.getPath(), childName);
-                        federatedNode.addChild(new Location(pathToChild));
+                        federatedNode.addChild(Location.create(pathToChild));
                     }
                 }
             } else {
@@ -140,7 +140,7 @@
                         index = previousValue;
                     }
                     Path pathToChild = pathFactory.create(location.getPath(), childName, index);
-                    federatedNode.addChild(new Location(pathToChild));
+                    federatedNode.addChild(Location.create(pathToChild));
                 }
 
                 // Add in the properties ...

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatedRepositorySourceIntegrationTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatedRepositorySourceIntegrationTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatedRepositorySourceIntegrationTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -187,7 +187,7 @@
             // locations may have more than just paths. So, create a list of actual locations that just have paths ...
             List<Location> actualPathOnlyChildren = new ArrayList<Location>(childLocations.size());
             for (Location actualChild : childLocations) {
-                actualPathOnlyChildren.add(new Location(actualChild.getPath()));
+                actualPathOnlyChildren.add(Location.create(actualChild.getPath()));
             }
             // Now create the array of expected locations (that each contain only a path) ...
             Location[] expectedChildren = new Location[children.length];
@@ -196,7 +196,7 @@
             for (String child : children) {
                 Path.Segment segment = context.getValueFactories().getPathFactory().createSegment(child);
                 Path childPath = context.getValueFactories().getPathFactory().create(parentPath, segment);
-                expectedChildren[i++] = new Location(childPath);
+                expectedChildren[i++] = Location.create(childPath);
             }
             assertThat(actualPathOnlyChildren, hasItems(expectedChildren));
         }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatingRequestProcessorTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatingRequestProcessorTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/FederatingRequestProcessorTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -263,15 +263,15 @@
 
         Path path = pathFactory.createRootPath();
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(3)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source1.getName()));
         assertThat(contributions.get(1).getSourceName(), is(source2.getName()));
         assertThat(contributions.get(2).getSourceName(), is(source3.getName()));
 
-        Location childA = new Location(pathFactory.create(path, "a"));
-        Location childB = new Location(pathFactory.create(path, "b"));
+        Location childA = Location.create(pathFactory.create(path, "a"));
+        Location childB = Location.create(pathFactory.create(path, "b"));
         assertThat(contributions.get(0).getChildren(), hasItems(childA, childB));
         assertThat(contributions.get(1).getChildren(), hasItems(childA));
         assertThat(contributions.get(2).getChildren(), hasItems(nodeX, nodeB));
@@ -283,7 +283,7 @@
         Iterator<Location> iter = contribution.getChildren();
         for (String childName : childNames) {
             Path expectedChildPath = context.getValueFactories().getPathFactory().create(location.getPath(), childName);
-            Location expectedChild = new Location(expectedChildPath);
+            Location expectedChild = Location.create(expectedChildPath);
             Location next = iter.next();
             if (!next.isSame(expectedChild)) {
                 assertThat(next, is(expectedChild));
@@ -311,7 +311,7 @@
 
         Path path = pathFactory.create("/x/y"); // from source 3
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(3)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source1.getName()));
@@ -324,7 +324,7 @@
 
         path = pathFactory.create("/x"); // from source 3
         contributions.clear();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(3)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source1.getName()));
@@ -383,7 +383,7 @@
 
         Path path = pathFactory.create("/b"); // from source 2 and source 3
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(3)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source1.getName()));
@@ -396,7 +396,7 @@
 
         path = pathFactory.create("/b/by"); // from source 3
         contributions.clear();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(2)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source2.getName()));
@@ -457,7 +457,7 @@
 
         Path path = pathFactory.create("/a"); // from sources 1, 2 and 3
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(3)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source1.getName()));
@@ -470,7 +470,7 @@
 
         path = pathFactory.create("/a/ay"); // from source 3
         contributions.clear();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         assertThat(contributions.size(), is(1)); // order is based upon order of projections
         assertThat(contributions.get(0).getSourceName(), is(source3.getName()));
@@ -481,7 +481,7 @@
     public void shouldFailToLoadNodeFromSourcesWhenTheNodeDoesNotAppearInAnyOfTheSources() throws Exception {
         Path nonExistant = pathFactory.create("/nonExistant/Node/In/AnySource");
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(nonExistant), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(nonExistant), defaultWorkspace, null, contributions);
         // All of the contributions should be empty ...
         for (Contribution contribution : contributions) {
             assertThat(contribution.isEmpty(), is(true));
@@ -539,7 +539,7 @@
 
         Path path = pathFactory.create("/a"); // from sources 1, 2 and 3
         List<Contribution> contributions = new LinkedList<Contribution>();
-        executor.loadContributionsFromSources(new Location(path), defaultWorkspace, null, contributions);
+        executor.loadContributionsFromSources(Location.create(path), defaultWorkspace, null, contributions);
 
         // Check when the contributions expire ...
         DateTime nowInUtc = executor.getCurrentTimeInUtc();

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiChildContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiChildContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiChildContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -71,32 +71,32 @@
         child2 = mock(Location.class);
         child3 = mock(Location.class);
         children = Arrays.asList(child1, child2, child3);
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, children);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, children);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
 
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullChildren() {
         children = null;
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowEmptyChildren() {
         children = Collections.emptyList();
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, children);
     }
 
     @Test
@@ -111,7 +111,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new MultiChildContribution(sourceName, workspaceName, new Location(pathInSource), NOW, children);
+        contribution = new MultiChildContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, children);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiPropertyContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiPropertyContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/MultiPropertyContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -75,14 +75,14 @@
         property2 = new BasicSingleValueProperty(new BasicName(nsUri, "property2"), "value2");
         property3 = new BasicSingleValueProperty(new BasicName(nsUri, "property3"), "value3");
         properties = Arrays.asList(property1, property2, property3);
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      properties);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      properties);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
@@ -90,21 +90,21 @@
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      properties);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullProperties() {
         properties = null;
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      properties);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowEmptyProperties() {
         properties = Collections.emptyList();
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      properties);
     }
 
@@ -120,7 +120,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new MultiPropertyContribution(sourceName, workspaceName, new Location(pathInSource), NOW, properties);
+        contribution = new MultiPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, properties);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/NodeContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/NodeContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/NodeContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -84,14 +84,14 @@
         child2 = mock(Location.class);
         child3 = mock(Location.class);
         children = Arrays.asList(child1, child2, child3);
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
@@ -99,35 +99,35 @@
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullProperties() {
         properties = null;
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowEmptyProperties() {
         properties = Collections.emptyList();
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullChildren() {
         children = null;
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowEmptyChildren() {
         children = Collections.emptyList();
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), expiration, properties,
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, properties,
                                             children);
     }
 
@@ -143,7 +143,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new NodeContribution(sourceName, workspaceName, new Location(pathInSource), NOW, properties, children);
+        contribution = new NodeContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, properties, children);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OneChildContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OneChildContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OneChildContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -62,26 +62,26 @@
         pathInSource = RootPath.INSTANCE;
         expiration = TOMORROW;
         child1 = mock(Location.class);
-        contribution = new OneChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1);
+        contribution = new OneChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new OneChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1);
+        contribution = new OneChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
 
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new OneChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1);
+        contribution = new OneChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullChildren() {
         child1 = null;
-        contribution = new OneChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1);
+        contribution = new OneChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1);
     }
 
     @Test
@@ -96,7 +96,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new OneChildContribution(sourceName, workspaceName, new Location(pathInSource), NOW, child1);
+        contribution = new OneChildContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, child1);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OnePropertyContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OnePropertyContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/OnePropertyContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -67,26 +67,26 @@
         expiration = TOMORROW;
         String nsUri = "http://www.jboss.org/default";
         property1 = new BasicSingleValueProperty(new BasicName(nsUri, "property1"), "value1");
-        contribution = new OnePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1);
+        contribution = new OnePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new OnePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1);
+        contribution = new OnePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
 
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new OnePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1);
+        contribution = new OnePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullFirstProperty() {
         property1 = null;
-        contribution = new OnePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1);
+        contribution = new OnePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1);
     }
 
     @Test
@@ -101,7 +101,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new OnePropertyContribution(sourceName, workspaceName, new Location(pathInSource), NOW, property1);
+        contribution = new OnePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, property1);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/ThreePropertyContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/ThreePropertyContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/ThreePropertyContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -71,14 +71,14 @@
         property1 = new BasicSingleValueProperty(new BasicName(nsUri, "property1"), "value1");
         property2 = new BasicSingleValueProperty(new BasicName(nsUri, "property2"), "value2");
         property3 = new BasicSingleValueProperty(new BasicName(nsUri, "property3"), "value3");
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
@@ -86,28 +86,28 @@
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullFirstProperty() {
         property1 = null;
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullSecondProperty() {
         property2 = null;
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullThirdProperty() {
         property3 = null;
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration,
                                                      property1, property2, property3);
     }
 
@@ -123,7 +123,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new ThreePropertyContribution(sourceName, workspaceName, new Location(pathInSource), NOW, property1,
+        contribution = new ThreePropertyContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, property1,
                                                      property2, property3);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoChildContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoChildContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoChildContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -64,32 +64,32 @@
         expiration = TOMORROW;
         child1 = mock(Location.class);
         child2 = mock(Location.class);
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1, child2);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1, child2);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
 
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1, child2);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullFirstChild() {
         child1 = null;
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1, child2);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullSecondChild() {
         child2 = null;
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), expiration, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, child1, child2);
     }
 
     @Test
@@ -104,7 +104,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new TwoChildContribution(sourceName, workspaceName, new Location(pathInSource), NOW, child1, child2);
+        contribution = new TwoChildContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, child1, child2);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));
     }

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoPropertyContributionTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoPropertyContributionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/contribution/TwoPropertyContributionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -69,14 +69,14 @@
         String nsUri = "http://www.jboss.org/default";
         property1 = new BasicSingleValueProperty(new BasicName(nsUri, "property1"), "value1");
         property2 = new BasicSingleValueProperty(new BasicName(nsUri, "property2"), "value2");
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1,
                                                    property2);
     }
 
     @Test
     public void shouldAllowNullExpiration() {
         expiration = null;
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1,
                                                    property2);
         assertThat(contribution.getExpirationTimeInUtc(), is(nullValue()));
     }
@@ -84,21 +84,21 @@
     @Test( expected = IllegalArgumentException.class )
     public void shouldNotAllowExpirationTimeIfNotInUtcTime() {
         expiration = new JodaDateTime(System.currentTimeMillis(), "CST");
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1,
                                                    property2);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullFirstProperty() {
         property1 = null;
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1,
                                                    property2);
     }
 
     @Test( expected = AssertionError.class )
     public void shouldNotAllowNullSecondProperty() {
         property2 = null;
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), expiration, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), expiration, property1,
                                                    property2);
     }
 
@@ -114,7 +114,7 @@
 
     @Test
     public void shouldNotBeExpiredIfExpirationIsInTheFuture() {
-        contribution = new TwoPropertyContribution(sourceName, workspaceName, new Location(pathInSource), NOW, property1,
+        contribution = new TwoPropertyContribution(sourceName, workspaceName, Location.create(pathInSource), NOW, property1,
                                                    property2);
         assertThat(contribution.isExpired(YESTERDAY), is(false));
         assertThat(contribution.isExpired(TOMORROW), is(true));

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/FederatedNodeTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/FederatedNodeTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/FederatedNodeTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -45,7 +45,7 @@
     @Before
     public void beforeEach() {
         MockitoAnnotations.initMocks(this);
-        location = new Location(mock(Path.class));
+        location = Location.create(mock(Path.class));
         node = new FederatedNode(location, "workspace");
     }
 

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/OneContributionMergeStrategyTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/OneContributionMergeStrategyTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/OneContributionMergeStrategyTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -75,12 +75,12 @@
         context.getNamespaceRegistry().register(DnaLexicon.Namespace.PREFIX, DnaLexicon.Namespace.URI);
         context.getNamespaceRegistry().register(JcrLexicon.Namespace.PREFIX, JcrLexicon.Namespace.URI);
         parentPath = context.getValueFactories().getPathFactory().create("/a/b/c");
-        node = new FederatedNode(new Location(parentPath), "some workspace");
+        node = new FederatedNode(Location.create(parentPath), "some workspace");
         stub(contribution.getSourceName()).toReturn("source name");
         children = new LinkedList<Location>();
         for (int i = 0; i != 10; ++i) {
             Path childPath = context.getValueFactories().getPathFactory().create(parentPath, "a" + i);
-            children.add(new Location(childPath));
+            children.add(Location.create(childPath));
         }
         properties = new HashMap<Name, Property>();
         for (int i = 0; i != 10; ++i) {

Modified: trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategyTest.java
===================================================================
--- trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategyTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-federation/src/test/java/org/jboss/dna/connector/federation/merge/strategy/SimpleMergeStrategyTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -74,7 +74,7 @@
         context.getNamespaceRegistry().register("jcr", "http://www.jcr.org");
         parentPath = context.getValueFactories().getPathFactory().create("/a/b/c");
         workspaceName = "some workspace";
-        node = new FederatedNode(new Location(parentPath), workspaceName);
+        node = new FederatedNode(Location.create(parentPath), workspaceName);
     }
 
     @Test
@@ -202,7 +202,7 @@
     protected Matcher<List<Location>> hasChildLocations( String... childNames ) {
         List<Location> locations = new ArrayList<Location>();
         for (String childName : childNames) {
-            locations.add(new Location(context.getValueFactories().getPathFactory().create(parentPath, childName)));
+            locations.add(Location.create(context.getValueFactories().getPathFactory().create(parentPath, childName)));
         }
         return equalTo(locations);
     }
@@ -211,7 +211,7 @@
         Location[] locations = new Location[childNames.length];
         int index = 0;
         for (String childName : childNames) {
-            locations[index++] = new Location(context.getValueFactories().getPathFactory().create(parentPath, childName));
+            locations[index++] = Location.create(context.getValueFactories().getPathFactory().create(parentPath, childName));
         }
         return IsIteratorContaining.hasItems(locations);
     }
@@ -242,7 +242,7 @@
                                        List<Contribution> contributions ) {
             this.context = context;
             this.mockContribution = Mockito.mock(Contribution.class);
-            stub(mockContribution.getLocationInSource()).toReturn(new Location(parentPath));
+            stub(mockContribution.getLocationInSource()).toReturn(Location.create(parentPath));
             stub(mockContribution.getSourceName()).toReturn(name);
             stub(mockContribution.getChildren()).toAnswer(new Answer<Iterator<Location>>() {
                 public Iterator<Location> answer( InvocationOnMock invocation ) throws Throwable {
@@ -273,7 +273,7 @@
         public ContributionBuilder addChildren( String... pathsForChildren ) {
             for (String childPath : pathsForChildren) {
                 Path path = context.getValueFactories().getPathFactory().create(parentPath, childPath);
-                children.add(new Location(path));
+                children.add(Location.create(path));
             }
             return this;
         }

Modified: trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -148,7 +148,7 @@
             for (String localName : parent.list(filenameFilter)) {
                 Name childName = nameFactory.create(defaultNamespaceUri, localName);
                 Path childPath = pathFactory.create(parentPath, childName);
-                request.addChild(new Location(childPath));
+                request.addChild(Location.create(childPath));
             }
         } else {
             // The parent is a java.io.File, and the path may refer to the node that is either the "nt:file" parent
@@ -156,7 +156,7 @@
             if (!parentPath.getLastSegment().getName().equals(JcrLexicon.CONTENT)) {
                 // This node represents the "nt:file" parent node, so the only child is the "jcr:content" node ...
                 Path contentPath = pathFactory().create(parentPath, JcrLexicon.CONTENT);
-                Location content = new Location(contentPath);
+                Location content = Location.create(contentPath);
                 request.addChild(content);
             }
             // otherwise, the path ends in "jcr:content", and there are no children
@@ -357,7 +357,7 @@
         File directory = new File(workspaceName);
         if (directory.exists() && directory.isDirectory() && directory.canRead()) {
             request.setActualWorkspaceName(getCanonicalWorkspaceName(directory));
-            request.setActualRootLocation(new Location(pathFactory().createRootPath()));
+            request.setActualRootLocation(Location.create(pathFactory().createRootPath()));
         } else {
             request.setError(new InvalidWorkspaceException(FileSystemI18n.workspaceDoesNotExist.text(workspaceName)));
         }
@@ -425,7 +425,7 @@
         File directory = new File(workspaceName);
         if (directory.exists() && directory.isDirectory() && directory.canRead()) {
             request.setActualWorkspaceName(getCanonicalWorkspaceName(directory));
-            request.setActualRootLocation(new Location(pathFactory().createRootPath()));
+            request.setActualRootLocation(Location.create(pathFactory().createRootPath()));
             availableWorkspaceNames.add(workspaceName);
         } else {
             request.setError(new InvalidWorkspaceException(FileSystemI18n.workspaceDoesNotExist.text(workspaceName)));

Modified: trunk/extensions/dna-connector-jbosscache/src/main/java/org/jboss/dna/connector/jbosscache/JBossCacheRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-jbosscache/src/main/java/org/jboss/dna/connector/jbosscache/JBossCacheRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-jbosscache/src/main/java/org/jboss/dna/connector/jbosscache/JBossCacheRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -116,10 +116,10 @@
         Path.Segment[] childList = (Path.Segment[])node.get(JBossCacheLexicon.CHILD_PATH_SEGMENT_LIST);
         if (childList != null) {
             for (Path.Segment child : childList) {
-                request.addChild(new Location(pathFactory.create(nodePath, child)));
+                request.addChild(Location.create(pathFactory.create(nodePath, child)));
             }
         }
-        request.setActualLocationOfNode(new Location(nodePath));
+        request.setActualLocationOfNode(Location.create(nodePath));
         setCacheableInfo(request);
     }
 
@@ -142,7 +142,7 @@
             Property property = propertyFactory.create(propertyName, values);
             request.addProperty(property);
         }
-        request.setActualLocationOfNode(new Location(nodePath));
+        request.setActualLocationOfNode(Location.create(nodePath));
         setCacheableInfo(request);
     }
 
@@ -177,7 +177,7 @@
             node.put(propName, value);
         }
         Path nodePath = pathFactory.create(parent, newSegment);
-        request.setActualLocationOfNode(new Location(nodePath));
+        request.setActualLocationOfNode(Location.create(nodePath));
     }
 
     @Override
@@ -206,7 +206,7 @@
             }
             node.put(propName, value);
         }
-        request.setActualLocationOfNode(new Location(nodePath));
+        request.setActualLocationOfNode(Location.create(nodePath));
     }
 
     @Override
@@ -242,7 +242,7 @@
                                            getExecutionContext());
 
         Path newPath = pathFactory.create(newParentPath, newSegment);
-        request.setActualLocations(new Location(nodePath), new Location(newPath));
+        request.setActualLocations(Location.create(nodePath), Location.create(newPath));
     }
 
     @Override
@@ -255,7 +255,7 @@
         if (node == null) return;
 
         node.getParent().removeChild(node.getFqn().getLastElement());
-        request.setActualLocationOfNode(new Location(nodePath));
+        request.setActualLocationOfNode(Location.create(nodePath));
     }
 
     @Override
@@ -281,7 +281,7 @@
         assert removed;
 
         Path newPath = pathFactory.create(newParentPath, newSegment);
-        request.setActualLocations(new Location(nodePath), new Location(newPath));
+        request.setActualLocations(Location.create(nodePath), Location.create(newPath));
     }
 
     /**
@@ -305,7 +305,7 @@
                 uuid = uuidFactory.create();
                 cache.put(rootName, DnaLexicon.UUID, uuid);
             }
-            request.setActualRootLocation(new Location(pathFactory.createRootPath()));
+            request.setActualRootLocation(Location.create(pathFactory.createRootPath()));
             request.setActualWorkspaceName(workspaceName);
         }
     }
@@ -347,7 +347,7 @@
             uuid = uuidFactory.create();
             cache.put(rootName, DnaLexicon.UUID, uuid);
         }
-        request.setActualRootLocation(new Location(pathFactory.createRootPath()));
+        request.setActualRootLocation(Location.create(pathFactory.createRootPath()));
         request.setActualWorkspaceName(workspaceName);
     }
 
@@ -482,7 +482,7 @@
                     fqn = null;
                 }
             }
-            request.setError(new PathNotFoundException(new Location(path), lowestExisting,
+            request.setError(new PathNotFoundException(Location.create(path), lowestExisting,
                                                        JBossCacheConnectorI18n.nodeDoesNotExist.text(nodePath)));
             node = null;
         }

Modified: trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/BasicRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -265,7 +265,7 @@
         String parentUuid = null;
         ChildEntity parentEntity = null;
         if (parent == null) {
-            return new Location(pathFactory.createRootPath(), UUID.fromString(childUuid));
+            return Location.create(pathFactory.createRootPath(), UUID.fromString(childUuid));
         }
         parentPath = parent.location.getPath();
         parentUuid = parent.uuid;
@@ -357,7 +357,7 @@
 
         // Set the actual path, regardless of the supplied path...
         Path path = pathFactory.create(parentPath, childName, nextSnsIndex);
-        Location actualLocation = new Location(path, UUID.fromString(childUuid));
+        Location actualLocation = Location.create(path, UUID.fromString(childUuid));
 
         // Finally, update the cache with the information we know ...
         if (childrenOfParent != null) {
@@ -515,7 +515,7 @@
             int sns = child.getSameNameSiblingIndex();
             Path childPath = pathFactory.create(parentPath, childName, sns);
             String childUuidString = child.getId().getChildUuidString();
-            Location childLocation = new Location(childPath, UUID.fromString(childUuidString));
+            Location childLocation = Location.create(childPath, UUID.fromString(childUuidString));
             childLocations.add(childLocation);
         }
         // Update the cache ...
@@ -572,7 +572,7 @@
                     int sns = child.getSameNameSiblingIndex();
                     Path childPath = pathFactory.create(parentPath, childName, sns);
                     String childUuidString = child.getId().getChildUuidString();
-                    Location childLocation = new Location(childPath, UUID.fromString(childUuidString));
+                    Location childLocation = Location.create(childPath, UUID.fromString(childUuidString));
                     request.addChild(childLocation);
                 }
                 // Do not update the cache, since we don't know all of the children.
@@ -668,7 +668,7 @@
                         int sns = child.getSameNameSiblingIndex();
                         Path childPath = pathFactory.create(parentPath, childName, sns);
                         String childUuidString = child.getId().getChildUuidString();
-                        Location childLocation = new Location(childPath, UUID.fromString(childUuidString));
+                        Location childLocation = Location.create(childPath, UUID.fromString(childUuidString));
                         request.addChild(childLocation);
                         if (allChildren != null) {
                             // We're going to cache the results, so add this child ...
@@ -1015,7 +1015,7 @@
                     assert children != null;
                     Path childPath = pathFactory.create(parent, childName, sns);
                     String childUuidString = child.getId().getChildUuidString();
-                    Location childLocation = new Location(childPath, UUID.fromString(childUuidString));
+                    Location childLocation = Location.create(childPath, UUID.fromString(childUuidString));
                     locationsByUuid.put(childUuidString, childLocation);
                     children.add(childLocation);
                 }
@@ -1285,7 +1285,7 @@
                     Map<Location, List<Reference>> invalidRefs = new HashMap<Location, List<Reference>>();
                     for (ReferenceEntity entity : invalidReferences) {
                         UUID fromUuid = UUID.fromString(entity.getId().getFromUuidString());
-                        ActualLocation actualFromLocation = getActualLocation(workspaceId, new Location(fromUuid));
+                        ActualLocation actualFromLocation = getActualLocation(workspaceId, Location.create(fromUuid));
                         Location fromLocation = actualFromLocation.location;
                         List<Reference> refs = invalidRefs.get(fromLocation);
                         if (refs == null) {
@@ -1441,7 +1441,7 @@
         if (workspace != null) {
             Long workspaceId = workspace.getId();
             assert workspaceId != null;
-            ActualLocation actual = getActualLocation(workspaceId, new Location(pathFactory.createRootPath()));
+            ActualLocation actual = getActualLocation(workspaceId, Location.create(pathFactory.createRootPath()));
             request.setActualRootLocation(actual.location);
             request.setActualWorkspaceName(workspace.getName());
         }
@@ -1494,7 +1494,7 @@
         WorkspaceEntity entity = workspaces.create(name);
         request.setActualWorkspaceName(entity.getName());
         // Create the root node ...
-        Location root = new Location(pathFactory.createRootPath());
+        Location root = Location.create(pathFactory.createRootPath());
         request.setActualRootLocation(getActualLocation(entity.getId(), root).location);
     }
 
@@ -1592,7 +1592,7 @@
         }
 
         // Finish up the request ...
-        Location root = new Location(pathFactory.createRootPath(), rootNodeUuid);
+        Location root = Location.create(pathFactory.createRootPath(), rootNodeUuid);
         request.setActualRootLocation(getActualLocation(intoWorkspace.getId(), root).location);
     }
 
@@ -1688,7 +1688,7 @@
                     for (ReferenceEntity entity : references) {
                         ReferenceId id = entity.getId();
                         UUID fromUuid = UUID.fromString(id.getFromUuidString());
-                        Location location = new Location(fromUuid);
+                        Location location = Location.create(fromUuid);
                         location = getActualLocation(id.getWorkspaceId(), location).location;
                         List<Reference> refs = invalidRefs.get(location);
                         if (refs == null) {
@@ -1778,7 +1778,7 @@
         // See if the reference is by UUID ...
         try {
             UUID uuid = uuidFactory.create(reference);
-            ActualLocation actualLocation = getActualLocation(workspaceId, new Location(uuid));
+            ActualLocation actualLocation = getActualLocation(workspaceId, Location.create(uuid));
             return actualLocation.uuid;
         } catch (ValueFormatException e) {
             // Unknown kind of reference, which we don't track
@@ -1860,7 +1860,7 @@
                 }
             }
             Path fullPath = pathFactory.createAbsolutePath(segments);
-            Location newLocation = new Location(fullPath, uuidProperty);
+            Location newLocation = Location.create(fullPath, uuidProperty);
             cache.addNewNode(workspaceId, newLocation);
             return new ActualLocation(newLocation, nodeUuidString, originalEntity);
         }

Modified: trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/SubgraphQuery.java
===================================================================
--- trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/SubgraphQuery.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-store-jpa/src/main/java/org/jboss/dna/connector/store/jpa/model/basic/SubgraphQuery.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -272,7 +272,7 @@
         pathByUuid.put(subgraphRootUuid, subgraphRootPath);
         UUID uuid = UUID.fromString(subgraphRootUuid);
         if (includeRoot) {
-            locations.add(new Location(subgraphRootPath, uuid));
+            locations.add(Location.create(subgraphRootPath, uuid));
         }
 
         // Now iterate over the child nodes in the subgraph (we've already included the root) ...
@@ -290,7 +290,7 @@
             String childUuid = entity.getId().getChildUuidString();
             pathByUuid.put(childUuid, childPath);
             uuid = UUID.fromString(childUuid);
-            locations.add(new Location(childPath, uuid));
+            locations.add(Location.create(childPath, uuid));
 
         }
         return locations;

Modified: trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/util/RequestProcessorCacheTest.java
===================================================================
--- trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/util/RequestProcessorCacheTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/util/RequestProcessorCacheTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -68,30 +68,30 @@
         workspaceId = 10L;
 
         Path parent = pathFactory.create("/a/b/c");
-        location = new Location(parent, UUID.randomUUID());
-        children = new Location[] {new Location(pathFactory.create(parent, "d1"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "d2"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "d3"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "d4"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("e"), 1), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("e"), 2), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("e"), 3), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("e"), 4), UUID.randomUUID())};
+        location = Location.create(parent, UUID.randomUUID());
+        children = new Location[] {Location.create(pathFactory.create(parent, "d1"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "d2"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "d3"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "d4"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("e"), 1), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("e"), 2), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("e"), 3), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("e"), 4), UUID.randomUUID())};
         childrenList = new LinkedList<Location>();
         for (Location loc : children) {
             childrenList.add(loc);
         }
 
         parent = pathFactory.create("/a/b/c/e[2]");
-        location2 = new Location(parent, children[5].getUuid());
-        children2 = new Location[] {new Location(pathFactory.create(parent, "f1"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "f2"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "f3"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, "f4"), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("g"), 1), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("g"), 2), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("g"), 3), UUID.randomUUID()),
-            new Location(pathFactory.create(parent, name("g"), 4), UUID.randomUUID())};
+        location2 = Location.create(parent, children[5].getUuid());
+        children2 = new Location[] {Location.create(pathFactory.create(parent, "f1"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "f2"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "f3"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, "f4"), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("g"), 1), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("g"), 2), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("g"), 3), UUID.randomUUID()),
+            Location.create(pathFactory.create(parent, name("g"), 4), UUID.randomUUID())};
         childrenList2 = new LinkedList<Location>();
         for (Location loc : children2) {
             childrenList2.add(loc);
@@ -169,7 +169,7 @@
         // The cache knows about the children of "/a/b/c" and "/a/b/c/e[2]".
         // This test moves "/a/b/c/e[2]" into "/a/b/c/d3"
         Location oldLocation = location2;
-        Location newLocation = new Location(pathFactory.create("/a/b/c/d3/e[1]"));
+        Location newLocation = Location.create(pathFactory.create("/a/b/c/d3/e[1]"));
         assertThat(oldLocation.getPath().getString(namespaces), is("/a/b/c/e[2]"));
         assertThat(newLocation.getPath().getString(namespaces), is("/a/b/c/d3/e[1]"));
         cache.addNewNode(workspaceId, location);
@@ -294,7 +294,7 @@
         // The cache knows about the children of "/a/b/c" and "/a/b/c/e[2]".
         // This test removes "/a/b/c/e[2]"
         Location oldLocation = location2;
-        Location newLocation = new Location(pathFactory.create("/a/b/c/d3/e[1]"));
+        Location newLocation = Location.create(pathFactory.create("/a/b/c/d3/e[1]"));
         assertThat(oldLocation.getPath().getString(namespaces), is("/a/b/c/e[2]"));
         assertThat(newLocation.getPath().getString(namespaces), is("/a/b/c/d3/e[1]"));
         cache.addNewNode(workspaceId, location);
@@ -359,9 +359,9 @@
         for (Location childLocation : children2) {
             locationsToRemove.add(childLocation);
         }
-        locationsToRemove.add(new Location(pathFactory.create(children2[6].getPath(), "m1")));
-        locationsToRemove.add(new Location(pathFactory.create(children2[6].getPath(), "m2")));
-        locationsToRemove.add(new Location(pathFactory.create(children2[6].getPath(), "m3")));
+        locationsToRemove.add(Location.create(pathFactory.create(children2[6].getPath(), "m1")));
+        locationsToRemove.add(Location.create(pathFactory.create(children2[6].getPath(), "m2")));
+        locationsToRemove.add(Location.create(pathFactory.create(children2[6].getPath(), "m3")));
 
         // Remove the branch ...
         assertThat(cache.removeBranch(workspaceId, locationsToRemove), is(true));

Modified: trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -216,7 +216,7 @@
                     Name childName = nameFactory().create(defaultNamespaceUri, localName);
                     String url = entry.getURL().toString();
                     Property idProperty = propertyFactory().create(childName, url);
-                    request.addChild(new Location(pathFactory().create(nodePath, JcrLexicon.CONTENT), idProperty));
+                    request.addChild(Location.create(pathFactory().create(nodePath, JcrLexicon.CONTENT), idProperty));
                 }
             } else if (kind == SVNNodeKind.DIR) { // the requested node is a directory.
                 final Collection<SVNDirEntry> dirEntries = getRepository().getDir(requestedNodePath,
@@ -231,7 +231,7 @@
                             Name childName = nameFactory().create(defaultNamespaceUri, localName);
                             String url = dirEntry.getURL().toString();
                             Property idProperty = propertyFactory().create(childName, url);
-                            Location location = new Location(pathFactory().create(newPath, JcrLexicon.CONTENT), idProperty);
+                            Location location = Location.create(pathFactory().create(newPath, JcrLexicon.CONTENT), idProperty);
                             request.addChild(location);
                         }
                     } else if (dirEntry.getKind() == SVNNodeKind.DIR) {
@@ -373,7 +373,7 @@
         // This does the job of converting a null workspace name to a valid workspace
         String workspaceName = request.workspaceName();
         if (workspaceName == null) workspaceName = "default";
-        request.setActualRootLocation(new Location(pathFactory().createRootPath()));
+        request.setActualRootLocation(Location.create(pathFactory().createRootPath()));
         request.setActualWorkspaceName(workspaceName);
     }
 
@@ -531,11 +531,11 @@
             kind = getRepository().checkPath(myPath, -1);
             if (kind == SVNNodeKind.NONE) {
                 // node does not exist or requested node is not correct.
-                throw new PathNotFoundException(new Location(requestedPath), null,
+                throw new PathNotFoundException(Location.create(requestedPath), null,
                                                 SVNRepositoryConnectorI18n.nodeDoesNotExist.text(myPath));
             } else if (kind == SVNNodeKind.UNKNOWN) {
                 // node is unknown
-                throw new PathNotFoundException(new Location(requestedPath), null,
+                throw new PathNotFoundException(Location.create(requestedPath), null,
                                                 SVNRepositoryConnectorI18n.nodeIsActuallyUnknow.text(myPath));
             }
         } catch (SVNException e) {

Modified: trunk/extensions/dna-connector-svn/src/test/java/org/jboss/dna/connector/svn/SVNRepositoryConnectionTest.java
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/java/org/jboss/dna/connector/svn/SVNRepositoryConnectionTest.java	2009-02-20 15:40:37 UTC (rev 730)
+++ trunk/extensions/dna-connector-svn/src/test/java/org/jboss/dna/connector/svn/SVNRepositoryConnectionTest.java	2009-02-20 16:20:00 UTC (rev 731)
@@ -222,7 +222,7 @@
     @Test
     public void shouldNotHaveProperties() {
         // Root location does not need properties.
-        Location root = new Location(pathFactory.create("/"));
+        Location root = Location.create(pathFactory.create("/"));
         Collection<Property> nilProperties = graph.getProperties().on(root);
         assertThat(nilProperties, is(notNullValue()));
         assertThat(nilProperties.isEmpty(), is(true));
@@ -231,7 +231,7 @@
     @Test
     public void shouldJustCatchThePropertiesOnLocation() {
         // directory nodeA has "jcr:primaryType" with value "nt:folder" and also "jcr:created" with value folder created date
-        Location nodeA = new Location(pathFactory.create("/nodeA"));
+        Location nodeA = Location.create(pathFactory.create("/nodeA"));
         Collection<Property> nodeAProperties = graph.getProperties().on(nodeA);
         assertThat(nodeAProperties, is(notNullValue()));
         assertThat(nodeAProperties.isEmpty(), is(false));
@@ -239,7 +239,7 @@
 
         // file itemA.txt has "jcr:primaryType" property whose value is "nt:file" and also "jcr:created" with value folder created
         // date
-        Location itemA1 = new Location(pathFactory.create("/nodeA/itemA1.txt"));
+        Location itemA1 = Location.create(pathFactory.create("/nodeA/itemA1.txt"));
         Collection<Property> itemA1Properties = graph.getProperties().on(itemA1);
         assertThat(itemA1Properties, is(notNullValue()));
         assertThat(itemA1Properties.isEmpty(), is(false));
@@ -250,7 +250,7 @@
         // "jcr:data" property whose value are the contents of the file
         // and a few other properties, like "jcr:encoding", "jcr:mimeType" and "jcr:lastModified" and
         // also "jcr:created" property
-        Location content = new Location(pathFactory.create("/nodeA/itemA2.txt/jcr:content"));
+        Location content = Location.create(pathFactory.create("/nodeA/itemA2.txt/jcr:content"));
         Collection<Property> itemA2ContentProperties = graph.getProperties().on(content);
         assertThat(itemA2ContentProperties, is(notNullValue()));
         assertThat(itemA2ContentProperties.isEmpty(), is(false));




More information about the dna-commits mailing list