@prefix :       <https://www.w3.org/TR/rdf12-primer/#> .
@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#> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:   <http://www.w3.org/2004/02/skos/core#> .
@prefix schema: <http://schema.org/> .
@prefix dct:    <http://purl.org/dc/terms/> .
@prefix foaf:   <http://xmlns.com/foaf/0.1/> .
@prefix ex:     <http://example.org/> .
@prefix prov:   <http://www.w3.org/ns/prov#> .

: a owl:Ontology ;
    schema:name "RDF 1.2 Primer — KG Ontology"@en ;
    schema:description "Semantic model of the W3C RDF 1.2 Primer — a W3C Group Note (April 2026) introducing the Resource Description Framework: triples, IRIs, literals, blank nodes, triple terms, named graphs, RDF vocabularies, serialization formats (Turtle, TriG, N-Triples, N-Quads, JSON-LD, RDFa, RDF/XML), and RDF semantics."@en ;
    rdfs:label "RDF 1.2 Primer — Knowledge Graph" ;
    schema:identifier "https://www.w3.org/TR/rdf12-primer/" ;
    dct:source <https://www.w3.org/TR/rdf12-primer/> ;
    dct:creator :pierreAntoineChampin, :niklasLindstrom ; dct:date "2026-04-16"^^xsd:date .

:RDFTerm a owl:Class ; rdfs:label "RDF Term" ; rdfs:comment "One of the four kinds of RDF terms — IRI, literal, blank node, or triple term." ; rdfs:isDefinedBy : .
:SerializationFormat a owl:Class ; rdfs:label "Serialization Format" ; rdfs:comment "A concrete syntax for writing RDF graphs and datasets — Turtle, TriG, N-Triples, N-Quads, JSON-LD, RDFa, or RDF/XML." ; rdfs:isDefinedBy : .
:KeyConcept a owl:Class ; rdfs:label "Key Concept" ; rdfs:comment "A foundational idea in RDF — the triple data model, vocabulary reuse, Linked Data, entailment, or reification." ; rdfs:isDefinedBy : .

:article a schema:Article, schema:TechArticle ;
    rdfs:label "RDF 1.2 Primer" ;
    schema:name "RDF 1.2 Primer"@en ;
    schema:headline "RDF 1.2 Primer"@en ;
    schema:description "The W3C RDF 1.2 Primer provides a basic introduction to the Resource Description Framework — covering the triple data model (IRIs, literals, blank nodes, triple terms), named graphs, RDF vocabularies, seven serialization formats, and RDF semantics. New in 1.2: directional language-tagged strings and triple terms for statement reification."@en ;
    schema:url <https://www.w3.org/TR/rdf12-primer/> ;
    schema:datePublished "2026-04-16"^^xsd:date ;
    schema:author :pierreAntoineChampin, :niklasLindstrom ;
    schema:publisher :w3c ;
    schema:about :rdfDataModel, :rdfVocabularies, :linkedData, :rdfSerialization, :rdfSemantics ;
    schema:hasPart :introSection, :dataModelSection, :vocabulariesSection, :serializationSection, :semanticsSection, :faqPage, :glossarySet, :howtoSection, :termsGroup, :formatsGroup, :conceptsGroup, : ; prov:wasGeneratedBy :kgGeneratorSkill .

:pierreAntoineChampin a foaf:Person, schema:Person ; schema:name "Pierre-Antoine Champin"@en ; schema:affiliation :w3c .
:niklasLindstrom a foaf:Person, schema:Person ; schema:name "Niklas Lindström"@en ; schema:affiliation :w3c .

:w3c a schema:Organization ; schema:name "World Wide Web Consortium (W3C)"@en ; schema:url <https://www.w3.org> .

:rdfDataModel a skos:Concept, schema:DefinedTerm ;
    schema:name "RDF Data Model"@en ;
    schema:description "An abstract syntax for expressing information about resources using subject-predicate-object triples. Four kinds of RDF terms: IRIs (global identifiers in all positions), literals (values in object position), blank nodes (anonymous resources in subject and object), and triple terms (propositions in object position). A set of triples forms a graph; a collection of graphs forms an RDF dataset."@en ; rdfs:isDefinedBy : .

:rdfVocabularies a skos:Concept, schema:DefinedTerm ;
    schema:name "RDF Vocabularies"@en ;
    schema:description "RDF Schema (RDFS) defines semantic characteristics: classes, properties, type, subClassOf, subPropertyOf, domain, range. Notable vocabularies include FOAF, Dublin Core, schema.org, and SKOS — vocabularies get their value from reuse."@en ; rdfs:isDefinedBy : .

:linkedData a skos:Concept, schema:DefinedTerm ;
    schema:name "Linked Data"@en ;
    schema:description "Publishing and interlinking structured data on the Web — retrieving one IRI yields data that links to other IRIs, forming a web of interconnected machine-readable information."@en ; rdfs:isDefinedBy : .

:rdfSerialization a skos:Concept, schema:DefinedTerm ;
    schema:name "RDF Serialization Formats"@en ;
    schema:description "Seven concrete syntaxes for writing RDF: Turtle (prefixes, shorthands), TriG (multiple graphs), N-Triples (line-based), N-Quads (quads), JSON-LD (JSON syntax), RDFa (embedded in HTML), and RDF/XML (XML syntax)."@en ; rdfs:isDefinedBy : .

:rdfSemantics a skos:Concept, schema:DefinedTerm ;
    schema:name "RDF Semantics"@en ;
    schema:description "Three intuitive notions: IRIs name the same thing each time, triples are true when the relationship exists, and an RDF graph is true when all its triples are true. Entailment allows deducing additional triples from ground statements."@en ; rdfs:isDefinedBy : .

:termsGroup a schema:ArticleSection ; schema:name "RDF Terms"@en ; schema:position 3 ; schema:hasPart :iriTerm, :literalTerm, :blankNodeTerm, :tripleTermTerm .
:iriTerm a :RDFTerm ; rdfs:label "IRI (Internationalized Resource Identifier)" ; rdfs:comment "Global identifier generalizing URI — appears in subject, predicate, and object positions. Allows non-ASCII characters. Reusable across datasets."@en .
:literalTerm a :RDFTerm ; rdfs:label "Literal" ; rdfs:comment "Encodes values (strings, numbers, dates) rather than identifying them — always typed (e.g., xsd:string, xsd:integer, xsd:date). May carry language tag and base direction. Object position only."@en .
:blankNodeTerm a :RDFTerm ; rdfs:label "Blank Node" ; rdfs:comment "Anonymous resource without global identifier — like variables in algebra. Appears in subject and object positions. New in 1.2: directional language-tagged strings support ltr and rtl base direction."@en .
:tripleTermTerm a :RDFTerm ; rdfs:label "Triple Term" ; rdfs:comment "Denotes a proposition as an abstract object — used with the reifies predicate to annotate statements without implying them. New in RDF 1.2. Object position only."@en .

:formatsGroup a schema:ArticleSection ; schema:name "Serialization Formats"@en ; schema:position 5 ; schema:hasPart :turtleFmt, :trigFmt, :nTriplesFmt, :nQuadsFmt, :jsonldFmt, :rdfaFmt, :rdfXmlFmt .
:turtleFmt a :SerializationFormat ; rdfs:label "Turtle" ; rdfs:comment "Compact extension of N-Triples with prefixes, semicolons for same-subject, a for rdf:type, [] for blank nodes, << >> and {| |} and ~ for reification. Single graph."@en .
:trigFmt a :SerializationFormat ; rdfs:label "TriG" ; rdfs:comment "Extension of Turtle supporting multiple named graphs via GRAPH blocks. Any Turtle document is valid TriG. Named graphs for dataset organization."@en .
:nTriplesFmt a :SerializationFormat ; rdfs:label "N-Triples" ; rdfs:comment "Line-based plain-text serialization — full IRIs in angle brackets, period-terminated. Used for large RDF exchange."@en .
:nQuadsFmt a :SerializationFormat ; rdfs:label "N-Quads" ; rdfs:comment "Extension of N-Triples adding a fourth element per line for graph IRI. Used for large RDF dataset exchange."@en .
:jsonldFmt a :SerializationFormat ; rdfs:label "JSON-LD" ; rdfs:comment "JSON syntax for RDF with @context, @id, @type keywords. Transforms JSON to RDF with minimal changes. Supports @reverse and @container."@en .
:rdfaFmt a :SerializationFormat ; rdfs:label "RDFa" ; rdfs:comment "Embeds RDF within HTML/XML using resource, property, typeof, prefix attributes. Powers search engine rich results and structured data."@en .
:rdfXmlFmt a :SerializationFormat ; rdfs:label "RDF/XML" ; rdfs:comment "Original RDF syntax from the late 1990s — uses rdf:RDF root, rdf:Description elements with rdf:about, and rdf:datatype for typed literals."@en .

:conceptsGroup a schema:ArticleSection ; schema:name "Key Concepts"@en ; schema:position 4 ; schema:hasPart :reification, :entailment, :vocabReuse, :multipleGraphs .
:reification a :KeyConcept ; rdfs:label "Reification (Triple Terms)" ; rdfs:comment "New in RDF 1.2 — triple terms allow making statements about statements. A reifier concretizes a proposition; the reifies predicate links it to a triple term. Enables annotating assertions with provenance, certainty, or temporal context without implying the original statement."@en .
:entailment a :KeyConcept ; rdfs:label "Entailment" ; rdfs:comment "RDF Schema reasoners can deduce triples that must be true from ground statements. From ex:bob foaf:knows ex:alice, derive ex:bob rdf:type foaf:Person. Datatype constraints create logical inconsistencies when violated."@en .
:vocabReuse a :KeyConcept ; rdfs:label "Vocabulary Reuse" ; rdfs:comment "Vocabularies get their value from reuse — FOAF, Dublin Core, schema.org, SKOS, and Wikidata provide shared IRI-based vocabularies. owl:sameAs links equivalent IRIs across datasets."@en .
:multipleGraphs a :KeyConcept ; rdfs:label "Named Graphs and RDF Datasets" ; rdfs:comment "An RDF dataset contains multiple named graphs (each with an IRI) and at most one default graph. TriG and N-Quads provide concrete syntaxes. Graph names are often used to indicate provenance or data source context."@en .

:introSection a schema:ArticleSection ; schema:name "Introduction"@en ; schema:position 1 ; schema:description "RDF is a framework for expressing information about resources — documents, people, physical objects, abstract concepts. It targets machine-processable information exchange and enables Linked Data. The primer introduces the RDF data model, vocabularies, serialization formats, and semantics."@en .
:dataModelSection a schema:ArticleSection ; schema:name "RDF Data Model"@en ; schema:position 2 ; schema:description "RDF uses subject-predicate-object triples as statements. Four term types: IRIs (identifiers in all positions), literals (values in object position), blank nodes (anonymous resources), and triple terms (propositions, new in 1.2). A set of triples is a graph. Multiple graphs form an RDF dataset."@en .
:vocabulariesSection a schema:ArticleSection ; schema:name "RDF Vocabularies"@en ; schema:position 4 ; schema:description "RDF Schema defines classes, properties, type, subClassOf, subPropertyOf, domain, and range. FOAF, Dublin Core, schema.org, and SKOS are notable vocabularies. owl:sameAs links equivalent resources. Vocabularies gain value through reuse."@en .
:serializationSection a schema:ArticleSection ; schema:name "Writing RDF Graphs"@en ; schema:position 5 ; schema:description "Seven serialization formats: Turtle (compact with prefixes), N-Triples (line-based), TriG (multiple graphs), N-Quads (quads), JSON-LD (JSON syntax), RDFa (embedded in HTML), and RDF/XML. Directional language-tagged strings and triple terms are new 1.2 features with dedicated syntax in Turtle."@en .
:semanticsSection a schema:ArticleSection ; schema:name "Semantics of RDF Graphs"@en ; schema:position 6 ; schema:description "Three intuitive notions: consistent IRI naming, truth of triples, truth of graphs. Entailment allows reasoning systems to derive additional triples. Datatype constraints create inconsistencies when violated. RDF Schema permits modeling freedom — entities may be both classes and instances."@en .

:faqPage a schema:FAQPage ; schema:name "Frequently Asked Questions"@en ; schema:mainEntity :faq1, :faq2, :faq3, :faq4, :faq5, :faq6, :faq7, :faq8, :faq9, :faq10, :faq11, :faq12 .
:faq1 a schema:Question ; schema:name "What is RDF?"@en ; schema:acceptedAnswer :a1 . :a1 a schema:Answer ; schema:text "The Resource Description Framework — a W3C standard for expressing information about resources using subject-predicate-object triples. It enables machine-processable data exchange and powers Linked Data on the Web."@en .
:faq2 a schema:Question ; schema:name "What are the four kinds of RDF terms?"@en ; schema:acceptedAnswer :a2 . :a2 a schema:Answer ; schema:text "IRIs (global identifiers in all three triple positions), literals (typed values in object position only, optionally with language tags and base direction), blank nodes (anonymous resources in subject and object positions), and triple terms (proposition references in object position, new in RDF 1.2)."@en .
:faq3 a schema:Question ; schema:name "What is new in RDF 1.2?"@en ; schema:acceptedAnswer :a3 . :a3 a schema:Answer ; schema:text "Two major additions: directional language-tagged strings (supporting ltr and rtl base direction for proper bidirectional text rendering) and triple terms (enabling statements about statements through reification without implying the original assertion)."@en .
:faq4 a schema:Question ; schema:name "What serialization formats does RDF support?"@en ; schema:acceptedAnswer :a4 . :a4 a schema:Answer ; schema:text "Seven formats: Turtle (compact, prefix-based), N-Triples (line-based), TriG (multiple graphs extension of Turtle), N-Quads (line-based quads), JSON-LD (JSON syntax), RDFa (embedded in HTML/XML), and RDF/XML (original XML syntax)."@en .
:faq5 a schema:Question ; schema:name "What is the difference between Turtle and N-Triples?"@en ; schema:acceptedAnswer :a5 . :a5 a schema:Answer ; schema:text "N-Triples is a simple line-based format using full IRIs — designed for machine processing and large-scale exchange. Turtle extends N-Triples with namespace prefixes, shorthand predicates (a for rdf:type), same-subject grouping (semicolons), and blank node syntax. Turtle is designed for human readability."@en .
:faq6 a schema:Question ; schema:name "What is a triple term and how is it used?"@en ; schema:acceptedAnswer :a6 . :a6 a schema:Answer ; schema:text "A triple term denotes a proposition as an abstract object — it identifies a statement through its constituent subject, predicate, and object components. Used with the reifies predicate to annotate statements (e.g., adding provenance, certainty, or temporal context) without implying the original statement is true."@en .
:faq7 a schema:Question ; schema:name "What are RDF vocabularies?"@en ; schema:acceptedAnswer :a7 . :a7 a schema:Answer ; schema:text "Collections of IRIs defining classes and properties for specific domains. RDF Schema (RDFS) provides the vocabulary definition language. Notable vocabularies include FOAF (social networks), Dublin Core (metadata), schema.org (search engine markup), and SKOS (classification schemes)."@en .
:faq8 a schema:Question ; schema:name "What is Linked Data?"@en ; schema:acceptedAnswer :a8 . :a8 a schema:Answer ; schema:text "Using RDF to publish and interlink structured data on the Web — retrieving one IRI yields data that links to other IRIs, creating a web of interconnected machine-readable information. Wikidata, DBpedia, Europeana, and VIAF are prominent Linked Data datasets."@en .
:faq9 a schema:Question ; schema:name "What is entailment in RDF?"@en ; schema:acceptedAnswer :a9 . :a9 a schema:Answer ; schema:text "The ability of reasoning systems to deduce additional triples that must be true from ground statements. An RDFS reasoner can infer that a subject with a foaf:knows relationship is itself a foaf:Person. Datatype constraints (e.g., invalid xsd:integer values) create logical inconsistencies."@en .
:faq10 a schema:Question ; schema:name "How do named graphs work?"@en ; schema:acceptedAnswer :a10 . :a10 a schema:Answer ; schema:text "An RDF dataset contains multiple named graphs (each identified by an IRI) and at most one unnamed default graph. TriG and N-Quads provide syntax for named graphs. Graph names often indicate provenance, data source, or context."@en .
:faq11 a schema:Question ; schema:name "What RDF and SPARQL specifications exist?"@en ; schema:acceptedAnswer :a11 . :a11 a schema:Answer ; schema:text "Eleven RDF 1.2 documents: What's New, Concepts, N-Quads, N-Triples, Primer, Schema, Semantics, TriG, Turtle, XML Syntax, Interoperability. Twelve SPARQL 1.2 documents: What's New, Concepts, Query, Update, Service Description, Federated Query, plus results formats, entailment regimes, protocol, and graph store protocol."@en .
:faq12 a schema:Question ; schema:name "How does owl:sameAs support Linked Data?"@en ; schema:acceptedAnswer :a12 . :a12 a schema:Answer ; schema:text "owl:sameAs indicates that two IRIs refer to the same resource — for example, linking DBpedia's Leonardo da Vinci IRI to VIAF's Leonardo IRI. This enables cross-dataset integration and discovery, allowing applications to follow sameAs links to gather all known data about a resource."@en .

