return selectPath(source, selector1Name);
}
String selector2Name = joinCondition.getSelector2Name().getName();
return selectPath(source, selector2Name);
} else if (condition instanceof DescendantNodeJoinCondition) {
DescendantNodeJoinCondition joinCondition = (DescendantNodeJoinCondition)condition;
String ancestorSelectorName = joinCondition.getAncestorSelectorName().getName();
if (source.getColumns().hasSelector(ancestorSelectorName)) {
return selectPath(source, ancestorSelectorName);
}
String descendantSelectorName = joinCondition.getDescendantSelectorName().getName();
return selectPath(source, descendantSelectorName);
} else if (condition instanceof EquiJoinCondition) {
EquiJoinCondition joinCondition = (EquiJoinCondition)condition;
SelectorName selector1Name = joinCondition.getSelector1Name();
String propName1 = joinCondition.getProperty1Name();
if (source.getColumns().hasSelector(selector1Name.getName())) {
return selectValue(source, selector1Name, propName1);
}
SelectorName selector2Name = joinCondition.getSelector2Name();
String propName2 = joinCondition.getProperty2Name();
return selectValue(source, selector2Name, propName2);
}
throw new IllegalArgumentException();
}