Hi Reto,
sorry for the delay, I was on a business trip when you wrote this.
What you actually did when you issued
curl -D - -X PUT "http://localhost:8080/ontonet/ontology/User"
was not to create an ontology, but a container for ontologies, or Scope,
used for tailoring OWL interpretation and reasoning - although in the
strict sense it is an ontology because all containers can be exported to
RDF or native OWL as you noticed.
You were misled by the ambiguous RESTful API naming scheme, I am still
to refactor that but it will become
[stanbol]/ontology/scope/User
To create an ontology, not managed by a scope, you can currently PUT to
something like
[stanbol]/ontonet/http://my.ontology/name
or
[stanbol]/ontonet/simpleontologyname
and POST triples there
which is why I'm a little surprised you managed to upload triples like this
curl -u admin:admin -H "Content-type: text/turtle" -D - -X POST -d
@contacts.nt http://localhost:8080/ontonet/ontology/User
Perhaps there should either be some code to prevent it, or maybe allow
the population of ontology containers directly.
The reason why you get this import tree:
Now http://localhost:8080/ontonet/ontology/User imports
http://localhost:8080/ontonet/ontology/User/custom which in turm imports
http://localhost:8080/ontonet/ontology/User/org.apache.stanbol.ontologymanager.sources.clerezza.GraphContentInputSource-time:1369068440168which
contains the uploaded information plus some T-Box data and imports
http://localhost:8080/ontonet/ontology/User/core which is an empty ontology.
is that a scope creates an internal hierarchy for laying out ontologies.
If laid out correctly, this guarantees that triples that should be OWL
object property assertions are unexpectedly resolved as annotations
(which is what the plain OWL API would do).
The non-IRI entry you see is an automatic fallback when all of the
followig hold:
* the uploaded triples do not have any ontology naming statements, and
* you uploaded them from a datastream and not from a URL, and
* you did not provide an arbitrary name for the ontology
If you proceed as above you won't get this.
- Is there a way to have ontonet inline these imports so that I get back
the union of the uploaded ontologies?
I did some code back then, that allowed query parameter "merge=true" in
the GETs to return imported triples for some formats.
Just noticed that my /ontonet page is showing an error where the list of
ontologies should be shown:
get(ontologies) failed on instance of
org.apache.stanbol.ontologymanager.web.resources.OntoNetRootResourceThe
problematic instruction:----------==> assignment:
ontologies=it.ontologies [on line 71, column 3 in
html/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource/webview.ftl]
in include "webview.ftl" [on line 35, column 7 in
html/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource/index]
in user-directive common.page [on line 21, column 3 in
html/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource/index]----------
(...)
I do not know the impact that the introduction of security had on this,
but it might also be due to mixing up the scope management and ontology
management, since it's trying to treat /ontology/User both as a scope
and as a regular ontology.
HTH
Alessandro
--
Alessandro Adamou, Ph.D.
Knowledge Media Institute
The Open University
Walton Hall, Milton Keynes MK7 6AA
United Kingdom
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna
Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice