@prefix ea: <http://www.w3.org/ns/ea#> .
@prefix oa: <http://www.w3.org/ns/oa#> .
@prefix as: <http://www.w3.org/ns/activitystreams#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/terms/> .
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .

# Ontology definition
ea: a owl:Ontology ;
    dc:title """EPUB Annotations Vocabulary 1.0"""@en ;
    dc:description """RDFS [[rdf-schema]] vocabulary formalizing the terms defined in the [[[epub-anno-10]]] specification. The vocabulary is a "profile" of the W3C [[[annotation-vocab]]]"""^^rdf:HTML ;
    rdfs:seeAlso <https://www.w3.org/TR/epub-anno-vocab-10/> ;
    dc:date "2026-04-07"^^xsd:date ;
.

# Property definitions
ea:about a rdf:Property, owl:ObjectProperty ;
    rdfs:domain ea:AnnotationSet ;
    rdfs:range ea:About ;
    rdfs:label "Information on the EPUB publication" ;
    rdfs:comment """<div>Provide information on the EPUB publication associated with an Annotation Set.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-about>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:body a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf oa:hasBody ;
    rdfs:domain ea:Annotation ;
    rdfs:range ea:Body ;
    rdfs:label "Designates the body of an annotation" ;
    rdfs:comment """<div>The range of body types is restricted for EPUB.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-body>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:color a rdf:Property ;
    rdfs:domain ea:Body ;
    rdfs:range [ a owl:Class; owl:oneOf (ea:pink ea:orange ea:yellow ea:green ea:blue ea:purple) ] ;
    rdfs:label "Highlight color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:conformsTo a rdf:Property ;
    rdfs:subPropertyOf dcterms:conformsTo ;
    rdfs:domain ea:FragmentSelector ;
    rdfs:range dcterms:Standard, [ a owl:Class; owl:oneOf (https://tools.ietf.org/rfc/rfc3236.html http://www.w3.org/TR/media-frags/ https://www.w3.org/TR/SVG/ https://wicg.github.io/scroll-to-text-fragment/) ] ;
    rdfs:label "Designates the fragment format" ;
    rdfs:comment """<div>The range of possible media formats in Fragment Selectors is restricted, see the range of this property.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-conformsto>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:creator a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf dcterms:creator ;
    rdfs:range ea:Creator ;
    rdfs:label "Information on the creator of an annotation" ;
    rdfs:comment """<div>The range of Creator types is restricted in EPUB.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-creator>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:generator a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf as:generator ;
    rdfs:domain ea:AnnotationSet ;
    rdfs:range ea:Generator ;
    rdfs:label "Information on the tool generating the annotations" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-generator>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:highlight a rdf:Property ;
    rdfs:domain ea:Body ;
    rdfs:range [ a owl:Class; owl:oneOf (ea:solid ea:underline ea:strikethrough ea:outline) ] ;
    rdfs:label "Highlight mode" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-highlight>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:homepage a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf foaf:homepage ;
    rdfs:domain ea:Generator ;
    rdfs:label "Homepage of the tool generating the annotations" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-homepage>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:items a rdf:Property, owl:ObjectProperty ;
    rdfs:domain ea:AnnotationSet ;
    rdfs:range ea:Annotation ;
    rdfs:label "Items in a set of annotations" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-items>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:meta a rdf:Property, owl:ObjectProperty ;
    rdfs:domain ea:Target ;
    rdfs:range ea:Meta ;
    rdfs:label "Meta" ;
    rdfs:comment """<div>To be defined…</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-meta>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:motivation a rdf:Property ;
    rdfs:subPropertyOf oa:motivatedBy ;
    rdfs:domain ea:Annotation ;
    rdfs:range oa:Motivation, [ a owl:Class; owl:oneOf (oa:bookmarking oa:commenting oa:highlighting) ] ;
    rdfs:label "Provides the motivation for an annotation" ;
    rdfs:comment """<div>The set of motivation types is restricted in EPUB, see the range definition. In the JSON-LD serialization those terms should be used without prefix.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-motivation>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:name a rdf:Property ;
    rdfs:subPropertyOf foaf:name ;
    rdfs:domain [ a owl:Class; owl:unionOf (ea:Creator ea:Generator) ] ;
    rdfs:range [ a owl:Class; owl:unionOf (rdf:langString xsd:string rdf:dirLangString) ] ;
    rdfs:label "Name" ;
    rdfs:comment """<div>This property is available on some classes, see domain definition.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-name>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:refinedBy a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf oa:refinedBy ;
    rdfs:domain ea:Selector ;
    rdfs:range ea:Selector ;
    rdfs:label "Selector refinement" ;
    rdfs:comment """<div>This property restricts the usage of the general <a href="https://www.w3.org/TR/annotation-vocab/#refinedby"><code>oa:refinedBy</code></a> property to the list of Selector types available in EPUB.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-motivation>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:selector a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf oa:hasSelector ;
    rdfs:domain ea:Target ;
    rdfs:range ea:Selector ;
    rdfs:label "Designates the selector(s) for a target" ;
    rdfs:comment """<div>This property restricts the possible Selector types in EPUB.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-selector>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:source a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf oa:hasSource ;
    rdfs:domain ea:Target ;
    rdfs:label "Designates the source resource for the target" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-source>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:tags a rdf:Property, owl:DatatypeProperty ;
    rdfs:domain ea:Body ;
    rdfs:range xsd:string ;
    rdfs:label "Tags" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-tags>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:target a rdf:Property, owl:ObjectProperty ;
    rdfs:subPropertyOf oa:hasTarget ;
    rdfs:domain ea:Annotation ;
    rdfs:range ea:Target ;
    rdfs:label "Designates the target resource for the EPUB annotation" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-target>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:setTitle a rdf:Property ;
    rdfs:domain ea:AnnotationSet ;
    rdfs:range [ a owl:Class; owl:unionOf (rdf:langString xsd:string rdf:dirLangString) ] ;
    rdfs:label "Title of the Annotation Set" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-title>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

# Class definitions
ea:About a rdfs:Class ;
    rdfs:label "Information about the EPUB publication" ;
    rdfs:comment """<div>Dublin Core terms are used with this class, retaining the prefixes (to be in line with the EPUB Package Document).</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-about-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Annotation a rdfs:Class ;
    rdfs:subClassOf oa:Annotation ;
    rdfs:label "EPUB Annotation Object" ;
    rdfs:comment """<div>A subclass of the <a href="https://www.w3.org/TR/annotation-vocab/#annotation">Web Annotation object</a> with some restrictions with regards of various properties.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-annotation-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:AnnotationSet a rdfs:Class ;
    rdfs:label "Set of annotations" ;
    rdfs:comment """<div>An unordered collection of annotations, used as an interchange format amont EPUB Reading Systems.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-annotationset>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Body a rdfs:Class ;
    rdfs:subClassOf oa:TextualBody ;
    rdfs:label "Body of an EPUB Annotation" ;
    rdfs:comment """<div>In EPUB, annotations are restricted to have textual content only.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-body-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Creator a rdfs:Class ;
    rdfs:subClassOf [ a owl:Class; owl:unionOf (foaf:Person foaf:Organization as:Application) ] ;
    rdfs:label "Creator of an EPUB Annotation" ;
    rdfs:comment """<div>JSON-LD serializations should use the terms <code>Person</code>, <code>Organization</code>, or <code>Software</code> for typing, as these are the only available creator types.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-creator-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:FragmentSelector a rdfs:Class ;
    rdfs:subClassOf oa:FragmentSelector ;
    rdfs:label "Fragment Selector in EPUB" ;
    rdfs:comment """<div>This is restricted version of the <a href="https://www.w3.org/TR/annotation-vocab/#fragmentselector">Web Annotation Fragment Selector</a>, reducing the list of valid media types.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-fragment-selector-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Generator a rdfs:Class ;
    rdfs:label "Generator" ;
    rdfs:comment """<div>Information about the tool generating the annotations.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-generator-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Meta a rdfs:Class ;
    rdfs:label "Meta" ;
    rdfs:comment """<div>this class is currently undefined...</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-target-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Selector a rdfs:Class ;
    rdfs:subClassOf [ a owl:Class; owl:unionOf (ea:FragmentSelector oa:CssSelector oa:TextPositionSelector) ] ;
    rdfs:label "EPUB Annotation selector" ;
    rdfs:comment """<div>A restrictive subset of selectors, usable in EPUB.</div>"""^^rdf:HTML ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-selector>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:Target a rdfs:Class ;
    rdfs:label "Target of an EPUB Annotation." ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-target-object>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.



# Definitions of individuals
ea:pink a rdfs:Resource ;
    rdfs:label "Pink selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:orange a rdfs:Resource ;
    rdfs:label "Orange selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:yellow a rdfs:Resource ;
    rdfs:label "Yellow selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:green a rdfs:Resource ;
    rdfs:label "Green selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:blue a rdfs:Resource ;
    rdfs:label "Blue selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:purple a rdfs:Resource ;
    rdfs:label "Purple selection color" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-color>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:solid a rdfs:Resource ;
    rdfs:label "Solid selection highlight" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-highlight>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:underline a rdfs:Resource ;
    rdfs:label "Underline selection highlight" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-highlight>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:strikethrough a rdfs:Resource ;
    rdfs:label "Strikethrough selection highlight" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-highlight>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

ea:outline a rdfs:Resource ;
    rdfs:label "Outline selection highlight" ;
    rdfs:isDefinedBy <https://www.w3.org/TR/epub-anno-10/#dfn-highlight>, <http://www.w3.org/ns/ea#> ;
    vs:term_status "stable" ;
.

# Context files and their mentions
<https://www.w3.org/ns/epub-anno.jsonld> a jsonld:Context ;
    schema:mentions
        ea:About,
        ea:Annotation,
        ea:AnnotationSet,
        ea:Body,
        ea:Creator,
        ea:FragmentSelector,
        ea:Generator,
        ea:Meta,
        ea:Selector,
        ea:Target,
        ea:about,
        ea:blue,
        ea:body,
        ea:color,
        ea:conformsTo,
        ea:creator,
        ea:generator,
        ea:green,
        ea:highlight,
        ea:homepage,
        ea:items,
        ea:meta,
        ea:motivation,
        ea:name,
        ea:orange,
        ea:outline,
        ea:pink,
        ea:purple,
        ea:refinedBy,
        ea:selector,
        ea:setTitle,
        ea:solid,
        ea:source,
        ea:strikethrough,
        ea:tags,
        ea:target,
        ea:underline,
        ea:yellow ;
.

