From a99d5009ff49d2a5b220eb037f4bbbf7b1da8c13 Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Tue, 10 Sep 2024 09:26:47 +0200 Subject: [PATCH 1/8] #141 #37 #131 #136 #132 --- .gitignore | 1 + CHANGELOG.md | 12 + context/context_1.10.0.json | 432 ++++++++++++++++++++ context/context_1.11.0.json | 432 ++++++++++++++++++++ context/context_1.11.1.json | 432 ++++++++++++++++++++ context.json => context/context_1.12.0.json | 25 +- context/context_1.13.0.json | 2 +- context/context_1.9.0.json | 420 +++++++++++++++++++ scripts/context-generator.py | 70 ++++ scripts/requirements.txt | 2 + scripts/uri_standerdizer.py | 112 +++++ src/DFC_BusinessOntology.owl | 48 ++- src/DFC_BusinessOntology.rdf | 27 +- 13 files changed, 2000 insertions(+), 15 deletions(-) create mode 100644 context/context_1.10.0.json create mode 100644 context/context_1.11.0.json create mode 100644 context/context_1.11.1.json rename context.json => context/context_1.12.0.json (98%) create mode 100644 context/context_1.9.0.json create mode 100644 scripts/context-generator.py create mode 100644 scripts/requirements.txt create mode 100644 scripts/uri_standerdizer.py diff --git a/.gitignore b/.gitignore index d36da69..0e65d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ src/catalog-v001.xml *.orig *.chk.* +src/DFC_BusinessOntology.properties \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c17825..53a710c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +#### Property +- fulfills, domain: PhysicalProduct, inverseOf: fullfilledBy +- fulfilledBy, domain: OrderLine, inverseOf: fullfills + +#### Context +- 1.9.0, 1.10.0, 1.11.0, 1.11.1, 1.12.0, 1.13.0 + +#### Scripts +- context-generator : python script to generate context from rdf ontology file +- uri_standerdizer : python script to standardized uris from predefied format and deprecated last uris ### Changed #### Property diff --git a/context/context_1.10.0.json b/context/context_1.10.0.json new file mode 100644 index 0000000..b7188ee --- /dev/null +++ b/context/context_1.10.0.json @@ -0,0 +1,432 @@ +{ + "@context": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#", + "dfc-b:DFC_BusinessOntology_ObjectProperty": { + "@type": "@id" + }, + "dfc-b:DFC_Interface_Property": { + "@type": "@id" + }, + "dfc-b:addressOf": { + "@type": "@id" + }, + "dfc-b:affiliatedTo": { + "@type": "@id" + }, + "dfc-b:affiliates": { + "@type": "@id" + }, + "dfc-b:allergenCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:belongsTo": { + "@type": "@id" + }, + "dfc-b:brandOf": { + "@type": "@id" + }, + "dfc-b:certificateOf": { + "@type": "@id" + }, + "dfc-b:characteristicOf": { + "@type": "@id" + }, + "dfc-b:claimOf": { + "@type": "@id" + }, + "dfc-b:composedOf": { + "@type": "@id" + }, + "dfc-b:composes": { + "@type": "@id" + }, + "dfc-b:concernedBy": { + "@type": "@id" + }, + "dfc-b:concerns": { + "@type": "@id" + }, + "dfc-b:constituedBy": { + "@type": "@id" + }, + "dfc-b:constitutes": { + "@type": "@id" + }, + "dfc-b:consumedBy": { + "@type": "@id" + }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:containerInformationOf": { + "@type": "@id" + }, + "dfc-b:coordinatedBy": { + "@type": "@id" + }, + "dfc-b:coordinates": { + "@type": "@id" + }, + "dfc-b:definedBy": { + "@type": "@id" + }, + "dfc-b:defines": { + "@type": "@id" + }, + "dfc-b:deliveredAt": { + "@type": "@id" + }, + "dfc-b:facetOf": { + "@type": "@id" + }, + "dfc-b:from": { + "@type": "@id" + }, + "dfc-b:geographicalOriginOf": { + "@type": "@id" + }, + "dfc-b:hasAddress": { + "@type": "@id" + }, + "dfc-b:hasAllergenCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasAllergenDimension": { + "@type": "@id" + }, + "dfc-b:hasBrand": { + "@type": "@id" + }, + "dfc-b:hasCertification": { + "@type": "@id" + }, + "dfc-b:hasCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasClaim": { + "@type": "@id" + }, + "dfc-b:hasContainerInformation": { + "@type": "@id" + }, + "dfc-b:hasDimension": { + "@type": "@id" + }, + "dfc-b:hasFacet": { + "@type": "@id" + }, + "dfc-b:hasFulfilmentStatus": { + "@type": "@id" + }, + "dfc-b:hasGeographicalOrigin": { + "@type": "@id" + }, + "dfc-b:hasIncome": { + "@type": "@id" + }, + "dfc-b:hasIngredient": { + "@type": "@id" + }, + "dfc-b:hasLabellingCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasLabellingDimension": { + "@type": "@id" + }, + "dfc-b:hasMainContact": { + "@type": "@id" + }, + "dfc-b:hasNatureOrigin": { + "@type": "@id" + }, + "dfc-b:hasNutrientCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasNutrientDimension": { + "@type": "@id" + }, + "dfc-b:hasObject": { + "@type": "@id" + }, + "dfc-b:hasOption": { + "@type": "@id" + }, + "dfc-b:hasOrderStatus": { + "@type": "@id" + }, + "dfc-b:hasOutcome": { + "@type": "@id" + }, + "dfc-b:hasPart": { + "@type": "@id" + }, + "dfc-b:hasPartOrigin": { + "@type": "@id" + }, + "dfc-b:hasPaymentMethod": { + "@type": "@id" + }, + "dfc-b:hasPaymentStatus": { + "@type": "@id" + }, + "dfc-b:hasPhoneNumber": { + "@type": "@id" + }, + "dfc-b:hasPhysicalCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasPhysicalDimension": { + "@type": "@id" + }, + "dfc-b:hasPrice": { + "@type": "@id" + }, + "dfc-b:hasProcess": { + "@type": "@id" + }, + "dfc-b:hasQuantity": { + "@type": "@id" + }, + "dfc-b:hasReference": { + "@type": "@id" + }, + "dfc-b:hasSocialMedia": { + "@type": "@id" + }, + "dfc-b:hasStatus": { + "@type": "@id" + }, + "dfc-b:hasTemperature": { + "@type": "@id" + }, + "dfc-b:hasType": { + "@type": "@id" + }, + "dfc-b:hasUnit": { + "@type": "@id" + }, + "dfc-b:hostedAt": { + "@type": "@id" + }, + "dfc-b:hosts": { + "@type": "@id" + }, + "dfc-b:identifiedBy": { + "@type": "@id" + }, + "dfc-b:identifies": { + "@type": "@id" + }, + "dfc-b:incomeOf": { + "@type": "@id" + }, + "dfc-b:industrializedBy": { + "@type": "@id" + }, + "dfc-b:industrializes": { + "@type": "@id" + }, + "dfc-b:isIngredientOf": { + "@type": "@id" + }, + "dfc-b:isPriceOf": { + "@type": "@id" + }, + "dfc-b:isTemperatureOf": { + "@type": "@id" + }, + "dfc-b:labellingCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:listedIn": { + "@type": "@id" + }, + "dfc-b:lists": { + "@type": "@id" + }, + "dfc-b:localizedBy": { + "@type": "@id" + }, + "dfc-b:localizes": { + "@type": "@id" + }, + "dfc-b:mainContactOf": { + "@type": "@id" + }, + "dfc-b:maintainedBy": { + "@type": "@id" + }, + "dfc-b:maintains": { + "@type": "@id" + }, + "dfc-b:managedBy": { + "@type": "@id" + }, + "dfc-b:manages": { + "@type": "@id" + }, + "dfc-b:natureOriginOf": { + "@type": "@id" + }, + "dfc-b:nutrientCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:objectOf": { + "@type": "@id" + }, + "dfc-b:offeredThrough": { + "@type": "@id" + }, + "dfc-b:offers": { + "@type": "@id" + }, + "dfc-b:offersTo": { + "@type": "@id" + }, + "dfc-b:optionOf": { + "@type": "@id" + }, + "dfc-b:orderedBy": { + "@type": "@id" + }, + "dfc-b:orders": { + "@type": "@id" + }, + "dfc-b:outcomeOf": { + "@type": "@id" + }, + "dfc-b:ownedBy": { + "@type": "@id" + }, + "dfc-b:owns": { + "@type": "@id" + }, + "dfc-b:paidWith": { + "@type": "@id" + }, + "dfc-b:partOf": { + "@type": "@id" + }, + "dfc-b:partOriginOf": { + "@type": "@id" + }, + "dfc-b:phoneNumberOf": { + "@type": "@id" + }, + "dfc-b:physicalCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:pickedUpAt": { + "@type": "@id" + }, + "dfc-b:processOf": { + "@type": "@id" + }, + "dfc-b:producedBy": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:proposedBy": { + "@type": "@id" + }, + "dfc-b:proposes": { + "@type": "@id" + }, + "dfc-b:referenceOf": { + "@type": "@id" + }, + "dfc-b:referencedBy": { + "@type": "@id" + }, + "dfc-b:references": { + "@type": "@id" + }, + "dfc-b:refersTo": { + "@type": "@id" + }, + "dfc-b:representedBy": { + "@type": "@id" + }, + "dfc-b:represents": { + "@type": "@id" + }, + "dfc-b:requestedBy": { + "@type": "@id" + }, + "dfc-b:requests": { + "@type": "@id" + }, + "dfc-b:satisfiedBy": { + "@type": "@id" + }, + "dfc-b:satisfies": { + "@type": "@id" + }, + "dfc-b:selects": { + "@type": "@id" + }, + "dfc-b:socialMediaOf": { + "@type": "@id" + }, + "dfc-b:storedIn": { + "@type": "@id" + }, + "dfc-b:stores": { + "@type": "@id" + }, + "dfc-b:suppliedBy": { + "@type": "@id" + }, + "dfc-b:supplies": { + "@type": "@id" + }, + "dfc-b:suppliesTo": { + "@type": "@id" + }, + "dfc-b:to": { + "@type": "@id" + }, + "dfc-b:tracedBy": { + "@type": "@id" + }, + "dfc-b:traces": { + "@type": "@id" + }, + "dfc-b:transformedBy": { + "@type": "@id" + }, + "dfc-b:transforms": { + "@type": "@id" + }, + "dfc-b:typeOf": { + "@type": "@id" + }, + "dfc-b:uses": { + "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + } + } +} \ No newline at end of file diff --git a/context/context_1.11.0.json b/context/context_1.11.0.json new file mode 100644 index 0000000..89855b7 --- /dev/null +++ b/context/context_1.11.0.json @@ -0,0 +1,432 @@ +{ + "@context": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#", + "dfc-b:DFC_BusinessOntology_ObjectProperty": { + "@type": "@id" + }, + "dfc-b:DFC_Interface_Property": { + "@type": "@id" + }, + "dfc-b:addressOf": { + "@type": "@id" + }, + "dfc-b:affiliatedTo": { + "@type": "@id" + }, + "dfc-b:affiliates": { + "@type": "@id" + }, + "dfc-b:allergenCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:belongsTo": { + "@type": "@id" + }, + "dfc-b:brandOf": { + "@type": "@id" + }, + "dfc-b:certificateOf": { + "@type": "@id" + }, + "dfc-b:characteristicOf": { + "@type": "@id" + }, + "dfc-b:claimOf": { + "@type": "@id" + }, + "dfc-b:composedOf": { + "@type": "@id" + }, + "dfc-b:composes": { + "@type": "@id" + }, + "dfc-b:concernedBy": { + "@type": "@id" + }, + "dfc-b:concerns": { + "@type": "@id" + }, + "dfc-b:constituedBy": { + "@type": "@id" + }, + "dfc-b:constitutes": { + "@type": "@id" + }, + "dfc-b:consumedBy": { + "@type": "@id" + }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:containerInformationOf": { + "@type": "@id" + }, + "dfc-b:coordinatedBy": { + "@type": "@id" + }, + "dfc-b:coordinates": { + "@type": "@id" + }, + "dfc-b:definedBy": { + "@type": "@id" + }, + "dfc-b:defines": { + "@type": "@id" + }, + "dfc-b:deliveredAt": { + "@type": "@id" + }, + "dfc-b:facetOf": { + "@type": "@id" + }, + "dfc-b:from": { + "@type": "@id" + }, + "dfc-b:geographicalOriginOf": { + "@type": "@id" + }, + "dfc-b:hasAddress": { + "@type": "@id" + }, + "dfc-b:hasAllergenCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasAllergenDimension": { + "@type": "@id" + }, + "dfc-b:hasBrand": { + "@type": "@id" + }, + "dfc-b:hasCertification": { + "@type": "@id" + }, + "dfc-b:hasCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasClaim": { + "@type": "@id" + }, + "dfc-b:hasContainerInformation": { + "@type": "@id" + }, + "dfc-b:hasDimension": { + "@type": "@id" + }, + "dfc-b:hasFacet": { + "@type": "@id" + }, + "dfc-b:hasFulfilmentStatus": { + "@type": "@id" + }, + "dfc-b:hasGeographicalOrigin": { + "@type": "@id" + }, + "dfc-b:hasIngredient": { + "@type": "@id" + }, + "dfc-b:hasInput": { + "@type": "@id" + }, + "dfc-b:hasLabellingCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasLabellingDimension": { + "@type": "@id" + }, + "dfc-b:hasMainContact": { + "@type": "@id" + }, + "dfc-b:hasNatureOrigin": { + "@type": "@id" + }, + "dfc-b:hasNutrientCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasNutrientDimension": { + "@type": "@id" + }, + "dfc-b:hasObject": { + "@type": "@id" + }, + "dfc-b:hasOption": { + "@type": "@id" + }, + "dfc-b:hasOrderStatus": { + "@type": "@id" + }, + "dfc-b:hasOutput": { + "@type": "@id" + }, + "dfc-b:hasPart": { + "@type": "@id" + }, + "dfc-b:hasPartOrigin": { + "@type": "@id" + }, + "dfc-b:hasPaymentMethod": { + "@type": "@id" + }, + "dfc-b:hasPaymentStatus": { + "@type": "@id" + }, + "dfc-b:hasPhoneNumber": { + "@type": "@id" + }, + "dfc-b:hasPhysicalCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasPhysicalDimension": { + "@type": "@id" + }, + "dfc-b:hasPrice": { + "@type": "@id" + }, + "dfc-b:hasProcess": { + "@type": "@id" + }, + "dfc-b:hasQuantity": { + "@type": "@id" + }, + "dfc-b:hasReference": { + "@type": "@id" + }, + "dfc-b:hasSocialMedia": { + "@type": "@id" + }, + "dfc-b:hasStatus": { + "@type": "@id" + }, + "dfc-b:hasTemperature": { + "@type": "@id" + }, + "dfc-b:hasType": { + "@type": "@id" + }, + "dfc-b:hasUnit": { + "@type": "@id" + }, + "dfc-b:hostedAt": { + "@type": "@id" + }, + "dfc-b:hosts": { + "@type": "@id" + }, + "dfc-b:identifiedBy": { + "@type": "@id" + }, + "dfc-b:identifies": { + "@type": "@id" + }, + "dfc-b:industrializedBy": { + "@type": "@id" + }, + "dfc-b:industrializes": { + "@type": "@id" + }, + "dfc-b:inputOf": { + "@type": "@id" + }, + "dfc-b:isIngredientOf": { + "@type": "@id" + }, + "dfc-b:isPriceOf": { + "@type": "@id" + }, + "dfc-b:isTemperatureOf": { + "@type": "@id" + }, + "dfc-b:labellingCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:listedIn": { + "@type": "@id" + }, + "dfc-b:lists": { + "@type": "@id" + }, + "dfc-b:localizedBy": { + "@type": "@id" + }, + "dfc-b:localizes": { + "@type": "@id" + }, + "dfc-b:mainContactOf": { + "@type": "@id" + }, + "dfc-b:maintainedBy": { + "@type": "@id" + }, + "dfc-b:maintains": { + "@type": "@id" + }, + "dfc-b:managedBy": { + "@type": "@id" + }, + "dfc-b:manages": { + "@type": "@id" + }, + "dfc-b:natureOriginOf": { + "@type": "@id" + }, + "dfc-b:nutrientCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:objectOf": { + "@type": "@id" + }, + "dfc-b:offeredThrough": { + "@type": "@id" + }, + "dfc-b:offers": { + "@type": "@id" + }, + "dfc-b:offersTo": { + "@type": "@id" + }, + "dfc-b:optionOf": { + "@type": "@id" + }, + "dfc-b:orderedBy": { + "@type": "@id" + }, + "dfc-b:orders": { + "@type": "@id" + }, + "dfc-b:outputOf": { + "@type": "@id" + }, + "dfc-b:ownedBy": { + "@type": "@id" + }, + "dfc-b:owns": { + "@type": "@id" + }, + "dfc-b:paidWith": { + "@type": "@id" + }, + "dfc-b:partOf": { + "@type": "@id" + }, + "dfc-b:partOriginOf": { + "@type": "@id" + }, + "dfc-b:phoneNumberOf": { + "@type": "@id" + }, + "dfc-b:physicalCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:pickedUpAt": { + "@type": "@id" + }, + "dfc-b:processOf": { + "@type": "@id" + }, + "dfc-b:producedBy": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:proposedBy": { + "@type": "@id" + }, + "dfc-b:proposes": { + "@type": "@id" + }, + "dfc-b:referenceOf": { + "@type": "@id" + }, + "dfc-b:referencedBy": { + "@type": "@id" + }, + "dfc-b:references": { + "@type": "@id" + }, + "dfc-b:refersTo": { + "@type": "@id" + }, + "dfc-b:representedBy": { + "@type": "@id" + }, + "dfc-b:represents": { + "@type": "@id" + }, + "dfc-b:requestedBy": { + "@type": "@id" + }, + "dfc-b:requests": { + "@type": "@id" + }, + "dfc-b:satisfiedBy": { + "@type": "@id" + }, + "dfc-b:satisfies": { + "@type": "@id" + }, + "dfc-b:selects": { + "@type": "@id" + }, + "dfc-b:socialMediaOf": { + "@type": "@id" + }, + "dfc-b:storedIn": { + "@type": "@id" + }, + "dfc-b:stores": { + "@type": "@id" + }, + "dfc-b:suppliedBy": { + "@type": "@id" + }, + "dfc-b:supplies": { + "@type": "@id" + }, + "dfc-b:suppliesTo": { + "@type": "@id" + }, + "dfc-b:to": { + "@type": "@id" + }, + "dfc-b:tracedBy": { + "@type": "@id" + }, + "dfc-b:traces": { + "@type": "@id" + }, + "dfc-b:transformedBy": { + "@type": "@id" + }, + "dfc-b:transforms": { + "@type": "@id" + }, + "dfc-b:typeOf": { + "@type": "@id" + }, + "dfc-b:uses": { + "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + } + } +} \ No newline at end of file diff --git a/context/context_1.11.1.json b/context/context_1.11.1.json new file mode 100644 index 0000000..89855b7 --- /dev/null +++ b/context/context_1.11.1.json @@ -0,0 +1,432 @@ +{ + "@context": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#", + "dfc-b:DFC_BusinessOntology_ObjectProperty": { + "@type": "@id" + }, + "dfc-b:DFC_Interface_Property": { + "@type": "@id" + }, + "dfc-b:addressOf": { + "@type": "@id" + }, + "dfc-b:affiliatedTo": { + "@type": "@id" + }, + "dfc-b:affiliates": { + "@type": "@id" + }, + "dfc-b:allergenCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:belongsTo": { + "@type": "@id" + }, + "dfc-b:brandOf": { + "@type": "@id" + }, + "dfc-b:certificateOf": { + "@type": "@id" + }, + "dfc-b:characteristicOf": { + "@type": "@id" + }, + "dfc-b:claimOf": { + "@type": "@id" + }, + "dfc-b:composedOf": { + "@type": "@id" + }, + "dfc-b:composes": { + "@type": "@id" + }, + "dfc-b:concernedBy": { + "@type": "@id" + }, + "dfc-b:concerns": { + "@type": "@id" + }, + "dfc-b:constituedBy": { + "@type": "@id" + }, + "dfc-b:constitutes": { + "@type": "@id" + }, + "dfc-b:consumedBy": { + "@type": "@id" + }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:containerInformationOf": { + "@type": "@id" + }, + "dfc-b:coordinatedBy": { + "@type": "@id" + }, + "dfc-b:coordinates": { + "@type": "@id" + }, + "dfc-b:definedBy": { + "@type": "@id" + }, + "dfc-b:defines": { + "@type": "@id" + }, + "dfc-b:deliveredAt": { + "@type": "@id" + }, + "dfc-b:facetOf": { + "@type": "@id" + }, + "dfc-b:from": { + "@type": "@id" + }, + "dfc-b:geographicalOriginOf": { + "@type": "@id" + }, + "dfc-b:hasAddress": { + "@type": "@id" + }, + "dfc-b:hasAllergenCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasAllergenDimension": { + "@type": "@id" + }, + "dfc-b:hasBrand": { + "@type": "@id" + }, + "dfc-b:hasCertification": { + "@type": "@id" + }, + "dfc-b:hasCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasClaim": { + "@type": "@id" + }, + "dfc-b:hasContainerInformation": { + "@type": "@id" + }, + "dfc-b:hasDimension": { + "@type": "@id" + }, + "dfc-b:hasFacet": { + "@type": "@id" + }, + "dfc-b:hasFulfilmentStatus": { + "@type": "@id" + }, + "dfc-b:hasGeographicalOrigin": { + "@type": "@id" + }, + "dfc-b:hasIngredient": { + "@type": "@id" + }, + "dfc-b:hasInput": { + "@type": "@id" + }, + "dfc-b:hasLabellingCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasLabellingDimension": { + "@type": "@id" + }, + "dfc-b:hasMainContact": { + "@type": "@id" + }, + "dfc-b:hasNatureOrigin": { + "@type": "@id" + }, + "dfc-b:hasNutrientCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasNutrientDimension": { + "@type": "@id" + }, + "dfc-b:hasObject": { + "@type": "@id" + }, + "dfc-b:hasOption": { + "@type": "@id" + }, + "dfc-b:hasOrderStatus": { + "@type": "@id" + }, + "dfc-b:hasOutput": { + "@type": "@id" + }, + "dfc-b:hasPart": { + "@type": "@id" + }, + "dfc-b:hasPartOrigin": { + "@type": "@id" + }, + "dfc-b:hasPaymentMethod": { + "@type": "@id" + }, + "dfc-b:hasPaymentStatus": { + "@type": "@id" + }, + "dfc-b:hasPhoneNumber": { + "@type": "@id" + }, + "dfc-b:hasPhysicalCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasPhysicalDimension": { + "@type": "@id" + }, + "dfc-b:hasPrice": { + "@type": "@id" + }, + "dfc-b:hasProcess": { + "@type": "@id" + }, + "dfc-b:hasQuantity": { + "@type": "@id" + }, + "dfc-b:hasReference": { + "@type": "@id" + }, + "dfc-b:hasSocialMedia": { + "@type": "@id" + }, + "dfc-b:hasStatus": { + "@type": "@id" + }, + "dfc-b:hasTemperature": { + "@type": "@id" + }, + "dfc-b:hasType": { + "@type": "@id" + }, + "dfc-b:hasUnit": { + "@type": "@id" + }, + "dfc-b:hostedAt": { + "@type": "@id" + }, + "dfc-b:hosts": { + "@type": "@id" + }, + "dfc-b:identifiedBy": { + "@type": "@id" + }, + "dfc-b:identifies": { + "@type": "@id" + }, + "dfc-b:industrializedBy": { + "@type": "@id" + }, + "dfc-b:industrializes": { + "@type": "@id" + }, + "dfc-b:inputOf": { + "@type": "@id" + }, + "dfc-b:isIngredientOf": { + "@type": "@id" + }, + "dfc-b:isPriceOf": { + "@type": "@id" + }, + "dfc-b:isTemperatureOf": { + "@type": "@id" + }, + "dfc-b:labellingCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:listedIn": { + "@type": "@id" + }, + "dfc-b:lists": { + "@type": "@id" + }, + "dfc-b:localizedBy": { + "@type": "@id" + }, + "dfc-b:localizes": { + "@type": "@id" + }, + "dfc-b:mainContactOf": { + "@type": "@id" + }, + "dfc-b:maintainedBy": { + "@type": "@id" + }, + "dfc-b:maintains": { + "@type": "@id" + }, + "dfc-b:managedBy": { + "@type": "@id" + }, + "dfc-b:manages": { + "@type": "@id" + }, + "dfc-b:natureOriginOf": { + "@type": "@id" + }, + "dfc-b:nutrientCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:objectOf": { + "@type": "@id" + }, + "dfc-b:offeredThrough": { + "@type": "@id" + }, + "dfc-b:offers": { + "@type": "@id" + }, + "dfc-b:offersTo": { + "@type": "@id" + }, + "dfc-b:optionOf": { + "@type": "@id" + }, + "dfc-b:orderedBy": { + "@type": "@id" + }, + "dfc-b:orders": { + "@type": "@id" + }, + "dfc-b:outputOf": { + "@type": "@id" + }, + "dfc-b:ownedBy": { + "@type": "@id" + }, + "dfc-b:owns": { + "@type": "@id" + }, + "dfc-b:paidWith": { + "@type": "@id" + }, + "dfc-b:partOf": { + "@type": "@id" + }, + "dfc-b:partOriginOf": { + "@type": "@id" + }, + "dfc-b:phoneNumberOf": { + "@type": "@id" + }, + "dfc-b:physicalCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:pickedUpAt": { + "@type": "@id" + }, + "dfc-b:processOf": { + "@type": "@id" + }, + "dfc-b:producedBy": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:proposedBy": { + "@type": "@id" + }, + "dfc-b:proposes": { + "@type": "@id" + }, + "dfc-b:referenceOf": { + "@type": "@id" + }, + "dfc-b:referencedBy": { + "@type": "@id" + }, + "dfc-b:references": { + "@type": "@id" + }, + "dfc-b:refersTo": { + "@type": "@id" + }, + "dfc-b:representedBy": { + "@type": "@id" + }, + "dfc-b:represents": { + "@type": "@id" + }, + "dfc-b:requestedBy": { + "@type": "@id" + }, + "dfc-b:requests": { + "@type": "@id" + }, + "dfc-b:satisfiedBy": { + "@type": "@id" + }, + "dfc-b:satisfies": { + "@type": "@id" + }, + "dfc-b:selects": { + "@type": "@id" + }, + "dfc-b:socialMediaOf": { + "@type": "@id" + }, + "dfc-b:storedIn": { + "@type": "@id" + }, + "dfc-b:stores": { + "@type": "@id" + }, + "dfc-b:suppliedBy": { + "@type": "@id" + }, + "dfc-b:supplies": { + "@type": "@id" + }, + "dfc-b:suppliesTo": { + "@type": "@id" + }, + "dfc-b:to": { + "@type": "@id" + }, + "dfc-b:tracedBy": { + "@type": "@id" + }, + "dfc-b:traces": { + "@type": "@id" + }, + "dfc-b:transformedBy": { + "@type": "@id" + }, + "dfc-b:transforms": { + "@type": "@id" + }, + "dfc-b:typeOf": { + "@type": "@id" + }, + "dfc-b:uses": { + "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + } + } +} \ No newline at end of file diff --git a/context.json b/context/context_1.12.0.json similarity index 98% rename from context.json rename to context/context_1.12.0.json index cc752ac..4edab7b 100644 --- a/context.json +++ b/context/context_1.12.0.json @@ -158,9 +158,6 @@ "dfc-b:hasObject": { "@type": "@id" }, - "dfc-b:hasOffer": { - "@type": "@id" - }, "dfc-b:hasOption": { "@type": "@id" }, @@ -221,9 +218,6 @@ "dfc-b:hasUnit": { "@type": "@id" }, - "dfc-b:holds": { - "@type": "@id" - }, "dfc-b:hostedAt": { "@type": "@id" }, @@ -383,16 +377,13 @@ "dfc-b:satisfies": { "@type": "@id" }, - "dfc-b:selectedBy": { - "@type": "@id" - }, "dfc-b:selects": { "@type": "@id" }, - "dfc-b:sells": { + "dfc-b:socialMediaOf": { "@type": "@id" }, - "dfc-b:socialMediaOf": { + "dfc-b:sold": { "@type": "@id" }, "dfc-b:soldBy": { @@ -433,6 +424,18 @@ }, "dfc-b:uses": { "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" } } } \ No newline at end of file diff --git a/context/context_1.13.0.json b/context/context_1.13.0.json index 3a6de70..65ffabb 100644 --- a/context/context_1.13.0.json +++ b/context/context_1.13.0.json @@ -443,7 +443,7 @@ "dfc-t:hostedBy": { "@type": "@id" }, - "dfc:owner": { + "dfc-t:owner": { "@type": "@id" } } diff --git a/context/context_1.9.0.json b/context/context_1.9.0.json new file mode 100644 index 0000000..07d2321 --- /dev/null +++ b/context/context_1.9.0.json @@ -0,0 +1,420 @@ +{ + "@context": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#", + "dfc-b:DFC_BusinessOntology_ObjectProperty": { + "@type": "@id" + }, + "dfc-b:DFC_Interface_Property": { + "@type": "@id" + }, + "dfc-b:addressOf": { + "@type": "@id" + }, + "dfc-b:affiliatedBy": { + "@type": "@id" + }, + "dfc-b:affiliates": { + "@type": "@id" + }, + "dfc-b:allergenCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:belongsTo": { + "@type": "@id" + }, + "dfc-b:brandOf": { + "@type": "@id" + }, + "dfc-b:certificateOf": { + "@type": "@id" + }, + "dfc-b:characteristicOf": { + "@type": "@id" + }, + "dfc-b:claimOf": { + "@type": "@id" + }, + "dfc-b:composedOf": { + "@type": "@id" + }, + "dfc-b:composes": { + "@type": "@id" + }, + "dfc-b:concernedBy": { + "@type": "@id" + }, + "dfc-b:concerns": { + "@type": "@id" + }, + "dfc-b:constituedBy": { + "@type": "@id" + }, + "dfc-b:constitutes": { + "@type": "@id" + }, + "dfc-b:consumedBy": { + "@type": "@id" + }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:containerInformationOf": { + "@type": "@id" + }, + "dfc-b:coordinatedBy": { + "@type": "@id" + }, + "dfc-b:coordinates": { + "@type": "@id" + }, + "dfc-b:definedBy": { + "@type": "@id" + }, + "dfc-b:defines": { + "@type": "@id" + }, + "dfc-b:deliveredAt": { + "@type": "@id" + }, + "dfc-b:facetOf": { + "@type": "@id" + }, + "dfc-b:from": { + "@type": "@id" + }, + "dfc-b:geographicalOriginOf": { + "@type": "@id" + }, + "dfc-b:hasAddress": { + "@type": "@id" + }, + "dfc-b:hasAllergenCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasAllergenDimension": { + "@type": "@id" + }, + "dfc-b:hasBrand": { + "@type": "@id" + }, + "dfc-b:hasCertification": { + "@type": "@id" + }, + "dfc-b:hasCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasClaim": { + "@type": "@id" + }, + "dfc-b:hasContainerInformation": { + "@type": "@id" + }, + "dfc-b:hasDimension": { + "@type": "@id" + }, + "dfc-b:hasFacet": { + "@type": "@id" + }, + "dfc-b:hasGeographicalOrigin": { + "@type": "@id" + }, + "dfc-b:hasIncome": { + "@type": "@id" + }, + "dfc-b:hasIngredient": { + "@type": "@id" + }, + "dfc-b:hasLabellingCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasLabellingDimension": { + "@type": "@id" + }, + "dfc-b:hasMainContact": { + "@type": "@id" + }, + "dfc-b:hasNatureOrigin": { + "@type": "@id" + }, + "dfc-b:hasNutrientCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasNutrientDimension": { + "@type": "@id" + }, + "dfc-b:hasObject": { + "@type": "@id" + }, + "dfc-b:hasOption": { + "@type": "@id" + }, + "dfc-b:hasOutcome": { + "@type": "@id" + }, + "dfc-b:hasPart": { + "@type": "@id" + }, + "dfc-b:hasPartOrigin": { + "@type": "@id" + }, + "dfc-b:hasPaymentMethod": { + "@type": "@id" + }, + "dfc-b:hasPhoneNumber": { + "@type": "@id" + }, + "dfc-b:hasPhysicalCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasPhysicalDimension": { + "@type": "@id" + }, + "dfc-b:hasPrice": { + "@type": "@id" + }, + "dfc-b:hasProcess": { + "@type": "@id" + }, + "dfc-b:hasQuantity": { + "@type": "@id" + }, + "dfc-b:hasReference": { + "@type": "@id" + }, + "dfc-b:hasSocialMedia": { + "@type": "@id" + }, + "dfc-b:hasTemperature": { + "@type": "@id" + }, + "dfc-b:hasType": { + "@type": "@id" + }, + "dfc-b:hasUnit": { + "@type": "@id" + }, + "dfc-b:hostedAt": { + "@type": "@id" + }, + "dfc-b:hosts": { + "@type": "@id" + }, + "dfc-b:identifiedBy": { + "@type": "@id" + }, + "dfc-b:identifies": { + "@type": "@id" + }, + "dfc-b:incomeOf": { + "@type": "@id" + }, + "dfc-b:industrializedBy": { + "@type": "@id" + }, + "dfc-b:industrializes": { + "@type": "@id" + }, + "dfc-b:isIngredientOf": { + "@type": "@id" + }, + "dfc-b:isPriceOf": { + "@type": "@id" + }, + "dfc-b:isTemperatureOf": { + "@type": "@id" + }, + "dfc-b:labellingCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:listedIn": { + "@type": "@id" + }, + "dfc-b:lists": { + "@type": "@id" + }, + "dfc-b:localizedBy": { + "@type": "@id" + }, + "dfc-b:localizes": { + "@type": "@id" + }, + "dfc-b:mainContactOf": { + "@type": "@id" + }, + "dfc-b:maintainedBy": { + "@type": "@id" + }, + "dfc-b:maintains": { + "@type": "@id" + }, + "dfc-b:managedBy": { + "@type": "@id" + }, + "dfc-b:manages": { + "@type": "@id" + }, + "dfc-b:natureOriginOf": { + "@type": "@id" + }, + "dfc-b:nutrientCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:objectOf": { + "@type": "@id" + }, + "dfc-b:offeredThrough": { + "@type": "@id" + }, + "dfc-b:offers": { + "@type": "@id" + }, + "dfc-b:offersTo": { + "@type": "@id" + }, + "dfc-b:optionOf": { + "@type": "@id" + }, + "dfc-b:orderedBy": { + "@type": "@id" + }, + "dfc-b:orders": { + "@type": "@id" + }, + "dfc-b:outcomeOf": { + "@type": "@id" + }, + "dfc-b:ownedBy": { + "@type": "@id" + }, + "dfc-b:owns": { + "@type": "@id" + }, + "dfc-b:paidWith": { + "@type": "@id" + }, + "dfc-b:partOf": { + "@type": "@id" + }, + "dfc-b:partOriginOf": { + "@type": "@id" + }, + "dfc-b:phoneNumberOf": { + "@type": "@id" + }, + "dfc-b:physicalCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:pickedUpAt": { + "@type": "@id" + }, + "dfc-b:processOf": { + "@type": "@id" + }, + "dfc-b:producedBy": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:proposedBy": { + "@type": "@id" + }, + "dfc-b:proposes": { + "@type": "@id" + }, + "dfc-b:referenceOf": { + "@type": "@id" + }, + "dfc-b:referencedBy": { + "@type": "@id" + }, + "dfc-b:references": { + "@type": "@id" + }, + "dfc-b:refersTo": { + "@type": "@id" + }, + "dfc-b:representedBy": { + "@type": "@id" + }, + "dfc-b:represents": { + "@type": "@id" + }, + "dfc-b:requestedBy": { + "@type": "@id" + }, + "dfc-b:requests": { + "@type": "@id" + }, + "dfc-b:satisfiedBy": { + "@type": "@id" + }, + "dfc-b:satisfies": { + "@type": "@id" + }, + "dfc-b:selects": { + "@type": "@id" + }, + "dfc-b:socialMediaOf": { + "@type": "@id" + }, + "dfc-b:storedIn": { + "@type": "@id" + }, + "dfc-b:stores": { + "@type": "@id" + }, + "dfc-b:suppliedBy": { + "@type": "@id" + }, + "dfc-b:supplies": { + "@type": "@id" + }, + "dfc-b:suppliesTo": { + "@type": "@id" + }, + "dfc-b:to": { + "@type": "@id" + }, + "dfc-b:tracedBy": { + "@type": "@id" + }, + "dfc-b:traces": { + "@type": "@id" + }, + "dfc-b:transformedBy": { + "@type": "@id" + }, + "dfc-b:transforms": { + "@type": "@id" + }, + "dfc-b:typeOf": { + "@type": "@id" + }, + "dfc-b:uses": { + "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + } + } +} \ No newline at end of file diff --git a/scripts/context-generator.py b/scripts/context-generator.py new file mode 100644 index 0000000..c6802ac --- /dev/null +++ b/scripts/context-generator.py @@ -0,0 +1,70 @@ +import re, argparse + +parser = argparse.ArgumentParser(description="Generate JSON-LD context from an ontology file") + +# add argument that should end with .rdf +parser.add_argument('input', type=str, help='Input file path (should end with .rdf)') + +# add argument that should end with .json +parser.add_argument('output', type=str, help='Output file path (should end with .json)') + +assert parser.parse_args().input.endswith('.rdf'), "Input file should end with .rdf" +assert parser.parse_args().output.endswith('.json'), "Output file should end with .json" + +args = parser.parse_args() + +input_filepath = args.input + +with open(input_filepath, "r") as ontology_f: + ontology_text = ontology_f.read() + +ontology_text = ontology_text.split("\n") + +with open(args.output, "w") as export_context_f: + + export_context_f.write("""{ + "@context": { + \t"rdfs": "http://www.w3.org/2000/01/rdf-schema#", + \t"skos" : "http://www.w3.org/2004/02/skos/core#", + \t"dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + \t"dc": "http://purl.org/dc/elements/1.1/#", + \t"dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + \t"dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + \t"dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + \t"dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + \t"dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + \t"dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + \t"ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#\"""") + + for line in ontology_text: + if re.findall(r"", line): + line = re.sub("", "", line) + line = re.sub("/>", "", line) + line = re.sub("\"", "", line) + line = re.sub("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", "dfc-b:", line) + line = re.sub("\t", "", line) + line = re.sub(" ", "", line) + if not bool(re.search('http(\S+)', line)): + export_context_f.write(",\n") + export_context_f.write(f"\t\t\"{line}") + export_context_f.write("\": {\n") + export_context_f.write("\t\t\t\"@type\": \"@id\"\n") + export_context_f.write("\t\t}") + + export_context_f.write(""", + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + }""") + + export_context_f.write("\n\t}\n}") + \ No newline at end of file diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 0000000..759b416 --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1,2 @@ +numpy +rdflib \ No newline at end of file diff --git a/scripts/uri_standerdizer.py b/scripts/uri_standerdizer.py new file mode 100644 index 0000000..3c61156 --- /dev/null +++ b/scripts/uri_standerdizer.py @@ -0,0 +1,112 @@ +import argparse + +import numpy as np +import rdflib + +QUERY_CONCEPTS = """ + PREFIX rdfs: + PREFIX owl: + PREFIX xsd: + + SELECT ?s ?p ?o + WHERE { + { + ?s a skos:Concept . + } UNION { + ?s a skos:Collection . + } + ?s ?p ?o . + } +""" + +def clean_key(key): + key_split = key.split("#") + namespace = "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#" + + old_uri = key_split[1] + new_uri = old_uri[0].lower() + old_uri[1:] + + key = namespace + new_uri + return new_uri + +def create_dict_cleaned_uri(graph_file): + # Create a Graph object + graph = rdflib.Graph() + # Read the TTL file into the graph + graph.parse(graph_file, format='ttl') + + # Run the query + results = graph.query(QUERY_CONCEPTS) + + concepts = {} + for row in results: + concepts[str(row.s)] = np.append(concepts.get(str(row.s), np.array([])), (row.p, row.o)) + + dict_old_uri_to_clean = { + key.split("#")[1] : clean_key(key) for key in concepts.keys() + } + + return dict_old_uri_to_clean + +def apply_mapping(line, old_to_new): + for old, new in old_to_new.items(): + line = line.replace(":" + old, ":" + new) + return line + +parser = argparse.ArgumentParser(description="Generate updated taxonomy file with camelCase URIs and deprecated old URIs") + +parser.add_argument('input', type=str, help='Input file path (should end with .ttl)') +parser.add_argument('output', type=str, help='Output file path (should end with .ttl') + +args = parser.parse_args() + +GRAPH_FILE = args.input +CLEANED_GRAPH_FILE = args.output + +dict_old_uri_to_clean = create_dict_cleaned_uri(GRAPH_FILE) + +with open(GRAPH_FILE, 'r') as read_file: + with open(CLEANED_GRAPH_FILE, 'w') as write_file: + old_paragraph, new_paragraph = "", "" + old_uri, new_uri = "", "" + + for line in read_file.readlines(): + # Prefixes + if line[0] == "@": + write_file.write(line) + + # Update URIs and prepare exactMatch + elif ":" in line: + if "owl:Ontology" not in line and "github" not in line and "prefLabel" not in line and "Class" not in line: + line = line.replace(".", ";") + # print(line) + old_paragraph += line + new_paragraph += apply_mapping(line, dict_old_uri_to_clean) + + if "skos:Concept;" in line or "skos:Collection;" in line: + old_uri = line.split(" ")[0] + new_uri = apply_mapping(old_uri, dict_old_uri_to_clean) + + # Write the paragraph + elif len(line) == 1: + write_file.write("\n") + if "skos:Concept;" in old_paragraph or "skos:Collection;" in old_paragraph: + + old_paragraph += " skos:exactMatch " + new_uri + " ;\n" + new_paragraph += " skos:exactMatch " + old_uri + " .\n" + + old_paragraph += " owl:deprecated true .\n\n" + + write_file.write(old_paragraph) + write_file.write(new_paragraph) + + old_paragraph, new_paragraph = "", "" + old_uri, new_uri = "", "" + else: + write_file.write(new_paragraph) + + old_paragraph, new_paragraph = "", "" + old_uri, new_uri = "", "" + else: + old_paragraph += line + new_paragraph += line diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index ae3bfd3..4e20933 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -379,6 +379,9 @@ + + + @@ -532,6 +535,9 @@ + + + @@ -4377,6 +4383,10 @@ + + + + @@ -4585,6 +4595,10 @@ + + + + @@ -4901,6 +4915,10 @@ + + + + @@ -5243,6 +5261,10 @@ + + + + @@ -5478,6 +5500,10 @@ + + + + @@ -7859,6 +7885,16 @@ #frozen gelé + + + #fulfills + fulfills + + + + #fulfills + remplit + #geographicalOriginOf @@ -8399,6 +8435,16 @@ #invoiceNumber numéro de facture + + + #isFulfilledBy + est rempli par + + + + #isFulfilledBy + is fulfilled By + #isIngredientOf @@ -10458,5 +10504,5 @@ - + diff --git a/src/DFC_BusinessOntology.rdf b/src/DFC_BusinessOntology.rdf index 118c1d9..55de020 100644 --- a/src/DFC_BusinessOntology.rdf +++ b/src/DFC_BusinessOntology.rdf @@ -37,7 +37,7 @@ Data Food Consortium Business dfc-b A common vocabulary for digital food platforms (Business Part) - 1.12.0 + 1.14.0 @@ -549,6 +549,18 @@ + + + + + + + fulfills + remplit + + + + @@ -1366,6 +1378,17 @@ + + + + + + est rempli par + is fulfilled By + + + + @@ -6023,5 +6046,5 @@ - + From 10dea7809e661443dcb47e558f756bb0be008bbf Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Thu, 19 Sep 2024 14:31:26 +0200 Subject: [PATCH 2/8] Add Price on OrderLine --- CHANGELOG.md | 1 + src/DFC_BusinessOntology.owl | 1 + src/DFC_BusinessOntology.rdf | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a710c..b9ecb13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed #### Property - concerns, domain: Offer, inverseOf: concernedBy +- Domain : hasPrice, (Offer|PaymentMethod|Transaction) -> (Offer|PaymentMethod|Transaction|OrderLine) ## [1.13.0] - 2024-07-15 ### Added diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index 4e20933..084f243 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -5424,6 +5424,7 @@ + diff --git a/src/DFC_BusinessOntology.rdf b/src/DFC_BusinessOntology.rdf index 55de020..e16316a 100644 --- a/src/DFC_BusinessOntology.rdf +++ b/src/DFC_BusinessOntology.rdf @@ -37,7 +37,7 @@ Data Food Consortium Business dfc-b A common vocabulary for digital food platforms (Business Part) - 1.14.0 + 1.12.0 @@ -1124,6 +1124,7 @@ + From 80fc70d9ad3d0375a4e100dc63801bc9ff4e9d06 Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Wed, 20 Nov 2024 17:03:15 +0100 Subject: [PATCH 3/8] Add variant and deprecate quantity dataproperty --- CHANGELOG.md | 15 + src/DFC_BusinessOntology.owl | 538 ++++------------------------------- src/DFC_BusinessOntology.rdf | 32 +++ 3 files changed, 107 insertions(+), 478 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dd4ac2..ced49dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Added + +#### Property +- hasVariant, domain: DefinedProduct, inverseOf: isVariantOf +- isVariantOf, domain: DefinedProduct, inverseOf : hasVariant + +### Deleted + +#### Property +- quantity + +### Changed +- Domain : hasQuantity, (DefinedProduct | Ingredient | OrderLine) -> (ConsumptionFlow | DefinedProduct | Ingredient | LocalizedProduct | OrderLine | PhysicalProduct | ProductionFlow | SaleSession | ShippingOption | Stock | Transaction) + ## [1.14.0] - 2024-11-13 ### Added diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index f4e360f..77d9b48 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -511,6 +511,9 @@ + + + @@ -547,6 +550,9 @@ + + + @@ -1303,474 +1309,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -5031,6 +4569,10 @@ + + + + @@ -5079,6 +4621,10 @@ + + + + @@ -5475,6 +5021,10 @@ + + + + @@ -5904,9 +5454,17 @@ + + + + + + + + @@ -5937,6 +5495,10 @@ + + + + @@ -5985,6 +5547,10 @@ + + + + @@ -9364,6 +8930,16 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #hasUnit has unit + + + #hasVariant + a pour variant + + + + #hasVariant + has variant + #holds @@ -9384,16 +8960,6 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #hostedAt The location the session is hosted at. This could be a physical (e.g. a shop or market) or virtual place (e.g. online store). - - - #holds - détient - - - - #holds - holds - #hostedAt @@ -9534,6 +9100,16 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #isTemperatureOf is temperature of + + + #isVariantOf + est la variant de + + + + #isVariantOf + is variant of + #labellingCharacteristicOf @@ -10243,6 +9819,11 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #quantity quantité + + + #quantity + true + #referenceOf @@ -11903,3 +11484,4 @@ The Address the delivery will be/was made to + diff --git a/src/DFC_BusinessOntology.rdf b/src/DFC_BusinessOntology.rdf index 421d14d..1930a79 100644 --- a/src/DFC_BusinessOntology.rdf +++ b/src/DFC_BusinessOntology.rdf @@ -1208,9 +1208,17 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + + @@ -1349,6 +1357,18 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + a pour variant + has variant + + + + @@ -1490,6 +1510,17 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + est la variant de + is variant of + + + + @@ -2981,6 +3012,7 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl N.B. There is an expectation that either the ProductionFlow or the ConsumptionFlow of any given Transformation will have a quantity of 1.0 quantity quantité + true From 57a9f0fc7ec7f91490a20e35a48e079a75540ef6 Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Wed, 4 Dec 2024 11:31:19 +0100 Subject: [PATCH 4/8] Add shipment, vehicle and related properties to logistic use-case --- CHANGELOG.md | 29 ++++- src/DFC_BusinessOntology.owl | 233 ++++++++++++++++++++++++++++++++++- src/DFC_BusinessOntology.rdf | 163 +++++++++++++++++++++++- 3 files changed, 420 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced49dc..cf07ba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +### Import + +#### Class +- https://schema.org/OpeningHoursSpecification + +#### DataProperty +- https://schema.org/opens +- https://schema.org/closes +- https://schema.org/dayOfWeek + +#### DataTypes +- https://schema.org/DayOfWeek + ### Added +#### Class +- Shipment, subClassOf DFC_BusinessOntology_Relation +- Vehicle, subClassOf What_Subject + #### Property - hasVariant, domain: DefinedProduct, inverseOf: isVariantOf - isVariantOf, domain: DefinedProduct, inverseOf : hasVariant +- isOpenDuring, domain : PhysicalPlace, range : OpeningHoursSpecification +- isAvailableDuring, domain : Vehicle, range : OpeningHoursSpecification +- basedAt, domain : Vehicle, range : PhysicalPlace +- transportedBy, domain : Stock, inverseOf : transports +- transports, domain : Shipment, inverseOf : transportedBy +- startsAt, domain : Shipment, range : PhysicalPlace +- endsAt, domain : Shipment, range : PhysicalPlace ### Deleted @@ -18,7 +43,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - quantity ### Changed -- Domain : hasQuantity, (DefinedProduct | Ingredient | OrderLine) -> (ConsumptionFlow | DefinedProduct | Ingredient | LocalizedProduct | OrderLine | PhysicalProduct | ProductionFlow | SaleSession | ShippingOption | Stock | Transaction) +- Domain : hasQuantity, (DefinedProduct | Ingredient | OrderLine) -> (ConsumptionFlow | DefinedProduct | Ingredient | LocalizedProduct | OrderLine | PhysicalProduct | ProductionFlow | SaleSession | ShippingOption | Stock | Transaction | Vehicle) +- Domain : beginDate, (AsPlannedLocalTransformation | AsRealizedTransformation | SaleSession | Shipping option) -> (AsPlannedLocalTransformation | AsRealizedTransformation | SaleSession | Shipment | Shipping option) +- Domain : endDate, (AsPlannedLocalTransformation | AsRealizedTransformation | SaleSession | Shipping option) -> (AsPlannedLocalTransformation | AsRealizedTransformation | SaleSession | Shipment | Shipping option) ## [1.14.0] - 2024-11-13 ### Added diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index 77d9b48..3556d84 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -241,6 +241,9 @@ + + + @@ -268,6 +271,9 @@ + + + @@ -289,6 +295,9 @@ + + + @@ -316,6 +325,9 @@ + + + @@ -373,6 +385,9 @@ + + + @@ -538,12 +553,18 @@ + + + + + + @@ -697,6 +718,9 @@ + + + @@ -727,6 +751,12 @@ + + + + + + @@ -772,6 +802,9 @@ + + + @@ -910,6 +943,12 @@ + + + + + + @@ -1309,6 +1348,12 @@ + + + + + + @@ -2359,6 +2404,10 @@ + + + + @@ -2528,6 +2577,10 @@ + + + + @@ -4305,6 +4358,10 @@ + + + + @@ -4381,6 +4438,10 @@ + + + + @@ -4605,6 +4666,10 @@ + + + + @@ -4613,6 +4678,10 @@ + + + + @@ -4817,6 +4886,10 @@ + + + + @@ -4857,6 +4930,14 @@ + + + + + + + + @@ -5113,6 +5194,10 @@ + + + + @@ -5153,6 +5238,10 @@ + + + + @@ -5275,6 +5364,10 @@ + + + + @@ -5465,6 +5558,7 @@ + @@ -5531,6 +5625,10 @@ + + + + @@ -5539,6 +5637,10 @@ + + + + @@ -5776,6 +5878,10 @@ + + + + @@ -5812,6 +5918,14 @@ + + + + + + + + @@ -5830,6 +5944,14 @@ + + + + + + + + @@ -5974,6 +6096,18 @@ + + + + + + + + + + + + @@ -6158,6 +6292,10 @@ + + + + @@ -6205,6 +6343,10 @@ + + + + @@ -6244,7 +6386,10 @@ - + + + + @@ -6323,7 +6468,10 @@ - + + + + @@ -6343,6 +6491,7 @@ + @@ -6376,6 +6525,14 @@ + + + + + + + + @@ -6424,6 +6581,10 @@ + + + + @@ -6600,6 +6761,14 @@ + + + + + + + + #Address @@ -7657,6 +7826,16 @@ The Brand of a Product. #availabilityTime délai de disponibilité + + + #baseAt + base at + + + + #baseAt + est basé à + #batchNumber @@ -8129,6 +8308,16 @@ Any claims of a Product. #endDate end date + + + #endsAt + ends at + + + + #endsAt + termine à + #enterpriseID @@ -9055,6 +9244,16 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #invoiceNumber numéro de facture + + + #isAvailableDuring + est disponible pendant + + + + #isAvailableDuring + is available during + #isFulfilledBy @@ -9075,6 +9274,16 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #isIngredientOf is ingredient of + + + #isOpenDuring + est ouvert pendant + + + + #isOpenDuring + is open during + #isPriceOf @@ -10094,6 +10303,16 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #startDate date de début + + + #startsAt + commence à + + + + #startsAt + starts at + #stockLimitation @@ -10264,6 +10483,16 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #transforms transforms + + + #transportedBy + est transporté par + + + + #transportedBy + transported by + #typeOf diff --git a/src/DFC_BusinessOntology.rdf b/src/DFC_BusinessOntology.rdf index 1930a79..427055f 100644 --- a/src/DFC_BusinessOntology.rdf +++ b/src/DFC_BusinessOntology.rdf @@ -136,6 +136,18 @@ + + + + + + + + + + + + + + + + + + base at + est basé à + + + + @@ -541,6 +565,18 @@ + + + + + + + ends at + termine à + + + + @@ -1219,6 +1255,7 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + @@ -1465,6 +1502,18 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + est disponible pendant + is available during + + + + @@ -1487,6 +1536,18 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + est ouvert pendant + is open during + + + + @@ -2158,6 +2219,18 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + commence à + starts at + + + + @@ -2276,6 +2349,27 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + est transporté par + transported by + + + + + + + + + + + + + @@ -2517,6 +2611,15 @@ Any claims of a Product. + + + + + + + + + @@ -2652,6 +2755,7 @@ Any claims of a Product. + @@ -2762,7 +2866,14 @@ Any claims of a Product. - + + + + + + + + Does the Product require keeping frozen frozen @@ -3020,7 +3131,14 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl - + + + + + + + + Does the Product require keeping refrigerated refrigerated @@ -3075,6 +3193,7 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl + @@ -3167,6 +3286,24 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4727,6 +4872,14 @@ The Brand of a Product. + + + + + + + + @@ -4800,6 +4953,12 @@ The Brand of a Product. + + + + + + + - + - base at + based at est basé à @@ -2755,13 +2755,13 @@ Any claims of a Product. - + From 7cfac2917889d06a725fd16b3dfe5b5fedf8016b Mon Sep 17 00:00:00 2001 From: RaggedStaff Date: Fri, 6 Dec 2024 14:40:53 +0000 Subject: [PATCH 6/8] GH - Added comments for new concepts. --- src/DFC_BusinessOntology.owl | 56 ++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index f1ad109..94bdc88 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -7931,6 +7931,11 @@ The Brand of a Product. #SaleSession Session de vente + + + #Shipment + A shipment of a Physical Product that is transported from one Physical Place to another. + #ShippingOption @@ -8096,6 +8101,11 @@ The Brand of a Product. #VATstatus soumis à TVA + + + #Vehicle + A vehicle used for the transportation of products. E.G. truck, train, bicycle. + #VirtualPlace @@ -8773,6 +8783,11 @@ Any claims of a Product. #endDate end date + + + #endsAt + The destination of the Shipment. + #endsAt @@ -8901,7 +8916,7 @@ Any claims of a Product. #frozen - Does the Product require keeping frozen + Defines if the parent class supports or requires refrigeration to a safe temperature to maintain frozen products. @@ -9709,6 +9724,11 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #invoiceNumber numéro de facture + + + #isAvailableDuring + Operating window of the Vehicle. + #isAvailableDuring @@ -9739,6 +9759,11 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #isIngredientOf is ingredient of + + + #isOpenDuring + Schedule during which the Physical Place is accessible, may indicate it is open to the public or just for business. + #isOpenDuring @@ -10566,7 +10591,7 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #refrigerated - Does the Product require keeping refrigerated + Defines if the parent class supports or requires refrigeration to a safe temperature to maintain refrigerated products (typically 0-5°C). @@ -10768,6 +10793,11 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #startDate date de début + + + #startsAt + The origin point of the Shipment. + #startsAt @@ -10948,6 +10978,11 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #transforms transforms + + + #transportedBy + The Shipment that transports Stock. + #transportedBy @@ -10958,6 +10993,21 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #transportedBy transported by + + + #transports + The Stock that is transported by a Shipment. + + + + #transports + transports + + + + #transports + transports + #typeOf @@ -12177,5 +12227,5 @@ The Address the delivery will be/was made to - + From a8f5d7daf23b15dd031994d67302d21d6822de9d Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Fri, 6 Dec 2024 16:34:49 +0100 Subject: [PATCH 7/8] add property between shipment and vehicle --- CHANGELOG.md | 2 + src/DFC_BusinessOntology.owl | 586 +++++++++++---------- src/DFC_BusinessOntology.rdf | 985 ++++++++++++++++++++++++++++++++++- 3 files changed, 1295 insertions(+), 278 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc55785..5e37fee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - transports, domain : Shipment, inverseOf : transportedBy - startsAt, domain : Shipment, range : PhysicalPlace - endsAt, domain : Shipment, range : PhysicalPlace +- ships, domain : Vehicle, inverseOf : isShippedIn +- isShippedIn, domain : Shipment, inverseOf : ships ### Deleted diff --git a/src/DFC_BusinessOntology.owl b/src/DFC_BusinessOntology.owl index 94bdc88..ea9d054 100644 --- a/src/DFC_BusinessOntology.owl +++ b/src/DFC_BusinessOntology.owl @@ -568,6 +568,9 @@ + + + @@ -712,6 +715,9 @@ + + + @@ -1013,814 +1019,814 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5154,6 +5160,10 @@ + + + + @@ -5346,6 +5356,10 @@ + + + + @@ -5586,6 +5600,10 @@ + + + + @@ -6113,6 +6131,10 @@ + + + + @@ -6338,6 +6360,10 @@ + + + + @@ -9789,6 +9815,16 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l #isPriceOf is price of + + + #isShippedIn + est transporté dans + + + + #isShippedIn + is shipped in + #isTemperatureOf @@ -10713,6 +10749,16 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl #sells vend + + + #ships + ships + + + + #ships + transporte + #sku @@ -12227,5 +12273,5 @@ The Address the delivery will be/was made to - + diff --git a/src/DFC_BusinessOntology.rdf b/src/DFC_BusinessOntology.rdf index 4d5d1c4..53b4e98 100644 --- a/src/DFC_BusinessOntology.rdf +++ b/src/DFC_BusinessOntology.rdf @@ -89,12 +89,24 @@ + + + + + + + + + + + + @@ -571,6 +583,7 @@ + The destination of the Shipment. ends at termine à @@ -1508,6 +1521,7 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + Operating window of the Vehicle. est disponible pendant is available during @@ -1542,6 +1556,7 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + Schedule during which the Physical Place is accessible, may indicate it is open to the public or just for business. est ouvert pendant is open during @@ -1560,6 +1575,18 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + + est transporté dans + is shipped in + + + + @@ -2196,6 +2223,17 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + + + + + + ships + transporte + + + + @@ -2225,6 +2263,7 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + The origin point of the Shipment. commence à starts at @@ -2355,6 +2394,7 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + The Shipment that transports Stock. est transporté par transported by @@ -2366,6 +2406,9 @@ N.B. This is similar (simplified) functionality to the AsPlannedTransformation l + The Stock that is transported by a Shipment. + transports + transports @@ -2875,7 +2918,7 @@ Any claims of a Product. - Does the Product require keeping frozen + Defines if the parent class supports or requires refrigeration to a safe temperature to maintain frozen products. frozen gelé @@ -3140,7 +3183,7 @@ N.B. There is an expectation that either the ProductionFlow or the ConsumptionFl - Does the Product require keeping refrigerated + Defines if the parent class supports or requires refrigeration to a safe temperature to maintain refrigerated products (typically 0-5°C). refrigerated refrigéré @@ -4656,6 +4699,7 @@ The Brand of a Product. + A shipment of a Physical Product that is transported from one Physical Place to another. @@ -4876,6 +4920,7 @@ The Brand of a Product. + A vehicle used for the transportation of products. E.G. truck, train, bicycle. @@ -5142,39 +5187,963 @@ The Brand of a Product. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0e1140ddd7eddd3b219ff059e050768faa677e0c Mon Sep 17 00:00:00 2001 From: Baptiste Darnala Date: Thu, 12 Dec 2024 17:20:48 +0100 Subject: [PATCH 8/8] generate context for 1.15.0 --- CHANGELOG.md | 3 +- context/context_1.15.0.json | 489 ++++++++++++++++++++++++++++++++++++ 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 context/context_1.15.0.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e37fee..5001295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -403,7 +403,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Brand as a Facet. -[unreleased]: https://github.com/datafoodconsortium/ontology/compare/v1.14.0...master +[unreleased]: https://github.com/datafoodconsortium/ontology/compare/v1.15.0...master +[1.15.0]: https://github.com/datafoodconsortium/ontology/compare/v1.14.0...1.15.0 [1.14.0]: https://github.com/datafoodconsortium/ontology/compare/v1.13.0...1.14.0 [1.13.0]: https://github.com/datafoodconsortium/ontology/compare/v1.12.1...1.13.0 [1.12.1]: https://github.com/datafoodconsortium/ontology/compare/v1.12.0...v1.12.1 diff --git a/context/context_1.15.0.json b/context/context_1.15.0.json new file mode 100644 index 0000000..3de0862 --- /dev/null +++ b/context/context_1.15.0.json @@ -0,0 +1,489 @@ +{ + "@context": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#", + "dfc-b:DFC_BusinessOntology_ObjectProperty": { + "@type": "@id" + }, + "dfc-b:DFC_Interface_Property": { + "@type": "@id" + }, + "dfc-b:addressOf": { + "@type": "@id" + }, + "dfc-b:affiliatedTo": { + "@type": "@id" + }, + "dfc-b:affiliates": { + "@type": "@id" + }, + "dfc-b:allergenCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:basedAt": { + "@type": "@id" + }, + "dfc-b:belongsTo": { + "@type": "@id" + }, + "dfc-b:brandOf": { + "@type": "@id" + }, + "dfc-b:certificateOf": { + "@type": "@id" + }, + "dfc-b:characteristicOf": { + "@type": "@id" + }, + "dfc-b:claimOf": { + "@type": "@id" + }, + "dfc-b:composedOf": { + "@type": "@id" + }, + "dfc-b:composes": { + "@type": "@id" + }, + "dfc-b:concernedBy": { + "@type": "@id" + }, + "dfc-b:concerns": { + "@type": "@id" + }, + "dfc-b:constituedBy": { + "@type": "@id" + }, + "dfc-b:constitutes": { + "@type": "@id" + }, + "dfc-b:consumedBy": { + "@type": "@id" + }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:containerInformationOf": { + "@type": "@id" + }, + "dfc-b:coordinatedBy": { + "@type": "@id" + }, + "dfc-b:coordinates": { + "@type": "@id" + }, + "dfc-b:definedBy": { + "@type": "@id" + }, + "dfc-b:defines": { + "@type": "@id" + }, + "dfc-b:deliveredAt": { + "@type": "@id" + }, + "dfc-b:endsAt": { + "@type": "@id" + }, + "dfc-b:facetOf": { + "@type": "@id" + }, + "dfc-b:from": { + "@type": "@id" + }, + "dfc-b:fulfills": { + "@type": "@id" + }, + "dfc-b:geographicalOriginOf": { + "@type": "@id" + }, + "dfc-b:hasAddress": { + "@type": "@id" + }, + "dfc-b:hasAllergenCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasAllergenDimension": { + "@type": "@id" + }, + "dfc-b:hasBrand": { + "@type": "@id" + }, + "dfc-b:hasCertification": { + "@type": "@id" + }, + "dfc-b:hasCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasClaim": { + "@type": "@id" + }, + "dfc-b:hasContainerInformation": { + "@type": "@id" + }, + "dfc-b:hasDimension": { + "@type": "@id" + }, + "dfc-b:hasFacet": { + "@type": "@id" + }, + "dfc-b:hasFulfilmentStatus": { + "@type": "@id" + }, + "dfc-b:hasGeographicalOrigin": { + "@type": "@id" + }, + "dfc-b:hasIngredient": { + "@type": "@id" + }, + "dfc-b:hasInput": { + "@type": "@id" + }, + "dfc-b:hasLabellingCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasLabellingDimension": { + "@type": "@id" + }, + "dfc-b:hasMainContact": { + "@type": "@id" + }, + "dfc-b:hasNatureOrigin": { + "@type": "@id" + }, + "dfc-b:hasNutrientCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasNutrientDimension": { + "@type": "@id" + }, + "dfc-b:hasObject": { + "@type": "@id" + }, + "dfc-b:hasOffer": { + "@type": "@id" + }, + "dfc-b:hasOption": { + "@type": "@id" + }, + "dfc-b:hasOrderStatus": { + "@type": "@id" + }, + "dfc-b:hasOutput": { + "@type": "@id" + }, + "dfc-b:hasPart": { + "@type": "@id" + }, + "dfc-b:hasPartOrigin": { + "@type": "@id" + }, + "dfc-b:hasPaymentMethod": { + "@type": "@id" + }, + "dfc-b:hasPaymentStatus": { + "@type": "@id" + }, + "dfc-b:hasPhoneNumber": { + "@type": "@id" + }, + "dfc-b:hasPhysicalCharacteristic": { + "@type": "@id" + }, + "dfc-b:hasPhysicalDimension": { + "@type": "@id" + }, + "dfc-b:hasPrice": { + "@type": "@id" + }, + "dfc-b:hasProcess": { + "@type": "@id" + }, + "dfc-b:hasQuantity": { + "@type": "@id" + }, + "dfc-b:hasReference": { + "@type": "@id" + }, + "dfc-b:hasSocialMedia": { + "@type": "@id" + }, + "dfc-b:hasStatus": { + "@type": "@id" + }, + "dfc-b:hasTemperature": { + "@type": "@id" + }, + "dfc-b:hasTransformationType": { + "@type": "@id" + }, + "dfc-b:hasType": { + "@type": "@id" + }, + "dfc-b:hasUnit": { + "@type": "@id" + }, + "dfc-b:hasVariant": { + "@type": "@id" + }, + "dfc-b:holds": { + "@type": "@id" + }, + "dfc-b:hostedAt": { + "@type": "@id" + }, + "dfc-b:hosts": { + "@type": "@id" + }, + "dfc-b:identifiedBy": { + "@type": "@id" + }, + "dfc-b:identifies": { + "@type": "@id" + }, + "dfc-b:industrializedBy": { + "@type": "@id" + }, + "dfc-b:industrializes": { + "@type": "@id" + }, + "dfc-b:inputOf": { + "@type": "@id" + }, + "dfc-b:isAvailableDuring": { + "@type": "@id" + }, + "dfc-b:isFulfilledBy": { + "@type": "@id" + }, + "dfc-b:isIngredientOf": { + "@type": "@id" + }, + "dfc-b:isOpenDuring": { + "@type": "@id" + }, + "dfc-b:isPriceOf": { + "@type": "@id" + }, + "dfc-b:isShippedIn": { + "@type": "@id" + }, + "dfc-b:isTemperatureOf": { + "@type": "@id" + }, + "dfc-b:isVariantOf": { + "@type": "@id" + }, + "dfc-b:labellingCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:listedIn": { + "@type": "@id" + }, + "dfc-b:lists": { + "@type": "@id" + }, + "dfc-b:localizedBy": { + "@type": "@id" + }, + "dfc-b:localizes": { + "@type": "@id" + }, + "dfc-b:mainContactOf": { + "@type": "@id" + }, + "dfc-b:maintainedBy": { + "@type": "@id" + }, + "dfc-b:maintains": { + "@type": "@id" + }, + "dfc-b:managedBy": { + "@type": "@id" + }, + "dfc-b:manages": { + "@type": "@id" + }, + "dfc-b:natureOriginOf": { + "@type": "@id" + }, + "dfc-b:nutrientCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:objectOf": { + "@type": "@id" + }, + "dfc-b:offeredThrough": { + "@type": "@id" + }, + "dfc-b:offers": { + "@type": "@id" + }, + "dfc-b:offersTo": { + "@type": "@id" + }, + "dfc-b:optionOf": { + "@type": "@id" + }, + "dfc-b:orderedBy": { + "@type": "@id" + }, + "dfc-b:orders": { + "@type": "@id" + }, + "dfc-b:outputOf": { + "@type": "@id" + }, + "dfc-b:ownedBy": { + "@type": "@id" + }, + "dfc-b:owns": { + "@type": "@id" + }, + "dfc-b:paidWith": { + "@type": "@id" + }, + "dfc-b:partOf": { + "@type": "@id" + }, + "dfc-b:partOriginOf": { + "@type": "@id" + }, + "dfc-b:phoneNumberOf": { + "@type": "@id" + }, + "dfc-b:physicalCharacteristicOf": { + "@type": "@id" + }, + "dfc-b:pickedUpAt": { + "@type": "@id" + }, + "dfc-b:processOf": { + "@type": "@id" + }, + "dfc-b:producedBy": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:proposedBy": { + "@type": "@id" + }, + "dfc-b:proposes": { + "@type": "@id" + }, + "dfc-b:referenceOf": { + "@type": "@id" + }, + "dfc-b:referencedBy": { + "@type": "@id" + }, + "dfc-b:references": { + "@type": "@id" + }, + "dfc-b:refersTo": { + "@type": "@id" + }, + "dfc-b:representedBy": { + "@type": "@id" + }, + "dfc-b:represents": { + "@type": "@id" + }, + "dfc-b:requestedBy": { + "@type": "@id" + }, + "dfc-b:requests": { + "@type": "@id" + }, + "dfc-b:satisfiedBy": { + "@type": "@id" + }, + "dfc-b:satisfies": { + "@type": "@id" + }, + "dfc-b:selectedBy": { + "@type": "@id" + }, + "dfc-b:selects": { + "@type": "@id" + }, + "dfc-b:sells": { + "@type": "@id" + }, + "dfc-b:ships": { + "@type": "@id" + }, + "dfc-b:socialMediaOf": { + "@type": "@id" + }, + "dfc-b:soldBy": { + "@type": "@id" + }, + "dfc-b:startsAt": { + "@type": "@id" + }, + "dfc-b:storedIn": { + "@type": "@id" + }, + "dfc-b:stores": { + "@type": "@id" + }, + "dfc-b:suppliedBy": { + "@type": "@id" + }, + "dfc-b:supplies": { + "@type": "@id" + }, + "dfc-b:suppliesTo": { + "@type": "@id" + }, + "dfc-b:to": { + "@type": "@id" + }, + "dfc-b:tracedBy": { + "@type": "@id" + }, + "dfc-b:traces": { + "@type": "@id" + }, + "dfc-b:transformedBy": { + "@type": "@id" + }, + "dfc-b:transforms": { + "@type": "@id" + }, + "dfc-b:transportedBy": { + "@type": "@id" + }, + "dfc-b:transports": { + "@type": "@id" + }, + "dfc-b:typeOf": { + "@type": "@id" + }, + "dfc-b:uses": { + "@type": "@id" + }, + "dfc-t:represent": { + "@type": "@id" + }, + "dfc-t:hasPivot": { + "@type": "@id" + }, + "dfc-t:hostedBy": { + "@type": "@id" + }, + "dfc-t:owner": { + "@type": "@id" + } + } +} \ No newline at end of file