Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a11y enums and update vocab terms #291

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ def enumterms():

return "/term/enum/", "2018-05-29T12:36:01.337Z", graph

@compiler.dataset
def a11yenumterms():
graph = Graph().parse(str(compiler.path('source/a11y-enums.ttl')), format='turtle')

return "/term/enum/a11y/", "2018-05-29T12:36:01.337Z", graph

@compiler.dataset
def musnotationterms():
graph = Graph().parse(str(compiler.path('source/musicnotation.ttl')), format='turtle')
Expand Down
167 changes: 167 additions & 0 deletions source/a11y-enums.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sdo: <http://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix : <https://id.kb.se/vocab/> .
@base <https://id.kb.se/term/enum/a11y/> .

# accessMode

<accessMode/auditory> a :AccessModeType ;
skos:notation "auditory" .

<accessMode/tactile> a :AccessModeType ;
skos:notation "tactile" .

<accessMode/textual> a :AccessModeType ;
skos:notation "textual" .

<accessMode/visual> a :AccessModeType ;
skos:notation "visual" .

<accessMode/colorDependent> a :AccessModeType ;
skos:notation "colorDependent" .

<accessMode/chartOnVisual> a :AccessModeType ;
skos:notation "chartOnVisual" .

<accessMode/chemOnVisual> a :AccessModeType ;
skos:notation "chemOnVisual" .

<accessMode/diagramOnVisual> a :AccessModeType ;
skos:notation "diagramOnVisual" .

<accessMode/mathOnVisual> a :AccessModeType ;
skos:notation "mathOnVisual" .

<accessMode/musicOnVisual> a :AccessModeType ;
skos:notation "musicOnVisual" .

<accessMode/textOnVisual> a :AccessModeType ;
skos:notation "textOnVisual" .


# accessibilityHazard

<accessibilityHazard/flashing> a :AccessibilityHazardType ;
skos:notation "flashing" .

<accessibilityHazard/noFlashingHazard> a :AccessibilityHazardType ;
skos:notation "noFlashingHazard" .

<accessibilityHazard/motionSimulation> a :AccessibilityHazardType ;
skos:notation "motionSimulation" .

<accessibilityHazard/noMotionSimulationHazard> a :AccessibilityHazardType ;
skos:notation "noMotionSimulationHazard" .

<accessibilityHazard/noMotionSimulationHazard> a :AccessibilityHazardType ;
skos:notation "noMotionSimulationHazard" .

<accessibilityHazard/sound> a :AccessibilityHazardType ;
skos:notation "sound" .

<accessibilityHazard/noSoundHazard> a :AccessibilityHazardType ;
skos:notation "noSoundHazard" .

<accessibilityHazard/unknown> a :AccessibilityHazardType ;
skos:notation "unknown" .

<accessibilityHazard/none> a :AccessibilityHazardType ;
skos:notation "none" .


# accessibilityFeature

<accessibilityFeature/alternativeText> a :AccessFeatureType ;
skos:notation "alternativeText" .

<accessibilityFeature/annotations> a :AccessFeatureType ;
skos:notation "annotations" .

<accessibilityFeature/audioDescription> a :AccessFeatureType ;
skos:notation "audioDescription" .

<accessibilityFeature/bookmarks> a :AccessFeatureType ;
skos:notation "bookmarks" .

<accessibilityFeature/braille> a :AccessFeatureType ;
skos:notation "braille" .

<accessibilityFeature/captions> a :AccessFeatureType ;
skos:notation "captions" .

<accessibilityFeature/ChemML> a :AccessFeatureType ;
skos:notation "ChemML" .

<accessibilityFeature/describedMath> a :AccessFeatureType ;
skos:notation "describedMath" .

<accessibilityFeature/displayTransformability> a :AccessFeatureType ;
skos:notation "displayTransformability" .

<accessibilityFeature/highContrastAudio> a :AccessFeatureType ;
skos:notation "highContrastAudio" .

<accessibilityFeature/highContrastDisplay> a :AccessFeatureType ;
skos:notation "highContrastDisplay" .

<accessibilityFeature/index> a :AccessFeatureType ;
skos:notation "index" .

<accessibilityFeature/largePrint> a :AccessFeatureType ;
skos:notation "largePrint" .

<accessibilityFeature/latex> a :AccessFeatureType ;
skos:notation "latex" .

<accessibilityFeature/longDescription> a :AccessFeatureType ;
skos:notation "longDescription" .

<accessibilityFeature/MathML> a :AccessFeatureType ;
skos:notation "MathML" .

<accessibilityFeature/none> a :AccessFeatureType ;
skos:notation "none" .

<accessibilityFeature/printPageNumbers> a :AccessFeatureType ;
skos:notation "printPageNumbers" .

<accessibilityFeature/readingOrder> a :AccessFeatureType ;
skos:notation "readingOrder" .

<accessibilityFeature/rubyAnnotations> a :AccessFeatureType ;
skos:notation "rubyAnnotations" .

<accessibilityFeature/signLanguage> a :AccessFeatureType ;
skos:notation "signLanguage" .

<accessibilityFeature/structuralNavigation> a :AccessFeatureType ;
skos:notation "structuralNavigation" .

<accessibilityFeature/synchronizedAudioText> a :AccessFeatureType ;
skos:notation "synchronizedAudioText" .

<accessibilityFeature/tableOfContents> a :AccessFeatureType ;
skos:notation "tableOfContents" .

<accessibilityFeature/taggedPDF> a :AccessFeatureType ;
skos:notation "taggedPDF" .

<accessibilityFeature/tactileGraphic> a :AccessFeatureType ;
skos:notation "tactileGraphic" .

<accessibilityFeature/tactileObject> a :AccessFeatureType ;
skos:notation "tactileObject" .

<accessibilityFeature/timingControl> a :AccessFeatureType ;
skos:notation "timingControl" .

<accessibilityFeature/transcript> a :AccessFeatureType ;
skos:notation "transcript" .

<accessibilityFeature/ttsMarkup> a :AccessFeatureType ;
skos:notation "ttsMarkup" .

<accessibilityFeature/unlocked> a :AccessFeatureType ;
skos:notation "unlocked" .
58 changes: 25 additions & 33 deletions source/vocab/accessibility.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -55,57 +55,49 @@
# owl:equivalentProperty sdo:accessibilityControl .

:accessibilityFeature a owl:ObjectProperty ;
:category :pending ;
sdo:rangeIncludes :AccessibilityFeatureType ;
owl:equivalentProperty sdo:accessibilityFeature . # TODO: subClassOf ?
:subPropertyOf :contentAccessibility, sdo:accessibilityFeature ;
sdo:rangeIncludes :AccessibilityFeatureType .

:AccessibilityFeatureType a owl:Class ; # TODO: Make a :EnumerationClass ; ?
:notation :accessibilityFeature ;
:category :pending .
:AccessibilityFeatureType a owl:Class ;
:subClassOf :ContentAccessibility .

:accessibilityHazard a owl:ObjectProperty ;
:category :pending ;
sdo:rangeIncludes :AccessibilityHazardType ;
owl:equivalentProperty sdo:accessibilityHazard . # TODO: subPropertyOf ?

:AccessibilityHazardType a owl:Class ; # TODO: Make a :EnumerationClass ; ?
:notation :accessibilityHazard ;
:category :pending .

:accessibilitySummary a owl:DatatypeProperty ; # TODO: Connected to bf:contentAccessibility ? Use as base/superProperty ?
:category :pending ;
owl:equivalentProperty sdo:accessibilitySummary . # TODO: subPropertyOf ?

:accessMode a owl:ObjectProperty ;
:category :pending ;
sdo:rangeIncludes :AccessModeType ;
owl:equivalentProperty sdo:accessMode . # TODO: subPropertyOf ?

