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

Fix property names for incoming links #1144

Merged
merged 7 commits into from
Jan 9, 2019
Merged

Conversation

benjamingeer
Copy link

@benjamingeer benjamingeer commented Jan 8, 2019

  • In the API v2 complex schema, rename hasIncomingLink to hasIncomingLinkValue, because the name of a link value property must end in Value. Also rename the corresponding virtual property in knora-base.
  • In the API v2 simple schema, add the definition of hasIncomingLink to the knora-api ontology.
  • Update docs.
  • Update release notes.

Corresponding PR in Knora-ui: dasch-swiss/knora-ui#148

Fixes #1135.

@@ -383,7 +383,7 @@ object ConstructResponseUtilV2 {

if (incomingLinkAssertions.nonEmpty) {
// create a virtual property representing an incoming link
val incomingProps: (IRI, Seq[ValueRdfData]) = OntologyConstants.KnoraBase.HasIncomingLink -> incomingLinkAssertions.values.toSeq.flatten.map {
val incomingProps: (IRI, Seq[ValueRdfData]) = OntologyConstants.KnoraBase.HasIncomingLinkValue -> incomingLinkAssertions.values.toSeq.flatten.map {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key place where this actually gets used.

@benjamingeer benjamingeer mentioned this pull request Jan 8, 2019
@tobiasschweizer
Copy link
Contributor

I think in Knora-ui only the test data has to be updated. We can do that tomorrow morning.

Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests fail:

java.lang.AssertionError: assertion failed: property Iris are different for resource JsonLDString(http://rdfh.ch/8be1b7cf7103): expected Set(http://api.knora.org/ontology/knora-api/v2#hasIncomingLink, http://api.knora.org/ontology/knora-api/v2#attachedToProject, http://api.knora.org/ontology/knora-api/v2#creationDate, http://0.0.0.0:3333/ontology/0803/incunabula/v2#title, http://api.knora.org/ontology/knora-api/v2#attachedToUser, http://api.knora.org/ontology/knora-api/v2#hasPermissions), received Set(http://api.knora.org/ontology/knora-api/v2#hasIncomingLinkValue, http://api.knora.org/ontology/knora-api/v2#attachedToProject, http://api.knora.org/ontology/knora-api/v2#creationDate, http://0.0.0.0:3333/ontology/0803/incunabula/v2#title, http://api.knora.org/ontology/knora-api/v2#attachedToUser, http://api.knora.org/ontology/knora-api/v2#hasPermissions)

I think the tests data simply has to be adapted (hasIncomingLink -> hasIncomingLinkValue)

@benjamingeer
Copy link
Author

@tobiasschweizer OK to merge now?

# Conflicts:
#	webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiOntologyWithValueObjects.rdf
@benjamingeer benjamingeer merged commit 207a457 into develop Jan 9, 2019
@benjamingeer benjamingeer deleted the fix/1135-incoming-link branch January 9, 2019 19:06
benjamingeer pushed a commit to dasch-swiss/knora-ui that referenced this pull request Jan 9, 2019
* test (knora-core): Update test data to reflect dasch-swiss/dsp-api#1144

* test (knora-core): Update more test data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants