Closed palagdan closed 2 months ago
I changed the for loop to traverse through all variables(not in solution, in resultSet), but I found out that lastName is empty.
ResultSet rs = execution.execSelect();
constraintViolated = rs.hasNext();
if(constraintViolated){
for(int i = 0; i < ExecutionConfig.getEvidenceNumber() && rs.hasNext(); i++){
QuerySolution solution = rs.next() ;
Map<String, RDFNode> evidenceMap = new LinkedHashMap<>();
for (String varName : rs.getResultVars()) {
RDFNode value = solution.get(varName);
if (value != null) {
evidenceMap.put(varName, value);
} else {
evidenceMap.put(varName, model.createLiteral(""));
}
}
evidences.add(evidenceMap);
}
}
see my comment in PR https://github.com/kbss-cvut/s-pipes/pull/270
In the constraint-validation example, after the pipeline fails, the ValidationConstraintFailedException does not contain lastName due to strange bindings.