inception icon indicating copy to clipboard operation
inception copied to clipboard

Cannot create statements in reified KB

Open reckart opened this issue 6 years ago • 0 comments

Describe the bug Meanwhile, it is not even possible anymore to create a label statement (or any statement) in reified local KBs.

To Reproduce Steps to reproduce the behavior:

  1. Create a KB with reification and using the OWL mapping.
  2. Then try creating a label statement on the KB page gives this exception

Expected behavior

  • It would be an option to set the default prefix in the KB to http://www.wikidata.org/prop/P - but that would mean that instances and classes also get mapped into the properties namespace...
  • It would be an option to have separate prefixes for classes, instances and properties... but if we refactor reification support such that it is applied per namespace we may have to handle this differently - maybe by giving the user a choice in which namespace she wants to create an item? This could be done by adding a dropdown in the property editor through which the user can choose the namespace for the property.
  • or maybe for the time being, the reification strategy could be consulted as to which prefix should be used when creating new properties. That wouldn't help if the user tries using an OWL mapping with WIKIDATA reification - but it would at least allow the user to manually create some properties and use them to create reified statements.

Screenshots

2019-05-11 20:56:43 ERROR [rec] KnowledgeBasePage - Error: With WikiDataReification, properties must start with [http://www.wikidata.org/prop/P] but found [http://www.w3.org/2000/01/rdf-schema#label]
java.lang.IllegalArgumentException: With WikiDataReification, properties must start with [http://www.wikidata.org/prop/P] but found [http://www.w3.org/2000/01/rdf-schema#label]
	at de.tudarmstadt.ukp.inception.kb.reification.WikiDataReification.upsertStatement(WikiDataReification.java:431) ~[classes/:?]
	at de.tudarmstadt.ukp.inception.kb.KnowledgeBaseServiceImpl.lambda$19(KnowledgeBaseServiceImpl.java:674) ~[classes/:?]
	at de.tudarmstadt.ukp.inception.kb.KnowledgeBaseServiceImpl.update(KnowledgeBaseServiceImpl.java:737) ~[classes/:?]
	at de.tudarmstadt.ukp.inception.kb.KnowledgeBaseServiceImpl.upsertStatement(KnowledgeBaseServiceImpl.java:673) ~[classes/:?]
	at de.tudarmstadt.ukp.inception.kb.KnowledgeBaseServiceImpl$$FastClassBySpringCGLIB$$77259834.invoke(<generated>) ~[classes/:?]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684) ~[spring-aop-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at de.tudarmstadt.ukp.inception.kb.KnowledgeBaseServiceImpl$$EnhancerBySpringCGLIB$$a8d41386.upsertStatement(<generated>) ~[classes/:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:521) ~[wicket-ioc-8.3.0.jar:8.3.0]
	at com.sun.proxy.$Proxy182.upsertStatement(Unknown Source) ~[?:?]
	at de.tudarmstadt.ukp.inception.ui.kb.stmt.editor.StatementEditor.actionSave(StatementEditor.java:166) ~[classes/:?]
	at de.tudarmstadt.ukp.inception.ui.kb.stmt.editor.StatementEditor.access$8(StatementEditor.java:153) ~[classes/:?]
	at de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaAjaxButton.onSubmit(LambdaAjaxButton.java:52) [classes/:?]
...

Please complete the following information:

  • Version and build ID: [see bottom of the browser screen]
  • OS: [e.g. Windows, Linux, OS X]
  • Browser: [e.g. chrome, safari]

Additional context This issue is related to #709.

reckart avatar May 11 '19 19:05 reckart