@prefix : <https://ontology.inferal.com/modules/localization/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix mod: <https://w3id.org/mod#> .
@prefix ord: <https://ontology.inferal.com/modules/ordering/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@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 wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:
    a owl:Ontology, pubacc:PublicationManagedOntology ;
    dcterms:accessRights pubacc:PublicAccess ;
    owl:imports ord: ;
    dcterms:title "Localization Ontology" ;
    dcterms:description "Terms for abstract positions, reference frames, and provenance-bearing localization opinions." ;
    dcterms:abstract "The localization ontology separates an abstract position from the fallible readings, judgments, or instruments that locate it in a reference frame. Use ordinary literals when a property or datatype already fixes the frame, use loc:Locus when the position needs a stable RDF subject, and use loc:Localization when a source, instrument, confidence assessment, or rival opinion must be represented." ;
    dcterms:license <https://creativecommons.org/licenses/by/4.0/> ;
    dcterms:references
        <http://www.cidoc-crm.org/cidoc-crm/E52_Time-Span> ,
        <http://www.opengis.net/ont/geosparql> ,
        <http://www.w3.org/2003/01/geo/wgs84_pos#> ,
        <http://www.w3.org/ns/prov> ,
        <https://ontology.inferal.com/modules/confidence/> ,
        <https://ontology.inferal.com/modules/range/> ,
        <https://www.w3.org/TR/owl-time/> ;
    dcterms:source ord: ;
    vann:preferredNamespacePrefix "loc" ;
    vann:preferredNamespaceUri "https://ontology.inferal.com/modules/localization/" ;
    mod:status "draft" ;
    rdfs:comment "This module provides a small reusable vocabulary for locating stable RDF subjects in reference frames while keeping contested or instrumented localizations as separate claim nodes." ;
    dcterms:description "The module covers temporal positions, ordered sequence positions, partial-order positions, and spatial positions whose geometry is delegated to existing geospatial vocabularies. It intentionally avoids defining coordinate systems, calendar conversion, datum transformation, or confidence arithmetic. Those semantics live in reference frames, external value vocabularies, PROV-O provenance, and the Inferal Confidence module." ;
    rdfs:seeAlso <http://www.w3.org/ns/prov>, <https://ontology.inferal.com/modules/confidence/>, <https://ontology.inferal.com/modules/range/> ;
    owl:versionInfo "0.1.0" .

:Frame
    a rdfs:Class ;
    rdfs:label "frame" ;
    rdfs:comment "A reference frame in which subjects can be localized, such as the UTC timeline, a geodetic coordinate reference system, a copying order, or a chapter sequence." ;
    dcterms:description "A frame gives position values their meaning. The same literal or coordinate tuple may denote different positions under different frames, so data that cannot rely on a property or datatype default should name a loc:Frame explicitly. Ordered frames link to an ord:Ordering with loc:orderedBy; unordered frames such as geodetic coordinate reference systems can be used without ordering machinery." ;
    rdfs:isDefinedBy : .

:Locus
    a rdfs:Class ;
    rdfs:label "locus" ;
    rdfs:comment "An abstract position in a reference frame. A locus remains a stable RDF subject even when its value is unknown, uncertain, or contested." ;
    dcterms:description "Use a locus when a position needs an identifier independent of any particular reading: a manuscript's copy date, a release's publication point, a point in a chapter sequence, or a location whose precise coordinates are not yet known. A locus can name its frame with loc:inFrame and may carry one direct loc:at value as a compact form for a single uncontested position." ;
    rdfs:isDefinedBy : .

:Localization
    a rdfs:Class ;
    rdfs:subClassOf prov:Entity ;
    rdfs:label "localization" ;
    rdfs:comment "An opinion, reading, fix, or judgment locating a locus. A localization may be attributed, derived, assessed for confidence, and contradicted by rival localizations." ;
    dcterms:description "Use a localization for the claim-level node produced by a source, instrument, calculation, or human judgment. The localization identifies exactly one locus with loc:localizes and gives exactly one content value with loc:at. Attach provenance with PROV-O and confidence with the Inferal Confidence module. Multiple claims about the same locus are represented as separate localization individuals rather than as multiple loc:at values on one node." ;
    rdfs:isDefinedBy : .

:orderedBy
    a rdf:Property ;
    rdfs:label "ordered by" ;
    rdfs:comment "Connects an ordered reference frame to the ordering context that supports comparison among loci in that frame." ;
    dcterms:description "Use loc:orderedBy only for frames where positions can be compared by the Ordering module. A reference materialization query can then emit ord:inOrdering for loci in that frame. Frames without loc:orderedBy are not treated as ordered by this module." ;
    rdfs:domain :Frame ;
    rdfs:range ord:Ordering .

:inFrame
    a rdf:Property ;
    rdfs:label "in frame" ;
    rdfs:comment "Connects a locus to the reference frame in which it is a position." ;
    dcterms:description "loc:inFrame is the explicit way to state which frame gives a locus its semantics. A locus with no loc:inFrame can still be frame-resolvable when its direct loc:at literal resolves through embedded CRS, property default frame, or datatype registry; otherwise validation reports the missing frame." ;
    rdfs:domain :Locus ;
    rdfs:range :Frame .

