Skip to content

Support for new specifications in OWL 2 #903

Closed

Description

@DhanshreeA

Does rdflib currently support adding data ranges as per OWL2 specifications? For Example, can you create a custom datatype like:

g.add((URIRef(ns+"Answer"), RDF.type, RDFS.Datatype))
g.add((URIRef(ns+"Answer"), OWL.unionOf, (XSD.string, XSD.boolean, XSD.positiveInteger))) g.add((URIRef(ns+"answer_value"), RDF.type, RDFS.Property))
g.add((URIRef(ns+"answer_value"), RDFS.domain, URIRef(ns+"Question")))
g.add((URIRef(ns+"answer_value"), RDFS.range, URIRef(ns+"Answer")))

Activity

  1. MuraliKrishna26 commented on May 30, 2020

    @MuraliKrishna26

    Hey DhansheeA, I have worked on the issue and fixed it. Now you can add more than one data-type(or any property) at once as you mentioned in the code.
    The below line will work fine
    g.add((URIRef(ns+"Answer"), OWL.unionOf, (XSD.string, XSD.boolean, XSD.positiveInteger))

    I have observed there may be a typo in the line :
    g.add((URIRef(ns+"answer_value"), RDF.type, RDFS.Property))
    Property term is defined in RDF class but not in RDFS.

  2. ashleysommer commented on Aug 5, 2020

    @ashleysommer
    Contributor

    @MuraliKrishna26

    Property term is defined in RDF class but not in RDFS.

    RDF.type is correct. Even though it is specified in the RDFS spec, the type predicate intentionally uses rdf:type.
    See https://en.wikipedia.org/wiki/RDF_Schema

  3. DhanshreeA commented on Aug 18, 2020

    @DhanshreeA
    Author

    @ashleysommer I believe @MuraliKrishna26 is talking about RDF.Property and is correct in pointing out that Property is in RDF Class and not RDFS. :) I am a bit rusty on the spec itself, but at least within this Python implementation RDFS.Property does not seem to be the case.

  4. ashleysommer commented on Aug 18, 2020

    @ashleysommer
    Contributor

    @MuraliKrishna26 is talking about RDF.Property and is correct in pointing out that Property is in RDF Class and not RDFS

    Yes, you're right. I misread what @MuraliKrishna26 had written.

  5. ghost locked and limited conversation to collaborators on Dec 25, 2021
  6. ghost converted this issue into a discussion #1567 on Dec 25, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions