/**
  * {@inheritDoc}
  *
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (obj == this) return true;
   if (this.getClass().isInstance(obj)) {
     ReadAllPropertiesRequest that = (ReadAllPropertiesRequest) obj;
     if (!this.at().isSame(that.at())) return false;
     if (!this.inWorkspace().equals(that.inWorkspace())) return false;
     return true;
   }
   return false;
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.ReadAllPropertiesRequest)
  */
 @Override
 public void process(ReadAllPropertiesRequest request) {
   if (request == null) return;
   try {
     Workspace workspace = workspaceFor(request.inWorkspace());
     Node node = workspace.node(request.at());
     Location actualLocation = workspace.locationFor(node);
     request.setActualLocationOfNode(actualLocation);
     // Read the properties ...
     for (PropertyIterator iter = node.getProperties(); iter.hasNext(); ) {
       request.addProperty(workspace.propertyFor(iter.nextProperty()));
     }
     // Add in the 'jcr:uuid' property ...
     if (actualLocation.hasIdProperties()) {
       request.addProperty(workspace.propertyFor(ModeShapeLexicon.UUID, actualLocation.getUuid()));
     }
     // Get the number of children ...
     NodeIterator childIter = node.getNodes();
     int numChildren = (int) childIter.getSize();
     if (numChildren == -1) {
       numChildren = 0;
       while (childIter.hasNext()) {
         childIter.nextNode();
         ++numChildren;
       }
     }
     request.setNumberOfChildren(numChildren);
     setCacheableInfo(request);
   } catch (Throwable e) {
     request.setError(e);
   }
 }