Hi Alessandro,

one more thing about the scope manager of the ontonet:

When I load an ontology upon a scope, using multipart/form-data (i.e., FormData object in Javascript), then automatically after this POST (if ending with 303), a GET is done by the Browser on the URL of the ontology. I guess this is due to the POST/Redirect/GET pattern. The problem now is that this subsequent GET fails as time out. When doing the same GET via curl, it takes awfully long before it spits out the data belonging to the ontology. Everything is ok if I specify -H "Accept:application/rdf+xml" for the GET, but I guess that the automatic GET done by the browser does a plain GET and therefore is kicked out for time out reason.
Why does the plain GET take so long for e.g.

curl -i -X GET http://<stanbol>/ontonet/ontology/<myScope>/http://omv.ontoware.org/2005/05/ontology

?

Best,
Melanie

Am 31.07.2012 16:29, schrieb Alessandro Adamou:
Hi Melanie,

On 7/31/12 1:52 PM, Melanie Reiplinger wrote:
I did a complete re-installation and rebuild last night. Now my bugs are gone, the delete for the contenthub works and I can see e.g. the modified RESTful interface of the ontologymanager (which I did not see before, in spite of updating). The curl command for adding 2 scopes at once to some existing session now works for me. :-)

I forgot to tell you that in the latest update you had to rebuild and reinstall commons/owl too. However this happened automatically when you rebuilt the whole Stanbol.

But anyway, to make sure the update takes place without rebuilding everything, perhaps the best thing to do is to install the single bundles as you build them, like this (while Stanbol is up and running):

mvn clean install -PinstallBundle -Dsling.url=http://[stanbol]/system/console

if you have changed the admin credentials to something other than admin:admin , also add -Dsling.user=[admin-username] -Dsling.password=[admin-password]

Small update: I finally started working on the D of CRUD for stored ontologies! (i.e. on the /ontonet endpoint). Not sure how long it will take but I'd like to have a primitive implementation by the end of the week.

probably the first implementation will be conservative, i.e. if there are any handles on the ontology you will get a 409 Conflict or 403 Forbidden, not sure yet. You will first have to clear it of any handles from scopes or sessions.

Also for loading 2 libraries on a scope at creation, I succeeded after I had escaped the '&' symbol in the URL. This is a bit surprising for me, because I have used curl commands with the '&' several times and never had to escape it until now. I'll see how this works when sending the request via XmlHttpRequest using CORS, maybe then I don't need to escape it.

