datafoodconsortium-connector 1.4.0.pre.beta1 → 2.0.0.pre.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2d09493940bc4a1724371128c8a423a15dbdc4bb3bcc9e098c933f059edb0e6
4
- data.tar.gz: a87595b7d9ad39281a615a67596aecd61beab11029a7662a4abce652c2375439
3
+ metadata.gz: 21f3f3988c0fdd080af8e8c9a0c0343912648cc2c0f3fab972e5d6da1ee6671c
4
+ data.tar.gz: 919ae0069f01516cf456a82cf84ef9b6efe9d0dcdbca6feccaca26a249ce2c77
5
5
  SHA512:
6
- metadata.gz: 88aec684c9e0ef77cc5d40e13aa607f8db721624e2ffed4c5206d4cc57b1467268ef6c972aa18b0a566b6a7e2857adbcbf3888298f3c8ce5dce246d9a3e3ed4c
7
- data.tar.gz: fe270f5ec612bf459974addc4e071b53412721e132dd9ac149cbb03e6cae301c1f01fb21dbdc5ec1792c188e1729d68cd6b73ebeae1d16dccc290537bcd68d30
6
+ metadata.gz: 75ff122063e028c2be3caa9512fb7da0972ac12923ee53989f26239cd3a2e43ccd9f59c6a6a9b3b1af1ac1bea2ba0072c267002130fc58045693e0c5480e2070
7
+ data.tar.gz: 709a67f6810fad8bf82e40297190ade26593bd58f1b45c57e52d9a3cb863738216acebbba192b7227b5e05f19261ff0137a8f7f4d37fdb310956b17125609dc1
@@ -35,7 +35,7 @@ class DataFoodConsortium::Connector::Catalog
35
35
  # @return [ICatalogItem]
36
36
  attr_accessor :items
37
37
 
38
- # @return [IEnterprise]
38
+ # @return [IOrganization]
39
39
  attr_accessor :maintainers
40
40
 
41
41
  # @return [DateTime]
@@ -46,7 +46,7 @@ class DataFoodConsortium::Connector::Catalog
46
46
 
47
47
  # @param semanticId [String]
48
48
  # @param items [ICatalogItem]
49
- # @param maintainers [IEnterprise]
49
+ # @param maintainers [IOrganization]
50
50
  # @param beginDate [DateTime]
51
51
  # @param endDate [DateTime]
52
52
  def initialize(semanticId, items: [], maintainers: [], beginDate: nil, endDate: nil)
@@ -14,20 +14,17 @@ module DataFoodConsortium
14
14
 
15
15
  # This is the current file the DFC website refers to in a link header.
16
16
  alias_preloaded(
17
- "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context_1.16.0.jsonld",
17
+ "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context_2.0.0.jsonld",
18
18
  "http://www.datafoodconsortium.org/"
19
19
  )
20
20
 
21
- # This was the file the DFC website refers to in a link header.
22
21
  alias_preloaded(
23
- "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context.jsonld",
22
+ "https://w3id.org/dfc/ontology/context/context_2.0.0.json",
24
23
  "http://www.datafoodconsortium.org/"
25
24
  )
26
25
 
27
- # This is the old URL that's not online anymore.
28
- # Keep it for compatiblity with all versions before 1.8.
29
26
  alias_preloaded(
30
- "http://static.datafoodconsortium.org/ontologies/context.json",
27
+ "https://cdn.jsdelivr.net/gh/datafoodconsortium/ontology/context/context_2.0.0.json",
31
28
  "http://www.datafoodconsortium.org/"
32
29
  )
33
30
 
@@ -37,7 +34,7 @@ module DataFoodConsortium
37
34
  end
38
35
 
39
36
  def self.json
40
- @json ||= JSON.parse(File.read("#{__dir__}/context_1.16.0.json"))["@context"]
37
+ @json ||= JSON.parse(File.read("#{__dir__}/context_2.0.0.json"))["@context"]
41
38
  end
42
39
  end
43
40
  end
@@ -2,14 +2,14 @@
2
2
  "@context": {
3
3
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
4
4
  "skos" : "http://www.w3.org/2004/02/skos/core#",
5
- "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#",
5
+ "dfc": "http://w3id.org/dfc/ontology/DFC_FullModel.owl#",
6
6
  "dc": "http://purl.org/dc/elements/1.1/#",
7
- "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#",
8
- "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#",
9
- "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#",
10
- "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#",
11
- "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#",
12
- "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#",
7
+ "dfc-b": "http://w3id.org/dfc/ontology/v2.0.0/src/DFC_BusinessOntology.owl#",
8
+ "dfc-t": "http://w3id.org/dfc/ontology/v2.0.0/src/DFC_TechnicalOntology.owl#",
9
+ "dfc-m": "http://w3id.org/dfc/taxonomies/v2.0.0/measures.rdf#",
10
+ "dfc-pt": "http://w3id.org/dfc/taxonomies/v2.0.0/productTypes.rdf#",
11
+ "dfc-f": "http://w3id.org/dfc/taxonomies/v2.0.0/facets.rdf#",
12
+ "dfc-v": "http://w3id.org/dfc/taxonomies/v2.0.0/vocabulary.rdf#",
13
13
  "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#",
14
14
  "dfc-b:DFC_BusinessOntology_ObjectProperty": {
15
15
  "@type": "@id"
@@ -41,6 +41,9 @@
41
41
  "dfc-b:certificateOf": {
42
42
  "@type": "@id"
43
43
  },
44
+ "dfc-b:certifies": {
45
+ "@type": "@id"
46
+ },
44
47
  "dfc-b:characteristicOf": {
45
48
  "@type": "@id"
46
49
  },
@@ -89,6 +92,9 @@
89
92
  "dfc-b:deliveredAt": {
90
93
  "@type": "@id"
91
94
  },
95
+ "dfc-b:delivery": {
96
+ "@type": "@id"
97
+ },
92
98
  "dfc-b:endsAt": {
93
99
  "@type": "@id"
94
100
  },
@@ -140,6 +146,9 @@
140
146
  "dfc-b:hasFulfilmentStatus": {
141
147
  "@type": "@id"
142
148
  },
149
+ "dfc-b:hasGeoJsonFeature": {
150
+ "@type": "@id"
151
+ },
143
152
  "dfc-b:hasGeographicalOrigin": {
144
153
  "@type": "@id"
145
154
  },
@@ -158,6 +167,9 @@
158
167
  "dfc-b:hasMainContact": {
159
168
  "@type": "@id"
160
169
  },
170
+ "dfc-b:hasMember": {
171
+ "@type": "@id"
172
+ },
161
173
  "dfc-b:hasNatureOrigin": {
162
174
  "@type": "@id"
163
175
  },
@@ -206,7 +218,10 @@
206
218
  "dfc-b:hasPrice": {
207
219
  "@type": "@id"
208
220
  },
209
- "dfc-b:hasProcess": {
221
+ "dfc-b:hasProductOption": {
222
+ "@type": "@id"
223
+ },
224
+ "dfc-b:hasProductOptionValue": {
210
225
  "@type": "@id"
211
226
  },
212
227
  "dfc-b:hasQuantity": {
@@ -215,15 +230,27 @@
215
230
  "dfc-b:hasReference": {
216
231
  "@type": "@id"
217
232
  },
233
+ "dfc-b:hasReferenceProductOption": {
234
+ "@type": "@id"
235
+ },
236
+ "dfc-b:hasReferenceProductOptionValue": {
237
+ "@type": "@id"
238
+ },
218
239
  "dfc-b:hasSocialMedia": {
219
240
  "@type": "@id"
220
241
  },
221
242
  "dfc-b:hasStatus": {
222
243
  "@type": "@id"
223
244
  },
245
+ "dfc-b:hasStep": {
246
+ "@type": "@id"
247
+ },
224
248
  "dfc-b:hasTemperature": {
225
249
  "@type": "@id"
226
250
  },
251
+ "dfc-b:hasTemplateSaleSession": {
252
+ "@type": "@id"
253
+ },
227
254
  "dfc-b:hasTransformationType": {
228
255
  "@type": "@id"
229
256
  },
@@ -236,6 +263,9 @@
236
263
  "dfc-b:hasVariant": {
237
264
  "@type": "@id"
238
265
  },
266
+ "dfc-b:hasVariantCaracteristic": {
267
+ "@type": "@id"
268
+ },
239
269
  "dfc-b:holds": {
240
270
  "@type": "@id"
241
271
  },
@@ -263,12 +293,18 @@
263
293
  "dfc-b:isAvailableDuring": {
264
294
  "@type": "@id"
265
295
  },
296
+ "dfc-b:isCertifiedBy": {
297
+ "@type": "@id"
298
+ },
266
299
  "dfc-b:isFulfilledBy": {
267
300
  "@type": "@id"
268
301
  },
269
302
  "dfc-b:isIngredientOf": {
270
303
  "@type": "@id"
271
304
  },
305
+ "dfc-b:isMemberOf": {
306
+ "@type": "@id"
307
+ },
272
308
  "dfc-b:isOpenDuring": {
273
309
  "@type": "@id"
274
310
  },
@@ -278,9 +314,15 @@
278
314
  "dfc-b:isShippedIn": {
279
315
  "@type": "@id"
280
316
  },
317
+ "dfc-b:isStepOf": {
318
+ "@type": "@id"
319
+ },
281
320
  "dfc-b:isTemperatureOf": {
282
321
  "@type": "@id"
283
322
  },
323
+ "dfc-b:isTemplateSaleSessionOf": {
324
+ "@type": "@id"
325
+ },
284
326
  "dfc-b:isVariantOf": {
285
327
  "@type": "@id"
286
328
  },
@@ -365,6 +407,9 @@
365
407
  "dfc-b:physicalCharacteristicOf": {
366
408
  "@type": "@id"
367
409
  },
410
+ "dfc-b:pickUp": {
411
+ "@type": "@id"
412
+ },
368
413
  "dfc-b:pickedUpAt": {
369
414
  "@type": "@id"
370
415
  },
@@ -473,6 +518,12 @@
473
518
  "dfc-b:typeOf": {
474
519
  "@type": "@id"
475
520
  },
521
+ "dfc-b:useVehicle": {
522
+ "@type": "@id"
523
+ },
524
+ "dfc-b:usedInRoute": {
525
+ "@type": "@id"
526
+ },
476
527
  "dfc-b:uses": {
477
528
  "@type": "@id"
478
529
  },
@@ -37,13 +37,13 @@ class DataFoodConsortium::Connector::Person < DataFoodConsortium::Connector::Age
37
37
  # @return [String]
38
38
  attr_accessor :lastName
39
39
 
40
- # @return [IEnterprise]
40
+ # @return [IOrganization]
41
41
  attr_accessor :affiliatedOrganizations
42
42
 
43
43
  # @param semanticId [String]
44
44
  # @param firstName [String]
45
45
  # @param lastName [String]
46
- # @param affiliatedOrganizations [IEnterprise]
46
+ # @param affiliatedOrganizations [IOrganization]
47
47
  # @param localizations [IAddress]
48
48
  # @param phoneNumbers [IPhoneNumber]
49
49
  # @param emails [String]
@@ -7,7 +7,6 @@ module DataFoodConsortium
7
7
  require 'datafoodconsortium/connector/agent.rb'
8
8
  require 'datafoodconsortium/connector/certification.rb'
9
9
  require 'datafoodconsortium/connector/customer_category.rb'
10
- require 'datafoodconsortium/connector/enterprise.rb'
11
10
  require 'datafoodconsortium/connector/organization.rb'
12
11
  require 'datafoodconsortium/connector/person.rb'
13
12
  require 'datafoodconsortium/connector/phone_number.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datafoodconsortium-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.pre.beta1
4
+ version: 2.0.0.pre.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Lecoq
@@ -46,13 +46,11 @@ files:
46
46
  - lib/datafoodconsortium/connector/characteristic.rb
47
47
  - lib/datafoodconsortium/connector/connector.rb
48
48
  - lib/datafoodconsortium/connector/context.rb
49
- - lib/datafoodconsortium/connector/context_1.14.0.json
50
- - lib/datafoodconsortium/connector/context_1.16.0.json
49
+ - lib/datafoodconsortium/connector/context_2.0.0.json
51
50
  - lib/datafoodconsortium/connector/customer_category.rb
52
51
  - lib/datafoodconsortium/connector/defined_product.rb
53
52
  - lib/datafoodconsortium/connector/delivery_option.rb
54
53
  - lib/datafoodconsortium/connector/delivery_step.rb
55
- - lib/datafoodconsortium/connector/enterprise.rb
56
54
  - lib/datafoodconsortium/connector/flow.rb
57
55
  - lib/datafoodconsortium/connector/importer.rb
58
56
  - lib/datafoodconsortium/connector/json_ld_serializer.rb
@@ -71,7 +69,6 @@ files:
71
69
  - lib/datafoodconsortium/connector/pickup_option.rb
72
70
  - lib/datafoodconsortium/connector/pickup_step.rb
73
71
  - lib/datafoodconsortium/connector/planned_consumption_flow.rb
74
- - lib/datafoodconsortium/connector/planned_flow.rb
75
72
  - lib/datafoodconsortium/connector/planned_local_consumption_flow.rb
76
73
  - lib/datafoodconsortium/connector/planned_local_production_flow.rb
77
74
  - lib/datafoodconsortium/connector/planned_local_transformation.rb
@@ -1,456 +0,0 @@
1
- {
2
- "@context": {
3
- "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
4
- "skos" : "http://www.w3.org/2004/02/skos/core#",
5
- "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#",
6
- "dc": "http://purl.org/dc/elements/1.1/#",
7
- "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#",
8
- "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#",
9
- "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#",
10
- "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#",
11
- "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#",
12
- "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#",
13
- "ontosec": "http://www.semanticweb.org/ontologies/2008/11/OntologySecurity.owl#",
14
- "dfc-b:DFC_BusinessOntology_ObjectProperty": {
15
- "@type": "@id"
16
- },
17
- "dfc-b:DFC_Interface_Property": {
18
- "@type": "@id"
19
- },
20
- "dfc-b:addressOf": {
21
- "@type": "@id"
22
- },
23
- "dfc-b:affiliatedTo": {
24
- "@type": "@id"
25
- },
26
- "dfc-b:affiliates": {
27
- "@type": "@id"
28
- },
29
- "dfc-b:allergenCharacteristicOf": {
30
- "@type": "@id"
31
- },
32
- "dfc-b:belongsTo": {
33
- "@type": "@id"
34
- },
35
- "dfc-b:brandOf": {
36
- "@type": "@id"
37
- },
38
- "dfc-b:certificateOf": {
39
- "@type": "@id"
40
- },
41
- "dfc-b:characteristicOf": {
42
- "@type": "@id"
43
- },
44
- "dfc-b:claimOf": {
45
- "@type": "@id"
46
- },
47
- "dfc-b:composedOf": {
48
- "@type": "@id"
49
- },
50
- "dfc-b:composes": {
51
- "@type": "@id"
52
- },
53
- "dfc-b:concernedBy": {
54
- "@type": "@id"
55
- },
56
- "dfc-b:concerns": {
57
- "@type": "@id"
58
- },
59
- "dfc-b:constituedBy": {
60
- "@type": "@id"
61
- },
62
- "dfc-b:constitutes": {
63
- "@type": "@id"
64
- },
65
- "dfc-b:consumedBy": {
66
- "@type": "@id"
67
- },
68
- "dfc-b:consumes": {
69
- "@type": "@id"
70
- },
71
- "dfc-b:containerInformationOf": {
72
- "@type": "@id"
73
- },
74
- "dfc-b:coordinatedBy": {
75
- "@type": "@id"
76
- },
77
- "dfc-b:coordinates": {
78
- "@type": "@id"
79
- },
80
- "dfc-b:definedBy": {
81
- "@type": "@id"
82
- },
83
- "dfc-b:defines": {
84
- "@type": "@id"
85
- },
86
- "dfc-b:deliveredAt": {
87
- "@type": "@id"
88
- },
89
- "dfc-b:facetOf": {
90
- "@type": "@id"
91
- },
92
- "dfc-b:from": {
93
- "@type": "@id"
94
- },
95
- "dfc-b:fulfills": {
96
- "@type": "@id"
97
- },
98
- "dfc-b:geographicalOriginOf": {
99
- "@type": "@id"
100
- },
101
- "dfc-b:hasAddress": {
102
- "@type": "@id"
103
- },
104
- "dfc-b:hasAllergenCharacteristic": {
105
- "@type": "@id"
106
- },
107
- "dfc-b:hasAllergenDimension": {
108
- "@type": "@id"
109
- },
110
- "dfc-b:hasBrand": {
111
- "@type": "@id"
112
- },
113
- "dfc-b:hasCertification": {
114
- "@type": "@id"
115
- },
116
- "dfc-b:hasCharacteristic": {
117
- "@type": "@id"
118
- },
119
- "dfc-b:hasClaim": {
120
- "@type": "@id"
121
- },
122
- "dfc-b:hasContainerInformation": {
123
- "@type": "@id"
124
- },
125
- "dfc-b:hasDimension": {
126
- "@type": "@id"
127
- },
128
- "dfc-b:hasFacet": {
129
- "@type": "@id"
130
- },
131
- "dfc-b:hasFulfilmentStatus": {
132
- "@type": "@id"
133
- },
134
- "dfc-b:hasGeographicalOrigin": {
135
- "@type": "@id"
136
- },
137
- "dfc-b:hasIngredient": {
138
- "@type": "@id"
139
- },
140
- "dfc-b:hasInput": {
141
- "@type": "@id"
142
- },
143
- "dfc-b:hasLabellingCharacteristic": {
144
- "@type": "@id"
145
- },
146
- "dfc-b:hasLabellingDimension": {
147
- "@type": "@id"
148
- },
149
- "dfc-b:hasMainContact": {
150
- "@type": "@id"
151
- },
152
- "dfc-b:hasNatureOrigin": {
153
- "@type": "@id"
154
- },
155
- "dfc-b:hasNutrientCharacteristic": {
156
- "@type": "@id"
157
- },
158
- "dfc-b:hasNutrientDimension": {
159
- "@type": "@id"
160
- },
161
- "dfc-b:hasObject": {
162
- "@type": "@id"
163
- },
164
- "dfc-b:hasOffer": {
165
- "@type": "@id"
166
- },
167
- "dfc-b:hasOption": {
168
- "@type": "@id"
169
- },
170
- "dfc-b:hasOrderStatus": {
171
- "@type": "@id"
172
- },
173
- "dfc-b:hasOutput": {
174
- "@type": "@id"
175
- },
176
- "dfc-b:hasPart": {
177
- "@type": "@id"
178
- },
179
- "dfc-b:hasPartOrigin": {
180
- "@type": "@id"
181
- },
182
- "dfc-b:hasPaymentMethod": {
183
- "@type": "@id"
184
- },
185
- "dfc-b:hasPaymentStatus": {
186
- "@type": "@id"
187
- },
188
- "dfc-b:hasPhoneNumber": {
189
- "@type": "@id"
190
- },
191
- "dfc-b:hasPhysicalCharacteristic": {
192
- "@type": "@id"
193
- },
194
- "dfc-b:hasPhysicalDimension": {
195
- "@type": "@id"
196
- },
197
- "dfc-b:hasPrice": {
198
- "@type": "@id"
199
- },
200
- "dfc-b:hasProcess": {
201
- "@type": "@id"
202
- },
203
- "dfc-b:hasQuantity": {
204
- "@type": "@id"
205
- },
206
- "dfc-b:hasReference": {
207
- "@type": "@id"
208
- },
209
- "dfc-b:hasSocialMedia": {
210
- "@type": "@id"
211
- },
212
- "dfc-b:hasStatus": {
213
- "@type": "@id"
214
- },
215
- "dfc-b:hasTemperature": {
216
- "@type": "@id"
217
- },
218
- "dfc-b:hasTransformationType": {
219
- "@type": "@id"
220
- },
221
- "dfc-b:hasType": {
222
- "@type": "@id"
223
- },
224
- "dfc-b:hasUnit": {
225
- "@type": "@id"
226
- },
227
- "dfc-b:holds": {
228
- "@type": "@id"
229
- },
230
- "dfc-b:hostedAt": {
231
- "@type": "@id"
232
- },
233
- "dfc-b:hosts": {
234
- "@type": "@id"
235
- },
236
- "dfc-b:identifiedBy": {
237
- "@type": "@id"
238
- },
239
- "dfc-b:identifies": {
240
- "@type": "@id"
241
- },
242
- "dfc-b:industrializedBy": {
243
- "@type": "@id"
244
- },
245
- "dfc-b:industrializes": {
246
- "@type": "@id"
247
- },
248
- "dfc-b:inputOf": {
249
- "@type": "@id"
250
- },
251
- "dfc-b:isFulfilledBy": {
252
- "@type": "@id"
253
- },
254
- "dfc-b:isIngredientOf": {
255
- "@type": "@id"
256
- },
257
- "dfc-b:isPriceOf": {
258
- "@type": "@id"
259
- },
260
- "dfc-b:isTemperatureOf": {
261
- "@type": "@id"
262
- },
263
- "dfc-b:labellingCharacteristicOf": {
264
- "@type": "@id"
265
- },
266
- "dfc-b:listedIn": {
267
- "@type": "@id"
268
- },
269
- "dfc-b:lists": {
270
- "@type": "@id"
271
- },
272
- "dfc-b:localizedBy": {
273
- "@type": "@id"
274
- },
275
- "dfc-b:localizes": {
276
- "@type": "@id"
277
- },
278
- "dfc-b:mainContactOf": {
279
- "@type": "@id"
280
- },
281
- "dfc-b:maintainedBy": {
282
- "@type": "@id"
283
- },
284
- "dfc-b:maintains": {
285
- "@type": "@id"
286
- },
287
- "dfc-b:managedBy": {
288
- "@type": "@id"
289
- },
290
- "dfc-b:manages": {
291
- "@type": "@id"
292
- },
293
- "dfc-b:natureOriginOf": {
294
- "@type": "@id"
295
- },
296
- "dfc-b:nutrientCharacteristicOf": {
297
- "@type": "@id"
298
- },
299
- "dfc-b:objectOf": {
300
- "@type": "@id"
301
- },
302
- "dfc-b:offeredThrough": {
303
- "@type": "@id"
304
- },
305
- "dfc-b:offers": {
306
- "@type": "@id"
307
- },
308
- "dfc-b:offersTo": {
309
- "@type": "@id"
310
- },
311
- "dfc-b:optionOf": {
312
- "@type": "@id"
313
- },
314
- "dfc-b:orderedBy": {
315
- "@type": "@id"
316
- },
317
- "dfc-b:orders": {
318
- "@type": "@id"
319
- },
320
- "dfc-b:outputOf": {
321
- "@type": "@id"
322
- },
323
- "dfc-b:ownedBy": {
324
- "@type": "@id"
325
- },
326
- "dfc-b:owns": {
327
- "@type": "@id"
328
- },
329
- "dfc-b:paidWith": {
330
- "@type": "@id"
331
- },
332
- "dfc-b:partOf": {
333
- "@type": "@id"
334
- },
335
- "dfc-b:partOriginOf": {
336
- "@type": "@id"
337
- },
338
- "dfc-b:phoneNumberOf": {
339
- "@type": "@id"
340
- },
341
- "dfc-b:physicalCharacteristicOf": {
342
- "@type": "@id"
343
- },
344
- "dfc-b:pickedUpAt": {
345
- "@type": "@id"
346
- },
347
- "dfc-b:processOf": {
348
- "@type": "@id"
349
- },
350
- "dfc-b:producedBy": {
351
- "@type": "@id"
352
- },
353
- "dfc-b:produces": {
354
- "@type": "@id"
355
- },
356
- "dfc-b:proposedBy": {
357
- "@type": "@id"
358
- },
359
- "dfc-b:proposes": {
360
- "@type": "@id"
361
- },
362
- "dfc-b:referenceOf": {
363
- "@type": "@id"
364
- },
365
- "dfc-b:referencedBy": {
366
- "@type": "@id"
367
- },
368
- "dfc-b:references": {
369
- "@type": "@id"
370
- },
371
- "dfc-b:refersTo": {
372
- "@type": "@id"
373
- },
374
- "dfc-b:representedBy": {
375
- "@type": "@id"
376
- },
377
- "dfc-b:represents": {
378
- "@type": "@id"
379
- },
380
- "dfc-b:requestedBy": {
381
- "@type": "@id"
382
- },
383
- "dfc-b:requests": {
384
- "@type": "@id"
385
- },
386
- "dfc-b:satisfiedBy": {
387
- "@type": "@id"
388
- },
389
- "dfc-b:satisfies": {
390
- "@type": "@id"
391
- },
392
- "dfc-b:selectedBy": {
393
- "@type": "@id"
394
- },
395
- "dfc-b:selects": {
396
- "@type": "@id"
397
- },
398
- "dfc-b:sells": {
399
- "@type": "@id"
400
- },
401
- "dfc-b:socialMediaOf": {
402
- "@type": "@id"
403
- },
404
- "dfc-b:soldBy": {
405
- "@type": "@id"
406
- },
407
- "dfc-b:storedIn": {
408
- "@type": "@id"
409
- },
410
- "dfc-b:stores": {
411
- "@type": "@id"
412
- },
413
- "dfc-b:suppliedBy": {
414
- "@type": "@id"
415
- },
416
- "dfc-b:supplies": {
417
- "@type": "@id"
418
- },
419
- "dfc-b:suppliesTo": {
420
- "@type": "@id"
421
- },
422
- "dfc-b:to": {
423
- "@type": "@id"
424
- },
425
- "dfc-b:tracedBy": {
426
- "@type": "@id"
427
- },
428
- "dfc-b:traces": {
429
- "@type": "@id"
430
- },
431
- "dfc-b:transformedBy": {
432
- "@type": "@id"
433
- },
434
- "dfc-b:transforms": {
435
- "@type": "@id"
436
- },
437
- "dfc-b:typeOf": {
438
- "@type": "@id"
439
- },
440
- "dfc-b:uses": {
441
- "@type": "@id"
442
- },
443
- "dfc-t:represent": {
444
- "@type": "@id"
445
- },
446
- "dfc-t:hasPivot": {
447
- "@type": "@id"
448
- },
449
- "dfc-t:hostedBy": {
450
- "@type": "@id"
451
- },
452
- "dfc-t:owner": {
453
- "@type": "@id"
454
- }
455
- }
456
- }
@@ -1,109 +0,0 @@
1
- # MIT License
2
- #
3
- # Copyright (c) 2023 Maxime Lecoq <maxime@lecoqlibre.fr>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- require "datafoodconsortium/connector/agent"
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
- require "virtual_assembly/semantizer"
35
-
36
- class DataFoodConsortium::Connector::Enterprise < DataFoodConsortium::Connector::Agent
37
-
38
- SEMANTIC_TYPE = "dfc-b:Enterprise".freeze
39
-
40
- # @return [String]
41
- attr_accessor :name
42
-
43
- # @return [String]
44
- attr_accessor :description
45
-
46
- # @return [String]
47
- attr_accessor :vatNumber
48
-
49
- # @return [ICustomerCategory]
50
- attr_accessor :customerCategories
51
-
52
- # @return [ICatalog]
53
- attr_accessor :catalogs
54
-
55
- # @return [ICatalogItem]
56
- attr_accessor :catalogItems
57
-
58
- # @return [ISuppliedProduct]
59
- attr_accessor :suppliedProducts
60
-
61
- # @return [ITechnicalProduct]
62
- attr_accessor :technicalProducts
63
-
64
- # @return [IPerson]
65
- attr_accessor :mainContact
66
-
67
- # @param semanticId [String]
68
- # @param name [String]
69
- # @param description [String]
70
- # @param vatNumber [String]
71
- # @param customerCategories [ICustomerCategory]
72
- # @param catalogs [ICatalog]
73
- # @param catalogItems [ICatalogItem]
74
- # @param suppliedProducts [ISuppliedProduct]
75
- # @param technicalProducts [ITechnicalProduct]
76
- # @param mainContact [IPerson]
77
- # @param localizations [IAddress]
78
- # @param phoneNumbers [IPhoneNumber]
79
- # @param emails [String]
80
- # @param websites [String]
81
- # @param socialMedias [ISocialMedia]
82
- # @param logo [String]
83
- # @param customerCategoriesMembership [ICustomerCategory]
84
- def initialize(semanticId, name: nil, description: nil, vatNumber: nil, customerCategories: [], catalogs: [], catalogItems: [], suppliedProducts: [], technicalProducts: [], mainContact: nil, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil, customerCategoriesMembership: [])
85
- super(semanticId, localizations: localizations, phoneNumbers: phoneNumbers, emails: emails, websites: websites, socialMedias: socialMedias, logo: logo, customerCategoriesMembership: customerCategoriesMembership)
86
- @name = name
87
- @description = description
88
- @vatNumber = vatNumber
89
- @customerCategories = customerCategories
90
- @catalogs = catalogs
91
- @catalogItems = catalogItems
92
- @suppliedProducts = suppliedProducts
93
- @technicalProducts = technicalProducts
94
- @mainContact = mainContact
95
- self.semanticType = "dfc-b:Enterprise"
96
- registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
97
- registerSemanticProperty("dfc-b:hasDescription", &method("description")).valueSetter = method("description=")
98
- registerSemanticProperty("dfc-b:VATnumber", &method("vatNumber")).valueSetter = method("vatNumber=")
99
- registerSemanticProperty("dfc-b:defines", &method("customerCategories")).valueSetter = method("customerCategories=")
100
- registerSemanticProperty("dfc-b:maintains", &method("catalogs")).valueSetter = method("catalogs=")
101
- registerSemanticProperty("dfc-b:manages", &method("catalogItems")).valueSetter = method("catalogItems=")
102
- registerSemanticProperty("dfc-b:supplies", &method("suppliedProducts")).valueSetter = method("suppliedProducts=")
103
- registerSemanticProperty("dfc-b:proposes", &method("technicalProducts")).valueSetter = method("technicalProducts=")
104
- registerSemanticProperty("dfc-b:hasMainContact", &method("mainContact")).valueSetter = method("mainContact=")
105
- end
106
-
107
-
108
-
109
- end
@@ -1,42 +0,0 @@
1
- # MIT License
2
- #
3
- # Copyright (c) 2023 Maxime Lecoq <maxime@lecoqlibre.fr>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- require "datafoodconsortium/connector/flow"
24
- require "virtual_assembly/semantizer"
25
-
26
- class DataFoodConsortium::Connector::PlannedFlow < DataFoodConsortium::Connector::Flow
27
-
28
- # @return [IPlannedTransformation]
29
- attr_accessor :transformation
30
-
31
- # @param transformation [IPlannedTransformation]
32
- # @param quantity [IQuantity]
33
- def initialize(transformation: nil, quantity: nil)
34
- super(quantity: quantity)
35
- @transformation = transformation
36
-
37
- registerSemanticProperty("dfc-b:incomeOf", &method("transformation")).valueSetter = method("transformation=")
38
- end
39
-
40
-
41
-
42
- end