使用owl api加载RDF / XML文件

时间:2014-10-16 13:26:06

标签: java owl owl-api

我正在尝试使用OWL API打开rdf / xml文件。该文件可从以下网址访问:

http://www.dmi.unict.it/~longo/comunect/comunect.owl

如果我下载文件并尝试使用OWLOntologyManager类的loadOntologyFromOntologyDocument(文件文件)打开它。我收到以下错误:

    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库解析本体? 谢谢。

0 个答案:

没有答案