-
Notifications
You must be signed in to change notification settings - Fork 18
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 support for shared ontologies #987
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #987 +/- ##
==========================================
+ Coverage 82.31% 82.4% +0.09%
==========================================
Files 153 153
Lines 17689 17826 +137
Branches 1647 1669 +22
==========================================
+ Hits 14560 14690 +130
- Misses 3129 3136 +7
Continue to review full report at Codecov.
|
…non-shared ontologies. - Add example of a shared ontology. - Add tests.
…(for development). - Remove tests that are no longer relevant.
# Conflicts: # webapi/src/test/resources/test-data/ontologyR2RV2/allOntologyMetadata.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/allOntologyMetadata.ttl # webapi/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala # webapi/src/test/scala/org/knora/webapi/e2e/v1/ProjectsV1E2ESpec.scala
…rtup. - Add more tests.
…hared ontology in another project. - Add tests.
…multiple shared ontology projects. - Fix tests. - Add more tests. - Add docs. - Update release notes.
@subotic I'd like to request a review from you, but GitHub won't let me do it, because you created the PR. |
@subotic I guess that if you review the PR, I can approve it. :) |
No problem. I will review it and then you can approve :-) |
Just a thought, which we can address at a later time. I think that shared ontologies should be hostable at a URL other than |
I think you’re right. I could imagine that a group of projects (all hosted on different servers) might create a shared ontology together, which they would all use. The ontology would have to be in the triplestore on each server, but its external IRI would contain the hostname of a single “authoritative” server that would serve the ontology. I guess each participating server would need to have a lookup table in a configuration file, which would enable |
Or I guess the hostname could be part of the definition of a shared ontology project. Then each shared ontology project would have to be duplicated on each participating server. |
I was thinking about a default setting of I also think that it shouldn't be such a problem to publish the base ontologies on Github. |
In IRIs, the domain
That would be the easiest implementation. It could be in
Yes, we could do that with Github Pages, but we would need a web server to process the HTTP Accept header and redirect to the file in the requested format (JSON-LD, Turtle, or RDF/XML). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM :-)
# Conflicts: # docs/src/paradox/00-release-notes/v1.8.0.md # webapi/src/test/resources/test-data/ontologyR2RV2/incunabulaOntologySimple.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/incunabulaOntologyWithValueObjects.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/incunabulaPageAndBookWithValueObjects.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiDate.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiDateValue.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiOntologySimple.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiOntologyWithValueObjects.rdf # webapi/src/test/resources/test-data/ontologyR2RV2/standoffOntologyWithValueObjects.rdf
Thanks for reviewing! |
Summary
DefaultSharedOntologiesProject
with project code0000
.SmartIri
to support ontology IRIs containing the segmentshared
, usingapi.knora.org
as their hostname in API v2:http://www.knora.org/ontology/shared/example-box
(internal)http://api.knora.org/ontology/shared/example-box/v2
(external, complex schema)http://api.knora.org/ontology/shared/example-box/simple/v2
(external, simple schema)shared
ontology IRI defaults to0000
.SmartIri
can support additional shared ontology projects (by specifying the project code) if we decide to add them later (seeStringFormatterSpec
). I think this will probably end up being more convenient if we have a lot of shared ontologies.DefaultSharedOntologiesProject
, which can contain only shared ontologies.knora-api:isShared true
.knora-api:isBuiltIn true
.parole-religieuse
ontology to makeDrawingsGodsV1E2ESpec
work (because it previously createdanything:Thing
resources in theparole-religieuse
project, which is now forbidden).Issues