:AccessModeType a owl:Class ; # TODO: Make a :EnumerationClass ; ? # NOTE: exactMatch/closeMatch :MediaType (in RDA-sense) ?
:notation :accessMode ;
:category :pending .
:subPropertyOf :contentAccessibility, sdo:accessibilityHazard ;
sdo:rangeIncludes :AccessibilityHazardType .

:AccessibilityHazardType a owl:Class ;
:subClassOf :ContentAccessibility .

:accessibilitySummary a owl:DatatypeProperty ;
:subPropertyOf :contentAccessibility ;
owl:equivalentProperty sdo:accessibilitySummary .

:accessMode a owl:ObjectProperty ;
:subPropertyOf :contentAccessibility, sdo:accessMode ;
sdo:rangeIncludes :AccessModeType .

:AccessModeType a owl:Class ;
:subClassOf :ContentAccessibility .

:accessModeSufficient a owl:ObjectProperty ;
:category :pending ;
sdo:rangeIncludes :AccessModeSufficient ;
owl:equivalentProperty sdo:accessModeSufficient . # TODO: subPropertyOf ?
:subPropertyOf :contentAccessibility, sdo:accessModeSufficient ;
sdo:rangeIncludes :AccessModeSufficient .

:AccessModeSufficient a owl:Class ; # TODO: Qualified list-type of thing? Combination of values from AccessMode. Restrictions?
:category :pending .
:subClassOf :ContentAccessibility .

##
# ADDITIONAL TERMS

:certifiedBy a owl:ObjectProperty ;
:category :pending ;
rdfs:domain :Resource;
rdfs:range :Agent ;
:seeAlso <https://www.w3.org/TR/epub-a11y-11/#certifiedBy> .

:conformsTo a owl:ObjectProperty ;
:category :pending ;
rdfs:domain :Resource;
sdo:rangeIncludes :Standard ;
owl:equivalentProperty dc:conformsTo .

:Standard a owl:Class ;
:category :pending ;
owl:equivalentClass dc:Standard .
4 changes: 2 additions & 2 deletions source/vocab/details.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -1097,11 +1097,11 @@
rdfs:label "Anmärkning om medverkan"@sv .

:ContentAccessibility a owl:Class;
rdfs:label "Content accessibility information"@en, "Anmärkning om komplement för ökad tillgänglighet"@sv;
rdfs:label "Content accessibility information"@en, "Information om innehållets tillgänglighet"@sv;
owl:equivalentClass bf2:ContentAccessibility .

:contentAccessibility a owl:ObjectProperty;
rdfs:label "Content accessibility information"@en, "Anmärkning om komplement för ökad tillgänglighet"@sv;
rdfs:label "Content accessibility information"@en, "Information om innehållets tillgänglighet"@sv;
rdfs:range :ContentAccessibility;
owl:equivalentProperty bf2:contentAccessibility .

Expand Down
4 changes: 3 additions & 1 deletion source/vocab/display.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"@id": "AccessModeType-chips",
"@type": "fresnel:Lens",
"classLensDomain": "AccessModeType",
"showProperties": [ "code" ]
"showProperties": [ "notation" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be code (we use the BF nomenclature IIRC, which we map to skos:notation; look at these resources as JSON-LD after the dataset's been built to verify this).

},
"Record": {
"@id": "Record-chips",
Expand Down Expand Up @@ -436,6 +436,7 @@
"intendedAudience",
"associatedMedia",
"usageAndAccessPolicy",
"contentAccessibility",
"accessMode",
"relatedTo",
{"inverseOf": "itemOf"},
Expand Down Expand Up @@ -608,6 +609,7 @@
"@id": "AccessModeType-cards",
"@type": "fresnel:Lens",
"classLensDomain": "AccessModeType",
"fresnel:extends": {"@id": "AccessModeType-chips"},
"showProperties": [ "fresnel:super", "label" ]
},
"Publication": {
Expand Down