Skip to content

RDF subclassing feature #397

Closed
Closed

Description

@mpsonntag

The current implementation of the odml.tools.RDFWriter includes an export of Sections with specific Section.types as RDF classes different than odml:Section. In detail, if a Section.type is found in the type mapping in file odml.resources.section_subclasses.yaml, then the mapped entry is used as new RDF class name instead of odml:Section. As an example, a section with type cell would be exported as odml:Cell.

The idea is to specify Sections of interest which are easier to find in a SPARQL query, if they are proper RDF subclasses of class odml:Section. A query that would look like SELECT * WHERE {?s type odml:Section and ?s odml:hasType 'cell' .} could be simplified to SELECT * WHERE {?s type odml:Cell .} but would still also be found when searching for the more generic SELECT * WHERE {?s type odml:Section .} since odml:Cell is an RDF subclass of odml:Section.

The current implementation does not include an export of everything required to enable this kind of RDF class inference.

The following list of issues map the road to full compliance to RDF class inference in the RDFWriter

Activity

  1. mpsonntag commented on Jun 3, 2020

    @mpsonntag
    ContributorAuthor

    On a sidenote, the rdflib implementation also does not provide RDF class inference. To properly test this, libraries like owlrl have to be used in addition to an rdflib graph.

    This can cause issues, if a file is uploaded to a graph that similarly does not support class inference. There all queries depending on sub class inference will fail.

    From my point of view this is acceptable by default, since the parent of a subclassed Section still connects to its child via the predicate odml:hasSection and in a query that relies on finding all Sections, we can substitute ?s type odml:Section by going one level up and asking for ?parent odml:hasSection ?s.

    Users that really do not want this fallback, can deactivate the subclassing feature with the rdf_subclassing flag on the RDFWriter.

  2. mpsonntag commented on Jul 16, 2020

    @mpsonntag
    ContributorAuthor

    Closed via #400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions