@prefix : <urn:openlink:semantic-context-layers:> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:article
    a schema:Article ;
    schema:headline "Semantic and Context Layers via Open Standards" ;
    schema:abstract "An open-standards architecture in which an ontology supplies TBox and RBox semantics and the wider context layer also contains ABox assertions." ;
    schema:image :originalVisualization, :openLinkStyleVisualization ;
    schema:encoding :turtleCompanion .

:turtleCompanion
    a schema:MediaObject ;
    schema:name "Semantic and Context Layers via Open Standards — RDF Turtle companion" ;
    schema:encodingFormat "text/turtle" ;
    schema:about :contextLayer, :architectureOntology .

:originalVisualization
    a schema:ImageObject ;
    schema:name "Ontology, Context, and Semantic Layer visualization" ;
    schema:caption "The earlier visualization reconstructed from the photographed notebook sketch." ;
    schema:contentUrl <https://www.openlinksw.com/data//screenshots/ontology-context-semantic-layer-visualization.png> ;
    schema:encodingFormat "image/png" ;
    schema:about :contextLayer .

:openLinkStyleVisualization
    a schema:ImageObject ;
    schema:name "Context Layer informed by Ontology" ;
    schema:caption "An additional OpenLink-style rendition with an Ontology box around the TBox and RBox, plus an ABox within the wider Context Layer." ;
    schema:contentUrl <https://www.openlinksw.com/data//screenshots/ontology-context-semantic-layer-2.png> ;
    schema:encodingFormat "image/png" ;
    schema:about :contextLayer, :architectureOntology, :tbox, :rbox, :abox ;
    prov:wasDerivedFrom <https://www.openlinksw.com/data/html/knowledge-graph-manifestation-turtle-jsonld.html> .

:architectureOntology
    a owl:Ontology ;
    rdfs:label "Ontology" ;
    rdfs:comment "The ontology scope contains the TBox and RBox." ;
    schema:hasPart :tbox, :rbox .

:contextLayer
    a schema:DefinedTerm ;
    schema:name "Context Layer informed by Ontology" ;
    schema:description "The context layer encloses the TBox, RBox, and ABox and is informed by the ontology." ;
    schema:hasPart :tbox, :rbox, :abox ;
    :informedBy :architectureOntology .

:informedBy
    a rdf:Property ;
    rdfs:label "informed by" ;
    rdfs:domain schema:DefinedTerm ;
    rdfs:range owl:Ontology .

:tbox
    a schema:DefinedTerm ;
    schema:name "TBox" ;
    schema:description "Terminological axioms expressed with RDF Schema, illustrated by a simple subsumption scaffold." ;
    schema:hasPart :Person, :Parent, :Mother .

:Person a owl:Class ; rdfs:label "Person" .
:Parent a owl:Class ; rdfs:label "Parent" ; rdfs:subClassOf :Person .
:Mother a owl:Class ; rdfs:label "Mother" ; rdfs:subClassOf :Parent .

:rbox
    a schema:DefinedTerm ;
    schema:name "RBox" ;
    schema:description "Role and property axioms expressed with OWL, illustrated by a transitive object property." ;
    schema:hasPart :ancestorOf .

:ancestorOf
    a owl:ObjectProperty, owl:TransitiveProperty ;
    rdfs:label "ancestorOf" ;
    rdfs:domain :Person ;
    rdfs:range :Person .

:abox
    a schema:DefinedTerm ;
    schema:name "ABox" ;
    schema:description "Instance assertions using the TBox classes and RBox property." ;
    schema:hasPart :Alice, :Bob, :Carol,
        :aliceAncestorOfBobAssertion,
        :bobAncestorOfCarolAssertion,
        :aliceAncestorOfCarolInference .

:Alice a :Mother ; rdfs:label "Alice" ; :ancestorOf :Bob .
:Bob a :Person ; rdfs:label "Bob" ; :ancestorOf :Carol .
:Carol a :Person ; rdfs:label "Carol" .

:AssertedRelation a rdfs:Class ; rdfs:label "Asserted relation" .
:InferredRelation a rdfs:Class ; rdfs:label "Inferred relation" .

:aliceAncestorOfBobAssertion
    a rdf:Statement, :AssertedRelation ;
    rdf:subject :Alice ;
    rdf:predicate :ancestorOf ;
    rdf:object :Bob .

:bobAncestorOfCarolAssertion
    a rdf:Statement, :AssertedRelation ;
    rdf:subject :Bob ;
    rdf:predicate :ancestorOf ;
    rdf:object :Carol .

:aliceAncestorOfCarolInference
    a rdf:Statement, :InferredRelation, prov:Entity ;
    rdf:subject :Alice ;
    rdf:predicate :ancestorOf ;
    rdf:object :Carol ;
    prov:wasDerivedFrom :aliceAncestorOfBobAssertion, :bobAncestorOfCarolAssertion ;
    schema:description "Inferred through the owl:TransitiveProperty semantics of ancestorOf; shown as a dotted relation in the visualization." .