:at
    a rdf:Property ;
    rdfs:label "at" ;
    rdfs:comment "Gives the position value for a locus or localization. Point values denote a single position; region values denote a set of possible positions within which the locus lies." ;
    dcterms:description "On a loc:Locus, loc:at is the graph author's compact assertion of one uncontested value. On a loc:Localization, loc:at is the content of that opinion or observation. The value's denotation controls interpretation: dates and point geometries denote positions, while rng:Range values and region geometries denote sets of possible positions. This property deliberately has no RDFS domain or range and is not typed as owl:ObjectProperty or owl:DatatypeProperty, because valid values may be literals or resources." .

:localizes
    a rdf:Property ;
    rdfs:label "localizes" ;
    rdfs:comment "Connects a localization opinion to the locus it locates." ;
    dcterms:description "Every loc:Localization should have exactly one loc:localizes value. The property makes the stable position subject explicit while allowing separate localization claims to carry different values, provenance, derivations, and confidence assessments." ;
    rdfs:domain :Localization ;
    rdfs:range :Locus .

:defaultFrame
    a rdf:Property ;
    rdfs:label "default frame" ;
    rdfs:comment "Declares the reference frame for bare literal values of the annotated property when the literal itself does not embed a frame." ;
    dcterms:description "Vocabulary authors use loc:defaultFrame on position-valued properties so ordinary literal triples remain self-contained. Frame resolution uses this property after embedded literal frames, such as CRS IRIs in GeoSPARQL WKT literals, and before datatype-wide registry entries. The subject may be an Inferal property or a third-party property annotated by this registry." ;
    rdfs:domain rdf:Property ;
    rdfs:range :Frame .

:frameOfDatatype
    a rdf:Property ;
    rdfs:label "frame of datatype" ;
    rdfs:comment "Registry entry connecting a frame to a datatype whose value space represents positions in that frame." ;
    dcterms:description "Use loc:frameOfDatatype when every value of a datatype belongs to a known frame. The built-in UTC timeline maps dateTimeStamp, date, gYear, and gYearMonth. Plain xsd:dateTime is intentionally not mapped because timezone-less dateTime values are floating times unless a property-specific default frame supplies the missing interpretation." ;
    rdfs:domain :Frame ;
    rdfs:range rdfs:Datatype .

:UTCTimeline
    a :Frame ;
    rdfs:label "UTC timeline" ;
    rdfs:comment "Reference frame for offset-bearing UTC timeline values represented by XML Schema date and calendar datatypes." ;
    dcterms:description "The built-in temporal frame for XML Schema values whose interpretation is anchored to the UTC timeline or a calendar value that can be ordered on that timeline. It registers xsd:dateTimeStamp, xsd:date, xsd:gYear, and xsd:gYearMonth. It does not register xsd:dateTime because a dateTime literal without a timezone is not an instant on the UTC timeline by itself." ;
    :orderedBy :UTCTimelineOrdering ;
    :frameOfDatatype xsd:dateTimeStamp, xsd:date, xsd:gYear, xsd:gYearMonth .

:UTCTimelineOrdering
    a ord:TotalOrdering ;
    rdfs:label "UTC timeline ordering" ;
    rdfs:comment "Total ordering context for loci on the UTC timeline." ;
    dcterms:description "Ordering context used when UTC timeline loci need to participate in broad precedence, specialized comparison, immediate adjacency, same-rank, rank, or rng:Range machinery. Loci are connected to this ordering by the reference materialization query from loc:inFrame and loc:orderedBy, not by a subclass axiom." .

<http://www.opengis.net/def/crs/OGC/1.3/CRS84>
    a :Frame ;
    rdfs:label "WGS 84 CRS84" ;
    rdfs:comment "OGC CRS84 longitude-latitude coordinate reference system used here as the fixed frame for WGS84 latitude and longitude properties." ;
    dcterms:description "This graph types the OGC CRS84 IRI as a loc:Frame so localization frame resolution can point at the standard CRS resource rather than minting a duplicate Inferal frame. Geometry semantics, axis order, and spatial operations remain delegated to OGC/GeoSPARQL tooling." .

wgs84:lat
    :defaultFrame <http://www.opengis.net/def/crs/OGC/1.3/CRS84> ;
    rdfs:comment "Localization registry annotation: bare WGS84 latitude literals are interpreted in the OGC CRS84 frame." ;
    dcterms:description "This module does not redefine wgs84:lat. It adds a loc:defaultFrame annotation so consumers resolving localization literals can treat latitude values as positions in the standard CRS84 geodetic frame." .

wgs84:long
    :defaultFrame <http://www.opengis.net/def/crs/OGC/1.3/CRS84> ;
    rdfs:comment "Localization registry annotation: bare WGS84 longitude literals are interpreted in the OGC CRS84 frame." ;
    dcterms:description "This module does not redefine wgs84:long. It adds a loc:defaultFrame annotation so consumers resolving localization literals can treat longitude values as positions in the standard CRS84 geodetic frame." .

geo:wktLiteral
    rdfs:comment "GeoSPARQL WKT literals may embed a CRS IRI in their lexical form; localization processors use that embedded frame before property or datatype defaults." ;
    dcterms:description "This module does not redefine geo:wktLiteral. It documents the localization frame-resolution rule for WKT literals: when the lexical form starts with a CRS IRI, that embedded frame has priority over loc:defaultFrame and loc:frameOfDatatype registry entries." .
