Dynamic Data Model using RDF, RDFS and SKOS
Dynamic Data Model using RDF, RDFS and SKOS
This feature ultimately drives the search and discoverability challenges we have seen in Clearcast, and make it possible to effectively use ABAC and pernsonalised notifications.
RDFS Schema integrating your specified namespaces and using ISO 3166 for countries and ISO 639 for languages. (reuse as many stadards and things that exist as possible)
You don't need a database to build this spike, use RDF lib and Turtle files to prove the concept. They can be stored as JSONB in PG.
Namespaces Used:
- Core Entities (
mediamagic.flow.northell.com/core) Board,Lane,Card,Comment,Task- Compliance Attributes (
compliance.clearcast.com/core) - custom client properties, this example is clearcast BillingCode,Campaign,Concept,CostCentre- Standardized Taxonomies:
- ISO 3166 (
https://www.iso.org/iso-3166-country-codes.html) for Countries - ISO 639 (
https://www.iso.org/iso-639-language-code.html) for Languages
RDFS Schema with SKOS for Standardized Taxonomies
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix core: <http://mediamagic.flow.northell.com/core#> .
@prefix compliance: <http://compliance.clearcast.com/core#> .
@prefix iso3166: <https://www.iso.org/iso-3166-country-codes.html#> .
@prefix iso639: <https://www.iso.org/iso-639-language-code.html#> .
### Core Classes
core:Board a rdfs:Class ;
rdfs:label "Board" .
core:Lane a rdfs:Class ;
rdfs:label "Lane" .
core:Card a rdfs:Class ;
rdfs:label "Card (Asset)" .
core:Comment a rdfs:Class ;
rdfs:label "Comment" .
core:Task a rdfs:Class ;
rdfs:label "Task" .
### Compliance-Controlled Attributes
compliance:BillingCode a rdfs:Class ;
rdfs:label "Billing Code" ;
rdfs:subClassOf skos:Concept .
compliance:Campaign a rdfs:Class ;
rdfs:label "Campaign" ;
rdfs:subClassOf skos:Concept .
compliance:Concept a rdfs:Class ;
rdfs:label "Concept" ;
rdfs:subClassOf skos:Concept .
compliance:CostCentre a rdfs:Class ;
rdfs:label "Cost Centre" ;
rdfs:subClassOf skos:Concept .
### Relationships for Core Entities
core:cardHasBillingCode a rdf:Property ;
rdfs:domain core:Card ;
rdfs:range compliance:BillingCode ;
rdfs:label "has Billing Code" .
core:cardHasCampaign a rdf:Property ;
rdfs:domain core:Card ;
rdfs:range compliance:Campaign ;
rdfs:label "has Campaign" .
core:cardHasConcept a rdf:Property ;
rdfs:domain core:Card ;
rdfs:range compliance:Concept ;
rdfs:label "has Concept" .
core:boardHasCostCentre a rdf:Property ;
rdfs:domain core:Board ;
rdfs:range compliance:CostCentre ;
rdfs:label "has Cost Centre" .
### **Country & Language Standardized Properties**
core:boardHasCountry a rdf:Property ;
rdfs:domain core:Board ;
rdfs:range iso3166:Country ;
rdfs:label "has Country" .
core:cardHasLanguage a rdf:Property ;
rdfs:domain core:Card ;
rdfs:range iso639:Language ;
rdfs:label "has Language" .
### **SKOS-Controlled Taxonomies**
compliance:BillingCodeScheme a skos:ConceptScheme ;
rdfs:label "Billing Code Scheme" .
compliance:CampaignScheme a skos:ConceptScheme ;
rdfs:label "Campaign Scheme" .
compliance:ConceptScheme a skos:ConceptScheme ;
rdfs:label "Concept Scheme" .
compliance:CostCentreScheme a skos:ConceptScheme ;
rdfs:label "Cost Centre Scheme" .
iso3166:CountryScheme a skos:ConceptScheme ;
rdfs:label "ISO 3166 Country Scheme" .
iso639:LanguageScheme a skos:ConceptScheme ;
rdfs:label "ISO 639 Language Scheme" .
### **Linking Concepts to SKOS Taxonomies**
compliance:BillingCode skos:inScheme compliance:BillingCodeScheme .
compliance:Campaign skos:inScheme compliance:CampaignScheme .
compliance:Concept skos:inScheme compliance:ConceptScheme .
compliance:CostCentre skos:inScheme compliance:CostCentreScheme .
iso3166:Country skos:inScheme iso3166:CountryScheme .
iso639:Language skos:inScheme iso639:LanguageScheme .
Example Data (Instances)
# Example Card (Asset) linked to a campaign, concept, and language
core:Card123 a core:Card ;
core:cardHasBillingCode compliance:BillingCodeA ;
core:cardHasCampaign compliance:CampaignX ;
core:cardHasConcept compliance:ConceptY ;
core:cardHasLanguage iso639:en .
# Example Board linked to a cost centre and country
core:Board789 a core:Board ;
core:boardHasCostCentre compliance:CostCentreZ ;
core:boardHasCountry iso3166:US .
# Example SKOS Concepts (Billing Code, Campaign, Country, Language)
compliance:BillingCodeA a compliance:BillingCode ;
skos:prefLabel "BC-001" ;
skos:inScheme compliance:BillingCodeScheme .
compliance:CampaignX a compliance:Campaign ;
skos:prefLabel "Spring Sale" ;
skos:inScheme compliance:CampaignScheme .
compliance:ConceptY a compliance:Concept ;
skos:prefLabel "Eco-Friendly Packaging" ;
skos:inScheme compliance:ConceptScheme .
compliance:CostCentreZ a compliance:CostCentre ;
skos:prefLabel "Marketing Department" ;
skos:inScheme compliance:CostCentreScheme .
iso3166:US a iso3166:Country ;
skos:prefLabel "United States" ;
skos:notation "US" ;
skos:inScheme iso3166:CountryScheme .
iso639:en a iso639:Language ;
skos:prefLabel "English" ;
skos:notation "en" ;
skos:inScheme iso639:LanguageScheme .
What This Achieves
Modular Namespaces:
- mediamagic.flow.northell.com/core: For workflow entities.
- compliance.clearcast.com/core: For compliance attributes (client specific data models).
- iso3166 & iso639: For global standard taxonomies.
Integration with ISO Standards: - Countries are validated using ISO 3166. - Languages are controlled using ISO 639.
Scalability & Compliance:
- SKOS ensures controlled vocabularies for BillingCode, Campaign, Concept, CostCentre, Country, and Language.
Here's an example SKOS taxonomy for each concept, including Billing Code, Campaign, Concept, Cost Centre, Country (ISO 3166), and Language (ISO 639).
SKOS Taxonomy Definitions
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix compliance: <http://compliance.clearcast.com/core#> .
@prefix iso3166: <https://www.iso.org/iso-3166-country-codes.html#> .
@prefix iso639: <https://www.iso.org/iso-639-language-code.html#> .
### **Billing Code SKOS Taxonomy**
compliance:BillingCodeScheme a skos:ConceptScheme ;
rdfs:label "Billing Code Scheme" ;
skos:prefLabel "Billing Code Classification" ;
skos:definition "A controlled vocabulary for billing codes used in compliance and finance systems." .
compliance:BillingCodeA a compliance:BillingCode ;
skos:prefLabel "BC-001" ;
skos:notation "001" ;
skos:definition "Billing code for digital media production." ;
skos:inScheme compliance:BillingCodeScheme .
compliance:BillingCodeB a compliance:BillingCode ;
skos:prefLabel "BC-002" ;
skos:notation "002" ;
skos:definition "Billing code for print advertising." ;
skos:inScheme compliance:BillingCodeScheme .
compliance:BillingCodeC a compliance:BillingCode ;
skos:prefLabel "BC-003" ;
skos:notation "003" ;
skos:definition "Billing code for TV commercials." ;
skos:inScheme compliance:BillingCodeScheme .
---
### **Campaign SKOS Taxonomy**
compliance:CampaignScheme a skos:ConceptScheme ;
rdfs:label "Campaign Scheme" ;
skos:prefLabel "Marketing Campaign Classification" ;
skos:definition "A classification system for marketing campaigns." .
compliance:CampaignX a compliance:Campaign ;
skos:prefLabel "Spring Sale 2024" ;
skos:notation "Spring24" ;
skos:definition "Campaign for the 2024 spring sales." ;
skos:inScheme compliance:CampaignScheme .
compliance:CampaignY a compliance:Campaign ;
skos:prefLabel "Holiday Promotion" ;
skos:notation "HolidayPromo" ;
skos:definition "Holiday season discount campaign." ;
skos:inScheme compliance:CampaignScheme .
compliance:CampaignZ a compliance:Campaign ;
skos:prefLabel "New Product Launch" ;
skos:notation "NewLaunch" ;
skos:definition "Marketing campaign for launching a new product." ;
skos:inScheme compliance:CampaignScheme .
---
### **Concept SKOS Taxonomy**
compliance:ConceptScheme a skos:ConceptScheme ;
rdfs:label "Concept Scheme" ;
skos:prefLabel "Advertising Concept Classification" ;
skos:definition "A taxonomy for advertising and marketing concepts." .
compliance:ConceptEco a compliance:Concept ;
skos:prefLabel "Eco-Friendly Packaging" ;
skos:notation "EcoPack" ;
skos:definition "Marketing concept promoting sustainable and eco-friendly packaging." ;
skos:inScheme compliance:ConceptScheme .
compliance:ConceptLuxury a compliance:Concept ;
skos:prefLabel "Luxury Branding" ;
skos:notation "LuxuryBrand" ;
skos:definition "Advertising concept focusing on premium and high-end branding." ;
skos:inScheme compliance:ConceptScheme .
compliance:ConceptTech a compliance:Concept ;
skos:prefLabel "Tech Innovation" ;
skos:notation "TechInn" ;
skos:definition "Concept emphasizing technological innovation and futuristic branding." ;
skos:inScheme compliance:ConceptScheme .
---
### **Cost Centre SKOS Taxonomy**
compliance:CostCentreScheme a skos:ConceptScheme ;
rdfs:label "Cost Centre Scheme" ;
skos:prefLabel "Cost Centre Classification" ;
skos:definition "A scheme for categorizing cost centres within an organization." .
compliance:CostCentreMarketing a compliance:CostCentre ;
skos:prefLabel "Marketing Department" ;
skos:notation "MKT" ;
skos:definition "Cost centre for the marketing team and campaigns." ;
skos:inScheme compliance:CostCentreScheme .
compliance:CostCentreIT a compliance:CostCentre ;
skos:prefLabel "IT & Development" ;
skos:notation "IT" ;
skos:definition "Cost centre for technology and software development." ;
skos:inScheme compliance:CostCentreScheme .
compliance:CostCentreProduction a compliance:CostCentre ;
skos:prefLabel "Production & Operations" ;
skos:notation "ProdOps" ;
skos:definition "Cost centre for product manufacturing and operations." ;
skos:inScheme compliance:CostCentreScheme .
---
### **ISO 3166 Country SKOS Taxonomy**
iso3166:CountryScheme a skos:ConceptScheme ;
rdfs:label "ISO 3166 Country Scheme" ;
skos:prefLabel "Country Classification (ISO 3166)" ;
skos:definition "A taxonomy for standard country codes based on ISO 3166-1." .
iso3166:US a iso3166:Country ;
skos:prefLabel "United States" ;
skos:notation "US" ;
skos:definition "United States of America." ;
skos:inScheme iso3166:CountryScheme .
iso3166:GB a iso3166:Country ;
skos:prefLabel "United Kingdom" ;
skos:notation "GB" ;
skos:definition "United Kingdom of Great Britain and Northern Ireland." ;
skos:inScheme iso3166:CountryScheme .
iso3166:FR a iso3166:Country ;
skos:prefLabel "France" ;
skos:notation "FR" ;
skos:definition "French Republic." ;
skos:inScheme iso3166:CountryScheme .
---
### **ISO 639 Language SKOS Taxonomy**
iso639:LanguageScheme a skos:ConceptScheme ;
rdfs:label "ISO 639 Language Scheme" ;
skos:prefLabel "Language Classification (ISO 639)" ;
skos:definition "A controlled vocabulary for languages based on ISO 639-1 codes." .
iso639:en a iso639:Language ;
skos:prefLabel "English" ;
skos:notation "en" ;
skos:definition "English language." ;
skos:inScheme iso639:LanguageScheme .
iso639:fr a iso639:Language ;
skos:prefLabel "French" ;
skos:notation "fr" ;
skos:definition "French language." ;
skos:inScheme iso639:LanguageScheme .
iso639:es a iso639:Language ;
skos:prefLabel "Spanish" ;
skos:notation "es" ;
skos:definition "Spanish language." ;
skos:inScheme iso639:LanguageScheme .
What This Does
Enforces controlled vocabularies for Billing Codes, Campaigns, Concepts, Cost Centres, Countries, and Languages.
Uses SKOS taxonomies to structure hierarchical and standardized classifications.
Integrates with ISO 3166 and ISO 639, ensuring globally recognized country and language codes.
Facilitates interoperability with linked data and semantic web applications.
This setup allows Cards, Boards, and other assets to reference validated values from industry standards.