use of org.apache.jackrabbit.oak.namepath.PathTracker in project jackrabbit-oak by apache.
the class QueueingHandler method aggregate.
private AggregationResult aggregate(String name, NodeState node, IdentifierTracker childTracker) {
int aggregationLevel = 0;
if (aggregator != null) {
aggregationLevel = aggregator.aggregate(root, parents, new MemoryChildNodeEntry(name, node));
}
if (aggregationLevel <= 0) {
// no aggregation
return new AggregationResult(name, childTracker, getPrimaryType(node), getMixinTypes(node), pathTracker);
} else {
QueueingHandler handler = this;
IdentifierTracker tracker = childTracker;
String primaryType = null;
Iterable<String> mixinTypes = null;
PathTracker pathTracker = null;
String childName = null;
for (int i = 0; i < aggregationLevel; i++) {
if (i > 0) {
name = childName + "/" + name;
}
tracker = handler.identifierTracker;
primaryType = handler.parentType;
mixinTypes = handler.parentMixins;
pathTracker = handler.pathTracker;
childName = handler.name;
handler = handler.parent;
}
return new AggregationResult(name, tracker, primaryType, mixinTypes, pathTracker);
}
}
Aggregations