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

Add owl:rational and owl:real to match standard. #1428

Merged
merged 2 commits into from
Oct 10, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add owl:rational and owl:real to match standard.
sa-bpelakh committed Oct 7, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8993521755d5ce0cb5f32f2d3a6fd214903676a7
4 changes: 4 additions & 0 deletions rdflib/namespace/_OWL.py
Original file line number Diff line number Diff line change
@@ -115,4 +115,8 @@ class OWL(DefinedNamespace):
imports: URIRef # The property that is used for importing other ontologies into a given ontology.
versionIRI: URIRef # The property that identifies the version IRI of an ontology.

# http://www.w3.org/2000/01/rdf-schema#Datatype
rational: URIRef # The value space is the set of all rational numbers. The lexical form is numerator '/' denominator, where both are integers.
real: URIRef # The value space is the set of all real numbers. Does not directly provide any lexical forms.

_NS = Namespace("http://www.w3.org/2002/07/owl#")
7 changes: 7 additions & 0 deletions test/test_namespace.py
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
from rdflib.graph import Graph
from rdflib.namespace import (
FOAF,
OWL,
RDF,
RDFS,
SH,
@@ -245,3 +246,9 @@ def test_contains_method(self):

ref = URIRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#_1")
self.assertTrue(ref in RDF, "RDF does not include rdf:_1")

ref = URIRef("http://www.w3.org/2002/07/owl#rational")
self.assertTrue(ref in OWL, "OWL does not include owl:rational")

ref = URIRef("http://www.w3.org/2002/07/owl#real")
self.assertTrue(ref in OWL, "OWL does not include owl:real")