-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle resources with multiple comments in defined_nam…
…espace_creator (#2254) FIxed a bug in defined_namespace_creator so that when a resource in an ontology is commented on multiple times (with e.g. rdfs:comment), it creates only a single class variable in the resulting DefinedNamespace where the Python comment is the concatenation of the rdfs:comments.
- Loading branch information
1 parent
f17f975
commit 60d98db
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Contrived Test Data | ||
|
||
This directory contains test data contrived for specific purposes. Files in this | ||
directory should clearly indicate their purpose with a comment. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix ex: <http://example.org/multiline-string-example#> . | ||
|
||
# This file contains a RDF class with multiple rdfs:comment properties and is | ||
# used to verify the RDFLib defined namespace creator. It is used in | ||
# </test/test_namespace/test_definednamespace_creator.py>. | ||
|
||
<http://example.org/multiline-string-example> | ||
a owl:Ontology . | ||
|
||
ex:SomeClass a rdfs:Class, owl:Class; | ||
rdfs:label "Some class"@en; | ||
rdfs:comment "If one uses multiple comment properties, "@en; | ||
rdfs:comment "then it should still only create a single class variable."@en; | ||
rdfs:isDefinedBy <http://example.org/multiline-string-example>; | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters