this.builder = new QueryBuilder(this.typeSystem);
}
public QueryCommand createQuery( Component xpath ) {
if (xpath instanceof BinaryComponent) {
BinaryComponent binary = (BinaryComponent)xpath;
if (binary instanceof Union) {
createQuery(binary.getLeft());
builder.union();
createQuery(binary.getRight());
return builder.query();
} else if (binary instanceof Intersect) {
createQuery(binary.getLeft());
builder.intersect();
createQuery(binary.getRight());
return builder.query();
} else if (binary instanceof Except) {
createQuery(binary.getLeft());
builder.except();
createQuery(binary.getRight());
return builder.query();
}
} else if (xpath instanceof PathExpression) {
translate((PathExpression)xpath);
return builder.query();