OWL API を使用して rdf/xml ファイルを開こうとしています。ファイルは次からアクセスできます。
http://www.dmi.unict.it/~longo/comunect/comunect.owl
ファイルをダウンロードして OWLOntologyManager クラスの loadOntologyFromOntologyDocument(File file) で開こうとすると、次のエラーが表示されます。
org.semanticweb.owlapi.io.UnparsableOntologyException: Problem parsing file:/C:/myfile.owl
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) RDFXMLParser
2) OWLXMLParser
3) OWLFunctionalSyntaxOWLParser
4) TurtleOntologyParser
5) KRSS2OWLParser
6) ManchesterOWLSyntaxOntologyParser
7) OBOFormatOWLAPIParser
8) OWLOBO12Parser
Parser: RDFXMLParser
org.xml.sax.SAXParseException; systemId: file:/C:/myfile.owl; lineNumber: 1; columnNumber: 1; the content is not allowed in prolog.
さて、Protege でファイルを開くことができるのに、owl api ライブラリでオントロジーを解析できないのはなぜですか? ありがとうございました。