datafoodconsortium-connector 1.0.0.pre.alpha.5 → 1.0.0.pre.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '038c834a93288301c728b90f0295f52c59a8a96e164a03d965a90f2d7d4abafc'
4
- data.tar.gz: 2f1089809c6fb52f182f001fe0e80e648bb2f2d740e3d069925fa24e010d2910
3
+ metadata.gz: d8da1d0539a2c9b14d004cb6e63564fb1584bc39f6b298a6bc72f1ab0cd3cdc8
4
+ data.tar.gz: 293096a97a34240a1d3b21d4bbbb08eafb434561146068324333633cd1960fe1
5
5
  SHA512:
6
- metadata.gz: cbd1850d8b3757a44dbf2fd6b4a5af9fd4f5bc8484f125d2d87bff486bbd1e2710db6836220bd425a57a6685d71071169842b04900cf9b5f551e813c42a4f608
7
- data.tar.gz: 75f945233471dc052ba5f86ffc1bf51e374fc3534e595ec7a7bb6c3957520689f15566779255a7c08526ec993229335bca9d53d7aad2c57a70e6347af343ae6a
6
+ metadata.gz: b5a3aa4ff46f66417ac44fc7fa784045f6fbfc3203ee5b9d5716665e21f44c6112aa427595dfcbdda19d40950d53191d79de2acd469806f6d0a00c205467fe7e
7
+ data.tar.gz: '0383886b89522f274962111a3d6c9ea05a909b7132a540bec8f65fa774006f7f5baee904c160a6ce2ca3df516a199dc4337608928e4a3b395fd0524d125fa877'
@@ -50,11 +50,11 @@ class DataFoodConsortium::Connector::Address
50
50
  @postalCode = postalCode
51
51
  @city = city
52
52
  @country = country
53
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Address"
54
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasStreet") { self.street }
55
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPostalCode") { self.postalCode }
56
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCity") { self.city }
57
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCountry") { self.country }
53
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Address"
54
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasStreet") { self.street }
55
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPostalCode") { self.postalCode }
56
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCity") { self.city }
57
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCountry") { self.country }
58
58
  end
59
59
 
60
60
 
@@ -42,8 +42,8 @@ class DataFoodConsortium::Connector::Agent
42
42
  super(semanticId)
43
43
  @contacts = contacts
44
44
  @localizations = localizations
45
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Agent"
46
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasAddress") { self.localizations }
45
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Agent"
46
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAddress") { self.localizations }
47
47
  end
48
48
 
49
49
 
@@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::AllergenCharacteristic < DataFoodConsortium
39
39
  def initialize(allergenDimension: nil, unit: nil, value: 0.0)
40
40
  super(unit: unit, value: value)
41
41
  @allergenDimension = allergenDimension
42
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#AllergenCharacteristic"
43
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasAllergenDimension") { self.allergenDimension }
42
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#AllergenCharacteristic"
43
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAllergenDimension") { self.allergenDimension }
44
44
  end
45
45
 
46
46
 
@@ -52,11 +52,11 @@ class DataFoodConsortium::Connector::CatalogItem
52
52
  @sku = sku
53
53
  @stockLimitation = stockLimitation
54
54
  @offers = offers
55
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#CatalogItem"
56
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#references") { self.product }
57
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#sku") { self.sku }
58
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation }
59
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredThrough") { self.offers }
55
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#CatalogItem"
56
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#references") { self.product }
57
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#sku") { self.sku }
58
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#stockLimitation") { self.stockLimitation }
59
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredThrough") { self.offers }
60
60
  end
61
61
 
62
62
 
@@ -54,8 +54,21 @@ class DataFoodConsortium::Connector::Connector
54
54
  def initialize()
55
55
  super()
56
56
 
57
- @context = "http://static.datafoodconsortium.org/ontologies/context.json"
58
- @exporter = DataFoodConsortium::Connector::JsonLdSerializer.new(@context)
57
+ # used to prefix properties
58
+ # so the DFC's context can be used.
59
+ # See https://github.com/datafoodconsortium/connector-ruby/issues/11.
60
+ inputContext = {
61
+ "dfc-b" => "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#",
62
+ #"dfc-p" => "http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#",
63
+ #"dfc-t" => "http://static.datafoodconsortium.org/ontologies/DFC_TechnicalOntology.owl#",
64
+ "dfc-m" => "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#",
65
+ "dfc-pt" => "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#",
66
+ "dfc-f" => "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#"
67
+ }
68
+
69
+ @context = "https://www.datafoodconsortium.org"
70
+
71
+ @exporter = DataFoodConsortium::Connector::JsonLdSerializer.new(@context, inputContext)
59
72
  @parser = DataFoodConsortium::Connector::SKOSParser.new
60
73
 
61
74
  @FACETS = []
@@ -35,8 +35,8 @@ class DataFoodConsortium::Connector::CustomerCategory
35
35
  def initialize(semanticId, description: "")
36
36
  super(semanticId)
37
37
  @description = description
38
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#CustomerCategory"
39
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#description") { self.description }
38
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#CustomerCategory"
39
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#description") { self.description }
40
40
  end
41
41
 
42
42
 
@@ -121,23 +121,23 @@ class DataFoodConsortium::Connector::DefinedProduct
121
121
  @certifications = certifications
122
122
  @natureOrigin = natureOrigin
123
123
  @partOrigin = partOrigin
124
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#DefinedProduct"
125
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#name") { self.name }
126
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#description") { self.description }
127
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasType") { self.productType }
128
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasQuantity") { self.quantity }
129
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#alcoholPercentage") { self.alcoholPercentage }
130
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#lifetime") { self.lifetime }
131
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasClaim") { self.claims }
132
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#usageOrStorageCondition") { self.usageOrStorageConditions }
133
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasAllergenCharacteristic") { self.allergenCharacteristics }
134
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasNutrientCharacteristic") { self.nutrientCharacteristics }
135
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPhysicalCharacteristic") { self.physicalCharacteristics }
136
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasGeographicalOrigin") { self.geographicalOrigin }
137
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#referencedBy") { self.catalogItems }
138
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCertification") { self.certifications }
139
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasNatureOrigin") { self.natureOrigin }
140
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPartOrigin") { self.partOrigin }
124
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#DefinedProduct"
125
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#name") { self.name }
126
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#description") { self.description }
127
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasType") { self.productType }
128
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasQuantity") { self.quantity }
129
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#alcoholPercentage") { self.alcoholPercentage }
130
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#lifetime") { self.lifetime }
131
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasClaim") { self.claims }
132
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#usageOrStorageCondition") { self.usageOrStorageConditions }
133
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasAllergenCharacteristic") { self.allergenCharacteristics }
134
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNutrientCharacteristic") { self.nutrientCharacteristics }
135
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPhysicalCharacteristic") { self.physicalCharacteristics }
136
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasGeographicalOrigin") { self.geographicalOrigin }
137
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#referencedBy") { self.catalogItems }
138
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCertification") { self.certifications }
139
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNatureOrigin") { self.natureOrigin }
140
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPartOrigin") { self.partOrigin }
141
141
  end
142
142
 
143
143
 
@@ -68,13 +68,13 @@ class DataFoodConsortium::Connector::Enterprise < DataFoodConsortium::Connector:
68
68
  @customerCategories = customerCategories
69
69
  @suppliedProducts = suppliedProducts
70
70
  @catalogItems = catalogItems
71
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Enterprise"
72
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasName") { self.name }
73
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasDescription") { self.description }
74
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#VATnumber") { self.vatNumber }
75
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#defines") { self.customerCategories }
76
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#supplies") { self.suppliedProducts }
77
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#manages") { self.catalogItems }
71
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Enterprise"
72
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasName") { self.name }
73
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasDescription") { self.description }
74
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#VATnumber") { self.vatNumber }
75
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#defines") { self.customerCategories }
76
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#supplies") { self.suppliedProducts }
77
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#manages") { self.catalogItems }
78
78
  end
79
79
 
80
80
 
@@ -25,9 +25,9 @@ require 'json/ld'
25
25
 
26
26
  class DataFoodConsortium::Connector::JsonLdSerializer
27
27
 
28
- def initialize(context = nil)
29
- @context = context
30
- @hashSerializer = VirtualAssembly::Semantizer::HashSerializer.new
28
+ def initialize(outputContext = nil, inputContext = nil)
29
+ @outputContext = outputContext
30
+ @hashSerializer = VirtualAssembly::Semantizer::HashSerializer.new(inputContext)
31
31
  end
32
32
 
33
33
  def process(subject, *subjects)
@@ -39,11 +39,16 @@ class DataFoodConsortium::Connector::JsonLdSerializer
39
39
 
40
40
  inputs = []
41
41
 
42
+ # Insert an input context on each subject so the properties could be prefixed. This way,
43
+ # the DFC's context can be used.
44
+ # See https://github.com/datafoodconsortium/connector-ruby/issues/11.
42
45
  subjects.each do |subject|
