ncbo / ontologies_api

Hypermedia API for NCBO's ontology-related projects
http://data.bioontology.org
Other
25 stars 10 forks source link

Include skos:prefLabel values when determing property labels #70

Open jvendetti opened 4 years ago

jvendetti commented 4 years ago

When setting the human readable label property for AnnotationProperty, ObjectProperty, and DatatypeProperty, the current code base only pulls values from rdfs:label in source ontologies, e.g., see here.

An end user submitted an ontology (AFO) where the human readable labels for their properties are stored in skos:prefLabel:

###  http://purl.allotrope.org/ontologies/property#AFX_0000180

af-x:AFX_0000180 rdf:type owl:ObjectProperty ;

    rdfs:isDefinedBy <http://purl.allotrope.org/voc/afo/REC/2020/06/relation> ;

    skos:altLabel "step size" ;

    ...

    skos:prefLabel "increment" .

This causes the following behavior in BioPortal:

  1. REST calls like the following to retrieve the label for a particular ontology property return null: http://data.bioontology.org/ontologies/AFO/properties/http%3A%2F%2Fpurl.allotrope.org%2Fontologies%2Fproperty%23AFX_0000180/label.

  2. REST calls like the following to retrieve the basic set of attributes for an ontology property returns an empty set for labels: http://data.bioontology.org/ontologies/AFO/properties/http%3A%2F%2Fpurl.allotrope.org%2Fontologies%2Fproperty%23AFX_0000180?display_links=false&display_context=false.

  3. The property tree in the BioPortal UI displays the last fragment of the property ID for each node in the tree, rather than the human readable label:

Screen Shot 2020-08-25 at 12 20 02 PM