Skip to content

What is the sorting logic? #1337

Description

@Zack-83

When exporting an ontology into the .ttl format, Protégé orders the annotations according to an obscure logic.

The prefixes in the preamble are sorted according to the length and then alphabetically: for instance

cr < obo < owl < rdf < xml < xsd < bibo < biro < dcat < doap < prov < rdfs < skos < vann < voaf < premis < schema < dcterms.

The term annotations are sorted approximately alphabetically:

obo:RO_0002230 rdf:type owl:ObjectProperty ;
               rdfs:subPropertyOf obo:BFO_0000051 ;
               rdf:type owl:TransitiveProperty ;
               rdfs:domain m4i:ProcessingStep ;
               rdfs:range m4i:ProcessingStep ;
               rdfs:comment "..."@en ;
               rdfs:label "endet mit"@de ,
                          "ends with"@en ;
               skos:altLabel "finished by"@en ;
               skos:editorialNote "changed by m4i: added German labels, added rdfs:label"@en .

Remark that the two rdf:types are separated by a rdfs:subpropertyOf!

Term annotations of the same kind (e.g., two rdfs:labels) are sorted alphabetically, regardless of the language (!), but with capital letters before lower-case letters:

            rdfs:label "has part"@en ,
                       "hat Teil"@de ;

            rdfs:label "Teil von"@de ,
                       "part of"@en ;

Ontology annotations are sorted really randomly: the inferred prefix sequence is

rdf < owl:versionIri < dcterms < bibo < vann < voaf < doap < premis < rdfs < owl:versionInfo < schema.

The subject of sorting was already addressed (s. #47, #49, #402, #1044) but never solved.

Can somebody please explain me how this ordering logic works, and whether it is possible to regulate it?

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