You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Alex Parvulescu <al...@gmail.com> on 2011/02/18 17:39:48 UTC

store question

hi guys,

I've recently came across apache stanbol and I find it very interesting.

the lack of documentation is somewhat discouraging, but I decided to take a
stab at it anyway :)

My maybe not so intelligent  question is about stores (
http://localhost:8080/store), as I understand this would be the unique
reference for every processed resource, right?

I see that now you can submit some text for enhancement, a url or a file.

The text submit works, and I can see in the /store page, the link to the
created resource, which is good.

The question is more about urls and files. It apparently does not create a
link after submitting any of those two.

Let's take a url example: I go to the /store page, submit a url '
http://incubator.apache.org/stanbol' , the response properly redirects me to
the resource's page:

-----
Content Item: sha1-739e8ce03d860589b27e610f9184619613f1e5b0 (text/html)
Public URI of this resource
http://localhost:8080/store/content/sha1-739e8ce03d860589b27e610f9184619613f1e5b0
Content preview
-----

The content preview is empty, and if I click on 'Download the related RDF
enhancements' all I get back it a (probably broken) page containing just a
'}' . Still the page for the resource seems to be created.

When I get back to the /store page, this new resource is not listed on the
available resources list. This also happens for a plain text file I tried.

So now I'm confused :)

Is this a bug / something missing maybe?
Can you point me to some documentation/specs on the store?

Also, there is a TODO in the code
(org.apache.stanbol.enhancer.jersey.resource.StoreRootResource): // TODO:
add user-friendly feedback on empty requests from a form
This is tied to something I've noticed: there is no field validation on the
forms. You can submit empty fields and get back a resource page.

thanks for your time
alex

Re: store question

Posted by Fabian Christ <ch...@googlemail.com>.
Hi Alex,

2011/2/18 Alex Parvulescu <al...@gmail.com>:
> hi guys,
>
> I've recently came across apache stanbol and I find it very interesting.
>
> the lack of documentation is somewhat discouraging, but I decided to take a
> stab at it anyway :)

Good decision ;) But you're right. Documentation is definitely
something that will and has to be improved in the next weeks.

> My maybe not so intelligent  question is about stores (
> http://localhost:8080/store), as I understand this would be the unique
> reference for every processed resource, right?

Right, that's the idea.

> I see that now you can submit some text for enhancement, a url or a file.
>
> The text submit works, and I can see in the /store page, the link to the
> created resource, which is good.
>
> The question is more about urls and files. It apparently does not create a
> link after submitting any of those two.

I'm not completely sure but I think these feature are not completely
implemented yet. That's why you see this buggy behavior. Most of the
work that was done in Stanbol up to now was on the lower levels of the
architecture and on enhancement engines.

But thank you for trying and pointing this out. I think this is the
right motivation we need to correct and improve this things.

Best,
 - Fabian

Re: store question

Posted by Olivier Grisel <ol...@ensta.org>.
2011/2/18 Alex Parvulescu <al...@gmail.com>:
> hi guys,
>
> I've recently came across apache stanbol and I find it very interesting.
>
> the lack of documentation is somewhat discouraging, but I decided to take a
> stab at it anyway :)

Overall it's probably no usable in it's current state unless you want
basic annotations on pure text content written in English on the
/engines endpoint only.

> My maybe not so intelligent  question is about stores (
> http://localhost:8080/store), as I understand this would be the unique
> reference for every processed resource, right?

The /store endpoint is just a proof of concept for the REST API and
how to expose resources and their extracted annotations using the
cool-URI paradigm. Furthermore does not currently persist the
submitted content on disk (just in memory hence will be lost on server
restart). The extracted RDF annotations are persisted on the triple
store though.

> I see that now you can submit some text for enhancement, a url or a file.
>
> The text submit works, and I can see in the /store page, the link to the
> created resource, which is good.
>
> The question is more about urls and files. It apparently does not create a
> link after submitting any of those two.

It should create a link but if the provided resource does not have a
content type of type "text/plain" no engines will run on it and the
RDF output will be empty. Support for analysis of other types than
"text/plain" such as html, pdf, ... is planned but not implemented
yet.

It should work with pure text URLs and files such as:
http://tools.ietf.org/rfc/rfc1149.txt

However in this case it does not work either because the content type
is "text/plain;charset=ISO-8859-1" instead of just "text/plain" ...

Anyway, stay tuned the functional coverage will probably much improve
in the coming weeks.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel