@prefix : <https://ontology.inferal.com/modules/ordering/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix mod: <https://w3id.org/mod#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pubacc: <https://ontology.inferal.com/modules/publication-access/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    dcterms:title "Ordering Ontology" ;
    dcterms:description "Terms for comparable resources, ordering contexts, broad and specialized strict ordering relations, immediate adjacency, and optional ranks." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    vann:preferredNamespacePrefix "ord" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/ordering/" ;
    mod:status "draft" ;
    rdfs:comment "This module provides a small reusable ordering vocabulary that distinguishes broad precedence, specialized less-than and greater-than comparison, immediate adjacency, same-rank relations, and optional ranks." ;
    owl:versionInfo "0.1.0" .

:Comparable
    a rdfs:Class ;
    rdfs:label "comparable" ;
    rdfs:comment "A resource that can be placed relative to other resources in a named ordering context." .

:Ordering
    a rdfs:Class ;
    rdfs:label "ordering" ;
    rdfs:comment "A named context that gives precedence, comparison, adjacency, same-rank, and rank assertions their shared orientation." .

:PartialOrdering
    a rdfs:Class ;
    rdfs:subClassOf :Ordering ;
    rdfs:label "partial ordering" ;
    rdfs:comment "An ordering context that allows distinct comparable resources to remain without a stated or entailed ordering relation." .

:TotalOrdering
    a rdfs:Class ;
    rdfs:subClassOf :Ordering ;
    rdfs:label "total ordering" ;
    rdfs:comment "An ordering context in which every pair of distinct comparable resources is related by strict precedence or same-rank comparison." .

:RankDirection
    a rdfs:Class ;
    rdfs:label "rank direction" ;
    rdfs:comment "The direction in which numeric ranks determine comparison within an ordering context." .

:AscendingRank
    a :RankDirection ;
    rdfs:label "ascending rank" ;
    rdfs:comment "A greater rank sorts after a lesser rank, so the resource holding the greater rank is the greater of the pair." .

:DescendingRank
    a :RankDirection ;
    rdfs:label "descending rank" ;
    rdfs:comment "A greater rank sorts before a lesser rank, so the resource holding the greater rank is the lesser of the pair." .

:inOrdering
    a rdf:Property ;
    rdfs:label "in ordering" ;
    rdfs:comment "Associates a comparable resource with the ordering context that gives its relative-position, comparison, adjacency, same-rank, and rank assertions meaning." ;
    rdfs:domain :Comparable ;
    rdfs:range :Ordering .

:rankDirection
    a rdf:Property ;
    rdfs:label "rank direction" ;
    rdfs:comment "States that ranks assigned within this ordering determine comparison, and in which direction. Two comparable resources that both carry a rank in a rank-directed ordering are comparable without an asserted comparison edge between them." ;
    rdfs:domain :Ordering ;
    rdfs:range :RankDirection .

:precedes
    a rdf:Property ;
    rdfs:label "precedes" ;
    rdfs:comment "States that the subject occupies a strictly earlier position than the object in their shared ordering, without requiring adjacency." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:follows
    a rdf:Property ;
    rdfs:label "follows" ;
    rdfs:comment "States that the subject occupies a strictly later position than the object in their shared ordering, without requiring adjacency." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:greaterThan
    a rdf:Property ;
    rdfs:subPropertyOf :follows ;
    rdfs:label "greater than" ;
    rdfs:comment "States that the subject has a greater comparative value than the object and therefore follows it in their shared canonical ordering." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:lessThan
    a rdf:Property ;
    rdfs:subPropertyOf :precedes ;
    rdfs:label "less than" ;
    rdfs:comment "States that the subject has a lesser comparative value than the object and therefore precedes it in their shared canonical ordering." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:immediatelyPrecedes
    a rdf:Property ;
    rdfs:subPropertyOf :precedes ;
    rdfs:label "immediately precedes" ;
    rdfs:comment "States that the subject precedes the object with no other comparable resource between them in the asserted ordering extent." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:immediatelyFollows
    a rdf:Property ;
    rdfs:subPropertyOf :follows ;
    rdfs:label "immediately follows" ;
    rdfs:comment "States that the subject follows the object with no other comparable resource between them in the asserted ordering extent." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:sameRankAs
    a rdf:Property ;
    rdfs:label "same rank as" ;
    rdfs:comment "States that comparable resources occupy the same rank in their shared ordering context without asserting RDF or OWL identity." ;
    rdfs:domain :Comparable ;
    rdfs:range :Comparable .

:rank
    a rdf:Property ;
    rdfs:label "rank" ;
    rdfs:comment "Numeric rank assigned to a comparable resource within its ordering context. An ordering that states a rank direction fixes whether a greater rank sorts after or before a lesser one; without that statement the direction is defined only by the ordering's documentation and ranks do not establish comparability." ;
    rdfs:domain :Comparable ;
    rdfs:range xsd:integer .
