Closed palagdan closed 3 months ago
@palagdan I am merging this as I understand it only as REFACTORING of code. It does not change any functionality.
@blcham I refactored the toString() method to separate it into a utility class and used this method to insert the fields of evidences into the ValidationException map. So it inserts literals in readable form as shown in logs #76 For example, instead of inserting NUM^^xsd:int, it now directly inserts "Num" into the evidence field.
evidenceMap.put(varName, RDFNodeUtils.toString(value));
@palagdan Ohhhh ... I missed that ... it was misleading that you call this issue refactor. I reserve word refactor to do changes that does not effect functionality.
evidenceMap.put(varName, RDFNodeUtils.toString(value));
This is not correct way to solve the issue. We do not want to change data that are outputted by RDF, we want to change @context instead.
Thus please, revert this line back, while have a look at my proposal at https://github.com/kbss-cvut/s-pipes/issues/265 . The goal here is output correct RDF and its shape = JSON-LD as well so it looks like classical JSON just with additional @context. But it is important that we do not change initial RDF data just because we want to have nicer JSON.
Sorry, it was a misunderstanding. I thought it would solve the issue with the output of the evidence.
Resolves #263