-
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 consistency check optimisations from Ontotext #159
Conversation
- Allow a required property to have only a value marked as deleted. - Rename properties used in knora-base for consistency checking to make them clearer. - Add comments.
…otext. - Update GraphdBConsistencyCheckingSpec to test the new consistency checking rules. - Add missing cardinalities for hasStandoffLinkTo and hasStandoffLinkToValue to knora-base:Resource, and update test data accordingly.
- Refactor some code for the context query in the resources responder.
- Fix link deletion.
- Rename all 'rapierPath' to 'knoraApiPath.
- Distinguish between the 'anything' test user and the root user.
#88). - Always grant view permission on LinkValues for hasStandoffLinkTo. - Refactor link querying in ValuesResponderV1. - Use ?prop and ?obj in SPARQL rather than ?p and ?o, for consistency and code reuse.
- Describe the new deleting design. - Describe the SystemUser. - Remove ideas about future standoff development that are obsolete in the new standoff design. - Make the \issue{} command point to GitHub issues.
…off resource reference.
…dAsDeleted for consistency checking.
This is now ready to be reviewed after #186 is merged. |
# Resolved conflicts: # docs/latex/knora-base/knora-base.pdf # docs/latex/knora-base/knora-base.tex # knora-ontologies/knora-base.ttl # webapi/WebapiBuild.sbt # webapi/_test_data/all_data/anything-data.ttl # webapi/_test_data/all_data/beol-data.ttl # webapi/_test_data/all_data/incunabula-data.ttl # webapi/_test_data/demo_data/images-demo-data.ttl # webapi/_test_data/demo_data/incunabula-demo-data.ttl # webapi/_test_data/responders.v1.ValuesResponderV1Spec/incunabula-data.ttl # webapi/_test_data/store.triplestore.GraphDBConsistencyCheckingSpec/incunabula-data.ttl # webapi/src/main/scala/org/knora/webapi/responders/v1/PermissionUtilV1.scala # webapi/src/main/scala/org/knora/webapi/responders/v1/ResourcesResponderV1.scala # webapi/src/main/scala/org/knora/webapi/responders/v1/SearchResponderV1.scala # webapi/src/main/scala/org/knora/webapi/responders/v1/ValuesResponderV1.scala # webapi/src/main/scala/org/knora/webapi/util/InputValidation.scala # webapi/src/test/scala/org/knora/webapi/e2e/v1/ResourcesV1E2ESpec.scala # webapi/src/test/scala/org/knora/webapi/e2e/v1/ValuesV1E2ESpec.scala # webapi/src/test/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala # webapi/src/test/scala/org/knora/webapi/responders/v1/ResourcesResponderV1SpecFullData.scala
However, this is only effective if we really apply these constraints permanently. Should we always use common super classes in case a property applies to more than one type of subject/object? In other words: Should we always require these constraints?
|
…d objectClassConstraint.
Fixed, thanks.
The Knora API server requires For
Yes. I've clarified this in the RST doc. |
|
- it is an honour for me to fix your typos
|
I think the section about consistency checking in the documentation explains the task well. However, for more clarity, could you add some infos about:
|
I have a question regarding the
Let's take the example of a book. A book is subclass of a kb:resource and also subclass of a bunch of blank nodes that are themselves of type restriction, defining cardinalities on properties this very resource class may have.
Because
I find it confusing that a resource class is both subclass of a another resource class (kb:Resource) and actual instances that are of type |
The blank nodes are class definitions, not instances of classes. The OWL 2 spec says:
|
Better now? |
This adds optimisations implemented by Ontotext for our consistency checking rules.
[Cut]
to avoid generating redundant compiled rules.Without these optimisations,
incunabula-data.ttl
was taking 10 hours to load. With these optimisations, it loads for me in about 30 seconds.If a class has a cardinality on a property whose objects can't be marked as deleted (i.e. they aren't instances of
knora-base:Resource
orknora-base:Value
), currently you have to make that property a subproperty ofknora-base:objectCannotBeMarkedAsDeleted
. This is ugly, but there doesn't seem to be a better way. In any case, I think it's only needed for classes inknora-base
. Project-specific ontologies shouldn't need to use it.I also added missing cardinalities for
hasStandoffLinkTo
andhasStandoffLinkToValue
toknora-base:Resource
, and adjusted the test data accordingly. The GUI will need some code to ensure that users cannot add or modify objects ofhasStandoffLinkTo
, but can still use that property in the extended search (#162).These consistency rules require GraphDB 7.1 or later.
Documentation is in
consistency-checking.rst
.Closes #33: Check the triplestore for inconsistencies.
Closes #190: Check cardinalities of Values using Consistency Checking.