From a61798578988c7a857ac874035fd8a501dde97ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P=2E?= Date: Tue, 7 Apr 2026 16:45:28 +0200 Subject: [PATCH] Draft Ontology module --- js/ontology.js | 16 +++ scenes/ssgp/index.js | 4 + scenes/ssgp/ontology.json | 230 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 js/ontology.js create mode 100755 scenes/ssgp/ontology.json diff --git a/js/ontology.js b/js/ontology.js new file mode 100644 index 0000000..596c594 --- /dev/null +++ b/js/ontology.js @@ -0,0 +1,16 @@ +/** + * @module Ontology + */ + +/** + * Load an ontology from its JSON description + * @param {String} jsonPath The path (URI) of the ontology JSON file + * @returns {Object} + */ +export async function loadOntology(jsonPath) { + const ontology = await fetch(jsonPath) + .then(res => res.json()) + .catch(err => console.error(err)); + + return ontology; +} diff --git a/scenes/ssgp/index.js b/scenes/ssgp/index.js index 6171ded..3c453ee 100644 --- a/scenes/ssgp/index.js +++ b/scenes/ssgp/index.js @@ -3,6 +3,7 @@ import { config } from "../../config.js"; import AppState from "../../js/state.js"; import { normalizeNodes } from "../../js/utils/nodeUtils.js"; import { initUI } from "../../js/ui.js"; +import { loadOntology } from "../../js/ontology.js"; AppState.currentScene = 'ssgp'; const marker = config.markers.find(m => m.id === 'ssgp'); @@ -10,3 +11,6 @@ AppState.normalizedNodes = normalizeNodes(marker.nodes); openScene(marker, AppState.normalizedNodes); initUI(); + +// DEBUG +console.debug(await loadOntology('ontology.json')); diff --git a/scenes/ssgp/ontology.json b/scenes/ssgp/ontology.json new file mode 100755 index 0000000..cf8bf3b --- /dev/null +++ b/scenes/ssgp/ontology.json @@ -0,0 +1,230 @@ +{ + "ontology": "Baroque Theatre Ontology (BT)", + "generatedOn": "2026-01-29", + "note": "Only bt: classes and bt: subclass relations; excludes Core; no CIDOC/BOT equivalences included.", + "domains": { + "TheatreArchitecture": [ + { + "id": "bt:ArchitecturalComponent", + "label": "ArchitecturalComponent", + "children": [ + { + "id": "bt:ArchitecturalWings", + "label": "ArchitecturalWings", + "children": [] + }, + { + "id": "bt:Gridiron", + "label": "Gridiron", + "children": [] + }, + { + "id": "bt:Proscenium", + "label": "Proscenium", + "children": [] + }, + { + "id": "bt:StructuralBackdrop", + "label": "StructuralBackdrop", + "children": [] + }, + { + "id": "bt:TechnicalGallery", + "label": "TechnicalGallery", + "children": [] + }, + { + "id": "bt:Trapdoor", + "label": "Trapdoor", + "children": [] + } + ] + }, + { + "id": "bt:ArchitecturalSpace", + "label": "ArchitecturalSpace", + "children": [ + { + "id": "bt:Auditorium", + "label": "Auditorium", + "children": [ + { + "id": "bt:BoxTier", + "label": "BoxTier", + "children": [ + { + "id": "bt:Box", + "label": "Box", + "children": [] + } + ] + }, + { + "id": "bt:Gallery", + "label": "Gallery", + "children": [] + }, + { + "id": "bt:Stalls", + "label": "Stalls", + "children": [] + } + ] + }, + { + "id": "bt:BackstageArea", + "label": "BackstageArea", + "children": [] + }, + { + "id": "bt:CirculationRoute", + "label": "CirculationRoute", + "children": [] + }, + { + "id": "bt:Entrance", + "label": "Entrance", + "children": [] + }, + { + "id": "bt:OrchestraPit", + "label": "OrchestraPit", + "children": [] + }, + { + "id": "bt:Stage", + "label": "Stage", + "children": [ + { + "id": "bt:Overstage", + "label": "Overstage", + "children": [] + }, + { + "id": "bt:Understage", + "label": "Understage", + "children": [] + } + ] + } + ] + }, + { + "id": "bt:TheatreBuilding", + "label": "TheatreBuilding", + "children": [] + } + ], + "ScenicApparatus": [ + { + "id": "bt:ScenicApparatus", + "label": "ScenicApparatus", + "children": [ + { + "id": "bt:Backdrop", + "label": "Backdrop", + "children": [ + { + "id": "bt:FixedBackdrop", + "label": "FixedBackdrop", + "children": [] + }, + { + "id": "bt:MobileBackdrop", + "label": "MobileBackdrop", + "children": [] + } + ] + }, + { + "id": "bt:LightingDevice", + "label": "LightingDevice", + "children": [] + }, + { + "id": "bt:ScenicMachine", + "label": "ScenicMachine", + "children": [ + { + "id": "bt:FlightMechanism", + "label": "FlightMechanism", + "children": [] + }, + { + "id": "bt:MovingDevice", + "label": "MovingDevice", + "children": [] + } + ] + }, + { + "id": "bt:ScenicObject", + "label": "ScenicObject", + "children": [] + }, + { + "id": "bt:SoundEffectDevice", + "label": "SoundEffectDevice", + "children": [] + } + ] + } + ], + "PerformativeEvent": [ + { + "id": "bt:PerformativeEvent", + "label": "PerformativeEvent", + "children": [ + { + "id": "bt:PublicCelebration", + "label": "PublicCelebration", + "children": [] + }, + { + "id": "bt:Rehearsal", + "label": "Rehearsal", + "children": [] + }, + { + "id": "bt:TheatricalPerformance", + "label": "TheatricalPerformance", + "children": [] + } + ] + } + ], + "DocumentaryResource": [ + { + "id": "bt:DocumentaryResource", + "label": "DocumentaryResource", + "children": [ + { + "id": "bt:DigitalModel", + "label": "DigitalModel", + "children": [] + }, + { + "id": "bt:IconographicSource", + "label": "IconographicSource", + "children": [] + }, + { + "id": "bt:TechnicalDocument", + "label": "TechnicalDocument", + "children": [] + }, + { + "id": "bt:TextualSource", + "label": "TextualSource", + "children": [] + } + ] + }, + { + "id": "bt:DocumentationEvent", + "label": "DocumentationEvent", + "children": [] + } + ] + } +} \ No newline at end of file