* among the column names of the query result table.
* @throws RepositoryException if another error occurs.
*/
public Value getValue(String columnName) throws ItemNotFoundException, RepositoryException {
try {
ColumnImpl col = columns.get(columnName);
if (col == null) {
if (isExcerptFunction(columnName)) {
// excerpt function with parameter
return getExcerpt(columnName);
} else {
throw new ItemNotFoundException(columnName);
}
}
Node n = getNode(col.getSelectorName());
if (n == null) {
return null;
}
if (NameConstants.JCR_PATH.equals(col.getPropertyQName())) {
int idx = getSelectorIndex(col.getSelectorName());
QValue p = valueFactory.getQValueFactory().create(hmgr.getPath(sn[idx].getNodeId()));
return valueFactory.createValue(p);
} else if (n.hasProperty(col.getPropertyName())) {
Property p = n.getProperty(col.getPropertyName());
if (p.getDefinition().isMultiple()) {
// mvp values cannot be returned
return null;
} else {
if (p.getDefinition().getRequiredType() == PropertyType.UNDEFINED) {