@prefix ex: <https://example.com/version-in-range/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ver: <https://ontology.inferal.com/modules/versioning/> .

# Self-contained showcase for queries/version-in-range.rq.
#
# The query expects:
#   - Each version typed as ver:VersionIdentifier and tagged with an ordering.
#   - ver:greaterThanVersion already transitively closed across each ordering.
#   - Each range bound declares the same ver:inVersionOrdering as the version it
#     is being compared with.

ex:semver
    a ver:NumericComponentOrdering ;
    rdfs:label "SemVer-like numeric ordering for the version-in-range showcase" .

ex:v1-0-0
    a ver:VersionIdentifier ;
    ver:versionText "1.0.0" ;
    ver:inVersionOrdering ex:semver .

ex:v1-2-0
    a ver:VersionIdentifier ;
    ver:versionText "1.2.0" ;
    ver:inVersionOrdering ex:semver ;
    ver:greaterThanVersion ex:v1-0-0 .

ex:v1-5-0
    a ver:VersionIdentifier ;
    ver:versionText "1.5.0" ;
    ver:inVersionOrdering ex:semver ;
    ver:greaterThanVersion ex:v1-0-0, ex:v1-2-0 .

ex:v2-0-0
    a ver:VersionIdentifier ;
    ver:versionText "2.0.0" ;
    ver:inVersionOrdering ex:semver ;
    ver:greaterThanVersion ex:v1-0-0, ex:v1-2-0, ex:v1-5-0 .

# Inclusive lower, exclusive upper: covers 1.x (1.0.0, 1.2.0, 1.5.0).
ex:range-1-x
    a ver:VersionRange ;
    rdfs:label "Major version 1.x" ;
    ver:lowerBound ex:v1-0-0 ;
    ver:lowerInclusive true ;
    ver:upperBound ex:v2-0-0 ;
    ver:upperInclusive false .

# Inclusive on both ends: covers v1.2.0 and v1.5.0.
ex:range-1-2-to-1-5
    a ver:VersionRange ;
    rdfs:label "1.2.0 through 1.5.0 inclusive" ;
    ver:lowerBound ex:v1-2-0 ;
    ver:lowerInclusive true ;
    ver:upperBound ex:v1-5-0 ;
    ver:upperInclusive true .

# Open-ended upper: anything >= 1.5.0 (1.5.0, 2.0.0).
ex:range-at-least-1-5
    a ver:VersionRange ;
    rdfs:label "At least 1.5.0" ;
    ver:lowerBound ex:v1-5-0 ;
    ver:lowerInclusive true .
