datafoodconsortium-connector 1.3.0 → 1.4.0.pre.beta1

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/datafoodconsortium/connector/agent.rb +7 -1
  3. data/lib/datafoodconsortium/connector/catalog.rb +14 -1
  4. data/lib/datafoodconsortium/connector/certification.rb +75 -0
  5. data/lib/datafoodconsortium/connector/connector.rb +2 -2
  6. data/lib/datafoodconsortium/connector/context.rb +7 -14
  7. data/lib/datafoodconsortium/connector/context_1.14.0.json +456 -0
  8. data/lib/datafoodconsortium/connector/customer_category.rb +8 -1
  9. data/lib/datafoodconsortium/connector/defined_product.rb +7 -6
  10. data/lib/datafoodconsortium/connector/delivery_step.rb +51 -0
  11. data/lib/datafoodconsortium/connector/enterprise.rb +3 -2
  12. data/lib/datafoodconsortium/connector/json_ld_serializer.rb +2 -0
  13. data/lib/datafoodconsortium/connector/organization.rb +123 -0
  14. data/lib/datafoodconsortium/connector/person.rb +4 -2
  15. data/lib/datafoodconsortium/connector/physical_place.rb +8 -1
  16. data/lib/datafoodconsortium/connector/pickup_step.rb +51 -0
  17. data/lib/datafoodconsortium/connector/planned_flow.rb +42 -0
  18. data/lib/datafoodconsortium/connector/product_option.rb +64 -0
  19. data/lib/datafoodconsortium/connector/product_option_value.rb +57 -0
  20. data/lib/datafoodconsortium/connector/route.rb +65 -0
  21. data/lib/datafoodconsortium/connector/sale_session.rb +13 -5
  22. data/lib/datafoodconsortium/connector/step.rb +83 -0
  23. data/lib/datafoodconsortium/connector/supplied_product.rb +5 -3
  24. data/lib/datafoodconsortium/connector/technical_product.rb +6 -3
  25. data/lib/datafoodconsortium/connector/template_sale_session.rb +53 -0
  26. data/lib/datafoodconsortium/connector/value_recur.rb +79 -0
  27. data/lib/datafoodconsortium/connector/variant.rb +79 -0
  28. data/lib/datafoodconsortium/connector/variant_characteristic.rb +71 -0
  29. data/lib/datafoodconsortium/connector/vevent.rb +69 -0
  30. data/lib/datafoodconsortium/connector.rb +13 -0
  31. metadata +18 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53c5f255a48f339e30ae7ab2745a661f5989c6e91fd81ec639fa179ef82e7111
4
- data.tar.gz: 1b5f034696fb9540252bcb3f4431e0fe404a331c9c228098a2ab73c3c01b3532
3
+ metadata.gz: c2d09493940bc4a1724371128c8a423a15dbdc4bb3bcc9e098c933f059edb0e6
4
+ data.tar.gz: a87595b7d9ad39281a615a67596aecd61beab11029a7662a4abce652c2375439
5
5
  SHA512:
6
- metadata.gz: a3d9907d5f5b7b7529b464cde69eccc6e0c6de00a45097b58f79369d933c5cc08195f61716d4d9108e51b53c9a134b4312c8529ad8131d6e6e59aac13dca6400
7
- data.tar.gz: 97aa860ebfb2b1fd8ccd32c85c55a01e3f6ce2973856dd51df1a92621bcf523fdcdaf51d314caa7f605ebda2f933267e6e689b2d7d37e17bcefcf12241328d43
6
+ metadata.gz: 88aec684c9e0ef77cc5d40e13aa607f8db721624e2ffed4c5206d4cc57b1467268ef6c972aa18b0a566b6a7e2857adbcbf3888298f3c8ce5dce246d9a3e3ed4c
7
+ data.tar.gz: fe270f5ec612bf459974addc4e071b53412721e132dd9ac149cbb03e6cae301c1f01fb21dbdc5ec1792c188e1729d68cd6b73ebeae1d16dccc290537bcd68d30
@@ -47,6 +47,9 @@ class DataFoodConsortium::Connector::Agent
47
47
  # @return [String]
48
48
  attr_accessor :logo
49
49
 
50
+ # @return [ICustomerCategory]
51
+ attr_accessor :customerCategoriesMembership
52
+
50
53
  # @param semanticId [String]
51
54
  # @param localizations [IAddress]
52
55
  # @param phoneNumbers [IPhoneNumber]
@@ -54,7 +57,8 @@ class DataFoodConsortium::Connector::Agent
54
57
  # @param websites [String]
55
58
  # @param socialMedias [ISocialMedia]
56
59
  # @param logo [String]
57
- def initialize(semanticId, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil)
60
+ # @param customerCategoriesMembership [ICustomerCategory]
61
+ def initialize(semanticId, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil, customerCategoriesMembership: [])
58
62
  super(semanticId)
59
63
  @localizations = localizations
60
64
  @phoneNumbers = phoneNumbers
@@ -62,6 +66,7 @@ class DataFoodConsortium::Connector::Agent
62
66
  @websites = websites
63
67
  @socialMedias = socialMedias
64
68
  @logo = logo
69
+ @customerCategoriesMembership = customerCategoriesMembership
65
70
  self.semanticType = "dfc-b:Agent"
66
71
  registerSemanticProperty("dfc-b:hasAddress", &method("localizations")).valueSetter = method("localizations=")
67
72
  registerSemanticProperty("dfc-b:hasPhoneNumber", &method("phoneNumbers")).valueSetter = method("phoneNumbers=")
@@ -69,6 +74,7 @@ class DataFoodConsortium::Connector::Agent
69
74
  registerSemanticProperty("dfc-b:websitePage", &method("websites")).valueSetter = method("websites=")
70
75
  registerSemanticProperty("dfc-b:hasSocialMedia", &method("socialMedias")).valueSetter = method("socialMedias=")
71
76
  registerSemanticProperty("dfc-b:logo", &method("logo")).valueSetter = method("logo=")
77
+ registerSemanticProperty("dfc-b:isMemberOf", &method("customerCategoriesMembership")).valueSetter = method("customerCategoriesMembership=")
72
78
  end
73
79
 
74
80
 
@@ -24,6 +24,7 @@
24
24
 
25
25
 
26
26
 
27
+
27
28
  require "virtual_assembly/semantizer"
28
29
 
29
30
  class DataFoodConsortium::Connector::Catalog
@@ -37,16 +38,28 @@ class DataFoodConsortium::Connector::Catalog
37
38
  # @return [IEnterprise]
38
39
  attr_accessor :maintainers
39
40
 
41
+ # @return [DateTime]
42
+ attr_accessor :beginDate
43
+
44
+ # @return [DateTime]
45
+ attr_accessor :endDate
46
+
40
47
  # @param semanticId [String]
41
48
  # @param items [ICatalogItem]
42
49
  # @param maintainers [IEnterprise]
43
- def initialize(semanticId, items: [], maintainers: [])
50
+ # @param beginDate [DateTime]
51
+ # @param endDate [DateTime]
52
+ def initialize(semanticId, items: [], maintainers: [], beginDate: nil, endDate: nil)
44
53
  super(semanticId)
45
54
  @items = items
46
55
  @maintainers = maintainers
56
+ @beginDate = beginDate
57
+ @endDate = endDate
47
58
  self.semanticType = "dfc-b:Catalog"
48
59
  registerSemanticProperty("dfc-b:lists", &method("items")).valueSetter = method("items=")
49
60
  registerSemanticProperty("dfc-b:maintainedBy", &method("maintainers")).valueSetter = method("maintainers=")
61
+ registerSemanticProperty("dfc-b:beginDate", &method("beginDate")).valueSetter = method("beginDate=")
62
+ registerSemanticProperty("dfc-b:endDate", &method("endDate")).valueSetter = method("endDate=")
50
63
  end
51
64
 
52
65
 
@@ -0,0 +1,75 @@
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
+
24
+ require "virtual_assembly/semantizer"
25
+
26
+ class DataFoodConsortium::Connector::Certification
27
+ include VirtualAssembly::Semantizer::SemanticObject
28
+
29
+ SEMANTIC_TYPE = "dfc-b:Certfication".freeze
30
+
31
+ # @return [String]
32
+ attr_accessor :certificationReferences
33
+
34
+ # @return [String]
35
+ attr_accessor :certificationScores
36
+
37
+ # @return [String]
38
+ attr_accessor :operatorIds
39
+
40
+ # @return [IOrganization]
41
+ attr_accessor :certifiedOrganizations
42
+
43
+ # @return [String]
44
+ attr_accessor :name
45
+
46
+ # @return [String]
47
+ attr_accessor :description
48
+
49
+ # @param semanticId [String]
50
+ # @param certificationReferences [String]
51
+ # @param certificationScores [String]
52
+ # @param operatorIds [String]
53
+ # @param certifiedOrganizations [IOrganization]
54
+ # @param name [String]
55
+ # @param description [String]
56
+ def initialize(semanticId, certificationReferences: [], certificationScores: [], operatorIds: [], certifiedOrganizations: [], name: nil, description: nil)
57
+ super(semanticId)
58
+ @certificationReferences = certificationReferences
59
+ @certificationScores = certificationScores
60
+ @operatorIds = operatorIds
61
+ @certifiedOrganizations = certifiedOrganizations
62
+ @name = name
63
+ @description = description
64
+ self.semanticType = "dfc-b:Certfication"
65
+ registerSemanticProperty("dfc-b:certiferReference", &method("certificationReferences")).valueSetter = method("certificationReferences=")
66
+ registerSemanticProperty("dfc-b:certificationScore", &method("certificationScores")).valueSetter = method("certificationScores=")
67
+ registerSemanticProperty("dfc-b:operatorId", &method("operatorIds")).valueSetter = method("operatorIds=")
68
+ registerSemanticProperty("dfc-b:certifies", &method("certifiedOrganizations")).valueSetter = method("certifiedOrganizations=")
69
+ registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
70
+ registerSemanticProperty("dfc-b:hasDescription", &method("description")).valueSetter = method("description=")
71
+ end
72
+
73
+
74
+
75
+ end
@@ -35,8 +35,8 @@ module DataFoodConsortium::Connector
35
35
  attr_reader :MEASURES
36
36
  attr_reader :PRODUCT_TYPES
37
37
 
38
- def export(*subjects)
39
- @exporter.process(*subjects)
38
+ def export(subject, *subjects)
39
+ return @exporter.process(subject, *subjects)
40
40
  end
41
41
 
42
42
  def import(json_string_or_io)
@@ -8,34 +8,27 @@ module DataFoodConsortium
8
8
  #
9
9
  # Similar to: https://github.com/ruby-rdf/json-ld-preloaded/
10
10
  class Context < JSON::LD::Context
11
- URL = "https://w3id.org/dfc/ontology/context/context_1.16.0.json"
12
- URL_NORMALISED = "http://w3id.org/dfc/ontology/context/context_1.16.0.json"
11
+ URL = "https://www.datafoodconsortium.org"
13
12
 
14
- # All context URIs have to use http because https is normalised to http
15
- # during the lookup of preloaded contexts.
16
- # And if the URI doesn't have a path, it must end with `/`.
17
- add_preloaded(URL_NORMALISED) { parse(json) }
18
-
19
- # The default context always pointing to the latest version:
20
- alias_preloaded("http://www.datafoodconsortium.org/", URL_NORMALISED)
13
+ add_preloaded("http://www.datafoodconsortium.org/") { parse(json) }
21
14
 
22
15
  # This is the current file the DFC website refers to in a link header.
23
16
  alias_preloaded(
24
- "http://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context_1.16.0.jsonld",
25
- URL_NORMALISED
17
+ "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context_1.16.0.jsonld",
18
+ "http://www.datafoodconsortium.org/"
26
19
  )
27
20
 
28
21
  # This was the file the DFC website refers to in a link header.
29
22
  alias_preloaded(
30
- "http://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context.jsonld",
31
- URL_NORMALISED
23
+ "https://www.datafoodconsortium.org/wp-content/plugins/wordpress-context-jsonld/context.jsonld",
24
+ "http://www.datafoodconsortium.org/"
32
25
  )
33
26
 
34
27
  # This is the old URL that's not online anymore.
35
28
  # Keep it for compatiblity with all versions before 1.8.
36
29
  alias_preloaded(
37
30
  "http://static.datafoodconsortium.org/ontologies/context.json",
38
- URL_NORMALISED
31
+ "http://www.datafoodconsortium.org/"
39
32
  )
40
33
 
41
34
  # The hash serializer expects only string values in the context.
@@ -0,0 +1,456 @@
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
+ }
@@ -21,6 +21,7 @@
21
21
  # SOFTWARE.
22
22
 
23
23
 
24
+
24
25
  require "virtual_assembly/semantizer"
25
26
 
26
27
  class DataFoodConsortium::Connector::CustomerCategory
@@ -31,13 +32,19 @@ class DataFoodConsortium::Connector::CustomerCategory
31
32
  # @return [String]
32
33
  attr_accessor :description
33
34
 
35
+ # @return [IAgent]
36
+ attr_accessor :members
37
+
34
38
  # @param semanticId [String]
35
39
  # @param description [String]
36
- def initialize(semanticId, description: nil)
40
+ # @param members [IAgent]
41
+ def initialize(semanticId, description: nil, members: [])
37
42
  super(semanticId)
38
43
  @description = description
44
+ @members = members
39
45
  self.semanticType = "dfc-b:CustomerCategory"
40
46
  registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
47
+ registerSemanticProperty("dfc-b:isMemberOf", &method("members")).valueSetter = method("members=")
41
48
  end
42
49
 
43
50