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 --- waste/core.sdm | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++ waste/prefixes.ttl | 31 ++++++++++++++++ waste/view.sdm | 56 +++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 waste/core.sdm create mode 100644 waste/prefixes.ttl create mode 100644 waste/view.sdm (limited to 'waste') 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