Hi Alessandro, This must be it, it needs a web address... Thank you very much!
Adrian -----Message d'origine----- De : Alessandro Adamou [mailto:alessandro.ada...@open.ac.uk] Envoyé : July 31, 2015 7:41 AM À : dev@stanbol.apache.org Objet : Re: Load ontology to scope -- does not work Hi Adrian, I am not well-versed with the contenthub, so I can guess it depends on what policies it has for inspecting graphs and selecting them by name. Does your r2HR.rdf have a logical OWL ID? (in RDF, it is the name of a singleton instance of owl:Ontology) If the ontologymanager shows a file:/// URI, probably not. In that case, off the top of my hat it might just be that the contenthub filters it out because of an unconventional graph name. Alessandro On 30/07/2015 20:23, Adrian Dinu wrote: > Hi Alessandro, > Thank you so much for the detailed explanation, your example worked! > May I ask one more question please: I also loaded my locally stored > ontology called 'r2HR-ontology' stored in a file r2HR.rdf > > At http://localhost:8080/ontonet under 'Stored ontologies' shows both > file:///C:/Users/r2HR.rdf/r2HR-ontology > http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl > > However, at > http://localhost:8080/contenthub/contenthub/search/featured > under 'Graph: Choose ontology' only agentrole.owl is available, > r2HR.rdf is not present. > > Why is this? > > Thanks again, > Adrian > > -----Message d'origine----- > De : Alessandro Adamou [mailto:alessandro.ada...@open.ac.uk] > Envoyé : July 30, 2015 7:55 AM > À : dev@stanbol.apache.org > Objet : Re: Load ontology to scope -- does not work > > Hi Adrian, > > that documentation you looked at is outdated and no longer a reference > for Stanbol services. > > It seems like the preferred way to manage an ontology in a scope is > the first create it in the ontologymanager, then attach it to the scope. > Remember that ontology management is a privileged action so you need > HTTP authentication (I'm using the default admin:admin here, which of > course you should change in production). > > This is the sequence that worked for me: > > # Load external ontology > $ curl -u admin:admin -X POST -F > "url=http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl" > http://localhost:8080/ontonet > > # Create scope > $ curl -u admin:admin -X PUT > http://localhost:8080/ontonet/ontology/r2HR > > # Tell the scope to manage the ontology (use text/plain) # Request > body is the logical ID of the ontology, which in this case matches > with the URL it came from > $ curl -u admin:admin -X POST -H "Content-type: text/plain" -d > "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl" > http://localhost:8080/ontonet/ontology/r2HR > > Still, it is true that the REST API and HTML interface of the ontology > manager need to be refreshed. > > best > > Alessandro > > > On 28/07/2015 20:33, Alessandro Adamou wrote: >> Hi Adrian, >> >> I am not in front of a Stanbol installation right now so I will >> double-check that, but I think that since security was introduced in >> Stanbol, loading ontologies has become a privileged action that >> requires HTTP authentication. If you have not created custom users or >> set new passwords, try the same command with -u >> >> curl -u admin:admin -X POST -F >> location="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl" >> http://localhost:8080/ontonet/ontology/r2HR >> >> If it works, it should be a more feasible alternative to starting >> stanbol with the -no-security option >> >> I will try that out myself asap >> >> Alessandro >> >> >> ________________________________________ >> Da: Adrian Dinu <adr...@r-2.ca> >> Inviato: martedì 28 luglio 2015 19.56 >> A: dev@stanbol.apache.org >> Oggetto: Load ontology to scope -- does not work >> >> I have a scope called 'r2HR' and I try to load an ontology, >> http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl , for >> testing purposes. This ontology is mentioned in the examples at >> http://stlab.istc.cnr.it/documents/KReS/KReS-Alpha/node25.html >> >> I use >> >> curl -X POST -F >> location="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl" >> http://localhost:8080/ontonet/ontology/r2HR >> >> and the response is >> >> <html> >> <head> >> <meta http-equiv="Content-Type" >> content="text/html;charset=ISO-8859-1"/> >> <title>Error 400 Bad Request</title> >> </head> >> <body> >> <h2>HTTP ERROR: 400</h2> >> <p>Problem accessing /ontonet/ontology/r2HR. Reason: >> <pre> Bad Request</pre></p> >> <hr /><i><small>Powered by Jetty://</small></i> >> >> </body> >> </html> >> >> The same response I get when I try to load the ontology via the web >> interface (i.e. Load an ontology -> From a URL -> Fetch ) >> >> In the Stanbol's command window (DOS) no related information is displayed. >> >> Can anyone please tell me how to upload the ontology to the scope ? >> >> Thanks, Adrian >> >> . >> > -- The Open University is incorporated by Royal Charter (RC 000391), > an exempt charity in England & Wales and a charity registered in > Scotland (SC 038302). The Open University is authorised and regulated > by the Financial Conduct Authority. > > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4821 / Virus Database: 4365/10333 - Release Date: > 07/29/15 > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4821 / Virus Database: 4365/10300 - Release Date: > 07/24/15 > > . > -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority. ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4821 / Virus Database: 4365/10340 - Release Date: 07/30/15 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4821 / Virus Database: 4365/10300 - Release Date: 07/24/15