Skip to content

Commit

Permalink
Release alpha.8
Browse files Browse the repository at this point in the history
Fixed:
- The dfc-b prefix points to the business ontology, not the full model.
  • Loading branch information
lecoqlibre committed Jul 11, 2023
1 parent f9d574e commit c50cc84
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 64 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion connector.gemspec
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
10 changes: 5 additions & 5 deletions lib/datafoodconsortium/connector/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions lib/datafoodconsortium/connector/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions lib/datafoodconsortium/connector/allergen_characteristic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
10 changes: 5 additions & 5 deletions lib/datafoodconsortium/connector/catalog_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion lib/datafoodconsortium/connector/connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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#",
Expand Down
4 changes: 2 additions & 2 deletions lib/datafoodconsortium/connector/customer_category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
34 changes: 17 additions & 17 deletions lib/datafoodconsortium/connector/defined_product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
14 changes: 7 additions & 7 deletions lib/datafoodconsortium/connector/enterprise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions lib/datafoodconsortium/connector/nutrient_characteristic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
10 changes: 5 additions & 5 deletions lib/datafoodconsortium/connector/offer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
8 changes: 4 additions & 4 deletions lib/datafoodconsortium/connector/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading

0 comments on commit c50cc84

Please sign in to comment.