use of org.apache.clerezza.rdf.core.sparql.query.Variable in project stanbol by apache.
the class NumericVariableAtom method adapt.
@SuppressWarnings("unchecked")
@Override
public <T> T adapt(RuleAtom ruleAtom) throws RuleAtomCallExeption, UnavailableRuleObjectException, UnsupportedTypeForExportException {
org.apache.stanbol.rules.manager.atoms.NumericVariableAtom tmp = (org.apache.stanbol.rules.manager.atoms.NumericVariableAtom) ruleAtom;
String variableName = tmp.getVariableName();
Variable variable = new Variable(variableName);
return (T) new ClerezzaSparqlObject(variable);
}
use of org.apache.clerezza.rdf.core.sparql.query.Variable in project stanbol by apache.
the class ResultSetToXml method createResultElement.
private void createResultElement(SolutionMapping solutionMap, Element results, Document doc) {
Set<Variable> keys = solutionMap.keySet();
Element result = doc.createElement("result");
results.appendChild(result);
for (Variable key : keys) {
Element bindingElement = doc.createElement("binding");
bindingElement.setAttribute("name", key.getName());
bindingElement.appendChild(createValueElement(solutionMap.get(key), doc));
result.appendChild(bindingElement);
}
}
Aggregations