public List<Location> getChildren() { List<Location> children = request.getChildren(location); if (children == null) children = NO_CHILDREN; return children; }
public Location next() { // Add the children of the next node to the queue ... Location next = queue.poll(); if (next == null) throw new NoSuchElementException(); List<Location> children = getChildren(next); if (children != null && children.size() > 0) { // We should only add the children if they are nodes in the branch, so check the first one... Location firstChild = children.get(0); if (includes(firstChild)) queue.addAll(0, children); } return next; }
List<Location> existing = request.getChildren(parent); if (existing == null) existing = new ArrayList<Location>(children.size()); for (Location child : children) { if (children != null) { List<Location> existing = request.getChildren(parentInFederation); if (existing == null) existing = new ArrayList<Location>(children.size()); for (Location child : children) {
for (Location child : readSubgraph.getChildren(topNode)) { for (Location child : readSubgraph.getChildren(location)) { if (!readSubgraph.includes(child)) { if (!recordedParentLocation) {
/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.ReadBranchRequest) */ @Override public void process( ReadBranchRequest request ) { CacheableRequest source = (CacheableRequest)federatedRequest.getFirstProjectedRequest().getRequest(); if (checkErrorOrCancel(request, source)) return; if (RequestType.READ_BRANCH == source.getType()) { ReadBranchRequest readSource = (ReadBranchRequest)source; request.setActualLocationOfNode(readSource.getActualLocationOfNode()); for (Location node : readSource) { List<Location> children = readSource.getChildren(node); if (children != null) request.setChildren(node, children); Map<Name, Property> props = readSource.getPropertiesFor(node); if (props != null) request.setProperties(node, props.values()); } } else if (RequestType.READ_NODE == source.getType()) { ReadNodeRequest readSource = (ReadNodeRequest)source; request.setActualLocationOfNode(readSource.getActualLocationOfNode()); Location parent = readSource.getActualLocationOfNode(); request.setChildren(parent, readSource.getChildren()); request.setProperties(parent, readSource.getPropertiesByName().values()); } request.setCachePolicy(getDefaultCachePolicy()); setCacheableInfo(request, source.getCachePolicy()); }
ReadBranchRequest readFromSource = (ReadBranchRequest)fromSource; for (Location parent : readFromSource) { List<Location> children = readFromSource.getChildren(parent); Map<Name, Property> properties = readFromSource.getPropertiesFor(parent); projectToFederated(actualLocation, projection, request, parent, children, properties);
node = getOrCreateNode(location, expires); node.setProperties(readBranch.getPropertiesFor(location)); node.setChildren(readBranch.getChildren(location));
node = getOrCreateNode(location, expires); node.setProperties(readBranch.getPropertiesFor(location)); node.setChildren(readBranch.getChildren(location));