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

feat(api-v2): Make values citable #1322

Merged
merged 24 commits into from
Jun 6, 2019
Merged

feat(api-v2): Make values citable #1322

merged 24 commits into from
Jun 6, 2019

Conversation

benjamingeer
Copy link

@benjamingeer benjamingeer commented May 17, 2019

This PR aims to make it possible to cite Knora values, as per this comment. See the discussion in Fine-grained citations.

  • Add knora-base:valueHasUUID to knora-base:Value. This is stored only in the current version of each value.
  • Create and update value UUIDs when creating and updating values.
  • Read value UUIDs when reading values from the triplestore.
  • (refactor) move the functionality of KnoraIdUtil into StringFormatter.
  • Add a route for getting a resource along with a value specified by its UUID.
  • Give values ARK URLs in API responses.
  • Update tests.
    • Update .ttl files.
    • Update existing test code.
    • Update expected responses.
    • Add tests for citing values.
  • Add an upgrade script to add knora-base:valueHasUUID to existing repositories.
  • Update docs.

Existing repositories must be updated; see upgrade/1322-cite-values/README.md.

Resolves #941.

@benjamingeer benjamingeer changed the title feature(api-v2): Make values citable. feature(api-v2): Make values citable May 17, 2019
@benjamingeer benjamingeer self-assigned this May 17, 2019
@benjamingeer benjamingeer mentioned this pull request May 17, 2019
Benjamin Geer added 8 commits May 20, 2019 17:46
# Conflicts:
#	webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala
#	webapi/src/main/scala/org/knora/webapi/responders/v2/SearchResponderV2.scala
#	webapi/src/main/scala/org/knora/webapi/responders/v2/StandoffResponderV2.scala
#	webapi/src/main/scala/org/knora/webapi/util/ConstructResponseUtilV2.scala
#	webapi/src/test/resources/test-data/ontologyR2RV2/knoraApiOntologyWithValueObjects.rdf
benjamingeer pushed a commit to dasch-swiss/ark-resolver that referenced this pull request May 22, 2019
@tobiasschweizer
Copy link
Contributor

A question: Do you plan to use the text value's uuid in the standoff route too? If so, how would Knora guarantee that the client gets all the standoff belonging to one specific version of a text value?

@benjamingeer
Copy link
Author

Do you plan to use the text value's uuid in the standoff route too? If so, how would Knora guarantee that the client gets all the standoff belonging to one specific version of a text value?

I was thinking that we shouldn't use the UUID in the standoff route, exactly for this reason.

benjamingeer pushed a commit to dasch-swiss/ark-resolver-data that referenced this pull request May 22, 2019
@benjamingeer benjamingeer changed the title feature(api-v2): Make values citable feat(api-v2): Make values citable May 22, 2019
@subotic
Copy link
Collaborator

subotic commented May 22, 2019

This pull request has been mentioned on Discuss DaSCH. There might be relevant details there:

https://discuss.dasch.swiss/t/fine-grained-citations/24/1

@daschbot
Copy link
Collaborator

This pull request has been mentioned on Discuss DaSCH. There might be relevant details there:

https://discuss.dasch.swiss/t/fine-grained-citations/24/2

@benjamingeer
Copy link
Author

Have you checked with @kilchenmann and @flavens that the changes in the API (additional information on the value object) works with the converter in knora-ui/core?

https://discuss.dasch.swiss/t/fine-grained-citations/24/4?u=benjamingeer

@@ -170,6 +170,45 @@ class ValuesRouteV2E2ESpec extends E2ESpec {
}

