Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor RDFNode to string to separate utils class #264

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

palagdan
Copy link
Collaborator

Resolves #263

@palagdan palagdan requested a review from blcham August 20, 2024 11:31
@blcham
Copy link
Contributor

blcham commented Aug 21, 2024

@palagdan I am merging this as I understand it only as REFACTORING of code. It does not change any functionality.

@blcham blcham merged commit eecdce1 into main Aug 21, 2024
2 checks passed
@blcham blcham deleted the 263-refactor-rdfnode-output branch August 21, 2024 07:57
@palagdan
Copy link
Collaborator Author

palagdan commented Aug 21, 2024

@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));

@blcham
Copy link
Contributor

blcham commented Aug 21, 2024

@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.

@blcham
Copy link
Contributor

blcham commented Aug 21, 2024

Thus please, revert this line back, while have a look at my proposal at #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.

@palagdan
Copy link
Collaborator Author

palagdan commented Aug 21, 2024

Sorry, it was a misunderstanding. I thought it would solve the issue with the output of the evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor toString method to separate Utils Class for converting RDFNode values to the readable string
2 participants