Skip to content

Annotations dropped if annotation property is undeclared #875

@cmungall

Description

@cmungall

Example ontology:

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix oio: <http://www.geneontology.org/formats/oboInOwl#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .

# omitting this line loses the axiom annotation in roundtrip
oio:source rdf:type owl:AnnotationProperty .


obo:MONDO_0009025
    a owl:Class ;
    oio:hasDbXref "UMLS:C1415737" .

[ a owl:Axiom ;
  oio:source "MONDO:notFoundInSource" ;
  owl:annotatedProperty oio:hasDbXref ;
  owl:annotatedSource obo:MONDO_0009025 ;
  owl:annotatedTarget "UMLS:C1415737"
] .

this example roundtrips OK. However, if the AP declaration is removed, then the axiom annotation is silently lost.

This seems odd. Either the OWLAPI needs declarations to be present, or it should infer the types of undeclared properties. If the latter, then it should do this consistently whether parsing plain triples or axiom annotations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions