diff --git a/CHANGELOG.md b/CHANGELOG.md index 226a4df..828f3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 None. +## [1.0.0-alpha.8] - 2023-07-11 + +### Fixed + +- The `dfc-b` prefix points to the business ontology, not the full model. + + ## [1.0.0-alpha.7] - 2023-07-10 ### Changed @@ -72,6 +79,7 @@ None. - Initial version of this library. [unreleased]: https://github.com/datafoodconsortium/connector-ruby/compare/v1.0.0...HEAD +[1.0.0-alpha.8]: https://github.com/datafoodconsortium/connector-ruby/compare/v1.0.0-alpha.7...v1.0.0-alpha.8 [1.0.0-alpha.7]: https://github.com/datafoodconsortium/connector-ruby/compare/v1.0.0-alpha.6...v1.0.0-alpha.7 [1.0.0-alpha.6]: https://github.com/datafoodconsortium/connector-ruby/compare/v1.0.0-alpha.5...v1.0.0-alpha.6 [1.0.0-alpha.5]: https://github.com/datafoodconsortium/connector-ruby/compare/v1.0.0-alpha.4...v1.0.0-alpha.5 diff --git a/connector.gemspec b/connector.gemspec index d6138b4..2177814 100644 --- a/connector.gemspec +++ b/connector.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "datafoodconsortium-connector" - s.version = "1.0.0-alpha.7" + s.version = "1.0.0-alpha.8" s.summary = "Data Food Consortium connector" s.description = "A library to easily integrate the DFC standard within your application." s.authors = ["Maxime Lecoq"] diff --git a/lib/datafoodconsortium/connector/address.rb b/lib/datafoodconsortium/connector/address.rb index 81c9a14..f8dbaab 100644 --- a/lib/datafoodconsortium/connector/address.rb +++ b/lib/datafoodconsortium/connector/address.rb @@ -50,11 +50,11 @@ def initialize(semanticId, street: "", postalCode: "", city: "", country: "") @postalCode = postalCode @city = city @country = country - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Address" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasStreet") { self.street } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPostalCode") { self.postalCode } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCity") { self.city } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCountry") { self.country } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Address" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasStreet") { self.street } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPostalCode") { self.postalCode } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCity") { self.city } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCountry") { self.country } end diff --git a/lib/datafoodconsortium/connector/agent.rb b/lib/datafoodconsortium/connector/agent.rb index 18d7e3d..2f09657 100644 --- a/lib/datafoodconsortium/connector/agent.rb +++ b/lib/datafoodconsortium/connector/agent.rb @@ -42,8 +42,8 @@ def initialize(semanticId, contacts: [], localizations: []) super(semanticId) @contacts = contacts @localizations = localizations - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Agent" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAddress") { self.localizations } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Agent" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAddress") { self.localizations } end diff --git a/lib/datafoodconsortium/connector/allergen_characteristic.rb b/lib/datafoodconsortium/connector/allergen_characteristic.rb index ab9be5f..dfe6ad3 100644 --- a/lib/datafoodconsortium/connector/allergen_characteristic.rb +++ b/lib/datafoodconsortium/connector/allergen_characteristic.rb @@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::AllergenCharacteristic < DataFoodConsortium def initialize(allergenDimension: nil, unit: nil, value: 0.0) super(unit: unit, value: value) @allergenDimension = allergenDimension - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#AllergenCharacteristic" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAllergenDimension") { self.allergenDimension } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#AllergenCharacteristic" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenDimension") { self.allergenDimension } end diff --git a/lib/datafoodconsortium/connector/catalog_item.rb b/lib/datafoodconsortium/connector/catalog_item.rb index 46e70c1..2ec2759 100644 --- a/lib/datafoodconsortium/connector/catalog_item.rb +++ b/lib/datafoodconsortium/connector/catalog_item.rb @@ -52,11 +52,11 @@ def initialize(semanticId, product: nil, sku: "", stockLimitation: 0.0, offers: @sku = sku @stockLimitation = stockLimitation @offers = offers - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#CatalogItem" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#references") { self.product } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#sku") { self.sku } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#stockLimitation") { self.stockLimitation } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredThrough") { self.offers } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CatalogItem" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#references") { self.product } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#sku") { self.sku } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredThrough") { self.offers } end diff --git a/lib/datafoodconsortium/connector/connector.rb b/lib/datafoodconsortium/connector/connector.rb index b218c0d..c6e18d7 100644 --- a/lib/datafoodconsortium/connector/connector.rb +++ b/lib/datafoodconsortium/connector/connector.rb @@ -58,7 +58,7 @@ def initialize() # so the DFC's context can be used. # See https://github.com/datafoodconsortium/connector-ruby/issues/11. inputContext = { - "dfc-b" => "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dfc-b" => "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", #"dfc-p" => "http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#", #"dfc-t" => "http://static.datafoodconsortium.org/ontologies/DFC_TechnicalOntology.owl#", "dfc-m" => "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", diff --git a/lib/datafoodconsortium/connector/customer_category.rb b/lib/datafoodconsortium/connector/customer_category.rb index 69a5705..6825203 100644 --- a/lib/datafoodconsortium/connector/customer_category.rb +++ b/lib/datafoodconsortium/connector/customer_category.rb @@ -35,8 +35,8 @@ class DataFoodConsortium::Connector::CustomerCategory def initialize(semanticId, description: "") super(semanticId) @description = description - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#CustomerCategory" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#description") { self.description } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CustomerCategory" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description") { self.description } end diff --git a/lib/datafoodconsortium/connector/defined_product.rb b/lib/datafoodconsortium/connector/defined_product.rb index c9c73cc..da38270 100644 --- a/lib/datafoodconsortium/connector/defined_product.rb +++ b/lib/datafoodconsortium/connector/defined_product.rb @@ -121,23 +121,23 @@ def initialize(semanticId, name: "", description: "", productType: nil, quantity @certifications = certifications @natureOrigin = natureOrigin @partOrigin = partOrigin - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#DefinedProduct" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#name") { self.name } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#description") { self.description } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasType") { self.productType } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasQuantity") { self.quantity } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#alcoholPercentage") { self.alcoholPercentage } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#lifetime") { self.lifetime } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasClaim") { self.claims } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#usageOrStorageCondition") { self.usageOrStorageConditions } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAllergenCharacteristic") { self.allergenCharacteristics } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNutrientCharacteristic") { self.nutrientCharacteristics } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPhysicalCharacteristic") { self.physicalCharacteristics } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasGeographicalOrigin") { self.geographicalOrigin } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#referencedBy") { self.catalogItems } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCertification") { self.certifications } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNatureOrigin") { self.natureOrigin } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPartOrigin") { self.partOrigin } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#DefinedProduct" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#name") { self.name } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description") { self.description } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasType") { self.productType } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasQuantity") { self.quantity } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#alcoholPercentage") { self.alcoholPercentage } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lifetime") { self.lifetime } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasClaim") { self.claims } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#usageOrStorageCondition") { self.usageOrStorageConditions } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenCharacteristic") { self.allergenCharacteristics } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientCharacteristic") { self.nutrientCharacteristics } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalCharacteristic") { self.physicalCharacteristics } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasGeographicalOrigin") { self.geographicalOrigin } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#referencedBy") { self.catalogItems } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCertification") { self.certifications } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNatureOrigin") { self.natureOrigin } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPartOrigin") { self.partOrigin } end diff --git a/lib/datafoodconsortium/connector/enterprise.rb b/lib/datafoodconsortium/connector/enterprise.rb index d2595c2..9690a03 100644 --- a/lib/datafoodconsortium/connector/enterprise.rb +++ b/lib/datafoodconsortium/connector/enterprise.rb @@ -68,13 +68,13 @@ def initialize(semanticId, name: "", description: "", vatNumber: "", customerCat @customerCategories = customerCategories @suppliedProducts = suppliedProducts @catalogItems = catalogItems - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Enterprise" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasName") { self.name } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasDescription") { self.description } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#VATnumber") { self.vatNumber } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#defines") { self.customerCategories } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#supplies") { self.suppliedProducts } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#manages") { self.catalogItems } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Enterprise" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasName") { self.name } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasDescription") { self.description } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATnumber") { self.vatNumber } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#defines") { self.customerCategories } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#supplies") { self.suppliedProducts } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#manages") { self.catalogItems } end diff --git a/lib/datafoodconsortium/connector/nutrient_characteristic.rb b/lib/datafoodconsortium/connector/nutrient_characteristic.rb index 496f1c8..f620784 100644 --- a/lib/datafoodconsortium/connector/nutrient_characteristic.rb +++ b/lib/datafoodconsortium/connector/nutrient_characteristic.rb @@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::NutrientCharacteristic < DataFoodConsortium def initialize(nutrientDimension: nil, unit: nil, value: 0.0) super(unit: unit, value: value) @nutrientDimension = nutrientDimension - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#NutrientCharacteristic" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNutrientDimension") { self.nutrientDimension } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#NutrientCharacteristic" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientDimension") { self.nutrientDimension } end diff --git a/lib/datafoodconsortium/connector/offer.rb b/lib/datafoodconsortium/connector/offer.rb index 8ffc47a..f24e3ac 100644 --- a/lib/datafoodconsortium/connector/offer.rb +++ b/lib/datafoodconsortium/connector/offer.rb @@ -52,11 +52,11 @@ def initialize(semanticId, price: nil, stockLimitation: 0.0, offeredItem: nil, o @stockLimitation = stockLimitation @offeredItem = offeredItem @offeredTo = offeredTo - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Offer" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#price") { self.price } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#stockLimitation") { self.stockLimitation } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredItem") { self.offeredItem } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredTo") { self.offeredTo } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Offer" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#price") { self.price } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredItem") { self.offeredItem } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredTo") { self.offeredTo } end diff --git a/lib/datafoodconsortium/connector/person.rb b/lib/datafoodconsortium/connector/person.rb index ac3ffc5..53f1fc6 100644 --- a/lib/datafoodconsortium/connector/person.rb +++ b/lib/datafoodconsortium/connector/person.rb @@ -49,10 +49,10 @@ def initialize(semanticId, firstName: "", lastName: "", affiliatedOrganizations: @firstName = firstName @lastName = lastName @affiliatedOrganizations = affiliatedOrganizations - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Person" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#firstName") { self.firstName } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#familyName") { self.lastName } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#affiliates") { self.affiliatedOrganizations } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Person" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#firstName") { self.firstName } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#familyName") { self.lastName } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#affiliates") { self.affiliatedOrganizations } end diff --git a/lib/datafoodconsortium/connector/physical_characteristic.rb b/lib/datafoodconsortium/connector/physical_characteristic.rb index d220623..015a6b6 100644 --- a/lib/datafoodconsortium/connector/physical_characteristic.rb +++ b/lib/datafoodconsortium/connector/physical_characteristic.rb @@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::PhysicalCharacteristic < DataFoodConsortium def initialize(physicalDimension: nil, unit: nil, value: 0.0) super(unit: unit, value: value) @physicalDimension = physicalDimension - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#PhysicalCharacteristic" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPhysicalDimension") { self.physicalDimension } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#PhysicalCharacteristic" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalDimension") { self.physicalDimension } end diff --git a/lib/datafoodconsortium/connector/price.rb b/lib/datafoodconsortium/connector/price.rb index 288c496..a423530 100644 --- a/lib/datafoodconsortium/connector/price.rb +++ b/lib/datafoodconsortium/connector/price.rb @@ -44,10 +44,10 @@ def initialize(value: 0.0, vatRate: 0.0, unit: nil) @value = value @vatRate = vatRate @unit = unit - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Price" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#value") { self.value } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#VATrate") { self.vatRate } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasUnit") { self.unit } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Price" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value") { self.value } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATrate") { self.vatRate } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit") { self.unit } end diff --git a/lib/datafoodconsortium/connector/quantitative_value.rb b/lib/datafoodconsortium/connector/quantitative_value.rb index 2d78b98..1eeefed 100644 --- a/lib/datafoodconsortium/connector/quantitative_value.rb +++ b/lib/datafoodconsortium/connector/quantitative_value.rb @@ -40,9 +40,9 @@ def initialize(unit: nil, value: 0.0) super() @unit = unit @value = value - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#QuantitativeValue" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasUnit") { self.unit } - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#value") { self.value } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#QuantitativeValue" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit") { self.unit } + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value") { self.value } end diff --git a/lib/datafoodconsortium/connector/supplied_product.rb b/lib/datafoodconsortium/connector/supplied_product.rb index 1a228d9..7177bc3 100644 --- a/lib/datafoodconsortium/connector/supplied_product.rb +++ b/lib/datafoodconsortium/connector/supplied_product.rb @@ -51,8 +51,8 @@ class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Conne def initialize(semanticId, totalTheoreticalStock: 0.0, name: "", description: "", productType: nil, quantity: nil, alcoholPercentage: 0.0, lifetime: "", claims: [], usageOrStorageConditions: "", allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: []) super(semanticId, name: name, description: description, productType: productType, quantity: quantity, alcoholPercentage: alcoholPercentage, lifetime: lifetime, claims: claims, usageOrStorageConditions: usageOrStorageConditions, allergenCharacteristics: allergenCharacteristics, nutrientCharacteristics: nutrientCharacteristics, physicalCharacteristics: physicalCharacteristics, geographicalOrigin: geographicalOrigin, catalogItems: catalogItems, certifications: certifications, natureOrigin: natureOrigin, partOrigin: partOrigin) @totalTheoreticalStock = totalTheoreticalStock - self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#SuppliedProduct" - registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#totalTheoreticalStock") { self.totalTheoreticalStock } + self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#SuppliedProduct" + registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#totalTheoreticalStock") { self.totalTheoreticalStock } end