From 6a4ad9a5cc192d1d34a0dfac9d5934095e4371b8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 21 May 2024 09:38:09 +0200 Subject: reorganize: separate dif for each ontology and knowledge graph --- .gitignore | 17 +++++-- Makefile | 51 ++++++++++++--------- ex/prefixes.ttl | 31 +++++++++++++ ex/windsurfing.ttl | 27 ++++++++++++ learn/core.sdm | 105 ++++++++++++++++++++++++++++++++++++++++++++ learn/prefixes.ttl | 31 +++++++++++++ learn/tentacular.sdm | 81 ++++++++++++++++++++++++++++++++++ rdf/learning.sdm | 105 -------------------------------------------- rdf/learning_tentacular.sdm | 81 ---------------------------------- rdf/prefixes.ttl | 31 ------------- rdf/waste.sdm | 102 ------------------------------------------ rdf/waste_view.sdm | 56 ----------------------- rdf/windsurfing.ttl | 27 ------------ sdml-catalog.json | 14 +++--- waste/core.sdm | 102 ++++++++++++++++++++++++++++++++++++++++++ waste/prefixes.ttl | 31 +++++++++++++ waste/view.sdm | 56 +++++++++++++++++++++++ 17 files changed, 514 insertions(+), 434 deletions(-) create mode 100644 ex/prefixes.ttl create mode 100644 ex/windsurfing.ttl create mode 100644 learn/core.sdm create mode 100644 learn/prefixes.ttl create mode 100644 learn/tentacular.sdm delete mode 100644 rdf/learning.sdm delete mode 100644 rdf/learning_tentacular.sdm delete mode 100644 rdf/prefixes.ttl delete mode 100644 rdf/waste.sdm delete mode 100644 rdf/waste_view.sdm delete mode 100644 rdf/windsurfing.ttl create mode 100644 waste/core.sdm create mode 100644 waste/prefixes.ttl create mode 100644 waste/view.sdm diff --git a/.gitignore b/.gitignore index df48ffd..fa056cb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,17 @@ index_files/ svg-inkscape/ *~ /worlding/S2424791-JI_ME.pdf -rdf/*.ttl -rdf/*.svg +/ex/*.puml +/ex/*.png +/ex/*.svg +/learn/*.ttl +/learn/*.puml +/learn/*.png +/learn/*.svg +/waste/*.ttl +/waste/*.puml +/waste/*.png +/waste/*.svg +!/learn/prefixes.ttl +!/waste/prefixes.ttl index.tex -!rdf/prefixes.ttl -!rdf/windsurfing.ttl diff --git a/Makefile b/Makefile index 226e9bf..9a9d649 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ BASE_IRI = https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/ PAD_ARTICLES = worlding ARTICLES = waste worlding -ONTOLOGIES = learning waste +ONTOLOGIES = learn waste -GRAPHS = windsurfing +GRAPHS = $(patsubst ex/%.ttl,%,$(wildcard ex/*.ttl)) PERL_FILES = bin/biblatex-tidy bin/hedgedoc2quarto bin/xmp2rdfxml @@ -149,48 +149,57 @@ $(ARTICLES:%=%/b.tex): %/b.tex: mv --force $*/index.tex $@ rm --force _site/b.pdf -rdf/%-concepts.svg: rdf/%.sdm +%/concepts.svg: %/core.sdm sdml draw --diagram concepts -i $< -f svg -o $@ -rdf/%-er.svg: rdf/%.sdm +%/er.svg: %/core.sdm sdml draw --diagram entity-relationship -i $< -f svg -o $@ -rdf/%-uml.svg: rdf/%.sdm +%/uml.svg: %/core.sdm sdml draw --diagram uml-class -i $< -f svg -o $@ -rdf/%.ttl: rdf/%.sdm +%/core.ttl: %/core.sdm sdml convert -i $< -f rdf -o $@ --no-color -rdf/%.puml: rdf/%.ttl rdf/prefixes.ttl +%/core.puml: %/core.ttl %/prefixes.ttl rdfpuml $< -rdf/%.png: rdf/%.puml +%/core.png: %/core.puml plantuml -tpng $< -rdf/%.svg: rdf/%.puml +%/core.svg: %/core.puml plantuml -tsvg $< -rdf/%/index.html: rdf/%.ttl - mkdir --parents rdf/$* - ontospy gendocs --type 2 -x -o $(CURDIR)/rdf/$* $< +ex/%.puml: ex/%.ttl ex/prefixes.ttl + rdfpuml $< + +ex/%.png: ex/%.puml + plantuml -tpng $< -$(ONTOLOGIES:%=view-%-concept-diagram): view-%-concept-diagram: rdf/%-concepts.svg +ex/%.svg: ex/%.puml + plantuml -tsvg $< + +%/index.html: %/core.ttl + mkdir --parents $* + ontospy gendocs --type 2 -x -o $(CURDIR)/$* $< + +$(ONTOLOGIES:%=view-%-concept-diagram): view-%-concept-diagram: %/concepts.svg inkview $< -$(ONTOLOGIES:%=view-%-er-diagram): view-%-er-diagram: rdf/%-er.svg +$(ONTOLOGIES:%=view-%-er-diagram): view-%-er-diagram: %/er.svg inkview $< -$(ONTOLOGIES:%=view-%-uml-diagram): view-%-uml-diagram: rdf/%-uml.svg +$(ONTOLOGIES:%=view-%-uml-diagram): view-%-uml-diagram: %/uml.svg inkview $< -$(ONTOLOGIES:%=view-%-rdfs-graf): view-%-rdfs-graf: rdf/%.ttl +$(ONTOLOGIES:%=view-%-rdfs-graf): view-%-rdfs-graf: %/core.ttl rdfs2dot -f turtle $< | xdot - -#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.svg +#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: %/core.svg # inkview $< -#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.png -# imv-wayland $< -$(GRAPHS:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.png +$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: %/core.png + imv-wayland $< +$(GRAPHS:%=view-%-puml-diagram): view-%-puml-diagram: ex/%.png imv-wayland $< -$(ONTOLOGIES:%=render-%-ontology): render-%-ontology: rdf/%/index.html +$(ONTOLOGIES:%=render-%-ontology): render-%-ontology: %/index.html diff --git a/ex/prefixes.ttl b/ex/prefixes.ttl new file mode 100644 index 0000000..11a3a6f --- /dev/null +++ b/ex/prefixes.ttl @@ -0,0 +1,31 @@ +@base . +@prefix : <#> . +@prefix ex: . +@prefix learning: . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sdml: . +@prefix dc: . +@prefix skos: . +@prefix xsd: . + +#[] puml:options """ +# hide empty members +# hide circle +# left to right direction +#""". + +# TODO: use FoaF ontology +foaf:Person puml:stereotype "(A,orange)". +:Learner puml:stereotype "(A,orange)". +:Educator puml:stereotype "(A,orange)". +:Objective puml:stereotype "(O,green)". + +#<> a puml:Inline. +#sdml:Member a puml:Inline. +sdml:hasMember a puml:InlineProperty. +dc:creator a puml:InlineProperty. +dc:license a puml:InlineProperty. +owl:imports a puml:InlineProperty. diff --git a/ex/windsurfing.ttl b/ex/windsurfing.ttl new file mode 100644 index 0000000..b4bfdba --- /dev/null +++ b/ex/windsurfing.ttl @@ -0,0 +1,27 @@ +ex:windsurfing a :Objective; + rdfs:label "Windsurfing". + +ex:ernst a :Learner; + rdfs:label "Ernst Schraube"; + :seeksObjective ex:windsurfing; + :learnsCausedBy ex:boredom, ex:sealove; + :learnsThrough ex:stand. + +ex:stand a :Practice; + rdfs:label "standing up"; + rdfs:desc "trying to just stand on a board in the water"; + :contributesTo ex:windsurfing, ex:feel_balance. + +ex:feel_balance a :Objective; + rdfs:label "feel for balance"; + rdfs:desc "get a feel for the balance". + +ex:boredom a :DefensiveReason; + rdfs:label "boredom"; + rdfs:desc "I am bored at the beach and there is nothing else to do."; + :causeAction ex:stand. + +ex:sealove a :ExpansiveReason; + rdfs:label "love for the sea"; + rdfs:desc "I love the sea and dream about planning across the water."; + :causeAction ex:stand. diff --git a/learn/core.sdm b/learn/core.sdm new file mode 100644 index 0000000..e3b7026 --- /dev/null +++ b/learn/core.sdm @@ -0,0 +1,105 @@ +module learning learning is + + import [ + dc +; foaf + skos + xsd + ] + + @skos:prefLabel = "Learning Ontology"@en + @dc:description = "General domain ontology on learning"@en + @dc:created = @xsd:date(2024-04-26) + @dc:creator = + @dc:license = + @rdf:type = skos:ConceptScheme + + entity Objective is + @skos:prefLabel = "Objective"@en + @skos:prefLabel = "Mål"@da + @skos:description = "Abstract or concrete goal/skill/competence resulting from a succesful learning"@en + identity id -> unknown + + end + + entity Drive is + @skos:description = "Motivating or demotivating factor for a learner towards a learning objective"@en + identity id -> unknown + + drivesLearner -> Learner + end + + entity Learner is +; @rdf:type = foaf:Person + @skos:description = "Agent subject to a learning process"@en + identity id -> unknown + + learnsWithin -> Space + learnsUsing -> Material + learnsThrough -> Action + learnsFormalizedBy -> System + learnsCausedBy -> Cause + seeksObjective -> Objective + achievesObjective -> Objective + isEducatedBy -> Educator +; isTaughtBy -> Teacher +; isFacilitatedBy -> Facilitator +; isEvaluatedBy -> Evaluator +; isInstructedBy -> Instructor + collaboratesWith -> Learner + usesMethod -> Method + isDrivenBy -> Drive + end + + entity Educator is +; @rdf:type = foaf:Person + @skos:description = "Agent aiding a learner towards an objective"@en + @skos:description = "Agent abstractly or concretely guiding a learner towards an objective"@en +; @skos:narrower = Teacher, Instructor, Facilitator, Evaluator + identity id -> unknown + + educates -> Learner + educatesAbout -> Objective + educatesUsing -> Material + educatesFormalizedBy -> System + end + + entity System is + @skos:description = "Set of principles/methods/conventions for structuring a learning process"@en +; @skos:narrower = School_of_thought, Dogma, Principle + identity id -> unknown + end + + entity Action is + @skos:description = "Abstract or concrete action/practice/movement by a learner as part of a learning process"@en + identity id -> unknown + + contributesTo -> Objective + end + + entity Cause is + @skos:description = "Originating reason for a learner to initiate a learning process"@en + identity id -> unknown + + causesAction -> Action + end + + entity Material is + @skos:description = "Sets of information intended to aid a learner in reaching a learning objective"@en +; @skos:narrower = School_book, Prior_Knowledge + identity id -> unknown + end + + ;; the "evaluation" + entity Evaluation + + entity Method is + @skos:description = "Way of approaching a learning process"@en + identity id -> unknown + + requiresMaterial -> Material + isPartOf -> System + shapesAction -> Action + end + +end diff --git a/learn/prefixes.ttl b/learn/prefixes.ttl new file mode 100644 index 0000000..11a3a6f --- /dev/null +++ b/learn/prefixes.ttl @@ -0,0 +1,31 @@ +@base . +@prefix : <#> . +@prefix ex: . +@prefix learning: . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sdml: . +@prefix dc: . +@prefix skos: . +@prefix xsd: . + +#[] puml:options """ +# hide empty members +# hide circle +# left to right direction +#""". + +# TODO: use FoaF ontology +foaf:Person puml:stereotype "(A,orange)". +:Learner puml:stereotype "(A,orange)". +:Educator puml:stereotype "(A,orange)". +:Objective puml:stereotype "(O,green)". + +#<> a puml:Inline. +#sdml:Member a puml:Inline. +sdml:hasMember a puml:InlineProperty. +dc:creator a puml:InlineProperty. +dc:license a puml:InlineProperty. +owl:imports a puml:InlineProperty. diff --git a/learn/tentacular.sdm b/learn/tentacular.sdm new file mode 100644 index 0000000..cf1eebb --- /dev/null +++ b/learn/tentacular.sdm @@ -0,0 +1,81 @@ +module learning tentacular is + + import [ dc skos xsd ] + + @skos:prefLabel = "Tentacular Learning Ontology"@en + @dc:description = "Domain-specific ontology for Tentacular Learning as defined by Ernst Schraube"@en + @dc:created = @xsd:date(2024-04-26) + @dc:creator = + @dc:license = + + ;; Illeris + entity Learner is + identity id -> unknown + + receives -> Teaching + establishes -> Learning + end + + entity Teacher is + identity id -> unknown + + facilitates -> Learning + teaches -> Teaching + end + + entity Material + + structure Learning is + strengthenedBy -> Motivation + weakenedBy -> Distraction + end + + structure Teaching is + differentFrom -> Learning + end + + entity School + + ;; the "what" + entity Goal + + ;; the "why" + structure Motivation is + type -> MotivationType + motivatedBy -> Motivator + end + + enum MotivationType of + Defensive + Expansive + end + + ;; the "how" + structure Movement is + type -> MovementType + end + + enum MovementType of + Affinitive + Definitive + end + + ;; the "evaluation" + entity Evaluation + + entity Motivator +; affectsMotivation + + entity Method + + entity Expectation + + entity Prelearned + +; entity World + + entity + + entity + +end diff --git a/rdf/learning.sdm b/rdf/learning.sdm deleted file mode 100644 index e3b7026..0000000 --- a/rdf/learning.sdm +++ /dev/null @@ -1,105 +0,0 @@ -module learning learning is - - import [ - dc -; foaf - skos - xsd - ] - - @skos:prefLabel = "Learning Ontology"@en - @dc:description = "General domain ontology on learning"@en - @dc:created = @xsd:date(2024-04-26) - @dc:creator = - @dc:license = - @rdf:type = skos:ConceptScheme - - entity Objective is - @skos:prefLabel = "Objective"@en - @skos:prefLabel = "Mål"@da - @skos:description = "Abstract or concrete goal/skill/competence resulting from a succesful learning"@en - identity id -> unknown - - end - - entity Drive is - @skos:description = "Motivating or demotivating factor for a learner towards a learning objective"@en - identity id -> unknown - - drivesLearner -> Learner - end - - entity Learner is -; @rdf:type = foaf:Person - @skos:description = "Agent subject to a learning process"@en - identity id -> unknown - - learnsWithin -> Space - learnsUsing -> Material - learnsThrough -> Action - learnsFormalizedBy -> System - learnsCausedBy -> Cause - seeksObjective -> Objective - achievesObjective -> Objective - isEducatedBy -> Educator -; isTaughtBy -> Teacher -; isFacilitatedBy -> Facilitator -; isEvaluatedBy -> Evaluator -; isInstructedBy -> Instructor - collaboratesWith -> Learner - usesMethod -> Method - isDrivenBy -> Drive - end - - entity Educator is -; @rdf:type = foaf:Person - @skos:description = "Agent aiding a learner towards an objective"@en - @skos:description = "Agent abstractly or concretely guiding a learner towards an objective"@en -; @skos:narrower = Teacher, Instructor, Facilitator, Evaluator - identity id -> unknown - - educates -> Learner - educatesAbout -> Objective - educatesUsing -> Material - educatesFormalizedBy -> System - end - - entity System is - @skos:description = "Set of principles/methods/conventions for structuring a learning process"@en -; @skos:narrower = School_of_thought, Dogma, Principle - identity id -> unknown - end - - entity Action is - @skos:description = "Abstract or concrete action/practice/movement by a learner as part of a learning process"@en - identity id -> unknown - - contributesTo -> Objective - end - - entity Cause is - @skos:description = "Originating reason for a learner to initiate a learning process"@en - identity id -> unknown - - causesAction -> Action - end - - entity Material is - @skos:description = "Sets of information intended to aid a learner in reaching a learning objective"@en -; @skos:narrower = School_book, Prior_Knowledge - identity id -> unknown - end - - ;; the "evaluation" - entity Evaluation - - entity Method is - @skos:description = "Way of approaching a learning process"@en - identity id -> unknown - - requiresMaterial -> Material - isPartOf -> System - shapesAction -> Action - end - -end diff --git a/rdf/learning_tentacular.sdm b/rdf/learning_tentacular.sdm deleted file mode 100644 index cf1eebb..0000000 --- a/rdf/learning_tentacular.sdm +++ /dev/null @@ -1,81 +0,0 @@ -module learning tentacular is - - import [ dc skos xsd ] - - @skos:prefLabel = "Tentacular Learning Ontology"@en - @dc:description = "Domain-specific ontology for Tentacular Learning as defined by Ernst Schraube"@en - @dc:created = @xsd:date(2024-04-26) - @dc:creator = - @dc:license = - - ;; Illeris - entity Learner is - identity id -> unknown - - receives -> Teaching - establishes -> Learning - end - - entity Teacher is - identity id -> unknown - - facilitates -> Learning - teaches -> Teaching - end - - entity Material - - structure Learning is - strengthenedBy -> Motivation - weakenedBy -> Distraction - end - - structure Teaching is - differentFrom -> Learning - end - - entity School - - ;; the "what" - entity Goal - - ;; the "why" - structure Motivation is - type -> MotivationType - motivatedBy -> Motivator - end - - enum MotivationType of - Defensive - Expansive - end - - ;; the "how" - structure Movement is - type -> MovementType - end - - enum MovementType of - Affinitive - Definitive - end - - ;; the "evaluation" - entity Evaluation - - entity Motivator -; affectsMotivation - - entity Method - - entity Expectation - - entity Prelearned - -; entity World - - entity - - entity - -end diff --git a/rdf/prefixes.ttl b/rdf/prefixes.ttl deleted file mode 100644 index 11a3a6f..0000000 --- a/rdf/prefixes.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@base . -@prefix : <#> . -@prefix ex: . -@prefix learning: . -@prefix foaf: . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix sdml: . -@prefix dc: . -@prefix skos: . -@prefix xsd: . - -#[] puml:options """ -# hide empty members -# hide circle -# left to right direction -#""". - -# TODO: use FoaF ontology -foaf:Person puml:stereotype "(A,orange)". -:Learner puml:stereotype "(A,orange)". -:Educator puml:stereotype "(A,orange)". -:Objective puml:stereotype "(O,green)". - -#<> a puml:Inline. -#sdml:Member a puml:Inline. -sdml:hasMember a puml:InlineProperty. -dc:creator a puml:InlineProperty. -dc:license a puml:InlineProperty. -owl:imports a puml:InlineProperty. diff --git a/rdf/waste.sdm b/rdf/waste.sdm deleted file mode 100644 index c75dc87..0000000 --- a/rdf/waste.sdm +++ /dev/null @@ -1,102 +0,0 @@ -module waste action is - - import [ dc skos xsd ] - import [ waste_view ] - - entity Resident is - identity citizenId -> unknown - - viewsWasteAs -> {unique 0..6} waste_view:Grossness - end - - entity Household is - identity apartmentId -> unknown - - furnishedWith -> {10} Bin - inhabitedBy -> {1..4} Resident - end - - entity Host is - identity HostingId -> unknown - - providesContainer -> Container - end - - entity WasteCollector - - entity Bin is - identity binId -> unknown - - forTrashTypeType -> TrashType - binCapacity -> BinCapacity - binSpareCapacity -> BinSpareCapacity - end - - enum TrashType of - @owl:equivalentClass = unsigned - Food is - @rdf:value = 1 - @skos:prefLabel = "Food waste"@en, "Mad"@da - end - Paper is - @rdf:value = 2 - @skos:prefLabel = "Paper"@en, "Papir"@da - end - Cardboard is - @rdf:value = 3 - @skos:prefLabel = "Cardboard"@en, "Pap"@da - end - Metal is - @rdf:value = 4 - @skos:prefLabel = "Metal"@en, "Metal"@da - end - Glass is - @rdf:value = 5 - @skos:prefLabel = "Glass"@en, "Glas"@da - end - Plastic is - @rdf:value = 6 - @skos:prefLabel = "Plastic"@en, "Plast"@da - end - Textiles is - @rdf:value = 7 - @skos:prefLabel = "Textiles"@en, "Tekstil"@da - end - Cartons is - @rdf:value = 8 - @skos:prefLabel = "Paper"@en, "Papir"@da - @skos:prefLabel = "Food and beverage cartons"@en, "Mad- og drikkekartoner"@da - end - Residual is - @rdf:value = 9 - @skos:prefLabel = "Residual waste"@en, "Restaffald"@da - end - Hazardous is - @rdf:value = 10 - @skos:prefLabel = "Hazardous waste"@en, "Farligt affald"@da - end - end - - event BinEmptied source Bin is - binEmptied -> Bin - binEmptiedBy -> Resident - binEmptiedTo -> Container - binResets -> BinSpareCapacity - end - - event BinFilled source Bin is - by -> Resident - end - - event ContainerEmptied source Container is - containerEmptied -> Container - containerEmptiedBy -> WasteCollector - containerEmptiedTo -> RecyclingPlant - containerResets -> ContainerSpareCapacity - end - - structure Container - - structure Incinerator - -end diff --git a/rdf/waste_view.sdm b/rdf/waste_view.sdm deleted file mode 100644 index ea2b8a8..0000000 --- a/rdf/waste_view.sdm +++ /dev/null @@ -1,56 +0,0 @@ -module waste_view waste_view is - - ; Grossness: https://english.stackexchange.com/a/272409 - import [ dc skos xsd ] - - @skos:prefLabel = "Waste perception Ontology"@en - @dc:description = "Ways that waste can be subjectively perceived"@en - @dc:created = @xsd:date(2024-04-27) - @dc:creator = - @dc:license = - - enum Commodity of - @owl:equivalentClass = unsigned - Refuse is - @rdf:value = 1 - end - Litter is - @rdf:value = 2 - end - Waste is - @rdf:value = 3 - end - Rubbish is - @rdf:value = 4 - end - Trash is - @rdf:value = 5 - end - Garbage is - @rdf:value = 6 - end - end - - enum Grossness of - @owl:equivalentClass = unsigned - Refuse is - @rdf:value = 1 - end - Litter is - @rdf:value = 2 - end - Waste is - @rdf:value = 3 - end - Rubbish is - @rdf:value = 4 - end - Trash is - @rdf:value = 5 - end - Garbage is - @rdf:value = 6 - end - end - -end diff --git a/rdf/windsurfing.ttl b/rdf/windsurfing.ttl deleted file mode 100644 index b4bfdba..0000000 --- a/rdf/windsurfing.ttl +++ /dev/null @@ -1,27 +0,0 @@ -ex:windsurfing a :Objective; - rdfs:label "Windsurfing". - -ex:ernst a :Learner; - rdfs:label "Ernst Schraube"; - :seeksObjective ex:windsurfing; - :learnsCausedBy ex:boredom, ex:sealove; - :learnsThrough ex:stand. - -ex:stand a :Practice; - rdfs:label "standing up"; - rdfs:desc "trying to just stand on a board in the water"; - :contributesTo ex:windsurfing, ex:feel_balance. - -ex:feel_balance a :Objective; - rdfs:label "feel for balance"; - rdfs:desc "get a feel for the balance". - -ex:boredom a :DefensiveReason; - rdfs:label "boredom"; - rdfs:desc "I am bored at the beach and there is nothing else to do."; - :causeAction ex:stand. - -ex:sealove a :ExpansiveReason; - rdfs:label "love for the sea"; - rdfs:desc "I love the sea and dream about planning across the water."; - :causeAction ex:stand. diff --git a/sdml-catalog.json b/sdml-catalog.json index 7e1a3b7..de66410 100644 --- a/sdml-catalog.json +++ b/sdml-catalog.json @@ -1,22 +1,22 @@ { - "base": "https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/rdf/", + "base": "https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/", "entries": { "learning": { "item": { - "relative_url": "learning#", - "relative_path": "./learning.sdm" + "relative_url": "learning/core#", + "relative_path": "learn/core.sdm" } }, "waste": { "item": { - "relative_url": "waste#", - "relative_path": "rdf/waste.sdm" + "relative_url": "waste/core#", + "relative_path": "waste/core.sdm" } }, "waste_view": { "item": { - "relative_url": "waste_view#", - "relative_path": "rdf/waste_view.sdm" + "relative_url": "waste/view#", + "relative_path": "waste/view.sdm" } } } diff --git a/waste/core.sdm b/waste/core.sdm new file mode 100644 index 0000000..6ff284f --- /dev/null +++ b/waste/core.sdm @@ -0,0 +1,102 @@ +module waste core is + + import [ dc skos xsd ] + import [ waste_view ] + + entity Resident is + identity citizenId -> unknown + + viewsWasteAs -> {unique 0..6} waste_view:Grossness + end + + entity Household is + identity apartmentId -> unknown + + furnishedWith -> {10} Bin + inhabitedBy -> {1..4} Resident + end + + entity Host is + identity HostingId -> unknown + + providesContainer -> Container + end + + entity WasteCollector + + entity Bin is + identity binId -> unknown + + forTrashTypeType -> TrashType + binCapacity -> BinCapacity + binSpareCapacity -> BinSpareCapacity + end + + enum TrashType of + @owl:equivalentClass = unsigned + Food is + @rdf:value = 1 + @skos:prefLabel = "Food waste"@en, "Mad"@da + end + Paper is + @rdf:value = 2 + @skos:prefLabel = "Paper"@en, "Papir"@da + end + Cardboard is + @rdf:value = 3 + @skos:prefLabel = "Cardboard"@en, "Pap"@da + end + Metal is + @rdf:value = 4 + @skos:prefLabel = "Metal"@en, "Metal"@da + end + Glass is + @rdf:value = 5 + @skos:prefLabel = "Glass"@en, "Glas"@da + end + Plastic is + @rdf:value = 6 + @skos:prefLabel = "Plastic"@en, "Plast"@da + end + Textiles is + @rdf:value = 7 + @skos:prefLabel = "Textiles"@en, "Tekstil"@da + end + Cartons is + @rdf:value = 8 + @skos:prefLabel = "Paper"@en, "Papir"@da + @skos:prefLabel = "Food and beverage cartons"@en, "Mad- og drikkekartoner"@da + end + Residual is + @rdf:value = 9 + @skos:prefLabel = "Residual waste"@en, "Restaffald"@da + end + Hazardous is + @rdf:value = 10 + @skos:prefLabel = "Hazardous waste"@en, "Farligt affald"@da + end + end + + event BinEmptied source Bin is + binEmptied -> Bin + binEmptiedBy -> Resident + binEmptiedTo -> Container + binResets -> BinSpareCapacity + end + + event BinFilled source Bin is + by -> Resident + end + + event ContainerEmptied source Container is + containerEmptied -> Container + containerEmptiedBy -> WasteCollector + containerEmptiedTo -> RecyclingPlant + containerResets -> ContainerSpareCapacity + end + + structure Container + + structure Incinerator + +end diff --git a/waste/prefixes.ttl b/waste/prefixes.ttl new file mode 100644 index 0000000..11a3a6f --- /dev/null +++ b/waste/prefixes.ttl @@ -0,0 +1,31 @@ +@base . +@prefix : <#> . +@prefix ex: . +@prefix learning: . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sdml: . +@prefix dc: . +@prefix skos: . +@prefix xsd: . + +#[] puml:options """ +# hide empty members +# hide circle +# left to right direction +#""". + +# TODO: use FoaF ontology +foaf:Person puml:stereotype "(A,orange)". +:Learner puml:stereotype "(A,orange)". +:Educator puml:stereotype "(A,orange)". +:Objective puml:stereotype "(O,green)". + +#<> a puml:Inline. +#sdml:Member a puml:Inline. +sdml:hasMember a puml:InlineProperty. +dc:creator a puml:InlineProperty. +dc:license a puml:InlineProperty. +owl:imports a puml:InlineProperty. diff --git a/waste/view.sdm b/waste/view.sdm new file mode 100644 index 0000000..7eb97cd --- /dev/null +++ b/waste/view.sdm @@ -0,0 +1,56 @@ +module waste waste_view is + + ; Grossness: https://english.stackexchange.com/a/272409 + import [ dc skos xsd ] + + @skos:prefLabel = "Waste perception Ontology"@en + @dc:description = "Ways that waste can be subjectively perceived"@en + @dc:created = @xsd:date(2024-04-27) + @dc:creator = + @dc:license = + + enum Commodity of + @owl:equivalentClass = unsigned + Refuse is + @rdf:value = 1 + end + Litter is + @rdf:value = 2 + end + Waste is + @rdf:value = 3 + end + Rubbish is + @rdf:value = 4 + end + Trash is + @rdf:value = 5 + end + Garbage is + @rdf:value = 6 + end + end + + enum Grossness of + @owl:equivalentClass = unsigned + Refuse is + @rdf:value = 1 + end + Litter is + @rdf:value = 2 + end + Waste is + @rdf:value = 3 + end + Rubbish is + @rdf:value = 4 + end + Trash is + @rdf:value = 5 + end + Garbage is + @rdf:value = 6 + end + end + +end -- cgit v1.2.3