@prefix cg:      <https://www.openhistorymap.org/cited-geojson/ns#> .
@prefix orp:     <https://ontorag.org/provenance#> .
@prefix oa:      <http://www.w3.org/ns/oa#> .
@prefix prov:    <http://www.w3.org/ns/prov#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix vann:    <http://purl.org/vocab/vann/> .

# The few terms Cited GeoJSON needs beyond GeoJSON-LD, W3C Web Annotation, PROV-O and
# ontorag-provenance. Everything else in the JSON-LD context maps onto those vocabularies.

<https://www.openhistorymap.org/cited-geojson/ns>
    a owl:Ontology ;
    rdfs:label "Cited GeoJSON vocabulary"@en ;
    dcterms:description "Terms used by the Cited GeoJSON profile for citations of map features."@en ;
    owl:versionInfo "0.1" ;
    vann:preferredNamespacePrefix "cg" ;
    vann:preferredNamespaceUri "https://www.openhistorymap.org/cited-geojson/ns#" ;
    dcterms:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
    rdfs:seeAlso <https://www.openhistorymap.org/cited-geojson/0.1/> .

# ---------------------------------------------------------------- citation structure

cg:citation
    a owl:ObjectProperty ;
    rdfs:label "citation"@en ;
    rdfs:range cg:Citation ;
    rdfs:comment "Links a map feature to one of its citations (the `citations` array)."@en .

cg:Citation
    a owl:Class ;
    rdfs:label "Citation"@en ;
    rdfs:comment """A statement that a source is evidence for (part of) a map feature. In the direct
JSON-LD reading of a Cited GeoJSON file every element of a feature's `citations` is a cg:Citation.
When the citation locates a passage (selectors into a checksummed file) it is converted to an
orp:Mention; otherwise it is converted to an orp:attestedIn link from the feature to the source."""@en .

cg:citesSource
    a owl:ObjectProperty ;
    rdfs:label "cites source"@en ;
    rdfs:domain cg:Citation ;
    rdfs:range orp:Source ;
    rdfs:comment """Shortcut from a citation to the cited work. For an orp:Mention it equals the chain
oa:hasTarget / oa:hasSource / orp:fileOf."""@en ;
    owl:propertyChainAxiom ( oa:hasTarget oa:hasSource orp:fileOf ) .

cg:inFile
    a owl:DatatypeProperty ;
    rdfs:label "in file"@en ;
    rdfs:domain cg:Citation ;
    rdfs:range xsd:string ;
    rdfs:comment "Key (the file's `id`) of the source file that the citation's selectors point into."@en .

cg:fileKey
    a owl:DatatypeProperty ;
    rdfs:label "file key"@en ;
    rdfs:domain orp:SourceFile ;
    rdfs:range xsd:string ;
    rdfs:comment "Identifier of a source file within a Cited GeoJSON document."@en .

cg:supports
    a owl:DatatypeProperty ;
    rdfs:label "supports"@en ;
    rdfs:domain cg:Citation ;
    rdfs:range xsd:string ;
    rdfs:comment """Which part of the feature the citation is evidence for: "existence", "geometry",
"name", "when", or "properties.<key>"."""@en .

cg:method
    a owl:ObjectProperty ;
    rdfs:label "method"@en ;
    rdfs:domain cg:Citation ;
    rdfs:range cg:Method ;
    rdfs:comment "How the feature, or the supported part of it, was obtained from the source."@en .

cg:iiif
    a owl:ObjectProperty ;
    rdfs:label "IIIF image service"@en ;
    rdfs:domain orp:SourceFile ;
    rdfs:comment "IIIF Image API info.json of an image file, making image-region selectors IIIF-addressable."@en .

cg:sources
    a owl:ObjectProperty ;
    rdfs:label "sources"@en ;
    rdfs:comment "Links a Cited GeoJSON collection to the sources its features cite."@en ;
    rdfs:range orp:Source .

cg:when
    a owl:DatatypeProperty ;
    rdfs:label "when"@en ;
    rdfs:range rdf:JSON ;
    rdfs:comment "A Linked Places Format `when` object, kept as a JSON literal."@en ;
    rdfs:seeAlso <https://github.com/LinkedPasts/linked-places-format> .

cg:calendar
    a owl:DatatypeProperty ;
    rdfs:label "calendar"@en ;
    rdfs:range rdf:JSON ;
    rdfs:comment "The calendar in which a collection's `when` values are expressed, as a JSON literal."@en .

cg:georeferences
    a owl:DatatypeProperty ;
    rdfs:label "georeferences"@en ;
    rdfs:range rdf:JSON ;
    rdfs:comment "IIIF Georeference Annotations for the collection's scanned maps, as a JSON literal."@en ;
    rdfs:seeAlso <https://iiif.io/api/extension/georef/> .

# ---------------------------------------------------------------- methods

cg:Method
    a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "Method"@en .

cg:methods
    a skos:ConceptScheme ;
    skos:prefLabel "Cited GeoJSON methods"@en ;
    skos:hasTopConcept cg:traced , cg:transcribed , cg:surveyed , cg:imported , cg:inferred , cg:generated .

cg:traced a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "traced"@en ;
    skos:definition "Drawn over a georeferenced map or image, by hand or with assistance."@en .
cg:transcribed a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "transcribed"@en ;
    skos:definition "Taken from text: a description, a table, a gazetteer entry."@en .
cg:surveyed a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "surveyed"@en ;
    skos:definition "Measured in the field."@en .
cg:imported a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "imported"@en ;
    skos:definition "Copied from another dataset as is."@en .
cg:inferred a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "inferred"@en ;
    skos:definition "Reasoned from indirect evidence."@en .
cg:generated a cg:Method ; skos:inScheme cg:methods ; skos:prefLabel "generated"@en ;
    skos:definition "Produced by a model or procedural generator; the source is then the software and its parameters."@en .