This is a command line feature (I assume you're using curl from a Unix shell). In Bash shells, the '&' character means "fork this command as a background process" and everything after it is ignored unless you escape it. You don't have to escape it for Ajax requests, so I guess that's why it worked for your XmlHttpRequest in JavaScript. Are you sure that in your previous curl calls the query parameters from the second on (i.e. that followed '&') were actually considered?

Best,
Alessandro


Am 30.07.2012 14:16, schrieb Alessandro Adamou:
Hi Melanie,

On 7/30/12 1:27 PM, Melanie Reiplinger wrote:
Sorry for my late reply, but I took a 2-week break from the job to intensively study and revise for my exams that took place last week.

I understand. I hope they all went fine. I too am extensively working on my Ph.D. thesis (of which the Stanbol ontology manager is but a partial implementation BTW).

Can I be curious? I'd like to ask you what is the use case you're using ontonet for...

I tried to pass e.g. several scopes to load them into a session, but I'm doing something wrong. In what form is the list of scopes expected? I tried specifying 2 -F parameters, like curl -i -X POST -F scope=scope1 -F scope=scope2 http://<stanbol>/ontonet/session/mysession

Actually that is correct and it worked for me, provided that scope1 scope2 and mysession were all created earlier. What response are you receiving? You should just get a 303 on the session resource, but then if you request an RDF/OWl of the session, as in

curl -H "Accept: text/turtle" http://<stanbol>/ontonet/session/mysession

you should see an import statement for each scope.

Perhaps some day I will make scope attachment stateless via GET.

Trivial question: did you first svn update, rebuild, cleanup the Stanbol installation etc?

The same for passing several corereg or coreont parameters: How do I list them for the curl command? Something like
<stanbol>/ontology/scope1?corereg=lib1&corereg=lib2
won't work. Do I have to specify a list?

Again, that seems correct. But remember that if you are using curl via command line you must escape the '&' character. Example:

curl -i -X PUT [stanbol]/ontonet/ontology/scope1?corereg=http://stanbol.apache.org/ontologies/registries/stanbol_network/Foundational\&corereg=http://stanbol.apache.org/ontologies/registries/stanbol_network/W3C

Hope this is helping

Alessandro


Am 23.07.2012 18:44, schrieb Alessandro Adamou:
Hi,

Since you had been following its development more closely than others, I just thought you might be interested in the latest improvements in the Stanbol ontology manager.

Please do not hesitate to try it out to see if it better fits your needs and give whatever feedback you would like.

(NOTE I still need to update the documentation. That's my next TODO)

All the best,

Alessandro


-------- Original Message --------
Subject:        Latest Ontology Manager improvements
Date:   Mon, 23 Jul 2012 18:42:18 +0200
From:   Alessandro Adamou <[email protected]>
Reply-To:       [email protected]
Organization:   Alma Mater Studiorum - Università di Bologna
To:     [email protected]



Hi,

just wanted to share about the work I did on the Stanbol Ontology Manager over the last couple of months, as it is also based on requests that surfaced on the list:

NEW:
* Persistence and portability of ontology network structures: relations between scopes, sessions and the ontologies managed by them are now stored in a special metadata graph. Scopes and sessions are restored as soon as OntoNet activates (though sessions are restored in an inactive state). I will publish the OWL schema soon. * Configurable connectivity policies. Depending on the chosen policy, more import statements will be declared across scopes, spaces and session. This has shown to greatly affect OWL axiom interpretation and reasoning results. Default scheme is TIGHT. * REST service for attaching/detaching multiple scopes to a session at once. Just POST as many "scope={scopeID}" form parameters as you like to the session resource. Any previously attached scope not included will be detached automatically

IMPROVED:
* Speedups. Reduced the likelihood of copying triples from Clerezza-based input sources. This should reduce the length of ontology load operations by about 50%. * RESTful services for exporting ontology networks no longer depend on the configured namespaces for OntoNet components. URI prefixes are now extracted from the request URL. Only the Java API depends on this configuration now.
* HTML client can now create and delete scopes and sessions.
* POST service for creating sessions and letting Stanbol choose their ID (will be returned as the Location header in the 201 Created response) * Most creation methods now return 201 Created with the resource Location. It's still 303 for some service because the HTML client uses POST forms and would not be able to capture a 201 response and act thereupon. * Ontology -> Stored Graph reconciliation policies ( STANBOL-426). It is now possible to obtain a "public key" for each supplied OntologyID (incl. owl:versionIRI) or physical URL. * Parameters "corereg" and "coreont" for creating scopes with ontologies and libraries embedded in their core spaces can now have multiple values in a single call.
* Added backward links to the HTML interface

FIXED:
* CORS support (thanks Melanie for testing!)
* Parsing formats other than RDF/XML without specifying the parser to try was often failing as the streams were not being reset/recreated. This was also causing failures if imported ontologies were in a format different than RDF/XML. * Graph naming policy for anonymous ontologies was causing trouble when restoring components. Moved it out of commons/owl * Broke computational loops caused by cycles in import graphs (a consequence of migrating to the Clerezza API).
* Got rid of the obsolete OWL API-based implementation

Working on a couple more things right now, then once the OntoNet renaming takes place I would call for a new ontologymanager release.

Best,
Alessandro

--
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)

Not sent from my iSnobTechDevice






--
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)

Not sent from my iSnobTechDevice



--
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)

Not sent from my iSnobTechDevice

Reply via email to