datafoodconsortium-connector 2.0.0.pre.beta2 → 2.0.0.pre.beta4
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/agent.rb +1 -0
- data/lib/datafoodconsortium/connector/order.rb +8 -1
- data/lib/datafoodconsortium/connector/physical_place.rb +9 -9
- data/lib/datafoodconsortium/connector/supplied_product.rb +8 -1
- data/lib/datafoodconsortium/connector/template_sale_session.rb +7 -1
- data/lib/datafoodconsortium/connector/vevent.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2793b3c148d5db9d19bb82a711bf4cf7f438d40b338a30b5a40a7f0ff7a7df9e
|
|
4
|
+
data.tar.gz: 8c335762e0bbba6fd2afc6e50fce0ca4c82e54498f401d16d66133cdc0b77096
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 422db860ac8f9404a7bc5e4eb8f50f8f84bb1809cabd2555a8d628756c331b84c7be5d7da69c944b35a68831bb5e2995e8a7cf5f4d95f516888852219592365c
|
|
7
|
+
data.tar.gz: 525d285d284ac07f9e7f4f0f3ee8cf000e54f499e5e609eac50b030299e4a07bf015b3ae350621e0d0358805fe3b97035ed2fab867961d8a13756e808f179968
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
|
|
27
28
|
require "virtual_assembly/semantizer"
|
|
28
29
|
|
|
29
30
|
class DataFoodConsortium::Connector::Order
|
|
@@ -58,6 +59,9 @@ class DataFoodConsortium::Connector::Order
|
|
|
58
59
|
# @return [ISKOSConcept]
|
|
59
60
|
attr_accessor :paymentStatus
|
|
60
61
|
|
|
62
|
+
# @return [IPaymentMethod]
|
|
63
|
+
attr_accessor :paymentMethod
|
|
64
|
+
|
|
61
65
|
# @param semanticId [String]
|
|
62
66
|
# @param number [String]
|
|
63
67
|
# @param date [String]
|
|
@@ -68,7 +72,8 @@ class DataFoodConsortium::Connector::Order
|
|
|
68
72
|
# @param fulfilmentStatus [ISKOSConcept]
|
|
69
73
|
# @param orderStatus [ISKOSConcept]
|
|
70
74
|
# @param paymentStatus [ISKOSConcept]
|
|
71
|
-
|
|
75
|
+
# @param paymentMethod [IPaymentMethod]
|
|
76
|
+
def initialize(semanticId, number: nil, date: nil, saleSession: nil, lines: [], client: nil, soldBy: nil, fulfilmentStatus: nil, orderStatus: nil, paymentStatus: nil, paymentMethod: nil)
|
|
72
77
|
super(semanticId)
|
|
73
78
|
@number = number
|
|
74
79
|
@date = date
|
|
@@ -79,6 +84,7 @@ class DataFoodConsortium::Connector::Order
|
|
|
79
84
|
@fulfilmentStatus = fulfilmentStatus
|
|
80
85
|
@orderStatus = orderStatus
|
|
81
86
|
@paymentStatus = paymentStatus
|
|
87
|
+
@paymentMethod = paymentMethod
|
|
82
88
|
self.semanticType = "dfc-b:Order"
|
|
83
89
|
registerSemanticProperty("dfc-b:orderNumber", &method("number")).valueSetter = method("number=")
|
|
84
90
|
registerSemanticProperty("dfc-b:date", &method("date")).valueSetter = method("date=")
|
|
@@ -89,6 +95,7 @@ class DataFoodConsortium::Connector::Order
|
|
|
89
95
|
registerSemanticProperty("dfc-b:hasFulfilmentStatus", &method("fulfilmentStatus")).valueSetter = method("fulfilmentStatus=")
|
|
90
96
|
registerSemanticProperty("dfc-b:hasOrderStatus", &method("orderStatus")).valueSetter = method("orderStatus=")
|
|
91
97
|
registerSemanticProperty("dfc-b:hasPaymentStatus", &method("paymentStatus")).valueSetter = method("paymentStatus=")
|
|
98
|
+
registerSemanticProperty("dfc-b:hasPaymentMethod", &method("paymentMethod")).valueSetter = method("paymentMethod=")
|
|
92
99
|
end
|
|
93
100
|
|
|
94
101
|
|
|
@@ -46,10 +46,10 @@ class DataFoodConsortium::Connector::PhysicalPlace
|
|
|
46
46
|
attr_accessor :openingHours
|
|
47
47
|
|
|
48
48
|
# @return [IAddress]
|
|
49
|
-
attr_accessor :
|
|
49
|
+
attr_accessor :address
|
|
50
50
|
|
|
51
51
|
# @return [IPerson]
|
|
52
|
-
attr_accessor :
|
|
52
|
+
attr_accessor :mainContacts
|
|
53
53
|
|
|
54
54
|
# @return [ITheoreticalStock]
|
|
55
55
|
attr_accessor :theoreticalStocks
|
|
@@ -66,20 +66,20 @@ class DataFoodConsortium::Connector::PhysicalPlace
|
|
|
66
66
|
# @param hostedSaleSessions [ISaleSession]
|
|
67
67
|
# @param phoneNumbers [IPhoneNumber]
|
|
68
68
|
# @param openingHours [IOpeningHoursSpecification]
|
|
69
|
-
# @param
|
|
70
|
-
# @param
|
|
69
|
+
# @param address [IAddress]
|
|
70
|
+
# @param mainContacts [IPerson]
|
|
71
71
|
# @param theoreticalStocks [ITheoreticalStock]
|
|
72
72
|
# @param realStocks [IRealStock]
|
|
73
73
|
# @param features [IGeoJsonFeature]
|
|
74
|
-
def initialize(semanticId, name: nil, description: nil, hostedSaleSessions: [], phoneNumbers: [], openingHours: [],
|
|
74
|
+
def initialize(semanticId, name: nil, description: nil, hostedSaleSessions: [], phoneNumbers: [], openingHours: [], address: nil, mainContacts: [], theoreticalStocks: [], realStocks: [], features: [])
|
|
75
75
|
super(semanticId)
|
|
76
76
|
@name = name
|
|
77
77
|
@description = description
|
|
78
78
|
@hostedSaleSessions = hostedSaleSessions
|
|
79
79
|
@phoneNumbers = phoneNumbers
|
|
80
80
|
@openingHours = openingHours
|
|
81
|
-
@
|
|
82
|
-
@
|
|
81
|
+
@address = address
|
|
82
|
+
@mainContacts = mainContacts
|
|
83
83
|
@theoreticalStocks = theoreticalStocks
|
|
84
84
|
@realStocks = realStocks
|
|
85
85
|
@features = features
|
|
@@ -89,8 +89,8 @@ class DataFoodConsortium::Connector::PhysicalPlace
|
|
|
89
89
|
registerSemanticProperty("dfc-b:hosts", &method("hostedSaleSessions")).valueSetter = method("hostedSaleSessions=")
|
|
90
90
|
registerSemanticProperty("dfc-b:hasPhoneNumber", &method("phoneNumbers")).valueSetter = method("phoneNumbers=")
|
|
91
91
|
registerSemanticProperty("dfc-b:hasOpeningHours", &method("openingHours")).valueSetter = method("openingHours=")
|
|
92
|
-
registerSemanticProperty("dfc-b:hasAddress", &method("
|
|
93
|
-
registerSemanticProperty("dfc-b:hasMainContact", &method("
|
|
92
|
+
registerSemanticProperty("dfc-b:hasAddress", &method("address")).valueSetter = method("address=")
|
|
93
|
+
registerSemanticProperty("dfc-b:hasMainContact", &method("mainContacts")).valueSetter = method("mainContacts=")
|
|
94
94
|
registerSemanticProperty("dfc-b:localizes", &method("theoreticalStocks")).valueSetter = method("theoreticalStocks=")
|
|
95
95
|
registerSemanticProperty("dfc-b:stores", &method("realStocks")).valueSetter = method("realStocks=")
|
|
96
96
|
registerSemanticProperty("dfc-b:hasGeoJsonFeature", &method("features")).valueSetter = method("features=")
|
|
@@ -30,6 +30,7 @@ require "datafoodconsortium/connector/defined_product"
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
require "virtual_assembly/semantizer"
|
|
34
35
|
|
|
35
36
|
class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Connector::DefinedProduct
|
|
@@ -39,12 +40,16 @@ class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Conne
|
|
|
39
40
|
# @return [Real]
|
|
40
41
|
attr_accessor :totalTheoreticalStock
|
|
41
42
|
|
|
43
|
+
# @return [ILocalizedProduct]
|
|
44
|
+
attr_accessor :localizedProducts
|
|
45
|
+
|
|
42
46
|
|
|
43
47
|
|
|
44
48
|
|
|
45
49
|
|
|
46
50
|
# @param semanticId [String]
|
|
47
51
|
# @param totalTheoreticalStock [Real]
|
|
52
|
+
# @param localizedProducts [ILocalizedProduct]
|
|
48
53
|
# @param name [String]
|
|
49
54
|
# @param description [String]
|
|
50
55
|
# @param productType [ISKOSConcept]
|
|
@@ -64,11 +69,13 @@ class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Conne
|
|
|
64
69
|
# @param images [String]
|
|
65
70
|
# @param variants [IDefinedProduct]
|
|
66
71
|
# @param referenceProductOptions [IProductOption]
|
|
67
|
-
def initialize(semanticId, totalTheoreticalStock: nil, name: nil, description: nil, productType: nil, quantity: nil, alcoholPercentage: nil, lifetime: nil, claims: [], usageOrStorageConditions: nil, allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [], images: [], variants: [], referenceProductOptions: [])
|
|
72
|
+
def initialize(semanticId, totalTheoreticalStock: nil, localizedProducts: [], name: nil, description: nil, productType: nil, quantity: nil, alcoholPercentage: nil, lifetime: nil, claims: [], usageOrStorageConditions: nil, allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [], images: [], variants: [], referenceProductOptions: [])
|
|
68
73
|
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, images: images, variants: variants, referenceProductOptions: referenceProductOptions)
|
|
69
74
|
@totalTheoreticalStock = totalTheoreticalStock
|
|
75
|
+
@localizedProducts = localizedProducts
|
|
70
76
|
self.semanticType = "dfc-b:SuppliedProduct"
|
|
71
77
|
registerSemanticProperty("dfc-b:totalTheoreticalStock", &method("totalTheoreticalStock")).valueSetter = method("totalTheoreticalStock=")
|
|
78
|
+
registerSemanticProperty("dfc-b:referenceOf", &method("localizedProducts")).valueSetter = method("localizedProducts=")
|
|
72
79
|
end
|
|
73
80
|
|
|
74
81
|
|
|
@@ -36,16 +36,22 @@ class DataFoodConsortium::Connector::TemplateSaleSession
|
|
|
36
36
|
# @return [IOrganization]
|
|
37
37
|
attr_accessor :organizations
|
|
38
38
|
|
|
39
|
+
# @return [DateTime]
|
|
40
|
+
attr_accessor :date
|
|
41
|
+
|
|
39
42
|
# @param semanticId [String]
|
|
40
43
|
# @param hostingPlaces [IPlace]
|
|
41
44
|
# @param organizations [IOrganization]
|
|
42
|
-
|
|
45
|
+
# @param date [DateTime]
|
|
46
|
+
def initialize(semanticId, hostingPlaces: [], organizations: [], date: nil)
|
|
43
47
|
super(semanticId)
|
|
44
48
|
@hostingPlaces = hostingPlaces
|
|
45
49
|
@organizations = organizations
|
|
50
|
+
@date = date
|
|
46
51
|
self.semanticType = "dfc-b:TemplateSaleSession"
|
|
47
52
|
registerSemanticProperty("dfc-b:hostedAt", &method("hostingPlaces")).valueSetter = method("hostingPlaces=")
|
|
48
53
|
registerSemanticProperty("dfc-b:isTemplateSaleSessionOf", &method("organizations")).valueSetter = method("organizations=")
|
|
54
|
+
registerSemanticProperty("dfc-b:date", &method("date")).valueSetter = method("date=")
|
|
49
55
|
end
|
|
50
56
|
|
|
51
57
|
|
|
@@ -60,8 +60,8 @@ class DataFoodConsortium::Connector::Vevent
|
|
|
60
60
|
@rrule = rrule
|
|
61
61
|
self.semanticType = "http://www.w3.org/2002/12/cal/icaltzd#Vevent"
|
|
62
62
|
registerSemanticProperty("http://www.w3.org/2002/12/cal/icaltzd#dtstart", &method("dtstart")).valueSetter = method("dtstart=")
|
|
63
|
-
registerSemanticProperty("http://www.w3.org/2002/12/cal/icaltzd#
|
|
64
|
-
registerSemanticProperty("http://www.w3.org/2002/12/cal/icaltzd#
|
|
63
|
+
registerSemanticProperty("http://www.w3.org/2002/12/cal/icaltzd#dtend", &method("dtend")).valueSetter = method("dtend=")
|
|
64
|
+
registerSemanticProperty("http://www.w3.org/2002/12/cal/icaltzd#rrule", &method("rrule")).valueSetter = method("rrule=")
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
|