"The values v2 endpoint" should {
"get the latest version of a value, given its UUID" in {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these the same tests as for ResourcesResponderV2Spec, just for the values route this time?

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand the question. The resources route doesn't accept value UUIDs, and this PR doesn't add anything to ResourcesResponderV2Spec.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's just that the resources responder is used internally to get specific values so the tests were added to ResourcesResponderV2Spec. But the values route v2 is called in the API so the tests go into ValuesRouteV2E2ESpec.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, I got confused. Yes, that's right.

Copy link
Contributor

Choose a reason for hiding this comment

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

no problem, I first had to understand that v1 and v2 handling of values is different :-)

@tobiasschweizer
Copy link
Contributor

Have you checked with @kilchenmann and @flavens that the changes in the API (additional information on the value object) works with the converter in knora-ui/core?
https://discuss.dasch.swiss/t/fine-grained-citations/24/4?u=benjamingeer

In that case we need their feedback on this PR.

@benjamingeer
Copy link
Author

In that case we need their feedback on this PR.

I don't see what I could possibly change to make this easier for them. Adding more features to Knora usually means adding more information to API responses. We can't stop development on Knora.

@@ -83,6 +83,9 @@ DELETE {

*@
?resource <@{linkUpdate.linkPropertyIri}Value> ?linkValue@linkValueIndex .

@* Delete the UUID from the current version of the link value, because the new version will store it. *@
Copy link
Contributor

Choose a reason for hiding this comment

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

if this creates a new value, why would there already be a UUID?

Copy link
Author

Choose a reason for hiding this comment

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

If we're creating a new text value, we may have to update existing link values for standoff links. If there are existing link values, they will have UUIDs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I remember! There is only one link but the ref count could be more than one

Copy link
Author

Choose a reason for hiding this comment

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

Exactly. So much fun. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

posttraumatic standoff disorder -> PTSD

Copy link
Author

Choose a reason for hiding this comment

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

😜

Copy link
Contributor

Choose a reason for hiding this comment

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

It was not meant as a joke. I am actually suffering from it ;-)


*@
@if(linkUpdate.linkValueExists) {
<@linkUpdate.newLinkValueIri> knora-base:previousValue ?linkValue@linkValueIndex .
<@linkUpdate.newLinkValueIri> knora-base:previousValue ?linkValue@linkValueIndex ;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't you have to remove the UUID from the previous version?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that happens here:

https://github.com/dhlab-basel/Knora/blob/00267e66a277786e9fbe25bfafe2f32b1d22ed99/webapi/src/main/twirl/queries/sparql/v1/createValue.scala.txt#L88

I want to add another test to make sure these SPARQL updates insert and delete the UUIDs correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I want to add another test to make sure these SPARQL updates insert and delete the UUIDs correctly.

On this PR?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I'll do it today.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great. In the meantime, I will test the update script.

@tobiasschweizer
Copy link
Contributor

I get an error when running the update script:

Uploading named graphs...
Uploading named graph http://www.knora.org/ontology/knora-admin...
Uploading named graph http://www.knora.org/ontology/knora-base...
Uploading named graph http://www.knora.org/ontology/standoff...
Uploading named graph http://www.knora.org/data/standoff...
Uploading named graph http://www.knora.org/ontology/salsah-gui...
Uploading named graph http://www.knora.org/data/admin...
Uploading named graph http://www.knora.org/data/permissions...
Uploading named graph http://www.knora.org/data/0000/SystemProject...
Uploading named graph http://www.knora.org/ontology/0803/incunabula...
Uploading named graph http://www.knora.org/data/0803/incunabula...
Traceback (most recent call last):
  File "./update-values.py", line 354, in <module>
    main()
  File "./update-values.py", line 349, in main
    upload_dir=upload_dir
  File "./update-values.py", line 296, in update_repository
    repository.upload(upload_dir)
  File "./update-values.py", line 269, in upload
    named_graph.upload(upload_dir)
  File "./update-values.py", line 147, in upload
    upload_response.raise_for_status()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error:  for url: http://localhost:7200/repositories/knora-test/statements?context=%3Chttp%3A%2F%2Fwww.knora.org%2Fdata%2F0803%2Fincunabula%3E

com.ontotext.trree.consistency.ConsistencyException: Consistency check max_cardinality_1_without_deletion_flag_2 failed:
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "464ed34d0527"^^<http://www.w3.org/2001/XMLSchema#string>
http://www.knora.org/ontology/knora-base#valueHasUUID http://www.w3.org/2000/01/rdf-schema#subPropertyOf http://www.knora.org/ontology/knora-base#objectCannotBeMarkedAsDeleted
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID _:node681
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "MicEksrCRuiraLyAXa43Pw"^^<http://www.w3.org/2001/XMLSchema#string>

	at com.ontotext.trree.consistency.ConsistencyChecker$2.check(ConsistencyChecker.java:107)
	at com.ontotext.rio.parallel.ParallelLoader.end(ParallelLoader.java:354)
	at com.ontotext.rio.parallel.ParallelLoader.end(ParallelLoader.java:335)
	at com.ontotext.rio.parallel.ParallelRDFInserter.commit(ParallelRDFInserter.java:204)
	at com.ontotext.trree.monitorRepository.MonitorRepositoryConnection.commit(MonitorRepositoryConnection.java:200)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getAddDataResult(StatementsController.java:443)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.handleRequestInternal(StatementsController.java:126)
	at com.ontotext.graphdb.sesame.StatementsController.handleRequestInternal(StatementsController.java:26)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:41)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:29)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:501)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
[WARN ] 2019-06-05 11:25:21,071 [repositories/knora-test | c.o.r.p.ParallelRDFInserter] rollback invoked()
java.lang.Exception: debug
	at com.ontotext.rio.parallel.ParallelRDFInserter.rollback(ParallelRDFInserter.java:248)
	at com.ontotext.rio.parallel.ParallelRDFInserter.commit(ParallelRDFInserter.java:213)
	at com.ontotext.trree.monitorRepository.MonitorRepositoryConnection.commit(MonitorRepositoryConnection.java:200)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getAddDataResult(StatementsController.java:443)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.handleRequestInternal(StatementsController.java:126)
	at com.ontotext.graphdb.sesame.StatementsController.handleRequestInternal(StatementsController.java:26)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:41)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:29)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:501)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
