return "(uppercase " + delegate + ")";
}
};
}
if (operand instanceof NodeDepth) {
final NodeDepth nodeDepth = (NodeDepth)operand;
final int indexInRow = columns.getSelectorIndex(nodeDepth.getSelectorName());
final NodeCache cache = context.getNodeCache(sources.getWorkspaceName());
final TypeFactory<?> longType = context.getTypeSystem().getLongFactory();
return new ExtractFromRow() {
@Override
public TypeFactory<?> getType() {
return longType; // depth is always a long type
}
@Override
public Object getValueInRow( RowAccessor row ) {
CachedNode node = row.getNode(indexInRow);
if (node == null) return null;
return new Long(node.getDepth(cache));
}
@Override
public String toString() {
return "(nodeDepth " + nodeDepth.getSelectorName() + ")";
}
};
}
if (operand instanceof ChildCount) {
final ChildCount childCount = (ChildCount)operand;