- From: Ricardo Usbeck via GitHub <sysbot+gh@w3.org>
- Date: Thu, 29 Sep 2016 18:58:57 +0000
- To: public-annotation@w3.org
Indeed, content negotiation works
```java
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
URL OAURL = new URL("https://www.w3.org/ns/owl.ttl");
InputStream oais = OAURL.openStream();
OWLOntology ontologyOA =
manager.loadOntologyFromOntologyDocument(oais);
```
Before, I used the following code receiving the following error.
```java
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
URL OAURL = new URL("https://www.w3.org/ns/oa/index.owl");
InputStream oais = OAURL.openStream();
OWLOntology ontologyOA =
manager.loadOntologyFromOntologyDocument(oais);
```
```log
org.semanticweb.owlapi.io.UnparsableOntologyException: Problem parsing
inputstream:ontology2
Could not parse ontology. Either a suitable parser could not be
found, or parsing failed. See parser logs below for explanation.
The following parsers were tried:
1) org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser@61edc883
2) org.semanticweb.owlapi.owlxml.parser.OWLXMLParser@6928f576
3)
org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParser@660e9100
4) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.RioTurtleDocumentFormatFactory@95fd655c
5)
org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxOntologyParse
6) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.NQuadsDocumentFormatFactory@6f9c39ad
7) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.TrigDocumentFormatFactory@27e81c
8) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.RDFJsonDocumentFormatFactory@cd748dc3
9) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.NTriplesDocumentFormatFactory@937ecd36
10) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.BinaryRDFDocumentFormatFactory@3bf24493
11) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.RDFJsonLDDocumentFormatFactory@dcacc47d
12) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.RioRDFXMLDocumentFormatFactory@69b9a3bc
13) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.N3DocumentFormatFactory@9a5
14)
org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser@4c5204af
15) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.TrixDocumentFormatFactory@27e82d
16) org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser@79c3f01f
17) org.semanticweb.owlapi.krss2.parser.KRSS2OWLParser@678040b3
18) org.semanticweb.owlapi.rio.RioParserImpl :
org.semanticweb.owlapi.formats.RDFaDocumentFormatFactory@264e8d
```
--
GitHub Notification of comment by RicardoUsbeck
Please view or discuss this issue at
https://github.com/w3c/web-annotation/issues/359#issuecomment-250559562
using your GitHub account
Received on Thursday, 29 September 2016 18:59:04 UTC