You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Rafa Haro <rh...@zaizi.com> on 2012/09/14 15:15:07 UTC
ContentHub Custom index for DBPedia-spotlight enhancer
Hi all,
I have been playing around with DBPedia Spotlight engines these days.
With Rupert's help (thanks again) I was able to successfully install and
configure it as default engine. My next step was to create a custom
index in ContentHub to extract some data about the detected entities and
store it in Solr. Specifically, I want to store in Solr the labels of
each entities and its types (rdf:types). For example, for the entity
President Obama I would get:
Labels:
Presidency of Barack Obama
Présidence de Barack Obama
Barack Obama
Types:
foaf:Person
dbpedia-owl:Person
dbpedia-owl:OfficeHolder
dbpedia-owl:Agent
In order to achieve this, I have tried to extend default ContentHub
LDPath Program with this line:
concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
I know that it might give me exactly what I want, but it was just a
first test. Anyway, I found some issues when I submitted a document to
store it in my new index:
1. Recognized entities weren't exactly the same that you can get using
DBPedia Spotlight demo
(http://dbpedia-spotlight.github.com/demo/index.html), which results are
more accurate. I think that's because the 'No common words' feature in
the demo. I have been trying to configure it in the engine, but I wasn't
able to.
2. The LDPath program is executed also for entities that are not
recognized by the engine. For example, using the following text:
" /Orange is a tropical to semitropical, evergreen, small flowering tree
growing to about 5 to 8 m tall and bears seasonal fruits that measure
about 3 inches in diameter and weighs about 100-150 g. Oranges are
classified into two general categories, sweet and bitter, with the
former being the type most commonly consumed. Popular varieties of the
sweet orange include Valencia, Navel, Persian variety, and blood orange./"
The enhancer only recognized Orange (fruit) but, when I submit the text
to the content hub I also get results for Orange, Texas (Place). I would
need to store only the information of the disambiguated entity.
Thanks. Regards
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.
Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.
Re: content hub form element POST
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
You're right. "jsonCons" should be changed as "constraints".
("jsonCons" is the name of the parameter in the Java code). Anyway, the
examples in the REST API seems to have correct usage for this parameter.
However, constraints will not be specified in this way anymore, since
multipart serialization of ContentItems do has such a feature already.
See the documentations at [1] and [2]. For the sake of a unified
approach, we will use that feature to attach additional information for
ContentItems.
The disposition is a parameter which is automatically filled when a file
is sent through Multipart-FormData requests. As far as I know, clients
do not explicitly specify a value for that parameter. So, that parameter
should not be included in the documentation and you can ignore it.
As far as I see, the only parameter that is not documented is the "id"
for which I already gave an example in my previous mail.
Best,
Suat
[1]
http://stanbol.apache.org/docs/0.9.0-incubating/enhancer/contentitem.html
[2]
http://stanbol.apache.org/docs/trunk/components/enhancer/enhancerrest.html
On 10/5/2012 6:35 PM, Melanie Reiplinger wrote:
> Suat,
>
> but maybe one minor thing: could you give me a list of parameters that
> are valid for the POST request in creating or updating content items?
> because in the Doku, it says 'constraints' for the JSON constraint, a
> few lines below it is called '|||||*jsonCons', then there is
> 'disposition', but only for files, etc... *|||||
> So the docu seems to be a bit inconsistent here.
>
> Thank you,
> Melanie
>
>
> Am 05.10.2012 17:25, schrieb Melanie Reiplinger:
>> Hi Suat,
>>
>> thank you a lot. I was also having problems doing the POST via
>> jQuery.ajax, because I couldn't make the upload of files with
>> Multipart-Formdata (FromData object) work. But maybe I will try this
>> after you completed the changes, and work on something different for
>> the time being.
>>
>> Best,
>> Melanie
>>
>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>> Hi Melanie,
>>>
>>> Currently, I and my colleague are working on the RESTful services of
>>> Contenthub. We are going over the RESTful services providing
>>> ContentItem
>>> submission there will be an overall improvement on the services. We
>>> will
>>> adapt the services so that they will also support the multipart
>>> serialization of ContentItems. All documentations will also be updated.
>>> I hope the implementation will be finished in the next week. I will
>>> open
>>> issues for these developments and inform this list.
>>>
>>> You can specify a uri for your item with form elements as follows:
>>> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
>>> author.&constraints={author:\"mere\"}&title=PeterPan&id=myid"
>>> http://dev.iks-project.eu:8081/contenthub/contenthub/store
>>>
>>> The url parameter is only considered if you do not specify the
>>> "content"
>>> parameter. In this case, the content is fetched from the given url.
>>>
>>> Hope this helps, best,
>>> Suat
>>>
>>> On 10/5/2012 5:32 PM, Melanie Reiplinger wrote:
>>>> Hi all,
>>>>
>>>> I was trying the form element specification for content items. Seems
>>>> if I use form elements, then I cannot specify an urn for my item - I
>>>> get an ugly exception thrown (shown below).
>>>>
>>>> And another more thing: what happens with the url I specify? I can't
>>>> see them anywhere at my items.
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
>>>> author.&constraints={author:\"mere\"}&title=PeterPan&url=\"http://foo.bar.de\""
>>>>
>>>> http://dev.iks-project.eu:8081/contenthub/contenthub/store/PP
>>>> HTTP/1.1 500 There is no textual for the content item
>>>> Content-Type: text/html; charset=iso-8859-1
>>>> Cache-Control: must-revalidate,no-cache,no-store
>>>> Content-Length: 7484
>>>> Server: Jetty(6.1.x)
>>>>
>>>> <html>
>>>> <head>
>>>> <meta http-equiv="Content-Type" content="text/html;
>>>> charset=ISO-8859-1"/>
>>>> <title>Error 500 There is no textual for the content item</title>
>>>> </head>
>>>> <body><h2>HTTP ERROR 500</h2>
>>>> <p>Problem accessing /contenthub/contenthub/store/PP. Reason:
>>>> <pre> There is no textual for the content item</pre></p><h3>Caused
>>>> by:</h3><p
>>>> re>org.apache.stanbol.contenthub.servicesapi.store.StoreException:
>>>> There is no t extual for the
>>>> content item
>>>> at
>>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.addDefaultFiel
>>>> ds(SolrStoreImpl.java:375)
>>>> at
>>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>>>> mpl.java:320)
>>>> at
>>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>>>> mpl.java:342)
>>>> at
>>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(
>>>> SolrStoreImpl.java:314)
>>>> at
>>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>>>> ceAndRedirect(StoreResource.java:659)
>>>> at
>>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>>>> ceAndRedirect(StoreResource.java:802)
>>>> at
>>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createConte
>>>> ntItemWithId(StoreResource.java:496)
>>>> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown
>>>> Source)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>>> sorImpl.java:25)
>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>> at
>>>> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMe
>>>> thodInvokerFactory.java:60)
>>>> at
>>>> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMeth
>>>> odDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchPr
>>>>
>>>> ovider.java:205)
>>>> at
>>>> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDi
>>>> spatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>>>> at
>>>> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethod
>>>> Rule.java:288)
>>>> at
>>>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>>>> ndPathRule.java:147)
>>>> at
>>>> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(Resourc
>>>> eClassRule.java:108)
>>>> at
>>>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>>>> ndPathRule.java:147)
>>>> at
>>>> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(R
>>>> ootResourceClassesRule.java:84)
>>>> at
>>>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>>>> est(WebApplicationImpl.java:1483)
>>>> at
>>>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>>>> est(WebApplicationImpl.java:1414)
>>>> at
>>>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>>>> st(WebApplicationImpl.java:1363)
>>>> at
>>>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>>>> st(WebApplicationImpl.java:1353)
>>>> at
>>>> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponen
>>>> t.java:414)
>>>> at
>>>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>>>> Container.java:537)
>>>> at
>>>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>>>> Container.java:708)
>>>> at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(S
>>>> ervletHandler.java:96)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.ServletHandler.handle(Ser
>>>> vletHandler.java:79)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(S
>>>> ervletPipeline.java:42)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>>> Filter(InvocationFilterChain.java:49)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>>> (HttpFilterChain.java:33)
>>>> at
>>>> org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.d
>>>> oFilter(QueryHeadersFilter.java:75)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>>>> lterHandler.java:88)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>>> erHandler.java:76)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>>> Filter(InvocationFilterChain.java:47)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>>> (HttpFilterChain.java:33)
>>>> at
>>>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(A
>>>> uthenticatingFilter.java:157)
>>>> at java.security.AccessController.doPrivileged(Native Method)
>>>> at
>>>> javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>>>> at
>>>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilte
>>>> r(AuthenticatingFilter.java:153)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>>>> lterHandler.java:88)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>>> erHandler.java:76)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>>> Filter(InvocationFilterChain.java:47)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>>> (HttpFilterChain.java:33)
>>>> at
>>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>>> erHandler.java:78)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>>> Filter(InvocationFilterChain.java:47)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>>> (HttpFilterChain.java:33)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(
>>>> FilterPipeline.java:48)
>>>> at
>>>> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Disp
>>>> atcher.java:39)
>>>> at
>>>> org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatc
>>>> herServlet.java:67)
>>>> at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>>> at
>>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511
>>>> )
>>>> at
>>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
>>>> 90)
>>>> at
>>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
>>>> 82)
>>>> at
>>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
>>>> 65)
>>>> at
>>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
>>>> 52)
>>>> at org.mortbay.jetty.Server.handle(Server.java:326)
>>>> at
>>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54
>>>> 2)
>>>> at
>>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
>>>> n.java:943)
>>>> at
>>>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
>>>> at
>>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>>>> at
>>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>>> at
>>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
>>>> va:410)
>>>> at
>>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
>>>> ava:582)
>>>> </pre>
>>>> <hr /><i><small>Powered by Jetty://</small></i><br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>> <br/>
>>>>
>>>> </body>
>>>> </html>
>>>>
>>>>
>>
>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Suat,
but maybe one minor thing: could you give me a list of parameters that
are valid for the POST request in creating or updating content items?
because in the Doku, it says 'constraints' for the JSON constraint, a
few lines below it is called '|||||*jsonCons', then there is
'disposition', but only for files, etc... *|||||
So the docu seems to be a bit inconsistent here.
Thank you,
Melanie
Am 05.10.2012 17:25, schrieb Melanie Reiplinger:
> Hi Suat,
>
> thank you a lot. I was also having problems doing the POST via
> jQuery.ajax, because I couldn't make the upload of files with
> Multipart-Formdata (FromData object) work. But maybe I will try this
> after you completed the changes, and work on something different for
> the time being.
>
> Best,
> Melanie
>
> Am 05.10.2012 17:20, schrieb Suat Gonul:
>> Hi Melanie,
>>
>> Currently, I and my colleague are working on the RESTful services of
>> Contenthub. We are going over the RESTful services providing ContentItem
>> submission there will be an overall improvement on the services. We will
>> adapt the services so that they will also support the multipart
>> serialization of ContentItems. All documentations will also be updated.
>> I hope the implementation will be finished in the next week. I will open
>> issues for these developments and inform this list.
>>
>> You can specify a uri for your item with form elements as follows:
>> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
>> author.&constraints={author:\"mere\"}&title=PeterPan&id=myid"
>> http://dev.iks-project.eu:8081/contenthub/contenthub/store
>>
>> The url parameter is only considered if you do not specify the "content"
>> parameter. In this case, the content is fetched from the given url.
>>
>> Hope this helps, best,
>> Suat
>>
>> On 10/5/2012 5:32 PM, Melanie Reiplinger wrote:
>>> Hi all,
>>>
>>> I was trying the form element specification for content items. Seems
>>> if I use form elements, then I cannot specify an urn for my item - I
>>> get an ugly exception thrown (shown below).
>>>
>>> And another more thing: what happens with the url I specify? I can't
>>> see them anywhere at my items.
>>>
>>> Best,
>>> Melanie
>>>
>>> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
>>> author.&constraints={author:\"mere\"}&title=PeterPan&url=\"http://foo.bar.de\""
>>>
>>> http://dev.iks-project.eu:8081/contenthub/contenthub/store/PP
>>> HTTP/1.1 500 There is no textual for the content item
>>> Content-Type: text/html; charset=iso-8859-1
>>> Cache-Control: must-revalidate,no-cache,no-store
>>> Content-Length: 7484
>>> Server: Jetty(6.1.x)
>>>
>>> <html>
>>> <head>
>>> <meta http-equiv="Content-Type" content="text/html;
>>> charset=ISO-8859-1"/>
>>> <title>Error 500 There is no textual for the content item</title>
>>> </head>
>>> <body><h2>HTTP ERROR 500</h2>
>>> <p>Problem accessing /contenthub/contenthub/store/PP. Reason:
>>> <pre> There is no textual for the content item</pre></p><h3>Caused
>>> by:</h3><p
>>> re>org.apache.stanbol.contenthub.servicesapi.store.StoreException:
>>> There is no t extual for the
>>> content item
>>> at
>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.addDefaultFiel
>>> ds(SolrStoreImpl.java:375)
>>> at
>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>>> mpl.java:320)
>>> at
>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>>> mpl.java:342)
>>> at
>>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(
>>> SolrStoreImpl.java:314)
>>> at
>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>>> ceAndRedirect(StoreResource.java:659)
>>> at
>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>>> ceAndRedirect(StoreResource.java:802)
>>> at
>>> org.apache.stanbol.contenthub.web.resources.StoreResource.createConte
>>> ntItemWithId(StoreResource.java:496)
>>> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown
>>> Source)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>>> sorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMe
>>> thodInvokerFactory.java:60)
>>> at
>>> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMeth
>>> odDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchPr
>>>
>>> ovider.java:205)
>>> at
>>> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDi
>>> spatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>>> at
>>> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethod
>>> Rule.java:288)
>>> at
>>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>>> ndPathRule.java:147)
>>> at
>>> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(Resourc
>>> eClassRule.java:108)
>>> at
>>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>>> ndPathRule.java:147)
>>> at
>>> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(R
>>> ootResourceClassesRule.java:84)
>>> at
>>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>>> est(WebApplicationImpl.java:1483)
>>> at
>>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>>> est(WebApplicationImpl.java:1414)
>>> at
>>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>>> st(WebApplicationImpl.java:1363)
>>> at
>>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>>> st(WebApplicationImpl.java:1353)
>>> at
>>> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponen
>>> t.java:414)
>>> at
>>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>>> Container.java:537)
>>> at
>>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>>> Container.java:708)
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(S
>>> ervletHandler.java:96)
>>> at
>>> org.apache.felix.http.base.internal.handler.ServletHandler.handle(Ser
>>> vletHandler.java:79)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(S
>>> ervletPipeline.java:42)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>> Filter(InvocationFilterChain.java:49)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>> (HttpFilterChain.java:33)
>>> at
>>> org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.d
>>> oFilter(QueryHeadersFilter.java:75)
>>> at
>>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>>> lterHandler.java:88)
>>> at
>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>> erHandler.java:76)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>> Filter(InvocationFilterChain.java:47)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>> (HttpFilterChain.java:33)
>>> at
>>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(A
>>> uthenticatingFilter.java:157)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at
>>> javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>>> at
>>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilte
>>> r(AuthenticatingFilter.java:153)
>>> at
>>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>>> lterHandler.java:88)
>>> at
>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>> erHandler.java:76)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>> Filter(InvocationFilterChain.java:47)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>> (HttpFilterChain.java:33)
>>> at
>>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>>> erHandler.java:78)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>>> Filter(InvocationFilterChain.java:47)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>>> (HttpFilterChain.java:33)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(
>>> FilterPipeline.java:48)
>>> at
>>> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Disp
>>> atcher.java:39)
>>> at
>>> org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatc
>>> herServlet.java:67)
>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511 )
>>> at
>>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3 90)
>>>
>>> at
>>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1 82)
>>>
>>> at
>>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7 65)
>>>
>>> at
>>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1 52)
>>>
>>> at org.mortbay.jetty.Server.handle(Server.java:326)
>>> at
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54 2)
>>>
>>> at
>>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
>>> n.java:943)
>>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
>>> at
>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>>> at
>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>> at
>>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
>>> va:410)
>>> at
>>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
>>> ava:582)
>>> </pre>
>>> <hr /><i><small>Powered by Jetty://</small></i><br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>> <br/>
>>>
>>> </body>
>>> </html>
>>>
>>>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
thank you a lot. I was also having problems doing the POST via
jQuery.ajax, because I couldn't make the upload of files with
Multipart-Formdata (FromData object) work. But maybe I will try this
after you completed the changes, and work on something different for the
time being.
Best,
Melanie
Am 05.10.2012 17:20, schrieb Suat Gonul:
> Hi Melanie,
>
> Currently, I and my colleague are working on the RESTful services of
> Contenthub. We are going over the RESTful services providing ContentItem
> submission there will be an overall improvement on the services. We will
> adapt the services so that they will also support the multipart
> serialization of ContentItems. All documentations will also be updated.
> I hope the implementation will be finished in the next week. I will open
> issues for these developments and inform this list.
>
> You can specify a uri for your item with form elements as follows:
> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
> author.&constraints={author:\"mere\"}&title=PeterPan&id=myid"
> http://dev.iks-project.eu:8081/contenthub/contenthub/store
>
> The url parameter is only considered if you do not specify the "content"
> parameter. In this case, the content is fetched from the given url.
>
> Hope this helps, best,
> Suat
>
> On 10/5/2012 5:32 PM, Melanie Reiplinger wrote:
>> Hi all,
>>
>> I was trying the form element specification for content items. Seems
>> if I use form elements, then I cannot specify an urn for my item - I
>> get an ugly exception thrown (shown below).
>>
>> And another more thing: what happens with the url I specify? I can't
>> see them anywhere at my items.
>>
>> Best,
>> Melanie
>>
>> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
>> author.&constraints={author:\"mere\"}&title=PeterPan&url=\"http://foo.bar.de\""
>> http://dev.iks-project.eu:8081/contenthub/contenthub/store/PP
>> HTTP/1.1 500 There is no textual for the content item
>> Content-Type: text/html; charset=iso-8859-1
>> Cache-Control: must-revalidate,no-cache,no-store
>> Content-Length: 7484
>> Server: Jetty(6.1.x)
>>
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
>> <title>Error 500 There is no textual for the content item</title>
>> </head>
>> <body><h2>HTTP ERROR 500</h2>
>> <p>Problem accessing /contenthub/contenthub/store/PP. Reason:
>> <pre> There is no textual for the content item</pre></p><h3>Caused
>> by:</h3><p
>> re>org.apache.stanbol.contenthub.servicesapi.store.StoreException:
>> There is no t extual for the
>> content item
>> at
>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.addDefaultFiel
>> ds(SolrStoreImpl.java:375)
>> at
>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>> mpl.java:320)
>> at
>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
>> mpl.java:342)
>> at
>> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(
>> SolrStoreImpl.java:314)
>> at
>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>> ceAndRedirect(StoreResource.java:659)
>> at
>> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
>> ceAndRedirect(StoreResource.java:802)
>> at
>> org.apache.stanbol.contenthub.web.resources.StoreResource.createConte
>> ntItemWithId(StoreResource.java:496)
>> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at
>> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMe
>> thodInvokerFactory.java:60)
>> at
>> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMeth
>> odDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchPr
>> ovider.java:205)
>> at
>> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDi
>> spatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>> at
>> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethod
>> Rule.java:288)
>> at
>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>> ndPathRule.java:147)
>> at
>> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(Resourc
>> eClassRule.java:108)
>> at
>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
>> ndPathRule.java:147)
>> at
>> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(R
>> ootResourceClassesRule.java:84)
>> at
>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>> est(WebApplicationImpl.java:1483)
>> at
>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
>> est(WebApplicationImpl.java:1414)
>> at
>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>> st(WebApplicationImpl.java:1363)
>> at
>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
>> st(WebApplicationImpl.java:1353)
>> at
>> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponen
>> t.java:414)
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>> Container.java:537)
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
>> Container.java:708)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at
>> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(S
>> ervletHandler.java:96)
>> at
>> org.apache.felix.http.base.internal.handler.ServletHandler.handle(Ser
>> vletHandler.java:79)
>> at
>> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(S
>> ervletPipeline.java:42)
>> at
>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>> Filter(InvocationFilterChain.java:49)
>> at
>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>> (HttpFilterChain.java:33)
>> at
>> org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.d
>> oFilter(QueryHeadersFilter.java:75)
>> at
>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>> lterHandler.java:88)
>> at
>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>> erHandler.java:76)
>> at
>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>> Filter(InvocationFilterChain.java:47)
>> at
>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>> (HttpFilterChain.java:33)
>> at
>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(A
>> uthenticatingFilter.java:157)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>> at
>> org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilte
>> r(AuthenticatingFilter.java:153)
>> at
>> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
>> lterHandler.java:88)
>> at
>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>> erHandler.java:76)
>> at
>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>> Filter(InvocationFilterChain.java:47)
>> at
>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>> (HttpFilterChain.java:33)
>> at
>> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
>> erHandler.java:78)
>> at
>> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
>> Filter(InvocationFilterChain.java:47)
>> at
>> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
>> (HttpFilterChain.java:33)
>> at
>> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(
>> FilterPipeline.java:48)
>> at
>> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Disp
>> atcher.java:39)
>> at
>> org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatc
>> herServlet.java:67)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511 )
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3 90)
>> at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1 82)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7 65)
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1 52)
>> at org.mortbay.jetty.Server.handle(Server.java:326)
>> at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54 2)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
>> n.java:943)
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
>> at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>> at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>> at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
>> va:410)
>> at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
>> ava:582)
>> </pre>
>> <hr /><i><small>Powered by Jetty://</small></i><br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>> <br/>
>>
>> </body>
>> </html>
>>
>>
Re: content hub form element POST
Posted by Meriç Taze <me...@gmail.com>.
Hi Melanie,
Yes, that will be possible. Multipart serialization of ContentItems allow
parsing pdf files while constructing ContentItems. Since we will use this
approach it will be possible to submit pdf files.
Best
Meric.
2012/10/10 Melanie Reiplinger <me...@dfki.de>
> Hi Suat,
>
> concerning the file upload to the contenthub: will that also support
> upload of pdf, or plain text only?
>
>
> Best,
> Melanie
>
> Am 05.10.2012 17:20, schrieb Suat Gonul:
>
>> Hi Melanie,
>>
>>
>> Currently, I and my colleague are working on the RESTful services of
>> Contenthub. We are going over the RESTful services providing ContentItem
>> submission there will be an overall improvement on the services. We will
>> adapt the services so that they will also support the multipart
>> serialization of ContentItems. All documentations will also be updated.
>> I hope the implementation will be finished in the next week. I will open
>> issues for these developments and inform this list.
>>
>>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
concerning the file upload to the contenthub: will that also support
upload of pdf, or plain text only?
Best,
Melanie
Am 05.10.2012 17:20, schrieb Suat Gonul:
> Hi Melanie,
>
> Currently, I and my colleague are working on the RESTful services of
> Contenthub. We are going over the RESTful services providing ContentItem
> submission there will be an overall improvement on the services. We will
> adapt the services so that they will also support the multipart
> serialization of ContentItems. All documentations will also be updated.
> I hope the implementation will be finished in the next week. I will open
> issues for these developments and inform this list.
>
Re: entityhub problems
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi melanie
looks like the data in the SolrCore of the Entityhub on
dev.iks-project.eu:8081 got somehow corrupted. And I can not fix it
because I can still not access the "system/console" because of this
"Apache Clerezza Loging" issue.
In the meantime (until the server will be reseted tomorrow ~5:00am you
can use the dev.iks-project.eu:8080.
I will have a look at the logs to find your what caused the SolrCore
to get corrupted.
best
Rupert
On Fri, Oct 19, 2012 at 9:26 AM, Melanie Reiplinger
<me...@dfki.de> wrote:
> Hi all,
>
> since this morning some of my tests that work with the entityhub fail.
> When e.g. doing a find for name=P* then I get an exception related to geo.
> The same request works for e.g. Pad*.
>
> When klicking on the ready-to-use examples on
> http://dev.iks-project.eu:8081/entityhub/lookup, I get the same exception,
> see below.
>
> Does anyone know about this problem?
>
> Best, Melanie
>
> Unknown prefix geo (parsed from field geo:long)! - <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 Unknown prefix geo (parsed from field geo:long)!</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing /entityhub/lookup. Reason:
> <pre> Unknown prefix geo (parsed from field
> geo:long)!</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalStateException:
> Unknown prefix geo (parsed from field geo:long)!
>
>
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
entityhub problems
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi all,
since this morning some of my tests that work with the entityhub fail.
When e.g. doing a find for name=P* then I get an exception related to
geo. The same request works for e.g. Pad*.
When klicking on the ready-to-use examples on
http://dev.iks-project.eu:8081/entityhub/lookup, I get the same
exception, see below.
Does anyone know about this problem?
Best, Melanie
Unknown prefix geo (parsed from field geo:long)! - <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Unknown prefix geo (parsed from field geo:long)!</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /entityhub/lookup. Reason:
<pre> Unknown prefix geo (parsed from field geo:long)!</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalStateException: Unknown prefix geo (parsed from field geo:long)!
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
Thanks for your reply.
I've been uploading formdata via ajax before, e.g. on the ontonet. But
just with files it didn't seem to work. So I made a workaround for the
time being, and once the updates are on, I'll maybe take another look at
how this can be solved.
Best,
Melanie
Am 17.10.2012 18:16, schrieb Suat Gonul:
> Hi Melanie,
>
> ...
> Unfortunately, I have never tried ajax to send multipart requests. Once
> we are done with the changes, I will look into that (possibly next
> week). BTW, I found some links[1],[2]. Those may be useful for you.
>
> Best,
> Suat
>
> [1]
> http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax
> [2] http://blog.rectorsquid.com/ajax-and-multipartform-data/
>
>>> Best,
>>> Melanie
>>>
>>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>>> Hi Melanie,
>>>>
>>>> Currently, I and my colleague are working on the RESTful services of
>>>> Contenthub. We are going over the RESTful services providing
>>>> ContentItem
>>>> submission there will be an overall improvement on the services. We
>>>> will
>>>> adapt the services so that they will also support the multipart
>>>> serialization of ContentItems. All documentations will also be updated.
>>>> I hope the implementation will be finished in the next week. I will
>>>> open
>>>> issues for these developments and inform this list.
>>>>
>>
Re: content hub form element POST
Posted by adasal <ad...@gmail.com>.
On 22 October 2012 14:28, Melanie Reiplinger <me...@dfki.de>wrote:
> But wouldn't it be more intuitive if an 'update' of an existing item would
> result in the *updated* version of the very same item, i.e., with the very
> same id as before?
> Maybe I got this wrong, but I thought the update functionality would be
> used to e.g. insert more text into an item, or to override the text of the
> item, or to add metadata to an existing item.
>
Yes, you are right. But if what I have said is more or less correct about
the design issues, you can see that there is a problem.
The first issue is how does Stanbol use id internally. I'm not sure that it
does, rather that it is a requirement of the RDF spec which it fulfils by
spoofing it's own. Or is this outside of the spec and just used for storage?
I assume that this id is not used in processing, e.g. that an item with
this id is treated differently to one with another id.
I also assume that the reason it is spoofed is because the implementation
needs to ensure that all RDF fields are non empty.
Or else it is outside of RDF but anyway it breaks the items connection with
its originator deliberately. The originator is this machine.
Not any number of different (or the same) external requests to an action on
this machine.
So, in short, less is being done in this implementation than you would like
because the implications of doing more are quite complex and have not been
dealt with.
I would be interested to know if I have the correct hang of this as I am in
the process of contemplating designing a wrapper service that deals with
these issues.
Adam
> Am 22.10.2012 15:21, schrieb adasal:
>
>> This sounds like you need to know the id of the updated item.
>> I think that in RESTful systems this and other similar problems are dealt
>> with by having UUIDs.
>> The idea here would be that the system would respond to a GET for a
>> specific item from a particular user.
>> You may not want a store of user specific items - this could entail a huge
>> amount of duplication depending on the nature of the content.
>> What you want is a way of tracking users and items in which they have an
>> interest.
>> Or, rather, item requests against requested items.
>> UUIDs for requests and UUIDs for item (fragments) introduces indirection
>> that deals with this.
>> (Users are separate and should sit on top of this.)
>>
>> If I understand the Stanbol design this is not dealt with in the present
>> implementation.
>> Where it might be dealt with would be through the CMS connector.
>> But Stanbol itself is a LoD server.
>>
>> Adam
>>
>> On 22 October 2012 13:32, Melanie Reiplinger <me...@dfki.de>
>> **wrote:
>>
>> Hi Suat and all,
>>>
>>> another brief question on the contenthub:
>>> when updating a content item, I specify in the id parameter the uri of
>>> the
>>> item i wish to update. But how can I specify the id for the updated item?
>>> When I update some item with urn=abc, then my 'abc' item is deleted and
>>> the
>>> updated item is stored to some automatically created urn.
>>>
>>> Best,
>>> Melanie
>>>
>>> Am 17.10.2012 18:16, schrieb Suat Gonul:
>>>
>>> Hi Melanie,
>>>
>>>> On 10/17/2012 12:48 PM, Melanie Reiplinger wrote:
>>>>
>>>> Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
>>>>>
>>>>> Hi Suat,
>>>>>>
>>>>>> I'm trying to upload content items from local files using
>>>>>> jQuery.ajax. Is the multipart serialization supported already?
>>>>>>
>>>>>> We have not committed the changes yet. I will inform the list when
>>>>> they
>>>>>
>>>> are completed. We are planning to do this in a few days.
>>>>
>>>> My problem is, that I can see it works from command line when using
>>>>
>>>>> curl (at least if I do not try to specify an id for the item), but
>>>>> when sending a FormData object with an ajax call, only the name of the
>>>>> file seems to be sent, not the contents.
>>>>>
>>>>> Unfortunately, I have never tried ajax to send multipart requests.
>>>>> Once
>>>>>
>>>> we are done with the changes, I will look into that (possibly next
>>>> week). BTW, I found some links[1],[2]. Those may be useful for you.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> [1]
>>>> http://stackoverflow.com/****questions/5392344/sending-**<http://stackoverflow.com/**questions/5392344/sending-**>
>>>> multipart-formdata-with-****jquery-ajax<http://**
>>>> stackoverflow.com/questions/**5392344/sending-multipart-**
>>>> formdata-with-jquery-ajax<http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax>
>>>> >
>>>> [2] http://blog.rectorsquid.com/****ajax-and-multipartform-data/<http://blog.rectorsquid.com/**ajax-and-multipartform-data/>
>>>> <h**ttp://blog.rectorsquid.com/**ajax-and-multipartform-data/<http://blog.rectorsquid.com/ajax-and-multipartform-data/>
>>>> >
>>>>
>>>>
>>>> Best,
>>>>
>>>>> Melanie
>>>>>>
>>>>>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>>>>>
>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> Currently, I and my colleague are working on the RESTful services of
>>>>>>> Contenthub. We are going over the RESTful services providing
>>>>>>> ContentItem
>>>>>>> submission there will be an overall improvement on the services. We
>>>>>>> will
>>>>>>> adapt the services so that they will also support the multipart
>>>>>>> serialization of ContentItems. All documentations will also be
>>>>>>> updated.
>>>>>>> I hope the implementation will be finished in the next week. I will
>>>>>>> open
>>>>>>> issues for these developments and inform this list.
>>>>>>>
>>>>>>>
>>>>>>>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
But wouldn't it be more intuitive if an 'update' of an existing item
would result in the *updated* version of the very same item, i.e., with
the very same id as before?
Maybe I got this wrong, but I thought the update functionality would be
used to e.g. insert more text into an item, or to override the text of
the item, or to add metadata to an existing item.
Am 22.10.2012 15:21, schrieb adasal:
> This sounds like you need to know the id of the updated item.
> I think that in RESTful systems this and other similar problems are dealt
> with by having UUIDs.
> The idea here would be that the system would respond to a GET for a
> specific item from a particular user.
> You may not want a store of user specific items - this could entail a huge
> amount of duplication depending on the nature of the content.
> What you want is a way of tracking users and items in which they have an
> interest.
> Or, rather, item requests against requested items.
> UUIDs for requests and UUIDs for item (fragments) introduces indirection
> that deals with this.
> (Users are separate and should sit on top of this.)
>
> If I understand the Stanbol design this is not dealt with in the present
> implementation.
> Where it might be dealt with would be through the CMS connector.
> But Stanbol itself is a LoD server.
>
> Adam
>
> On 22 October 2012 13:32, Melanie Reiplinger <me...@dfki.de>wrote:
>
>> Hi Suat and all,
>>
>> another brief question on the contenthub:
>> when updating a content item, I specify in the id parameter the uri of the
>> item i wish to update. But how can I specify the id for the updated item?
>> When I update some item with urn=abc, then my 'abc' item is deleted and the
>> updated item is stored to some automatically created urn.
>>
>> Best,
>> Melanie
>>
>> Am 17.10.2012 18:16, schrieb Suat Gonul:
>>
>> Hi Melanie,
>>> On 10/17/2012 12:48 PM, Melanie Reiplinger wrote:
>>>
>>>> Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> I'm trying to upload content items from local files using
>>>>> jQuery.ajax. Is the multipart serialization supported already?
>>>>>
>>>> We have not committed the changes yet. I will inform the list when they
>>> are completed. We are planning to do this in a few days.
>>>
>>> My problem is, that I can see it works from command line when using
>>>> curl (at least if I do not try to specify an id for the item), but
>>>> when sending a FormData object with an ajax call, only the name of the
>>>> file seems to be sent, not the contents.
>>>>
>>>> Unfortunately, I have never tried ajax to send multipart requests. Once
>>> we are done with the changes, I will look into that (possibly next
>>> week). BTW, I found some links[1],[2]. Those may be useful for you.
>>>
>>> Best,
>>> Suat
>>>
>>> [1]
>>> http://stackoverflow.com/**questions/5392344/sending-**
>>> multipart-formdata-with-**jquery-ajax<http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax>
>>> [2] http://blog.rectorsquid.com/**ajax-and-multipartform-data/<http://blog.rectorsquid.com/ajax-and-multipartform-data/>
>>>
>>> Best,
>>>>> Melanie
>>>>>
>>>>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>>>>
>>>>>> Hi Melanie,
>>>>>>
>>>>>> Currently, I and my colleague are working on the RESTful services of
>>>>>> Contenthub. We are going over the RESTful services providing
>>>>>> ContentItem
>>>>>> submission there will be an overall improvement on the services. We
>>>>>> will
>>>>>> adapt the services so that they will also support the multipart
>>>>>> serialization of ContentItems. All documentations will also be updated.
>>>>>> I hope the implementation will be finished in the next week. I will
>>>>>> open
>>>>>> issues for these developments and inform this list.
>>>>>>
>>>>>>
Re: content hub form element POST
Posted by adasal <ad...@gmail.com>.
This sounds like you need to know the id of the updated item.
I think that in RESTful systems this and other similar problems are dealt
with by having UUIDs.
The idea here would be that the system would respond to a GET for a
specific item from a particular user.
You may not want a store of user specific items - this could entail a huge
amount of duplication depending on the nature of the content.
What you want is a way of tracking users and items in which they have an
interest.
Or, rather, item requests against requested items.
UUIDs for requests and UUIDs for item (fragments) introduces indirection
that deals with this.
(Users are separate and should sit on top of this.)
If I understand the Stanbol design this is not dealt with in the present
implementation.
Where it might be dealt with would be through the CMS connector.
But Stanbol itself is a LoD server.
Adam
On 22 October 2012 13:32, Melanie Reiplinger <me...@dfki.de>wrote:
> Hi Suat and all,
>
> another brief question on the contenthub:
> when updating a content item, I specify in the id parameter the uri of the
> item i wish to update. But how can I specify the id for the updated item?
> When I update some item with urn=abc, then my 'abc' item is deleted and the
> updated item is stored to some automatically created urn.
>
> Best,
> Melanie
>
> Am 17.10.2012 18:16, schrieb Suat Gonul:
>
> Hi Melanie,
>>
>> On 10/17/2012 12:48 PM, Melanie Reiplinger wrote:
>>
>>> Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
>>>
>>>> Hi Suat,
>>>>
>>>> I'm trying to upload content items from local files using
>>>> jQuery.ajax. Is the multipart serialization supported already?
>>>>
>>> We have not committed the changes yet. I will inform the list when they
>> are completed. We are planning to do this in a few days.
>>
>> My problem is, that I can see it works from command line when using
>>> curl (at least if I do not try to specify an id for the item), but
>>> when sending a FormData object with an ajax call, only the name of the
>>> file seems to be sent, not the contents.
>>>
>>> Unfortunately, I have never tried ajax to send multipart requests. Once
>> we are done with the changes, I will look into that (possibly next
>> week). BTW, I found some links[1],[2]. Those may be useful for you.
>>
>> Best,
>> Suat
>>
>> [1]
>> http://stackoverflow.com/**questions/5392344/sending-**
>> multipart-formdata-with-**jquery-ajax<http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax>
>> [2] http://blog.rectorsquid.com/**ajax-and-multipartform-data/<http://blog.rectorsquid.com/ajax-and-multipartform-data/>
>>
>> Best,
>>>> Melanie
>>>>
>>>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>>>
>>>>> Hi Melanie,
>>>>>
>>>>> Currently, I and my colleague are working on the RESTful services of
>>>>> Contenthub. We are going over the RESTful services providing
>>>>> ContentItem
>>>>> submission there will be an overall improvement on the services. We
>>>>> will
>>>>> adapt the services so that they will also support the multipart
>>>>> serialization of ContentItems. All documentations will also be updated.
>>>>> I hope the implementation will be finished in the next week. I will
>>>>> open
>>>>> issues for these developments and inform this list.
>>>>>
>>>>>
>>>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat and all,
another brief question on the contenthub:
when updating a content item, I specify in the id parameter the uri of
the item i wish to update. But how can I specify the id for the updated
item? When I update some item with urn=abc, then my 'abc' item is
deleted and the updated item is stored to some automatically created urn.
Best,
Melanie
Am 17.10.2012 18:16, schrieb Suat Gonul:
> Hi Melanie,
>
> On 10/17/2012 12:48 PM, Melanie Reiplinger wrote:
>> Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
>>> Hi Suat,
>>>
>>> I'm trying to upload content items from local files using
>>> jQuery.ajax. Is the multipart serialization supported already?
> We have not committed the changes yet. I will inform the list when they
> are completed. We are planning to do this in a few days.
>
>> My problem is, that I can see it works from command line when using
>> curl (at least if I do not try to specify an id for the item), but
>> when sending a FormData object with an ajax call, only the name of the
>> file seems to be sent, not the contents.
>>
> Unfortunately, I have never tried ajax to send multipart requests. Once
> we are done with the changes, I will look into that (possibly next
> week). BTW, I found some links[1],[2]. Those may be useful for you.
>
> Best,
> Suat
>
> [1]
> http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax
> [2] http://blog.rectorsquid.com/ajax-and-multipartform-data/
>
>>> Best,
>>> Melanie
>>>
>>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>>> Hi Melanie,
>>>>
>>>> Currently, I and my colleague are working on the RESTful services of
>>>> Contenthub. We are going over the RESTful services providing
>>>> ContentItem
>>>> submission there will be an overall improvement on the services. We
>>>> will
>>>> adapt the services so that they will also support the multipart
>>>> serialization of ContentItems. All documentations will also be updated.
>>>> I hope the implementation will be finished in the next week. I will
>>>> open
>>>> issues for these developments and inform this list.
>>>>
>>
Re: content hub form element POST
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
On 10/17/2012 12:48 PM, Melanie Reiplinger wrote:
> Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
>> Hi Suat,
>>
>> I'm trying to upload content items from local files using
>> jQuery.ajax. Is the multipart serialization supported already?
>
We have not committed the changes yet. I will inform the list when they
are completed. We are planning to do this in a few days.
> My problem is, that I can see it works from command line when using
> curl (at least if I do not try to specify an id for the item), but
> when sending a FormData object with an ajax call, only the name of the
> file seems to be sent, not the contents.
>
Unfortunately, I have never tried ajax to send multipart requests. Once
we are done with the changes, I will look into that (possibly next
week). BTW, I found some links[1],[2]. Those may be useful for you.
Best,
Suat
[1]
http://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax
[2] http://blog.rectorsquid.com/ajax-and-multipartform-data/
>>
>> Best,
>> Melanie
>>
>> Am 05.10.2012 17:20, schrieb Suat Gonul:
>>> Hi Melanie,
>>>
>>> Currently, I and my colleague are working on the RESTful services of
>>> Contenthub. We are going over the RESTful services providing
>>> ContentItem
>>> submission there will be an overall improvement on the services. We
>>> will
>>> adapt the services so that they will also support the multipart
>>> serialization of ContentItems. All documentations will also be updated.
>>> I hope the implementation will be finished in the next week. I will
>>> open
>>> issues for these developments and inform this list.
>>>
>>
>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Am 17.10.2012 11:17, schrieb Melanie Reiplinger:
> Hi Suat,
>
> I'm trying to upload content items from local files using jQuery.ajax.
> Is the multipart serialization supported already?
My problem is, that I can see it works from command line when using curl
(at least if I do not try to specify an id for the item), but when
sending a FormData object with an ajax call, only the name of the file
seems to be sent, not the contents.
>
> Best,
> Melanie
>
> Am 05.10.2012 17:20, schrieb Suat Gonul:
>> Hi Melanie,
>>
>> Currently, I and my colleague are working on the RESTful services of
>> Contenthub. We are going over the RESTful services providing ContentItem
>> submission there will be an overall improvement on the services. We will
>> adapt the services so that they will also support the multipart
>> serialization of ContentItems. All documentations will also be updated.
>> I hope the implementation will be finished in the next week. I will open
>> issues for these developments and inform this list.
>>
>
Re: content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
I'm trying to upload content items from local files using jQuery.ajax.
Is the multipart serialization supported already?
Best,
Melanie
Am 05.10.2012 17:20, schrieb Suat Gonul:
> Hi Melanie,
>
> Currently, I and my colleague are working on the RESTful services of
> Contenthub. We are going over the RESTful services providing ContentItem
> submission there will be an overall improvement on the services. We will
> adapt the services so that they will also support the multipart
> serialization of ContentItems. All documentations will also be updated.
> I hope the implementation will be finished in the next week. I will open
> issues for these developments and inform this list.
>
Re: content hub form element POST
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
Currently, I and my colleague are working on the RESTful services of
Contenthub. We are going over the RESTful services providing ContentItem
submission there will be an overall improvement on the services. We will
adapt the services so that they will also support the multipart
serialization of ContentItems. All documentations will also be updated.
I hope the implementation will be finished in the next week. I will open
issues for these developments and inform this list.
You can specify a uri for your item with form elements as follows:
curl -i -X POST --data "content=James M. Barrie is a famous Scottish
author.&constraints={author:\"mere\"}&title=PeterPan&id=myid"
http://dev.iks-project.eu:8081/contenthub/contenthub/store
The url parameter is only considered if you do not specify the "content"
parameter. In this case, the content is fetched from the given url.
Hope this helps, best,
Suat
On 10/5/2012 5:32 PM, Melanie Reiplinger wrote:
> Hi all,
>
> I was trying the form element specification for content items. Seems
> if I use form elements, then I cannot specify an urn for my item - I
> get an ugly exception thrown (shown below).
>
> And another more thing: what happens with the url I specify? I can't
> see them anywhere at my items.
>
> Best,
> Melanie
>
> curl -i -X POST --data "content=James M. Barrie is a famous Scottish
> author.&constraints={author:\"mere\"}&title=PeterPan&url=\"http://foo.bar.de\""
> http://dev.iks-project.eu:8081/contenthub/contenthub/store/PP
> HTTP/1.1 500 There is no textual for the content item
> Content-Type: text/html; charset=iso-8859-1
> Cache-Control: must-revalidate,no-cache,no-store
> Content-Length: 7484
> Server: Jetty(6.1.x)
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 There is no textual for the content item</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing /contenthub/contenthub/store/PP. Reason:
> <pre> There is no textual for the content item</pre></p><h3>Caused
> by:</h3><p
> re>org.apache.stanbol.contenthub.servicesapi.store.StoreException:
> There is no t extual for the
> content item
> at
> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.addDefaultFiel
> ds(SolrStoreImpl.java:375)
> at
> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
> mpl.java:320)
> at
> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
> mpl.java:342)
> at
> org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(
> SolrStoreImpl.java:314)
> at
> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
> ceAndRedirect(StoreResource.java:659)
> at
> org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
> ceAndRedirect(StoreResource.java:802)
> at
> org.apache.stanbol.contenthub.web.resources.StoreResource.createConte
> ntItemWithId(StoreResource.java:496)
> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMe
> thodInvokerFactory.java:60)
> at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMeth
> odDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchPr
> ovider.java:205)
> at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDi
> spatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethod
> Rule.java:288)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
> ndPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(Resourc
> eClassRule.java:108)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
> ndPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(R
> ootResourceClassesRule.java:84)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
> est(WebApplicationImpl.java:1483)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
> est(WebApplicationImpl.java:1414)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
> st(WebApplicationImpl.java:1363)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
> st(WebApplicationImpl.java:1353)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponen
> t.java:414)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
> Container.java:537)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
> Container.java:708)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(S
> ervletHandler.java:96)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(Ser
> vletHandler.java:79)
> at
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(S
> ervletPipeline.java:42)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
> Filter(InvocationFilterChain.java:49)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
> (HttpFilterChain.java:33)
> at
> org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.d
> oFilter(QueryHeadersFilter.java:75)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
> lterHandler.java:88)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
> erHandler.java:76)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
> Filter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
> (HttpFilterChain.java:33)
> at
> org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(A
> uthenticatingFilter.java:157)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> at
> org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilte
> r(AuthenticatingFilter.java:153)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
> lterHandler.java:88)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
> erHandler.java:76)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
> Filter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
> (HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
> erHandler.java:78)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
> Filter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
> (HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(
> FilterPipeline.java:48)
> at
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Disp
> atcher.java:39)
> at
> org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatc
> herServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511 )
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3 90)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1 82)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7 65)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1 52)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54 2)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
> n.java:943)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
> va:410)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
> ava:582)
> </pre>
> <hr /><i><small>Powered by Jetty://</small></i><br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
>
> </body>
> </html>
>
>
content hub form element POST
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi all,
I was trying the form element specification for content items. Seems if
I use form elements, then I cannot specify an urn for my item - I get an
ugly exception thrown (shown below).
And another more thing: what happens with the url I specify? I can't see
them anywhere at my items.
Best,
Melanie
curl -i -X POST --data "content=James M. Barrie is a famous Scottish
author.&constraints={author:\"mere\"}&title=PeterPan&url=\"http://foo.bar.de\""
http://dev.iks-project.eu:8081/contenthub/contenthub/store/PP
HTTP/1.1 500 There is no textual for the content item
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 7484
Server: Jetty(6.1.x)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 There is no textual for the content item</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /contenthub/contenthub/store/PP. Reason:
<pre> There is no textual for the content item</pre></p><h3>Caused
by:</h3><p
re>org.apache.stanbol.contenthub.servicesapi.store.StoreException: There
is no t extual for the content item
at
org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.addDefaultFiel
ds(SolrStoreImpl.java:375)
at
org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
mpl.java:320)
at
org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.put(SolrStoreI
mpl.java:342)
at
org.apache.stanbol.contenthub.store.solr.SolrStoreImpl.enhanceAndPut(
SolrStoreImpl.java:314)
at
org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
ceAndRedirect(StoreResource.java:659)
at
org.apache.stanbol.contenthub.web.resources.StoreResource.createEnhan
ceAndRedirect(StoreResource.java:802)
at
org.apache.stanbol.contenthub.web.resources.StoreResource.createConte
ntItemWithId(StoreResource.java:496)
at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMe
thodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMeth
odDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchPr
ovider.java:205)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDi
spatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethod
Rule.java:288)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
ndPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(Resourc
eClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHa
ndPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(R
ootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
est(WebApplicationImpl.java:1483)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
est(WebApplicationImpl.java:1414)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1363)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1353)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponen
t.java:414)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
Container.java:537)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(Servlet
Container.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(S
ervletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(Ser
vletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(S
ervletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
Filter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
(HttpFilterChain.java:33)
at
org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.d
oFilter(QueryHeadersFilter.java:75)
at
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
lterHandler.java:88)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
erHandler.java:76)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
Filter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
(HttpFilterChain.java:33)
at
org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(A
uthenticatingFilter.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at
org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilte
r(AuthenticatingFilter.java:153)
at
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(Fi
lterHandler.java:88)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
erHandler.java:76)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
Filter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(Filt
erHandler.java:78)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.do
Filter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter
(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(
FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Disp
atcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatc
herServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511 )
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3 90)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1 82)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7 65)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1 52)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:54 2)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:582)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html>
Re: ContentHub Custom index for DBPedia-spotlight enhancer
Posted by Rafa Haro <rh...@zaizi.com>.
Hi Pablo,
Thanks for your help. I just configured the engine using
CoOccurrenceBasedSelector like spotter at OSGi console and now I'm
getting the same results than your demo. I'm still having the same issue
with ContentHub, and now also there are some extracted concepts that
seems not to be passed to LDPath Program.
Regards
El 14/09/12 16:29, Pablo N. Mendes escribió:
> Hi Rafa,
>
>
>> Recognized entities weren't exactly the same ... I think that's because
>> the 'No common words' feature in the demo. I have been trying to configure
>> it in the engine, but I wasn't able to.
>
> Thanks for your interest in DBpedia Spotlight. In order to enable "No
> common words", you need to use &spotter=CoOccurrenceBasedSelector. We need
> better names for these spotters, we are expanding the documentation [1] and
> we hope to organize these things before the end of the year.
>
> For the engine in Stanbol, you need to change the Spotter configuration [2].
>
> [1] https://github.com/dbpedia-spotlight/dbpedia-spotlight/wiki/Spotting
> [2]
> http://blog.iks-project.eu/dbpedia-spotlight-integration-in-apache-stanbol-2/
>
> Cheers,
> Pablo
>
> On Fri, Sep 14, 2012 at 4:03 PM, Suat Gönül <su...@gmail.com> wrote:
>
>> Hi Rafa,
>>
>> Could you please open an issue and attach the file there? In any case you
>> can send it also to my email. I will look into that in the next week.
>>
>> Best,
>> Suat
>>
>>
>> On Fri, Sep 14, 2012 at 4:55 PM, Rafa Haro <rh...@zaizi.com> wrote:
>>
>>> Hi Suat,
>>>
>>> I'm pretty sure. I can send you the Enhancement graph in RDF if you want
>>> to check by your own. I was to post here but is pretty large.
>>>
>>> Regards
>>>
>>> El 14/09/12 15:27, Suat Gonul escribió:
>>>
>>> Hi Rafa,
>>>> Are you sure the enhancements of this text do not contain other
>>>> entities. The contexts(URIs) on which the LDPath program is executed are
>>>> obtained as follows:
>>>>
>>>> Iterator<Triple> it = sci.getMetadata().filter(null,
>>>> Properties.ENHANCER_ENTITY_**REFERENCE, null);
>>>>
>>>> In other words, the source of the URIs is the metadata of the
>>>> ContentItem, could you please look into the enhancement graph of your
>>>> ContentItem whether there exists any other Orange related entities?
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>>
>>>> On 09/14/2012 04:15 PM, Rafa Haro wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have been playing around with DBPedia Spotlight engines these days.
>>>>> With Rupert's help (thanks again) I was able to successfully install
>>>>> and configure it as default engine. My next step was to create a
>>>>> custom index in ContentHub to extract some data about the detected
>>>>> entities and store it in Solr. Specifically, I want to store in Solr
>>>>> the labels of each entities and its types (rdf:types). For example,
>>>>> for the entity President Obama I would get:
>>>>>
>>>>> Labels:
>>>>>
>>>>> Presidency of Barack Obama
>>>>> Présidence de Barack Obama
>>>>> Barack Obama
>>>>>
>>>>> Types:
>>>>> foaf:Person
>>>>> dbpedia-owl:Person
>>>>> dbpedia-owl:OfficeHolder
>>>>> dbpedia-owl:Agent
>>>>>
>>>>> In order to achieve this, I have tried to extend default ContentHub
>>>>> LDPath Program with this line:
>>>>>
>>>>> concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
>>>>>
>>>>> I know that it might give me exactly what I want, but it was just a
>>>>> first test. Anyway, I found some issues when I submitted a document to
>>>>> store it in my new index:
>>>>>
>>>>> 1. Recognized entities weren't exactly the same that you can get using
>>>>> DBPedia Spotlight demo
>>>>> (http://dbpedia-spotlight.**github.com/demo/index.html<
>> http://dbpedia-spotlight.github.com/demo/index.html>),
>>>>> which results
>>>>> are more accurate. I think that's because the 'No common words'
>>>>> feature in the demo. I have been trying to configure it in the engine,
>>>>> but I wasn't able to.
>>>>>
>>>>> 2. The LDPath program is executed also for entities that are not
>>>>> recognized by the engine. For example, using the following text:
>>>>>
>>>>> " /Orange is a tropical to semitropical, evergreen, small flowering
>>>>> tree growing to about 5 to 8 m tall and bears seasonal fruits that
>>>>> measure about 3 inches in diameter and weighs about 100-150 g. Oranges
>>>>> are classified into two general categories, sweet and bitter, with the
>>>>> former being the type most commonly consumed. Popular varieties of the
>>>>> sweet orange include Valencia, Navel, Persian variety, and blood
>>>>> orange./"
>>>>>
>>>>> The enhancer only recognized Orange (fruit) but, when I submit the
>>>>> text to the content hub I also get results for Orange, Texas (Place).
>>>>> I would need to store only the information of the disambiguated entity.
>>>>>
>>>>> Thanks. Regards
>>>>>
>>>>> This message should be regarded as confidential. If you have received
>>>>> this email in error please notify the sender and destroy it
>>>>> immediately. Statements of intent shall only become binding when
>>>>> confirmed in hard copy by an authorised signatory.
>>>>>
>>>>> Zaizi Ltd is registered in England and Wales with the registration
>>>>> number 6440931. The Registered Office is 222 Westbourne Studios, 242
>>>>> Acklam Road, London W10 5JJ, UK.
>>>>>
>>>>>
>>> This message should be regarded as confidential. If you have received
>> this
>>> email in error please notify the sender and destroy it immediately.
>>> Statements of intent shall only become binding when confirmed in hard
>> copy
>>> by an authorised signatory.
>>>
>>> Zaizi Ltd is registered in England and Wales with the registration number
>>> 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam
>> Road,
>>> London W10 5JJ, UK.
>>>
>>>
>
>
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.
Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.
Re: ContentHub Custom index for DBPedia-spotlight enhancer
Posted by "Pablo N. Mendes" <pa...@gmail.com>.
Hi Rafa,
> Recognized entities weren't exactly the same ... I think that's because
> the 'No common words' feature in the demo. I have been trying to configure
> it in the engine, but I wasn't able to.
Thanks for your interest in DBpedia Spotlight. In order to enable "No
common words", you need to use &spotter=CoOccurrenceBasedSelector. We need
better names for these spotters, we are expanding the documentation [1] and
we hope to organize these things before the end of the year.
For the engine in Stanbol, you need to change the Spotter configuration [2].
[1] https://github.com/dbpedia-spotlight/dbpedia-spotlight/wiki/Spotting
[2]
http://blog.iks-project.eu/dbpedia-spotlight-integration-in-apache-stanbol-2/
Cheers,
Pablo
On Fri, Sep 14, 2012 at 4:03 PM, Suat Gönül <su...@gmail.com> wrote:
> Hi Rafa,
>
> Could you please open an issue and attach the file there? In any case you
> can send it also to my email. I will look into that in the next week.
>
> Best,
> Suat
>
>
> On Fri, Sep 14, 2012 at 4:55 PM, Rafa Haro <rh...@zaizi.com> wrote:
>
> > Hi Suat,
> >
> > I'm pretty sure. I can send you the Enhancement graph in RDF if you want
> > to check by your own. I was to post here but is pretty large.
> >
> > Regards
> >
> > El 14/09/12 15:27, Suat Gonul escribió:
> >
> > Hi Rafa,
> >>
> >> Are you sure the enhancements of this text do not contain other
> >> entities. The contexts(URIs) on which the LDPath program is executed are
> >> obtained as follows:
> >>
> >> Iterator<Triple> it = sci.getMetadata().filter(null,
> >> Properties.ENHANCER_ENTITY_**REFERENCE, null);
> >>
> >> In other words, the source of the URIs is the metadata of the
> >> ContentItem, could you please look into the enhancement graph of your
> >> ContentItem whether there exists any other Orange related entities?
> >>
> >> Best,
> >> Suat
> >>
> >>
> >> On 09/14/2012 04:15 PM, Rafa Haro wrote:
> >>
> >>> Hi all,
> >>>
> >>> I have been playing around with DBPedia Spotlight engines these days.
> >>> With Rupert's help (thanks again) I was able to successfully install
> >>> and configure it as default engine. My next step was to create a
> >>> custom index in ContentHub to extract some data about the detected
> >>> entities and store it in Solr. Specifically, I want to store in Solr
> >>> the labels of each entities and its types (rdf:types). For example,
> >>> for the entity President Obama I would get:
> >>>
> >>> Labels:
> >>>
> >>> Presidency of Barack Obama
> >>> Présidence de Barack Obama
> >>> Barack Obama
> >>>
> >>> Types:
> >>> foaf:Person
> >>> dbpedia-owl:Person
> >>> dbpedia-owl:OfficeHolder
> >>> dbpedia-owl:Agent
> >>>
> >>> In order to achieve this, I have tried to extend default ContentHub
> >>> LDPath Program with this line:
> >>>
> >>> concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
> >>>
> >>> I know that it might give me exactly what I want, but it was just a
> >>> first test. Anyway, I found some issues when I submitted a document to
> >>> store it in my new index:
> >>>
> >>> 1. Recognized entities weren't exactly the same that you can get using
> >>> DBPedia Spotlight demo
> >>> (http://dbpedia-spotlight.**github.com/demo/index.html<
> http://dbpedia-spotlight.github.com/demo/index.html>),
> >>> which results
> >>> are more accurate. I think that's because the 'No common words'
> >>> feature in the demo. I have been trying to configure it in the engine,
> >>> but I wasn't able to.
> >>>
> >>> 2. The LDPath program is executed also for entities that are not
> >>> recognized by the engine. For example, using the following text:
> >>>
> >>> " /Orange is a tropical to semitropical, evergreen, small flowering
> >>> tree growing to about 5 to 8 m tall and bears seasonal fruits that
> >>> measure about 3 inches in diameter and weighs about 100-150 g. Oranges
> >>> are classified into two general categories, sweet and bitter, with the
> >>> former being the type most commonly consumed. Popular varieties of the
> >>> sweet orange include Valencia, Navel, Persian variety, and blood
> >>> orange./"
> >>>
> >>> The enhancer only recognized Orange (fruit) but, when I submit the
> >>> text to the content hub I also get results for Orange, Texas (Place).
> >>> I would need to store only the information of the disambiguated entity.
> >>>
> >>> Thanks. Regards
> >>>
> >>> This message should be regarded as confidential. If you have received
> >>> this email in error please notify the sender and destroy it
> >>> immediately. Statements of intent shall only become binding when
> >>> confirmed in hard copy by an authorised signatory.
> >>>
> >>> Zaizi Ltd is registered in England and Wales with the registration
> >>> number 6440931. The Registered Office is 222 Westbourne Studios, 242
> >>> Acklam Road, London W10 5JJ, UK.
> >>>
> >>>
> > This message should be regarded as confidential. If you have received
> this
> > email in error please notify the sender and destroy it immediately.
> > Statements of intent shall only become binding when confirmed in hard
> copy
> > by an authorised signatory.
> >
> > Zaizi Ltd is registered in England and Wales with the registration number
> > 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam
> Road,
> > London W10 5JJ, UK.
> >
> >
>
--
---
Pablo N. Mendes
http://pablomendes.com
Events: http://wole2012.eurecom.fr
Re: ContentHub Custom index for DBPedia-spotlight enhancer
Posted by Suat Gönül <su...@gmail.com>.
Hi Rafa,
Could you please open an issue and attach the file there? In any case you
can send it also to my email. I will look into that in the next week.
Best,
Suat
On Fri, Sep 14, 2012 at 4:55 PM, Rafa Haro <rh...@zaizi.com> wrote:
> Hi Suat,
>
> I'm pretty sure. I can send you the Enhancement graph in RDF if you want
> to check by your own. I was to post here but is pretty large.
>
> Regards
>
> El 14/09/12 15:27, Suat Gonul escribió:
>
> Hi Rafa,
>>
>> Are you sure the enhancements of this text do not contain other
>> entities. The contexts(URIs) on which the LDPath program is executed are
>> obtained as follows:
>>
>> Iterator<Triple> it = sci.getMetadata().filter(null,
>> Properties.ENHANCER_ENTITY_**REFERENCE, null);
>>
>> In other words, the source of the URIs is the metadata of the
>> ContentItem, could you please look into the enhancement graph of your
>> ContentItem whether there exists any other Orange related entities?
>>
>> Best,
>> Suat
>>
>>
>> On 09/14/2012 04:15 PM, Rafa Haro wrote:
>>
>>> Hi all,
>>>
>>> I have been playing around with DBPedia Spotlight engines these days.
>>> With Rupert's help (thanks again) I was able to successfully install
>>> and configure it as default engine. My next step was to create a
>>> custom index in ContentHub to extract some data about the detected
>>> entities and store it in Solr. Specifically, I want to store in Solr
>>> the labels of each entities and its types (rdf:types). For example,
>>> for the entity President Obama I would get:
>>>
>>> Labels:
>>>
>>> Presidency of Barack Obama
>>> Présidence de Barack Obama
>>> Barack Obama
>>>
>>> Types:
>>> foaf:Person
>>> dbpedia-owl:Person
>>> dbpedia-owl:OfficeHolder
>>> dbpedia-owl:Agent
>>>
>>> In order to achieve this, I have tried to extend default ContentHub
>>> LDPath Program with this line:
>>>
>>> concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
>>>
>>> I know that it might give me exactly what I want, but it was just a
>>> first test. Anyway, I found some issues when I submitted a document to
>>> store it in my new index:
>>>
>>> 1. Recognized entities weren't exactly the same that you can get using
>>> DBPedia Spotlight demo
>>> (http://dbpedia-spotlight.**github.com/demo/index.html<http://dbpedia-spotlight.github.com/demo/index.html>),
>>> which results
>>> are more accurate. I think that's because the 'No common words'
>>> feature in the demo. I have been trying to configure it in the engine,
>>> but I wasn't able to.
>>>
>>> 2. The LDPath program is executed also for entities that are not
>>> recognized by the engine. For example, using the following text:
>>>
>>> " /Orange is a tropical to semitropical, evergreen, small flowering
>>> tree growing to about 5 to 8 m tall and bears seasonal fruits that
>>> measure about 3 inches in diameter and weighs about 100-150 g. Oranges
>>> are classified into two general categories, sweet and bitter, with the
>>> former being the type most commonly consumed. Popular varieties of the
>>> sweet orange include Valencia, Navel, Persian variety, and blood
>>> orange./"
>>>
>>> The enhancer only recognized Orange (fruit) but, when I submit the
>>> text to the content hub I also get results for Orange, Texas (Place).
>>> I would need to store only the information of the disambiguated entity.
>>>
>>> Thanks. Regards
>>>
>>> This message should be regarded as confidential. If you have received
>>> this email in error please notify the sender and destroy it
>>> immediately. Statements of intent shall only become binding when
>>> confirmed in hard copy by an authorised signatory.
>>>
>>> Zaizi Ltd is registered in England and Wales with the registration
>>> number 6440931. The Registered Office is 222 Westbourne Studios, 242
>>> Acklam Road, London W10 5JJ, UK.
>>>
>>>
> This message should be regarded as confidential. If you have received this
> email in error please notify the sender and destroy it immediately.
> Statements of intent shall only become binding when confirmed in hard copy
> by an authorised signatory.
>
> Zaizi Ltd is registered in England and Wales with the registration number
> 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road,
> London W10 5JJ, UK.
>
>
Re: ContentHub Custom index for DBPedia-spotlight enhancer
Posted by Rafa Haro <rh...@zaizi.com>.
Hi Suat,
I'm pretty sure. I can send you the Enhancement graph in RDF if you want
to check by your own. I was to post here but is pretty large.
Regards
El 14/09/12 15:27, Suat Gonul escribió:
> Hi Rafa,
>
> Are you sure the enhancements of this text do not contain other
> entities. The contexts(URIs) on which the LDPath program is executed are
> obtained as follows:
>
> Iterator<Triple> it = sci.getMetadata().filter(null, Properties.ENHANCER_ENTITY_REFERENCE, null);
>
> In other words, the source of the URIs is the metadata of the
> ContentItem, could you please look into the enhancement graph of your
> ContentItem whether there exists any other Orange related entities?
>
> Best,
> Suat
>
>
> On 09/14/2012 04:15 PM, Rafa Haro wrote:
>> Hi all,
>>
>> I have been playing around with DBPedia Spotlight engines these days.
>> With Rupert's help (thanks again) I was able to successfully install
>> and configure it as default engine. My next step was to create a
>> custom index in ContentHub to extract some data about the detected
>> entities and store it in Solr. Specifically, I want to store in Solr
>> the labels of each entities and its types (rdf:types). For example,
>> for the entity President Obama I would get:
>>
>> Labels:
>>
>> Presidency of Barack Obama
>> Présidence de Barack Obama
>> Barack Obama
>>
>> Types:
>> foaf:Person
>> dbpedia-owl:Person
>> dbpedia-owl:OfficeHolder
>> dbpedia-owl:Agent
>>
>> In order to achieve this, I have tried to extend default ContentHub
>> LDPath Program with this line:
>>
>> concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
>>
>> I know that it might give me exactly what I want, but it was just a
>> first test. Anyway, I found some issues when I submitted a document to
>> store it in my new index:
>>
>> 1. Recognized entities weren't exactly the same that you can get using
>> DBPedia Spotlight demo
>> (http://dbpedia-spotlight.github.com/demo/index.html), which results
>> are more accurate. I think that's because the 'No common words'
>> feature in the demo. I have been trying to configure it in the engine,
>> but I wasn't able to.
>>
>> 2. The LDPath program is executed also for entities that are not
>> recognized by the engine. For example, using the following text:
>>
>> " /Orange is a tropical to semitropical, evergreen, small flowering
>> tree growing to about 5 to 8 m tall and bears seasonal fruits that
>> measure about 3 inches in diameter and weighs about 100-150 g. Oranges
>> are classified into two general categories, sweet and bitter, with the
>> former being the type most commonly consumed. Popular varieties of the
>> sweet orange include Valencia, Navel, Persian variety, and blood
>> orange./"
>>
>> The enhancer only recognized Orange (fruit) but, when I submit the
>> text to the content hub I also get results for Orange, Texas (Place).
>> I would need to store only the information of the disambiguated entity.
>>
>> Thanks. Regards
>>
>> This message should be regarded as confidential. If you have received
>> this email in error please notify the sender and destroy it
>> immediately. Statements of intent shall only become binding when
>> confirmed in hard copy by an authorised signatory.
>>
>> Zaizi Ltd is registered in England and Wales with the registration
>> number 6440931. The Registered Office is 222 Westbourne Studios, 242
>> Acklam Road, London W10 5JJ, UK.
>>
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.
Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.
Re: ContentHub Custom index for DBPedia-spotlight enhancer
Posted by Suat Gonul <su...@gmail.com>.
Hi Rafa,
Are you sure the enhancements of this text do not contain other
entities. The contexts(URIs) on which the LDPath program is executed are
obtained as follows:
Iterator<Triple> it = sci.getMetadata().filter(null, Properties.ENHANCER_ENTITY_REFERENCE, null);
In other words, the source of the URIs is the metadata of the
ContentItem, could you please look into the enhancement graph of your
ContentItem whether there exists any other Orange related entities?
Best,
Suat
On 09/14/2012 04:15 PM, Rafa Haro wrote:
> Hi all,
>
> I have been playing around with DBPedia Spotlight engines these days.
> With Rupert's help (thanks again) I was able to successfully install
> and configure it as default engine. My next step was to create a
> custom index in ContentHub to extract some data about the detected
> entities and store it in Solr. Specifically, I want to store in Solr
> the labels of each entities and its types (rdf:types). For example,
> for the entity President Obama I would get:
>
> Labels:
>
> Presidency of Barack Obama
> Présidence de Barack Obama
> Barack Obama
>
> Types:
> foaf:Person
> dbpedia-owl:Person
> dbpedia-owl:OfficeHolder
> dbpedia-owl:Agent
>
> In order to achieve this, I have tried to extend default ContentHub
> LDPath Program with this line:
>
> concepts = fn:concat(rdfs:label[@en]," ", rdf:type) :: xsd:string;
>
> I know that it might give me exactly what I want, but it was just a
> first test. Anyway, I found some issues when I submitted a document to
> store it in my new index:
>
> 1. Recognized entities weren't exactly the same that you can get using
> DBPedia Spotlight demo
> (http://dbpedia-spotlight.github.com/demo/index.html), which results
> are more accurate. I think that's because the 'No common words'
> feature in the demo. I have been trying to configure it in the engine,
> but I wasn't able to.
>
> 2. The LDPath program is executed also for entities that are not
> recognized by the engine. For example, using the following text:
>
> " /Orange is a tropical to semitropical, evergreen, small flowering
> tree growing to about 5 to 8 m tall and bears seasonal fruits that
> measure about 3 inches in diameter and weighs about 100-150 g. Oranges
> are classified into two general categories, sweet and bitter, with the
> former being the type most commonly consumed. Popular varieties of the
> sweet orange include Valencia, Navel, Persian variety, and blood
> orange./"
>
> The enhancer only recognized Orange (fruit) but, when I submit the
> text to the content hub I also get results for Orange, Texas (Place).
> I would need to store only the information of the disambiguated entity.
>
> Thanks. Regards
>
> This message should be regarded as confidential. If you have received
> this email in error please notify the sender and destroy it
> immediately. Statements of intent shall only become binding when
> confirmed in hard copy by an authorised signatory.
>
> Zaizi Ltd is registered in England and Wales with the registration
> number 6440931. The Registered Office is 222 Westbourne Studios, 242
> Acklam Road, London W10 5JJ, UK.
>