Unable to load EDAM ontology; uri cannot be cast to Literal

When I try to load the EDAM ontology (the official release) with the cypher query

CALL n10s.onto.import.fetch("file:///data/ontologies/EDAM.owl","RDF/XML");

I get the the following error message:

Failed to invoke procedure n10s.onto.import.fetch: Caused by: java.lang.ClassCastException: class org.eclipse.rdf4j.model.impl.SimpleIRI cannot be cast to class org.eclipse.rdf4j.model.Literal (org.eclipse.rdf4j.model.impl.SimpleIRI and org.eclipse.rdf4j.model.Literal are in unnamed module of loader 'app')

The 'preview' function works (I guess because only part of the ontology is loaded).

Any guidance would be appreciated.
-Evan

RESOLVED.
This is not so much an issue with neosemantics as it is with the EDAM ontology itself. Through bisecting search I discovered the issue was with the import of the class with id operation_2519 defined as:

<owl:Class rdf:about="http://edamontology.org/operation_2519">
        <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#DeprecatedClass"/>
        <created_in>beta12orEarlier</created_in>
        <obsolete_since>1.6</obsolete_since>
        <oboInOwl:hasDefinition>Process (read and / or write) nucleic acid tertiary structure data.</oboInOwl:hasDefinition>
        <oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/edam#obsolete"/>
        <oboInOwl:replacedBy rdf:resource="http://edamontology.org/operation_2480"/>
        <rdfs:comment rdf:resource="http://edamontology.org/operation_2481"/>
        <rdfs:label>Structure processing (nucleic acid)</rdfs:label>
        <owl:deprecated>true</owl:deprecated>
    </owl:Class>

The offending line is

        <rdfs:comment rdf:resource="http://edamontology.org/operation_2481"/>

The rdfs:comment expects a literal, though none was found. Additionally, rdfs:comment was passed an unexpected attribute of rdf:resource.

SOLUTION:

  • manually remove the offending line from that class definition
  • neosemantics: I couldn't find a direct filter class rule, but I think using sparql as in the docs here would work