43
- inputs.push(subject.serialize(@hashSerializer))
46
+ input = { "@context" => "https://www.datafoodconsortium.org" }
47
+ input.merge!(subject.serialize(@hashSerializer))
48
+ inputs.push(input)
44
49
  end
45
-
46
- jsonLd = JSON::LD::API.compact(inputs, @context)
50
+
51
+ jsonLd = JSON::LD::API.compact(inputs, @outputContext)
47
52
 
48
53
  return JSON.generate(jsonLd)
49
54
  end
@@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::NutrientCharacteristic < DataFoodConsortium
39
39
  def initialize(nutrientDimension: nil, unit: nil, value: 0.0)
40
40
  super(unit: unit, value: value)
41
41
  @nutrientDimension = nutrientDimension
42
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#NutrientCharacteristic"
43
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasNutrientDimension") { self.nutrientDimension }
42
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#NutrientCharacteristic"
43
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasNutrientDimension") { self.nutrientDimension }
44
44
  end
45
45
 
46
46
 
@@ -52,11 +52,11 @@ class DataFoodConsortium::Connector::Offer
52
52
  @stockLimitation = stockLimitation
53
53
  @offeredItem = offeredItem
54
54
  @offeredTo = offeredTo
55
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Offer"
56
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#price") { self.price }
57
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation }
58
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredItem") { self.offeredItem }
59
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredTo") { self.offeredTo }
55
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Offer"
56
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#price") { self.price }
57
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#stockLimitation") { self.stockLimitation }
58
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredItem") { self.offeredItem }
59
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#offeredTo") { self.offeredTo }
60
60
  end
61
61
 
62
62
 
@@ -49,10 +49,10 @@ class DataFoodConsortium::Connector::Person < DataFoodConsortium::Connector::Age
49
49
  @firstName = firstName
50
50
  @lastName = lastName
51
51
  @affiliatedOrganizations = affiliatedOrganizations
52
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Person"
53
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#firstName") { self.firstName }
54
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#familyName") { self.lastName }
55
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#affiliates") { self.affiliatedOrganizations }
52
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Person"
53
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#firstName") { self.firstName }
54
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#familyName") { self.lastName }
55
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#affiliates") { self.affiliatedOrganizations }
56
56
  end
57
57
 
58
58
 
@@ -39,8 +39,8 @@ class DataFoodConsortium::Connector::PhysicalCharacteristic < DataFoodConsortium
39
39
  def initialize(physicalDimension: nil, unit: nil, value: 0.0)
40
40
  super(unit: unit, value: value)
41
41
  @physicalDimension = physicalDimension
42
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#PhysicalCharacteristic"
43
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPhysicalDimension") { self.physicalDimension }
42
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#PhysicalCharacteristic"
43
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPhysicalDimension") { self.physicalDimension }
44
44
  end
45
45
 
46
46
 
@@ -44,10 +44,10 @@ class DataFoodConsortium::Connector::Price
44
44
  @value = value
45
45
  @vatRate = vatRate
46
46
  @unit = unit
47
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Price"
48
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#value") { self.value }
49
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#VATrate") { self.vatRate }
50
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasUnit") { self.unit }
47
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Price"
48
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#value") { self.value }
49
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#VATrate") { self.vatRate }
50
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasUnit") { self.unit }
51
51
  end
52
52
 
53
53
 
@@ -40,9 +40,9 @@ class DataFoodConsortium::Connector::QuantitativeValue
40
40
  super()
41
41
  @unit = unit
42
42
  @value = value
43
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#QuantitativeValue"
44
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasUnit") { self.unit }
45
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#value") { self.value }
43
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#QuantitativeValue"
44
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasUnit") { self.unit }
45
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#value") { self.value }
46
46
  end
47
47
 
48
48
 
@@ -51,8 +51,8 @@ class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Conne
51
51
  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: [])
52
52
  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)
53
53
  @totalTheoreticalStock = totalTheoreticalStock
54
- self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#SuppliedProduct"
55
- registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#totalTheoreticalStock") { self.totalTheoreticalStock }
54
+ self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#SuppliedProduct"
55
+ registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#totalTheoreticalStock") { self.totalTheoreticalStock }
56
56
  end
57
57
 
58
58
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datafoodconsortium-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.5
4
+ version: 1.0.0.pre.alpha.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Lecoq
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-20 00:00:00.000000000 Z
11
+ date: 2023-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtual_assembly-semantizer
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.0'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.0.3
22
+ version: 1.0.5
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1.0'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.0.3
32
+ version: 1.0.5
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: minitest
35
35
  requirement: !ruby/object:Gem::Requirement