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

Existential blank nodes in LDTab #34

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Conversation

ckindermann
Copy link
Contributor

@ckindermann ckindermann commented Nov 9, 2024

One of LDTab's guiding design choices is to eliminate blank nodes where possible. In the case of existential blank nodes, i.e., blank nodes that do not appear as objects in an RDF graph, we can choose to

  1. collapse the blank node in the usual way:
    i) introduce a 'wiring' blank node for the subject column
    ii) use "unknown" for the predicate (or a value of a property that indicates what kind of structure the blank node points to - so far we have chosen its rdf:type, if available.)
    iii) put the JSON structure of the existential blank node in the object column.

OR

  1. unfold the first level of the JSON structure created in 1. iii) into LDTab rows.

Example:

Consider a disjoint classes axiom in OWL. This is represented with an existential blank node in RDF corresponding to the following JSON object in LDTab:

{
    "owl:members": {
        "object": [
            {
                "datatype": "_IRI",
                "object": "<http://purl.obolibrary.org/obo/BFO_0000009>"
            },
            {
                "datatype": "_IRI",
                "object": "<http://purl.obolibrary.org/obo/BFO_0000018>"
            },
            {
                "datatype": "_IRI",
                "object": "<http://purl.obolibrary.org/obo/BFO_0000026>"
            },
            {
                "datatype": "_IRI",
                "object": "<http://purl.obolibrary.org/obo/BFO_0000028>"
            }
        ],
        "datatype": "_JSONLIST"
    },
    "rdf:type": {
        "object": "owl:AllDisjointClasses",
        "datatype": "_IRI"
    }
}

Instead of putting this JSON object in LDTab's object column (as per 1. above), we would unfold the top level of the JSON object into the following two LDTab rows (I'm using CURIEs instead of full IRIs for classes here):

subject predicate object datatype
wiring:blanknode:_ owl:members [{"datatype":"_IRI","object":"obo:BFO_0000009"},{"datatype":"_IRI","object":"obo:BFO_0000018"},{"datatype":"_IRI","object":"obo:BFO_0000026"},{"datatype":"_IRI","object":"obo:BFO_0000028"}] _JSONLIST
wiring:blanknode:_ rdf:type owl:AllDisjointClasses _IRI

@ckindermann ckindermann merged commit 85ae634 into main Nov 12, 2024
1 check passed
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.

1 participant