0

I'm trying to open a rdf/xml file using the OWL API. The file is accessible from:

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

If I download the file and try to open it with the loadOntologyFromOntologyDocument(File file) of OWLOntologyManager class. I obtain the following error:

    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.

Now, since I can open the file with Protege, why I can't parse the ontology with the owl api library ? Thank you.

4

0 回答 0