[ERROR] 2019-06-05 11:25:21,084 [repositories/knora-test | o.e.r.h.s.ProtocolExceptionResolver] Error while handling request
org.eclipse.rdf4j.query.UpdateExecutionException: com.ontotext.trree.consistency.ConsistencyException: Consistency check max_cardinality_1_without_deletion_flag_2 failed:
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "464ed34d0527"^^<http://www.w3.org/2001/XMLSchema#string>
http://www.knora.org/ontology/knora-base#valueHasUUID http://www.w3.org/2000/01/rdf-schema#subPropertyOf http://www.knora.org/ontology/knora-base#objectCannotBeMarkedAsDeleted
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID _:node681
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "MicEksrCRuiraLyAXa43Pw"^^<http://www.w3.org/2001/XMLSchema#string>

	at com.ontotext.rio.parallel.ParallelRDFInserter.commit(ParallelRDFInserter.java:217)
	at com.ontotext.trree.monitorRepository.MonitorRepositoryConnection.commit(MonitorRepositoryConnection.java:200)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getAddDataResult(StatementsController.java:443)
	at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.handleRequestInternal(StatementsController.java:126)
	at com.ontotext.graphdb.sesame.StatementsController.handleRequestInternal(StatementsController.java:26)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:41)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:29)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:501)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: com.ontotext.trree.consistency.ConsistencyException: Consistency check max_cardinality_1_without_deletion_flag_2 failed:
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "464ed34d0527"^^<http://www.w3.org/2001/XMLSchema#string>
http://www.knora.org/ontology/knora-base#valueHasUUID http://www.w3.org/2000/01/rdf-schema#subPropertyOf http://www.knora.org/ontology/knora-base#objectCannotBeMarkedAsDeleted
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID _:node681
http://rdfh.ch/0803/047db418ae06/values/464ed34d0527 http://www.knora.org/ontology/knora-base#valueHasUUID "MicEksrCRuiraLyAXa43Pw"^^<http://www.w3.org/2001/XMLSchema#string>

	at com.ontotext.trree.consistency.ConsistencyChecker$2.check(ConsistencyChecker.java:107)
	at com.ontotext.rio.parallel.ParallelLoader.end(ParallelLoader.java:354)
	at com.ontotext.rio.parallel.ParallelLoader.end(ParallelLoader.java:335)
	at com.ontotext.rio.parallel.ParallelRDFInserter.commit(ParallelRDFInserter.java:204)
	... 47 common frames omitted


still using graphdb 8.5

@tobiasschweizer
Copy link
Contributor

Ok, I know what happened: I loaded the data with this branch and applied the conversion. Instead, the data has to be loaded on develop and converted on this branch.

Does this mean that the script breaks if the data is already converted?

@benjamingeer
Copy link
Author

Does this mean that the script breaks if the data is already converted?

Yes. The solution to that is #1336.

@tobiasschweizer
Copy link
Contributor

Did you manage to preserve the prefixes? They used to be renamed to ns0 or something.

@tobiasschweizer tobiasschweizer mentioned this pull request Jun 5, 2019
@benjamingeer
Copy link
Author

Did you manage to preserve the prefixes? They used to be renamed to ns0 or something.

I'm not sure whether this is possible with rdflib, but I'll try as part of #1336.

@tobiasschweizer
Copy link
Contributor

@benjamingeer Can this branched be updated, @SepidehAlassi as just merged a PR?

@tobiasschweizer
Copy link
Contributor

@benjamingeer The upgrade script works!

@benjamingeer
Copy link
Author

The upgrade script works!

Cool. Horrible test almost done.

@benjamingeer
Copy link
Author

@tobiasschweizer OK, I added a test to ValuesResponderV2Spec.scala to check that value UUIDs get updated correctly.

@benjamingeer
Copy link
Author

@tobiasschweizer Is this OK to merge?

@tobiasschweizer
Copy link
Contributor

Is this OK to merge?

I want to get the feedback from @kilchenmann and @flavens. I think this should be possible today.

@flavens
Copy link
Contributor

flavens commented Jun 6, 2019

@benjamingeer @tobiasschweizer You can merge this PR today. For you to know: We actually work only with the Knora official releases (now 7.0.0). But it is really good to know when there are breaking changes in the next release, this way, it is easier for us to fix bugs and adapt.

@benjamingeer
Copy link
Author

@flavens Thank you!

@benjamingeer
Copy link
Author

@tobiasschweizer In that case could you please approve this?

@benjamingeer
Copy link
Author

@tobiasschweizer Thank you!

@benjamingeer benjamingeer merged commit 9f99af1 into develop Jun 6, 2019
@benjamingeer benjamingeer deleted the wip/941-cite-value branch June 6, 2019 13:09
@daschbot
Copy link
Collaborator

daschbot commented Jun 7, 2019

This pull request has been mentioned on Discuss DaSCH. There might be relevant details there:

https://discuss.dasch.swiss/t/fine-grained-citations/24/6

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.

v2 route for text values
5 participants