Skip to content

Add support for owl:unionOf when resolving rdfs:range on an owl:ObjectProperty #3

@Astn

Description

@Astn

When using ontologies such as the OWL compliant version of schema.org created by topbraid (http://topbraid.org/schema) @ http://topbraid.org/schema/schema.ttl

It is common to encounter a union of resources as the object of rdfs:range. Example:

###  http://schema.org/acquiredFrom
<http://schema.org/acquiredFrom> rdf:type owl:ObjectProperty ;
                                 rdfs:domain <http://schema.org/OwnershipInfo> ;
                                 rdfs:range [ rdf:type owl:Class ;
                                              owl:unionOf ( <http://schema.org/Organization>
                                                            <http://schema.org/Person>
                                                          )
                                            ] ;
                                 rdfs:comment "The organization or person from which the product was acquired."^^xsd:string ;
                                 rdfs:label "acquired from"^^xsd:string .

I propose that we handle this case by adding all of the resources found in the owl:unionOf to a GraphQLUnionType and return that from the call to getGraphqlPolymorphicObjectType.

I have been working on a solution for this particular issue, and should be able to submit a pull request for review shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions