return "(childCount " + childCount.getSelectorName() + ")";
}
};
}
if (operand instanceof NodeId) {
final NodeId nodeId = (NodeId)operand;
final int indexInRow = columns.getSelectorIndex(nodeId.getSelectorName());
final NodeCache cache = context.getNodeCache(sources.getWorkspaceName());
final NodeKey root = cache.getRootKey();
final TypeFactory<?> stringType = context.getTypeSystem().getStringFactory();
return new ExtractFromRow() {
@Override
public TypeFactory<?> getType() {
return stringType; // ID is always a string type
}
@Override
public Object getValueInRow( RowAccessor row ) {
CachedNode node = row.getNode(indexInRow);
if (node == null) return null;
return sources.getIdentifier(node, root);
}
@Override
public String toString() {
return "(nodeId " + nodeId.getSelectorName() + ")";
}
};
}
if (operand instanceof NodePath) {
final NodePath nodePath = (NodePath)operand;