datafoodconsortium-connector 2.0.0.pre.beta4 → 2.0.0.pre.beta5
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 +4 -4
- data/lib/datafoodconsortium/connector/address.rb +2 -2
- data/lib/datafoodconsortium/connector/context.rb +1 -1
- data/lib/datafoodconsortium/connector/customer_category.rb +7 -1
- data/lib/datafoodconsortium/connector/{quantity.rb → opening_hours_specification.rb} +25 -19
- data/lib/datafoodconsortium/connector/planned_consumption_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/planned_local_consumption_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/planned_local_production_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/planned_local_transformation.rb +2 -2
- data/lib/datafoodconsortium/connector/planned_production_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/planned_transformation.rb +2 -2
- data/lib/datafoodconsortium/connector/realized_consumption_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/realized_production_flow.rb +1 -1
- data/lib/datafoodconsortium/connector/realized_transformation.rb +2 -2
- data/lib/datafoodconsortium/connector.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2c22f2894c689b3fe1f5a3f3e6f74bdc3eb2bb3ebf8de0220c97c46d86d3c5c
|
|
4
|
+
data.tar.gz: 847ff1c84d90ae01263437f505261196634db0a9a2730c70029b990e38715944
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f89e5399acab529e422fec75e3ab695ba268362dee20b9e033599c91919f97d9984d611c3de20a35b12dc65143aca5ed60a3c3cdb74a7a326076c522641c2e5
|
|
7
|
+
data.tar.gz: 1b7862a04bd52c519c0c743ccc0cdd4d3f49d956943d751089cffd38a6fca3523ed11995af4a2440a924ef2da7dfbbafbaa330eab41bebe0111ea756d3ce6489
|
|
@@ -37,7 +37,7 @@ class DataFoodConsortium::Connector::Address
|
|
|
37
37
|
# @return [String]
|
|
38
38
|
attr_accessor :city
|
|
39
39
|
|
|
40
|
-
# @return [
|
|
40
|
+
# @return [ISKOSConcept]
|
|
41
41
|
attr_accessor :country
|
|
42
42
|
|
|
43
43
|
# @return [Real]
|
|
@@ -53,7 +53,7 @@ class DataFoodConsortium::Connector::Address
|
|
|
53
53
|
# @param street [String]
|
|
54
54
|
# @param postalCode [String]
|
|
55
55
|
# @param city [String]
|
|
56
|
-
# @param country [
|
|
56
|
+
# @param country [ISKOSConcept]
|
|
57
57
|
# @param latitude [Real]
|
|
58
58
|
# @param longitude [Real]
|
|
59
59
|
# @param region [String]
|
|
@@ -29,6 +29,9 @@ class DataFoodConsortium::Connector::CustomerCategory
|
|
|
29
29
|
|
|
30
30
|
SEMANTIC_TYPE = "dfc-b:CustomerCategory".freeze
|
|
31
31
|
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :name
|
|
34
|
+
|
|
32
35
|
# @return [String]
|
|
33
36
|
attr_accessor :description
|
|
34
37
|
|
|
@@ -36,13 +39,16 @@ class DataFoodConsortium::Connector::CustomerCategory
|
|
|
36
39
|
attr_accessor :members
|
|
37
40
|
|
|
38
41
|
# @param semanticId [String]
|
|
42
|
+
# @param name [String]
|
|
39
43
|
# @param description [String]
|
|
40
44
|
# @param members [IAgent]
|
|
41
|
-
def initialize(semanticId, description: nil, members: [])
|
|
45
|
+
def initialize(semanticId, name: nil, description: nil, members: [])
|
|
42
46
|
super(semanticId)
|
|
47
|
+
@name = name
|
|
43
48
|
@description = description
|
|
44
49
|
@members = members
|
|
45
50
|
self.semanticType = "dfc-b:CustomerCategory"
|
|
51
|
+
registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
|
|
46
52
|
registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
|
|
47
53
|
registerSemanticProperty("dfc-b:isMemberOf", &method("members")).valueSetter = method("members=")
|
|
48
54
|
end
|
|
@@ -21,29 +21,35 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
require "virtual_assembly/semantizer"
|
|
26
25
|
|
|
27
|
-
class DataFoodConsortium::Connector::
|
|
26
|
+
class DataFoodConsortium::Connector::OpeningHoursSpecification
|
|
28
27
|
include VirtualAssembly::Semantizer::SemanticObject
|
|
29
28
|
|
|
30
|
-
SEMANTIC_TYPE = "
|
|
31
|
-
|
|
32
|
-
# @return [
|
|
33
|
-
attr_accessor :
|
|
34
|
-
|
|
35
|
-
# @return [
|
|
36
|
-
attr_accessor :
|
|
37
|
-
|
|
38
|
-
# @
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
SEMANTIC_TYPE = "https://schema.org/OpeningHoursSpecification".freeze
|
|
30
|
+
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :dayOfWeek
|
|
33
|
+
|
|
34
|
+
# @return [Time]
|
|
35
|
+
attr_accessor :opens
|
|
36
|
+
|
|
37
|
+
# @return [Time]
|
|
38
|
+
attr_accessor :closes
|
|
39
|
+
|
|
40
|
+
# @param semanticId [String]
|
|
41
|
+
# @param dayOfWeek [String]
|
|
42
|
+
# @param opens [Time]
|
|
43
|
+
# @param closes [Time]
|
|
44
|
+
def initialize(semanticId, dayOfWeek: nil, opens: nil, closes: nil)
|
|
45
|
+
super(semanticId)
|
|
46
|
+
@dayOfWeek = dayOfWeek
|
|
47
|
+
@opens = opens
|
|
48
|
+
@closes = closes
|
|
49
|
+
self.semanticType = "https://schema.org/OpeningHoursSpecification"
|
|
50
|
+
registerSemanticProperty("https://schema.org/dayOfWeek", &method("dayOfWeek")).valueSetter = method("dayOfWeek=")
|
|
51
|
+
registerSemanticProperty("https://schema.org/opens", &method("opens")).valueSetter = method("opens=")
|
|
52
|
+
registerSemanticProperty("https://schema.org/closes", &method("closes")).valueSetter = method("closes=")
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::PlannedConsumptionFlow < DataFoodConsortium
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsPlannedConsumptionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:inputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:consumes", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::PlannedLocalConsumptionFlow < DataFoodConso
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsPlannedLocalConsumptionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:inputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:consumes", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::PlannedLocalProductionFlow < DataFoodConsor
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsPlannedLocalProductionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:outputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:produces", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -70,8 +70,8 @@ class DataFoodConsortium::Connector::PlannedLocalTransformation
|
|
|
70
70
|
registerSemanticProperty("dfc-b:cost", &method("cost")).valueSetter = method("cost=")
|
|
71
71
|
registerSemanticProperty("dfc-b:startDate", &method("startDate")).valueSetter = method("startDate=")
|
|
72
72
|
registerSemanticProperty("dfc-b:endDate", &method("endDate")).valueSetter = method("endDate=")
|
|
73
|
-
registerSemanticProperty("dfc-b:
|
|
74
|
-
registerSemanticProperty("dfc-b:
|
|
73
|
+
registerSemanticProperty("dfc-b:hasInput", &method("consumptionFlow")).valueSetter = method("consumptionFlow=")
|
|
74
|
+
registerSemanticProperty("dfc-b:hasOutput", &method("productionFlow")).valueSetter = method("productionFlow=")
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::PlannedProductionFlow < DataFoodConsortium:
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsPlannedProductionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:outputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:produces", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -51,8 +51,8 @@ class DataFoodConsortium::Connector::PlannedTransformation
|
|
|
51
51
|
@productionFlow = productionFlow
|
|
52
52
|
self.semanticType = "dfc-b:AsPlannedTransformation"
|
|
53
53
|
registerSemanticProperty("dfc-b:hasTransformationType", &method("transformationType")).valueSetter = method("transformationType=")
|
|
54
|
-
registerSemanticProperty("dfc-b:
|
|
55
|
-
registerSemanticProperty("dfc-b:
|
|
54
|
+
registerSemanticProperty("dfc-b:hasInput", &method("consumptionFlow")).valueSetter = method("consumptionFlow=")
|
|
55
|
+
registerSemanticProperty("dfc-b:hasOutput", &method("productionFlow")).valueSetter = method("productionFlow=")
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::RealizedConsumptionFlow < DataFoodConsortiu
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsRealizedConsumptionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:inputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:consumes", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -47,7 +47,7 @@ class DataFoodConsortium::Connector::RealizedProductionFlow < DataFoodConsortium
|
|
|
47
47
|
@transformation = transformation
|
|
48
48
|
@product = product
|
|
49
49
|
self.semanticType = "dfc-b:AsRealizedProductionFlow"
|
|
50
|
-
registerSemanticProperty("dfc-b:
|
|
50
|
+
registerSemanticProperty("dfc-b:outputOf", &method("transformation")).valueSetter = method("transformation=")
|
|
51
51
|
registerSemanticProperty("dfc-b:produces", &method("product")).valueSetter = method("product=")
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -64,8 +64,8 @@ class DataFoodConsortium::Connector::RealizedTransformation
|
|
|
64
64
|
registerSemanticProperty("dfc-b:hasTransformationType", &method("transformationType")).valueSetter = method("transformationType=")
|
|
65
65
|
registerSemanticProperty("dfc-b:startDate", &method("startDate")).valueSetter = method("startDate=")
|
|
66
66
|
registerSemanticProperty("dfc-b:endDate", &method("endDate")).valueSetter = method("endDate=")
|
|
67
|
-
registerSemanticProperty("dfc-b:
|
|
68
|
-
registerSemanticProperty("dfc-b:
|
|
67
|
+
registerSemanticProperty("dfc-b:hasInput", &method("consumptionFlow")).valueSetter = method("consumptionFlow=")
|
|
68
|
+
registerSemanticProperty("dfc-b:hasOutput", &method("productionFlow")).valueSetter = method("productionFlow=")
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
|
|
@@ -15,9 +15,9 @@ module DataFoodConsortium
|
|
|
15
15
|
require 'datafoodconsortium/connector/allergen_characteristic.rb'
|
|
16
16
|
require 'datafoodconsortium/connector/characteristic.rb'
|
|
17
17
|
require 'datafoodconsortium/connector/nutrient_characteristic.rb'
|
|
18
|
+
require 'datafoodconsortium/connector/opening_hours_specification.rb'
|
|
18
19
|
require 'datafoodconsortium/connector/physical_characteristic.rb'
|
|
19
20
|
require 'datafoodconsortium/connector/quantitative_value.rb'
|
|
20
|
-
require 'datafoodconsortium/connector/quantity.rb'
|
|
21
21
|
require 'datafoodconsortium/connector/value_recur.rb'
|
|
22
22
|
require 'datafoodconsortium/connector/vevent.rb'
|
|
23
23
|
require 'datafoodconsortium/connector/defined_product.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: 2.0.0.pre.
|
|
4
|
+
version: 2.0.0.pre.beta5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maxime Lecoq
|
|
@@ -57,6 +57,7 @@ files:
|
|
|
57
57
|
- lib/datafoodconsortium/connector/localized_product.rb
|
|
58
58
|
- lib/datafoodconsortium/connector/nutrient_characteristic.rb
|
|
59
59
|
- lib/datafoodconsortium/connector/offer.rb
|
|
60
|
+
- lib/datafoodconsortium/connector/opening_hours_specification.rb
|
|
60
61
|
- lib/datafoodconsortium/connector/order.rb
|
|
61
62
|
- lib/datafoodconsortium/connector/order_line.rb
|
|
62
63
|
- lib/datafoodconsortium/connector/organization.rb
|
|
@@ -79,7 +80,6 @@ files:
|
|
|
79
80
|
- lib/datafoodconsortium/connector/product_option.rb
|
|
80
81
|
- lib/datafoodconsortium/connector/product_option_value.rb
|
|
81
82
|
- lib/datafoodconsortium/connector/quantitative_value.rb
|
|
82
|
-
- lib/datafoodconsortium/connector/quantity.rb
|
|
83
83
|
- lib/datafoodconsortium/connector/real_stock.rb
|
|
84
84
|
- lib/datafoodconsortium/connector/realized_consumption_flow.rb
|
|
85
85
|
- lib/datafoodconsortium/connector/realized_production_flow.rb
|