Hi Alessandro.

Sorry for the late reply.
Thanks a lot for your help in this. I read your last mail about the Clerezza update, nevertheless I'll answer to this earlier mail. I'll go through the mail step by step.


Am 15.06.2012 12:34, schrieb Rupert Westenthaler:
I think this is because of http://markmail.org/message/iz4piguvglo466t7

Off the top of my head, and given the type of exception that you received, I think Rupert is right. But to confirm that I need numbers. How many ontologies have you been trying to upload since first running Stanbol, and how large?

only one ontology:
http://ontologydesignpatterns.org/ont/iks/kres/omv.owl (~ 100KB)
I have only started looking at the ontonet endpoint, and failed when trying to load that one for testing.


Can you check the size of your TDB data directory? from the felix console you have to note the bundle number of the "Clerezza - SCB Jena TDB Storage Provider" bundle (let it be N).
that should be 13 for me

Then check the size of directory [sling-launcher-dir]/stanbol/felix/bundle[N]/data/tdb-data
that's
stanbol/felix/bundle13/data/tdb-data
size is 11 M

stanbol_dev/stanbol/felix/bundle13/data/tdb-data/mgraph$ du -sh *
256K    http%3A%2F%2Fincubator.apache.org%2Fstanbol%2Frules%2Frecipe_index
260K ontonet%3A%3Ahttp%3A%2F%2Fkres.iks-project.eu%2Fontology%2Fmeta%2Fonm.owl
412K    ontonet%3A%3Ahttp%3A%2F%2Fomv.ontoware.org%2F2005%2F05%2Fontology
404K ontonet%3A%3Ahttp%3A%2F%2Fontologydesignpatterns.org%2Font%2Fiks%2Fkres%2Fomv.owl
288K    ontonet%3A%3Ahttp%3A%2F%2Fstanbol.apache.org%2F1339519236740
288K    ontonet%3A%3Ahttp%3A%2F%2Fstanbol.apache.org%2F1339949577786
260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fagentrole.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fclassification.owl 260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fcollectionentity.owl 260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fcommunities.owl 260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fdescription.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fdescriptionandsituation.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Finformationobjectsandrepresentationlanguages.owl 272K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fintensionextension.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fobjectrole.owl 260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fparticipation.owl 256K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fpartof.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Fsituation.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Ftaskexecution.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcp%2Fowl%2Ftaskrole.owl 268K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fcpont%2Fcodo%2Fcodkernel.owl 264K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fschemas%2Fcpannotationschema.owl 260K ontonet%3A%3Ahttp%3A%2F%2Fwww.ontologydesignpatterns.org%2Fschemas%2Fmeta.owl
256K    ontonet%3A%3Ahttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore
3.5M    org.apache.stanbol.contenthub.enhancements
260K    org.apache.stanbol.ontologymanager.ontonet


If it is as I expect, it is a Clerezza/TDB issue and we need to wait until named graph support in Jena TDB goes into the Clerezza mainline.

As for these:

curl -i -X PUT "http://<myserver>/ontonet/ontology/<scopeID>?location=http://ontologydesignpatterns.org/ont/iks/kres/";

This is incorrect, there is no "location" parameter in the PUT, and the URI you supplied is neither a regular ontology nor a registry definition, but just a directory. That PUT works anyway, but it creates an empty scope (which is acceptable btw)
thanks.

Would you like a variant that tries to load all the ontologies in a (remote) directory? That would only work if the HTTP server allows directory listing though.

An example of a library being loaded on scope creation is:

curl -X PUT http://<myserver>/ontonet/ontology/<scopeID>?corereg=http://stanbol.apache.org/ontologies/registries/stanbol_network/SocialNetworks

curl -i -X POST -data "http://ontologydesignpatterns.org/ont/iks/kres/omv.owl"; http://<myserver>/ontonet/ontology/<scopeID>
That gave me some Unsupported Media Type Error

because that way (using --data) you should supply the ontology content in the payload, not its URL

If you want to just give it the url, you have to use the form-multipart variant:

curl -X POST -F "url=http://ontologydesignpatterns.org/ont/iks/kres/omv.owl"; http://<myserver>/ontonet/ontology/myScope

yes thanks, I tried this morning.


Even better, if you know the format you can also add the form parameter "format" with the MIME Type, otherwise it will try to guess among supported formats (there is still a bug for Turtle due to the usage of the non-registered MIME type).

Perhaps you've looked at some outdated documentation that I should update?

I mainly looked at the REST API, and also at the documentation on http://incubator.apache.org/stanbol/docs/trunk/


Also, don't forget that before starting to load ontologies, you should configure the namespace of the Ontology Network Manager and the Session Manager in the Felix console, so that they point to the resolvable URLs. This is necessary for the Java API to produce correct import statements.

OK, I did not know that. I just checked, it's set to
http://localhost:8080/ontonet/
*hmpf*, that explains why I keep seeing this localhost address whenever working with the ontonet endpoint. Sorry for this.
What is to be specified here? Just insert my server address, so that it's
http://<myserver:port>/ontonet
?

Best
Melanie

Reply via email to