ert.setRecordSchema("default");
response.setEchoedSearchRetrieveRequest(ert);
}
private OperandType toOperandType(CQLNode node) {
OperandType ot=new OperandType();
if(node instanceof CQLBooleanNode) {
CQLBooleanNode cbn=(CQLBooleanNode)node;
TripleType tt=new TripleType();
if(cbn instanceof CQLAndNode)
tt.set_boolean(new BooleanType("and", null));
else if(cbn instanceof CQLOrNode)
tt.set_boolean(new BooleanType("or", null));
else if(cbn instanceof CQLNotNode)
tt.set_boolean(new BooleanType("not", null));
else tt.set_boolean(new BooleanType("prox", null));
tt.setLeftOperand(toOperandType(cbn.left));
tt.setRightOperand(toOperandType(cbn.right));
ot.setTriple(tt);
}
else if(node instanceof CQLTermNode) {
CQLTermNode ctn=(CQLTermNode)node;
SearchClauseType sct=new SearchClauseType();
sct.setIndex(getQualifier(ctn));
RelationType rt=new RelationType();
rt.setValue(ctn.getRelation().getBase());
sct.setRelation(rt);
sct.setTerm(ctn.getTerm());
ot.setSearchClause(sct);
}
else {
log.error("Found a node on the parse tree of type: "+node);
}
return ot;