:glossarySet a schema:DefinedTermSet ; schema:name "Glossary of Key Terms"@en ; schema:hasDefinedTerm :rdfDataModel, :rdfVocabularies, :linkedData, :rdfSerialization, :rdfSemantics, :tripleTerm, :graphTerm, :datasetTerm, :reificationTerm .
:tripleTerm a schema:DefinedTerm ; schema:name "Triple"@en ; schema:description "A subject-predicate-object statement in RDF — the fundamental unit of the data model."@en .
:graphTerm a schema:DefinedTerm ; schema:name "RDF Graph"@en ; schema:description "A set of RDF triples — the basic unit of RDF data that can be serialized and exchanged."@en .
:datasetTerm a schema:DefinedTerm ; schema:name "RDF Dataset"@en ; schema:description "A collection of named graphs (each with an IRI) and at most one default graph."@en .
:reificationTerm a schema:DefinedTerm ; schema:name "Reification"@en ; schema:description "Making statements about statements using triple terms and the reifies predicate — annotating assertions without implying truth."@en .

:howtoSection a schema:HowTo ; schema:name "How to Use RDF"@en ; schema:description "A seven-step guide for getting started with RDF — from creating triples to publishing Linked Data."@en ; schema:step :step1, :step2, :step3, :step4, :step5, :step6, :step7 .
:step1 a schema:HowToStep ; schema:name "Model Your Domain as Triples"@en ; schema:position 1 ; schema:text "Express information about resources as subject-predicate-object triples. Identify what entities exist (subjects), what properties they have (predicates), and what values or related entities they connect to (objects). Start with informal pseudocode before committing to specific IRIs."@en .
:step2 a schema:HowToStep ; schema:name "Choose or Define IRIs"@en ; schema:position 2 ; schema:text "Use existing vocabularies when possible — FOAF for people, Dublin Core for metadata, schema.org for web content. Create new IRIs under your own domain for concepts without existing vocabulary terms. IRIs are global identifiers that others can reuse."@en .
:step3 a schema:HowToStep ; schema:name "Pick a Serialization Format"@en ; schema:position 3 ; schema:text "Choose based on your use case: Turtle for human readability, JSON-LD for web APIs, N-Triples/N-Quads for bulk exchange, TriG for multiple graphs, RDFa for embedding in HTML, RDF/XML for legacy systems. Start with Turtle — it is the most widely used and readable format."@en .
:step4 a schema:HowToStep ; schema:name "Add Schema and Semantics"@en ; schema:position 4 ; schema:text "Declare classes and properties using RDF Schema (rdfs:Class, rdf:Property, rdfs:subClassOf, rdfs:domain, rdfs:range). Define type relationships (rdf:type). These enable reasoners to infer additional triples and validate data structure."@en .
:step5 a schema:HowToStep ; schema:name "Use Named Graphs for Provenance"@en ; schema:position 5 ; schema:text "Group statements into named graphs to track data source and context. Use the default graph for publisher metadata. TriG and N-Quads provide concrete syntax for named graphs. Graph names often correspond to the IRI where the data was retrieved."@en .
:step6 a schema:HowToStep ; schema:name "Link to Other Datasets"@en ; schema:position 6 ; schema:text "Use owl:sameAs to indicate that your IRI refers to the same resource as IRIs in Wikidata, DBpedia, VIAF, or other datasets. Link your data into the Linked Data cloud. Every connection makes your data more discoverable and useful."@en .
:step7 a schema:HowToStep ; schema:name "Publish and Query with SPARQL"@en ; schema:position 7 ; schema:text "Make your RDF data available at its IRI. Implement content negotiation to serve different formats. Set up a SPARQL endpoint to enable cross-dataset queries. SPARQL 1.2 provides a powerful query language for RDF graphs and datasets."@en .

:kgGeneratorSkill a schema:SoftwareApplication ; schema:name "kg-generator skill"@en ; schema:url <https://github.com/anomalyco/opencode/tree/main/kg-generator> ; schema:description "LLM-prompt-based Knowledge Graph generation skill."@en .
