# Luna vocabulary — the `luna:` namespace.
#
# Namespace IRI:  https://jeromev.github.io/Luna/ontology#
# Single source of truth in code: lunaModel::LUNA_NS (luna/luna.classes/luna.model.class.php);
# the 15 XSLT `xmlns:luna="…"` declarations and semantic/ontop/mapping.ttl must match it.
#
# This `luna:` namespace holds app-specific CONTENT terms only. The UI render-model — the
# i18n strings and XSLT-chrome scaffolding — lives in a SEPARATE namespace,
# ui: <https://jeromev.github.io/Luna/render#> (ui:vocabulary, ui:data, ui:request,
# ui:pager, ui:message, ui:log, …), and never reaches any published graph.
#
# Luna publishes content with standard vocabularies — schema.org, Dublin Core, FOAF,
# SIOC, PROV-O. As projected into the triplestore (R2RML + the model's write-through), the
# ENTIRE custom vocabulary is the three terms below; everything else is standard:
# schema:WebPage / schema:Article / foaf:Person, and schema:name / schema:identifier /
# schema:headline / schema:articleBody / schema:isPartOf / schema:hasPart / schema:inLanguage /
# foaf:name. That minimalism is deliberate — reuse standards, invent as little as possible.
#
# (There is effectively ONE model now: the legacy terms owl:isChildOf, luna:is_active and the
#  /node/{nid} integer URIs are GONE everywhere — rendered, published and triplestore alike.
#  The integer nid survives only as schema:identifier and as the loaders' internal DB key.
#  project_to_schema() re-keys the in-memory graph to /id/{slug} and maps the content vocabulary
#  to schema.org at the serialisation boundary, so the XSLT renders from the same schema.org/slug
#  graph that ?output=xml/n3/json/jsonld serves and that matches the triplestore.)

@prefix luna: <https://jeromev.github.io/Luna/ontology#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .

<https://jeromev.github.io/Luna/ontology#>
    a owl:Ontology ;
    rdfs:label "Luna vocabulary" ;
    rdfs:comment "The small set of system predicates Luna uses where no schema.org / Dublin Core / FOAF / SIOC / PROV-O term fits. Draft." ;
    rdfs:seeAlso <https://github.com/jeromev/Luna> ;
    owl:versionInfo "draft" .

luna:lid a rdf:Property, owl:DatatypeProperty ;
    rdfs:label "literal identifier" ;
    rdfs:comment "A node's permanent machine-facing slug — the segment its identity URI is built from, as in …/id/edit_texts. It is a routing key, not a name: language-independent, stable for the life of the node, and the thing the SPARQL router matches a request path against. schema:name carries the human-readable, language-dependent display name and is deliberately kept distinct; using one for the other is the overload this term exists to end." ;
    rdfs:range rdfs:Literal .

luna:isActive a rdf:Property, owl:DatatypeProperty ;
    rdfs:label "is active" ;
    rdfs:comment "Whether a node (page, text, level, group, user, module) is active/published — a boolean flag, currently encoded as 1 (active) or 0 (inactive)." .

luna:level a rdf:Property, owl:ObjectProperty ;
    rdfs:label "access level" ;
    rdfs:comment "Relates a node to the access level that gates it; the object is an access-level resource (e.g. …/id/level_public)." .

luna:content a rdf:Property, owl:DatatypeProperty ;
    rdfs:label "content" ;
    rdfs:comment "The Markdown source body of a text block, as authored. The HTML view renders it to HTML on the fly; schema:articleBody is the published, stripped-plain-text projection of the rendered value, which standard consumers read." ;
    rdfs:range rdfs:Literal .
