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

Fix construct-matched-person lastName binding #270

Merged
merged 5 commits into from
Sep 12, 2024
Merged

Conversation

palagdan
Copy link
Collaborator

@palagdan palagdan commented Sep 2, 2024

Resolves #269

@palagdan palagdan requested a review from blcham September 2, 2024 14:28
@palagdan
Copy link
Collaborator Author

palagdan commented Sep 2, 2024

@blcham
I tried using different variables for lastName in the inner and outer queries, and it worked. I’m not sure why this makes a difference. Do you have any suggestions?

Screenshot from 2024-09-02 16-37-05

@palagdan
Copy link
Collaborator Author

palagdan commented Sep 2, 2024

@blcham

I worked on the JSON-LD output and identified several issues that I want to explain below:

  1. RDFNode as a Resource: If the RDFNode is a resource, I added "@type": "@id". This change addresses an error I encountered on the frontend, where I needed to retrieve just a URI but instead received a nested object with @id.

    Screenshot from 2024-09-02 19-43-57

    Now, it does not nest the object and resolves the URI properly.

    Screenshot from 2024-09-02 19-41-28

  2. Primitive Types: I removed @type for primitives because adding it for strings broke the JSON-LD, and for other primitives like integers, it did not resolve the prefix at all.

    Screenshot from 2024-09-02 19-35-03

    Without the @type, it works correctly:

    Screenshot from 2024-09-02 19-45-29

  3. Prefix Resolution: I added "ValidationConstraintError": "http://onto.fel.cvut.cz/ontologies/s-pipes/ValidationConstraintError" to the context because the prefix wasn't resolving before:

    Screenshot from 2024-09-02 19-48-11

    Now it resolves correctly:

    Screenshot from 2024-09-02 19-49-01

@blcham
Copy link
Contributor

blcham commented Sep 11, 2024

@palagdan I believe we discussed that null values are not shown properly so PR should handle it as well. Thus not merging the PR yet.

@palagdan
Copy link
Collaborator Author

palagdan commented Sep 12, 2024

@blcham
Currently, the output includes input variables that are null. In the case of the lastName example, when it is null, the context contains information about the variable, but it is not included in the evidence because we don't include these variables in the model

  e.forEach((key, value) -> {
                    if(value != null){
                        model.add(
                                r,
                                getP(key),
                                value);
                    }
             });
            evidenceRe

Screenshot from 2024-09-12 10-56-53

@blcham
Copy link
Contributor

blcham commented Sep 12, 2024

@palagdan yes, that is correct behaviour. Maybe it will be harder to visualize in backend and thus more appropriate solution would be also to include ordered column list as well ... so think about it if it is not needed to simplify frontend visualization of the table, closing this issue

@blcham blcham merged commit 9cb033f into main Sep 12, 2024
2 checks passed
@blcham blcham deleted the 269-lastName-missing branch September 12, 2024 10:59
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.

ValidationConstraintFailedException does not contain lastName column
2 participants