use of org.apache.clerezza.rdf.core.sparql.query.UnaryOperation in project stanbol by apache.
the class NotAtom method adapt.
@SuppressWarnings("unchecked")
@Override
public <T> T adapt(RuleAtom ruleAtom) throws RuleAtomCallExeption, UnavailableRuleObjectException, UnsupportedTypeForExportException {
org.apache.stanbol.rules.manager.atoms.LowerCaseAtom tmp = (org.apache.stanbol.rules.manager.atoms.LowerCaseAtom) ruleAtom;
StringFunctionAtom argument = tmp.getStringFunctionAtom();
ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument, ConstructQuery.class);
List<Expression> argumentExpressions = new ArrayList<Expression>();
argumentExpressions.add((Expression) argument1.getClerezzaObject());
BuiltInCall builtInCall = new BuiltInCall("BOUND", argumentExpressions);
UnaryOperation unaryOperation = new UnaryOperation("!", builtInCall);
return (T) new ClerezzaSparqlObject(unaryOperation);
}
Aggregations