On 8/1/12 11:54 AM, Melanie Reiplinger wrote:
Hi Alessandro,
the GET for the test-response you sent takes less than a second for
me. So then it is a bit strange that I'm getting these time out
problems. Do you know if there's a way to avoid the subsequent GET
after uploading the ontology?
AFAIK no, as browsers react automatically on 303 responses.
If you want, while I wait to implement Ajax forms that redirect on 201,
I can change the See Other Location header to the same as the scope.
Alessandro
Am 01.08.2012 11:47, schrieb Alessandro Adamou:
On 8/1/12 10:54 AM, Melanie Reiplinger wrote:
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.
Yes. Actually I would like the it to return 201 Created, but then I'd
need all the POST request in the HTML forms to be handled by Ajax
instead of standard forms. Not sure yet on the best way to do that
though (I heard there's a forms extension for jQuery that handles
Ajax forms?).
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.
How long is it taking? When I load the OMV onto a scope (e.g. from
[1]), the subsequent GET responds in a couple of seconds on my
laptop. In general it has handled graphs with 100k triples okay. How
long is a GET taking for you on
http://bernina.cs.unibo.it/stanbol/ontonet/ontology/test-response/http://omv.ontoware.org/2005/05/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?
Because at the moment the plain GET also shows the ontology axioms
(in Manchester syntax) just like the other GETs do. Which means it
takes as much time as to export the stored graph to that format. But
again, this should hold for ontologies much larger than the OMV...
Anyway, most likely the ontology code will disappear from the HTML
response. I'm not liking it that much and it can cause trouble for
large ontologies. I would like it to replace it with a summary, some
labels, maybe also key concepts...
Best,
Alessandro
[1] http://ontologydesignpatterns.org/ont/iks/kres/omv.owl
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
--
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