dfc-linkml-connector 2.0.6
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +78 -0
- data/contexts/context_2.0.0.json +544 -0
- data/lib/core/connector.rb +670 -0
- data/lib/core/json_ld_serializer.rb +92 -0
- data/lib/core/semantic_object.rb +103 -0
- data/lib/core/vocabulary_loader.rb +125 -0
- data/lib/dfc_linkml_connector.rb +102 -0
- data/lib/models/address.rb +68 -0
- data/lib/models/agent.rb +83 -0
- data/lib/models/allergen_characteristic.rb +57 -0
- data/lib/models/as_planned_consumption_flow.rb +25 -0
- data/lib/models/as_planned_local_consumption_flow.rb +25 -0
- data/lib/models/as_planned_local_production_flow.rb +25 -0
- data/lib/models/as_planned_local_transformation.rb +53 -0
- data/lib/models/as_planned_production_flow.rb +25 -0
- data/lib/models/as_planned_transformation.rb +38 -0
- data/lib/models/as_realized_consumption_flow.rb +25 -0
- data/lib/models/as_realized_production_flow.rb +25 -0
- data/lib/models/as_realized_transformation.rb +48 -0
- data/lib/models/brand.rb +33 -0
- data/lib/models/catalog.rb +43 -0
- data/lib/models/catalog_item.rb +93 -0
- data/lib/models/certfication.rb +43 -0
- data/lib/models/collection.rb +47 -0
- data/lib/models/concept.rb +82 -0
- data/lib/models/concept_scheme.rb +47 -0
- data/lib/models/consumption_flow.rb +67 -0
- data/lib/models/coordination.rb +62 -0
- data/lib/models/customer_category.rb +38 -0
- data/lib/models/defined_product.rb +178 -0
- data/lib/models/delivery_option.rb +48 -0
- data/lib/models/delivery_step.rb +25 -0
- data/lib/models/ditributed_representation.rb +47 -0
- data/lib/models/enterprise.rb +29 -0
- data/lib/models/feature.rb +57 -0
- data/lib/models/functional_product.rb +33 -0
- data/lib/models/geometry.rb +52 -0
- data/lib/models/how_subject.rb +47 -0
- data/lib/models/individual.rb +47 -0
- data/lib/models/ingredient.rb +38 -0
- data/lib/models/labelling_characteristic.rb +57 -0
- data/lib/models/length.rb +25 -0
- data/lib/models/localized_product.rb +68 -0
- data/lib/models/nutrient_characteristic.rb +57 -0
- data/lib/models/offer.rb +82 -0
- data/lib/models/opening_hours_specification.rb +62 -0
- data/lib/models/order.rb +115 -0
- data/lib/models/order_line.rb +86 -0
- data/lib/models/organization.rb +92 -0
- data/lib/models/payment_method.rb +43 -0
- data/lib/models/person.rb +38 -0
- data/lib/models/phone_number.rb +38 -0
- data/lib/models/physical_characteristic.rb +57 -0
- data/lib/models/physical_place.rb +58 -0
- data/lib/models/physical_product.rb +78 -0
- data/lib/models/pick_up_step.rb +25 -0
- data/lib/models/pickup_option.rb +33 -0
- data/lib/models/place.rb +28 -0
- data/lib/models/platform.rb +25 -0
- data/lib/models/point.rb +25 -0
- data/lib/models/polygon.rb +25 -0
- data/lib/models/price.rb +37 -0
- data/lib/models/product_batch.rb +53 -0
- data/lib/models/product_option.rb +28 -0
- data/lib/models/product_option_value.rb +25 -0
- data/lib/models/production_flow.rb +67 -0
- data/lib/models/properties.rb +47 -0
- data/lib/models/quantitative_value.rb +33 -0
- data/lib/models/real_stock.rb +38 -0
- data/lib/models/representation_pivot.rb +25 -0
- data/lib/models/represented_thing.rb +25 -0
- data/lib/models/route.rb +38 -0
- data/lib/models/sale_session.rb +92 -0
- data/lib/models/shipment.rb +77 -0
- data/lib/models/shipping_option.rb +58 -0
- data/lib/models/social_media.rb +33 -0
- data/lib/models/step.rb +48 -0
- data/lib/models/stock.rb +67 -0
- data/lib/models/supplied_product.rb +73 -0
- data/lib/models/technical_product.rb +38 -0
- data/lib/models/temperature.rb +28 -0
- data/lib/models/template_sale_session.rb +57 -0
- data/lib/models/theoritical_stock.rb +33 -0
- data/lib/models/transaction.rb +62 -0
- data/lib/models/transformation.rb +25 -0
- data/lib/models/value_r_e_c_u_r.rb +67 -0
- data/lib/models/variant.rb +33 -0
- data/lib/models/variant_caracteristic.rb +33 -0
- data/lib/models/vehicle.rb +58 -0
- data/lib/models/vevent.rb +62 -0
- data/lib/models/virtual_place.rb +33 -0
- data/lib/models/volume.rb +25 -0
- data/lib/models/weight.rb +25 -0
- data/lib/models/what_subject.rb +47 -0
- data/lib/models/where_subject.rb +47 -0
- data/lib/models/who_subject.rb +47 -0
- data/vocabularies/facet.jsonld +4130 -0
- data/vocabularies/measure.jsonld +2586 -0
- data/vocabularies/product_type.jsonld +10116 -0
- data/vocabularies/scope.jsonld +190 -0
- data/vocabularies/vocabulary_term.jsonld +502 -0
- metadata +199 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #OrderLine
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module DfcLinkmlConnector
|
|
8
|
+
module Models
|
|
9
|
+
class OrderLine < Core::SemanticObject
|
|
10
|
+
SEMANTIC_TYPE = "dfc-b:OrderLine".freeze
|
|
11
|
+
|
|
12
|
+
# @return [Float]
|
|
13
|
+
attr_accessor :discount
|
|
14
|
+
|
|
15
|
+
# @return [Float]
|
|
16
|
+
attr_accessor :quantity
|
|
17
|
+
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :concerns
|
|
20
|
+
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :price
|
|
23
|
+
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :is_fulfilled_by
|
|
26
|
+
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :date
|
|
29
|
+
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :characteristic_of
|
|
38
|
+
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :dimension
|
|
41
|
+
|
|
42
|
+
# @return [QuantitativeValue, String]
|
|
43
|
+
attr_accessor :has_quantity
|
|
44
|
+
|
|
45
|
+
# @return [Order, String]
|
|
46
|
+
attr_accessor :part_of
|
|
47
|
+
|
|
48
|
+
# @param semanticId [String]
|
|
49
|
+
# @param discount: nil, quantity: nil, concerns: nil, price: nil, isFulfilledBy: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hasQuantity: nil, partOf: nil
|
|
50
|
+
def initialize(semanticId, discount: nil, quantity: nil, concerns: nil, price: nil, isFulfilledBy: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hasQuantity: nil, partOf: nil)
|
|
51
|
+
super(semanticId)
|
|
52
|
+
@discount = discount
|
|
53
|
+
@quantity = quantity
|
|
54
|
+
@concerns = concerns
|
|
55
|
+
@price = price
|
|
56
|
+
@is_fulfilled_by = isFulfilledBy
|
|
57
|
+
@date = date
|
|
58
|
+
@description = description
|
|
59
|
+
@name = name
|
|
60
|
+
@characteristic_of = characteristicOf
|
|
61
|
+
@dimension = dimension
|
|
62
|
+
@has_quantity = hasQuantity
|
|
63
|
+
@part_of = partOf
|
|
64
|
+
self.semanticType = "dfc-b:OrderLine"
|
|
65
|
+
registerSemanticProperty("dfc-b:discount", &method("discount")).valueSetter = method("discount=")
|
|
66
|
+
registerSemanticProperty("dfc-b:quantity", &method("quantity")).valueSetter = method("quantity=")
|
|
67
|
+
registerSemanticProperty("dfc-b:concerns", &method("concerns")).valueSetter = method("concerns=")
|
|
68
|
+
registerSemanticProperty("dfc-b:hasPrice", &method("price")).valueSetter = method("price=")
|
|
69
|
+
registerSemanticProperty("dfc-b:isFulfilledBy", &method("is_fulfilled_by")).valueSetter = method("is_fulfilled_by=")
|
|
70
|
+
registerSemanticProperty("dfc-b:date", &method("date")).valueSetter = method("date=")
|
|
71
|
+
registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
|
|
72
|
+
registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
|
|
73
|
+
registerSemanticProperty("dfc-b:characteristicOf", &method("characteristic_of")).valueSetter = method("characteristic_of=")
|
|
74
|
+
registerSemanticProperty("dfc-b:hasDimension", &method("dimension")).valueSetter = method("dimension=")
|
|
75
|
+
registerSemanticProperty("dfc-b:hasQuantity", &method("has_quantity")).valueSetter = method("has_quantity=")
|
|
76
|
+
registerSemanticProperty("dfc-b:partOf", &method("part_of")).valueSetter = method("part_of=")
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Original DFC v2 API aliases (see config/dfc-original-api.yaml).
|
|
80
|
+
alias_method :offer, :concerns
|
|
81
|
+
alias_method :offer=, :concerns=
|
|
82
|
+
|
|
83
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Organization
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'agent'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Organization < Agent
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Organization".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :vat_number
|
|
15
|
+
|
|
16
|
+
# @return [Boolean]
|
|
17
|
+
attr_accessor :vat_status
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :enterprise_id
|
|
21
|
+
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :template_sale_session
|
|
24
|
+
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :is_certified_by
|
|
27
|
+
|
|
28
|
+
# @return [Array<Organization, String>]
|
|
29
|
+
attr_accessor :affiliates
|
|
30
|
+
|
|
31
|
+
# @return [Array<CustomerCategory, String>]
|
|
32
|
+
attr_accessor :defines
|
|
33
|
+
|
|
34
|
+
# @return [Person, String]
|
|
35
|
+
attr_accessor :main_contact
|
|
36
|
+
|
|
37
|
+
# @return [Array<Catalog, String>]
|
|
38
|
+
attr_accessor :maintains
|
|
39
|
+
|
|
40
|
+
# @return [Array<CatalogItem, String>]
|
|
41
|
+
attr_accessor :manages
|
|
42
|
+
|
|
43
|
+
# @return [Array<TechnicalProduct, String>]
|
|
44
|
+
attr_accessor :proposes
|
|
45
|
+
|
|
46
|
+
# @return [Array<SuppliedProduct, String>]
|
|
47
|
+
attr_accessor :supplies
|
|
48
|
+
|
|
49
|
+
# @return [Array<AsPlannedLocalTransformation, String>]
|
|
50
|
+
attr_accessor :transforms
|
|
51
|
+
|
|
52
|
+
# @param semanticId [String]
|
|
53
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, email: nil, logo: nil, websitePage: nil, hasPhoneNumber: nil, socialMedia: nil, owns: nil, sells: nil, affiliatedTo: nil, address: [], isMemberOf: [], orders: [], requests: [], vatNumber: nil, vatStatus: nil, enterpriseId: nil, templateSaleSession: nil, isCertifiedBy: nil, affiliates: [], defines: [], mainContact: nil, maintains: [], manages: [], proposes: [], supplies: [], transforms: []
|
|
54
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, email: nil, logo: nil, websitePage: nil, hasPhoneNumber: nil, socialMedia: nil, owns: nil, sells: nil, affiliatedTo: nil, address: [], isMemberOf: [], orders: [], requests: [], vatNumber: nil, vatStatus: nil, enterpriseId: nil, templateSaleSession: nil, isCertifiedBy: nil, affiliates: [], defines: [], mainContact: nil, maintains: [], manages: [], proposes: [], supplies: [], transforms: [])
|
|
55
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension, email: email, logo: logo, websitePage: websitePage, hasPhoneNumber: hasPhoneNumber, socialMedia: socialMedia, owns: owns, sells: sells, affiliatedTo: affiliatedTo, address: address, isMemberOf: isMemberOf, orders: orders, requests: requests)
|
|
56
|
+
@vat_number = vatNumber
|
|
57
|
+
@vat_status = vatStatus
|
|
58
|
+
@enterprise_id = enterpriseId
|
|
59
|
+
@template_sale_session = templateSaleSession
|
|
60
|
+
@is_certified_by = isCertifiedBy
|
|
61
|
+
@affiliates = affiliates
|
|
62
|
+
@defines = defines
|
|
63
|
+
@main_contact = mainContact
|
|
64
|
+
@maintains = maintains
|
|
65
|
+
@manages = manages
|
|
66
|
+
@proposes = proposes
|
|
67
|
+
@supplies = supplies
|
|
68
|
+
@transforms = transforms
|
|
69
|
+
self.semanticType = "dfc-b:Organization"
|
|
70
|
+
registerSemanticProperty("dfc-b:VATnumber", &method("vat_number")).valueSetter = method("vat_number=")
|
|
71
|
+
registerSemanticProperty("dfc-b:VATstatus", &method("vat_status")).valueSetter = method("vat_status=")
|
|
72
|
+
registerSemanticProperty("dfc-b:enterpriseID", &method("enterprise_id")).valueSetter = method("enterprise_id=")
|
|
73
|
+
registerSemanticProperty("dfc-b:hasTemplateSaleSession", &method("template_sale_session")).valueSetter = method("template_sale_session=")
|
|
74
|
+
registerSemanticProperty("dfc-b:isCertifiedBy", &method("is_certified_by")).valueSetter = method("is_certified_by=")
|
|
75
|
+
registerSemanticProperty("dfc-b:affiliates", &method("affiliates")).valueSetter = method("affiliates=")
|
|
76
|
+
registerSemanticProperty("dfc-b:defines", &method("defines")).valueSetter = method("defines=")
|
|
77
|
+
registerSemanticProperty("dfc-b:hasMainContact", &method("main_contact")).valueSetter = method("main_contact=")
|
|
78
|
+
registerSemanticProperty("dfc-b:maintains", &method("maintains")).valueSetter = method("maintains=")
|
|
79
|
+
registerSemanticProperty("dfc-b:manages", &method("manages")).valueSetter = method("manages=")
|
|
80
|
+
registerSemanticProperty("dfc-b:proposes", &method("proposes")).valueSetter = method("proposes=")
|
|
81
|
+
registerSemanticProperty("dfc-b:supplies", &method("supplies")).valueSetter = method("supplies=")
|
|
82
|
+
registerSemanticProperty("dfc-b:transforms", &method("transforms")).valueSetter = method("transforms=")
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Original DFC v2 API aliases (see config/dfc-original-api.yaml).
|
|
86
|
+
alias_method :vatNumber, :vat_number
|
|
87
|
+
alias_method :vatNumber=, :vat_number=
|
|
88
|
+
|
|
89
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PaymentMethod
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'how_subject'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PaymentMethod < HowSubject
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PaymentMethod".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :payment_method_provider
|
|
15
|
+
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :payment_method_type
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :price
|
|
21
|
+
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :paid_with
|
|
24
|
+
|
|
25
|
+
# @param semanticId [String]
|
|
26
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, paymentMethodProvider: nil, paymentMethodType: nil, price: nil, paidWith: nil
|
|
27
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, paymentMethodProvider: nil, paymentMethodType: nil, price: nil, paidWith: nil)
|
|
28
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
29
|
+
@payment_method_provider = paymentMethodProvider
|
|
30
|
+
@payment_method_type = paymentMethodType
|
|
31
|
+
@price = price
|
|
32
|
+
@paid_with = paidWith
|
|
33
|
+
self.semanticType = "dfc-b:PaymentMethod"
|
|
34
|
+
registerSemanticProperty("dfc-b:paymentMethodProvider", &method("payment_method_provider")).valueSetter = method("payment_method_provider=")
|
|
35
|
+
registerSemanticProperty("dfc-b:paymentMethodType", &method("payment_method_type")).valueSetter = method("payment_method_type=")
|
|
36
|
+
registerSemanticProperty("dfc-b:hasPrice", &method("price")).valueSetter = method("price=")
|
|
37
|
+
registerSemanticProperty("dfc-b:paidWith", &method("paid_with")).valueSetter = method("paid_with=")
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Person
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'agent'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Person < Agent
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Person".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :family_name
|
|
15
|
+
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :first_name
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :main_contact_of
|
|
21
|
+
|
|
22
|
+
# @param semanticId [String]
|
|
23
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, email: nil, logo: nil, websitePage: nil, hasPhoneNumber: nil, socialMedia: nil, owns: nil, sells: nil, affiliatedTo: nil, address: [], isMemberOf: [], orders: [], requests: [], familyName: nil, firstName: nil, mainContactOf: nil
|
|
24
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, email: nil, logo: nil, websitePage: nil, hasPhoneNumber: nil, socialMedia: nil, owns: nil, sells: nil, affiliatedTo: nil, address: [], isMemberOf: [], orders: [], requests: [], familyName: nil, firstName: nil, mainContactOf: nil)
|
|
25
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension, email: email, logo: logo, websitePage: websitePage, hasPhoneNumber: hasPhoneNumber, socialMedia: socialMedia, owns: owns, sells: sells, affiliatedTo: affiliatedTo, address: address, isMemberOf: isMemberOf, orders: orders, requests: requests)
|
|
26
|
+
@family_name = familyName
|
|
27
|
+
@first_name = firstName
|
|
28
|
+
@main_contact_of = mainContactOf
|
|
29
|
+
self.semanticType = "dfc-b:Person"
|
|
30
|
+
registerSemanticProperty("dfc-b:familyName", &method("family_name")).valueSetter = method("family_name=")
|
|
31
|
+
registerSemanticProperty("dfc-b:firstName", &method("first_name")).valueSetter = method("first_name=")
|
|
32
|
+
registerSemanticProperty("dfc-b:mainContactOf", &method("main_contact_of")).valueSetter = method("main_contact_of=")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PhoneNumber
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'what_subject'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PhoneNumber < WhatSubject
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PhoneNumber".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :country_code
|
|
15
|
+
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :phone_number
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :phone_number_of
|
|
21
|
+
|
|
22
|
+
# @param semanticId [String]
|
|
23
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, countryCode: nil, phoneNumber: nil, phoneNumberOf: nil
|
|
24
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, countryCode: nil, phoneNumber: nil, phoneNumberOf: nil)
|
|
25
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
26
|
+
@country_code = countryCode
|
|
27
|
+
@phone_number = phoneNumber
|
|
28
|
+
@phone_number_of = phoneNumberOf
|
|
29
|
+
self.semanticType = "dfc-b:PhoneNumber"
|
|
30
|
+
registerSemanticProperty("dfc-b:countryCode", &method("country_code")).valueSetter = method("country_code=")
|
|
31
|
+
registerSemanticProperty("dfc-b:phoneNumber", &method("phone_number")).valueSetter = method("phone_number=")
|
|
32
|
+
registerSemanticProperty("dfc-b:phoneNumberOf", &method("phone_number_of")).valueSetter = method("phone_number_of=")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PhysicalCharacteristic
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module DfcLinkmlConnector
|
|
8
|
+
module Models
|
|
9
|
+
class PhysicalCharacteristic < Core::SemanticObject
|
|
10
|
+
SEMANTIC_TYPE = "dfc-b:PhysicalCharacteristic".freeze
|
|
11
|
+
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :physical_characteristic_of
|
|
14
|
+
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :date
|
|
17
|
+
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :description
|
|
20
|
+
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :characteristic_of
|
|
26
|
+
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :dimension
|
|
29
|
+
|
|
30
|
+
# @return [Concept, String]
|
|
31
|
+
attr_accessor :physical_dimension
|
|
32
|
+
|
|
33
|
+
# @param semanticId [String]
|
|
34
|
+
# @param physicalCharacteristicOf: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, physicalDimension: nil
|
|
35
|
+
def initialize(semanticId, physicalCharacteristicOf: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, physicalDimension: nil)
|
|
36
|
+
super(semanticId)
|
|
37
|
+
@physical_characteristic_of = physicalCharacteristicOf
|
|
38
|
+
@date = date
|
|
39
|
+
@description = description
|
|
40
|
+
@name = name
|
|
41
|
+
@characteristic_of = characteristicOf
|
|
42
|
+
@dimension = dimension
|
|
43
|
+
@physical_dimension = physicalDimension
|
|
44
|
+
self.semanticType = "dfc-b:PhysicalCharacteristic"
|
|
45
|
+
registerSemanticProperty("dfc-b:physicalCharacteristicOf", &method("physical_characteristic_of")).valueSetter = method("physical_characteristic_of=")
|
|
46
|
+
registerSemanticProperty("dfc-b:date", &method("date")).valueSetter = method("date=")
|
|
47
|
+
registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
|
|
48
|
+
registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
|
|
49
|
+
registerSemanticProperty("dfc-b:characteristicOf", &method("characteristic_of")).valueSetter = method("characteristic_of=")
|
|
50
|
+
registerSemanticProperty("dfc-b:hasDimension", &method("dimension")).valueSetter = method("dimension=")
|
|
51
|
+
registerSemanticProperty("dfc-b:hasPhysicalDimension", &method("physical_dimension")).valueSetter = method("physical_dimension=")
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PhysicalPlace
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'place'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PhysicalPlace < Place
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PhysicalPlace".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :has_phone_number
|
|
15
|
+
|
|
16
|
+
# @return [Address, String]
|
|
17
|
+
attr_accessor :address
|
|
18
|
+
|
|
19
|
+
# @return [Array<Feature, String>]
|
|
20
|
+
attr_accessor :geo_json_feature
|
|
21
|
+
|
|
22
|
+
# @return [Array<Person, String>]
|
|
23
|
+
attr_accessor :main_contact
|
|
24
|
+
|
|
25
|
+
# @return [OpeningHoursSpecification, String]
|
|
26
|
+
attr_accessor :is_open_during
|
|
27
|
+
|
|
28
|
+
# @return [Array<TheoriticalStock, String>]
|
|
29
|
+
attr_accessor :localizes
|
|
30
|
+
|
|
31
|
+
# @return [Array<RealStock, String>]
|
|
32
|
+
attr_accessor :stores
|
|
33
|
+
|
|
34
|
+
# @param semanticId [String]
|
|
35
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hosts: [], hasPhoneNumber: nil, address: nil, geoJsonFeature: [], mainContact: [], isOpenDuring: nil, localizes: [], stores: []
|
|
36
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hosts: [], hasPhoneNumber: nil, address: nil, geoJsonFeature: [], mainContact: [], isOpenDuring: nil, localizes: [], stores: [])
|
|
37
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension, hosts: hosts)
|
|
38
|
+
@has_phone_number = hasPhoneNumber
|
|
39
|
+
@address = address
|
|
40
|
+
@geo_json_feature = geoJsonFeature
|
|
41
|
+
@main_contact = mainContact
|
|
42
|
+
@is_open_during = isOpenDuring
|
|
43
|
+
@localizes = localizes
|
|
44
|
+
@stores = stores
|
|
45
|
+
self.semanticType = "dfc-b:PhysicalPlace"
|
|
46
|
+
registerSemanticProperty("dfc-b:hasPhoneNumber", &method("has_phone_number")).valueSetter = method("has_phone_number=")
|
|
47
|
+
registerSemanticProperty("dfc-b:hasAddress", &method("address")).valueSetter = method("address=")
|
|
48
|
+
registerSemanticProperty("dfc-b:hasGeoJsonFeature", &method("geo_json_feature")).valueSetter = method("geo_json_feature=")
|
|
49
|
+
registerSemanticProperty("dfc-b:hasMainContact", &method("main_contact")).valueSetter = method("main_contact=")
|
|
50
|
+
registerSemanticProperty("dfc-b:isOpenDuring", &method("is_open_during")).valueSetter = method("is_open_during=")
|
|
51
|
+
registerSemanticProperty("dfc-b:localizes", &method("localizes")).valueSetter = method("localizes=")
|
|
52
|
+
registerSemanticProperty("dfc-b:stores", &method("stores")).valueSetter = method("stores=")
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PhysicalProduct
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'what_subject'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PhysicalProduct < WhatSubject
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PhysicalProduct".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :image
|
|
15
|
+
|
|
16
|
+
# @return [Float]
|
|
17
|
+
attr_accessor :quantity
|
|
18
|
+
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :concerned_by
|
|
21
|
+
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :constitued_by
|
|
24
|
+
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :consumed_by
|
|
27
|
+
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :fulfills
|
|
30
|
+
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :produced_by
|
|
33
|
+
|
|
34
|
+
# @return [QuantitativeValue, String]
|
|
35
|
+
attr_accessor :has_quantity
|
|
36
|
+
|
|
37
|
+
# @return [Agent, String]
|
|
38
|
+
attr_accessor :owned_by
|
|
39
|
+
|
|
40
|
+
# @return [Array<LocalizedProduct, String>]
|
|
41
|
+
attr_accessor :represents
|
|
42
|
+
|
|
43
|
+
# @return [Array<ProductBatch, String>]
|
|
44
|
+
attr_accessor :traced_by
|
|
45
|
+
|
|
46
|
+
# @param semanticId [String]
|
|
47
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, image: nil, quantity: nil, concernedBy: nil, constituedBy: nil, consumedBy: nil, fulfills: nil, producedBy: nil, hasQuantity: nil, ownedBy: nil, represents: [], tracedBy: []
|
|
48
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, image: nil, quantity: nil, concernedBy: nil, constituedBy: nil, consumedBy: nil, fulfills: nil, producedBy: nil, hasQuantity: nil, ownedBy: nil, represents: [], tracedBy: [])
|
|
49
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
50
|
+
@image = image
|
|
51
|
+
@quantity = quantity
|
|
52
|
+
@concerned_by = concernedBy
|
|
53
|
+
@constitued_by = constituedBy
|
|
54
|
+
@consumed_by = consumedBy
|
|
55
|
+
@fulfills = fulfills
|
|
56
|
+
@produced_by = producedBy
|
|
57
|
+
@has_quantity = hasQuantity
|
|
58
|
+
@owned_by = ownedBy
|
|
59
|
+
@represents = represents
|
|
60
|
+
@traced_by = tracedBy
|
|
61
|
+
self.semanticType = "dfc-b:PhysicalProduct"
|
|
62
|
+
registerSemanticProperty("dfc-b:Image", &method("image")).valueSetter = method("image=")
|
|
63
|
+
registerSemanticProperty("dfc-b:quantity", &method("quantity")).valueSetter = method("quantity=")
|
|
64
|
+
registerSemanticProperty("dfc-b:concernedBy", &method("concerned_by")).valueSetter = method("concerned_by=")
|
|
65
|
+
registerSemanticProperty("dfc-b:constituedBy", &method("constitued_by")).valueSetter = method("constitued_by=")
|
|
66
|
+
registerSemanticProperty("dfc-b:consumedBy", &method("consumed_by")).valueSetter = method("consumed_by=")
|
|
67
|
+
registerSemanticProperty("dfc-b:fulfills", &method("fulfills")).valueSetter = method("fulfills=")
|
|
68
|
+
registerSemanticProperty("dfc-b:producedBy", &method("produced_by")).valueSetter = method("produced_by=")
|
|
69
|
+
registerSemanticProperty("dfc-b:hasQuantity", &method("has_quantity")).valueSetter = method("has_quantity=")
|
|
70
|
+
registerSemanticProperty("dfc-b:ownedBy", &method("owned_by")).valueSetter = method("owned_by=")
|
|
71
|
+
registerSemanticProperty("dfc-b:represents", &method("represents")).valueSetter = method("represents=")
|
|
72
|
+
registerSemanticProperty("dfc-b:tracedBy", &method("traced_by")).valueSetter = method("traced_by=")
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PickUpStep
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'step'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PickUpStep < Step
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PickUpStep".freeze
|
|
12
|
+
|
|
13
|
+
# @param semanticId [String]
|
|
14
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, arrivalDate: nil, duration: nil, isStepOf: nil, delivery: [], pickUp: []
|
|
15
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, arrivalDate: nil, duration: nil, isStepOf: nil, delivery: [], pickUp: [])
|
|
16
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension, arrivalDate: arrivalDate, duration: duration, isStepOf: isStepOf, delivery: delivery, pickUp: pickUp)
|
|
17
|
+
|
|
18
|
+
self.semanticType = "dfc-b:PickUpStep"
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #PickupOption
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'shipping_option'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class PickupOption < ShippingOption
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:PickupOption".freeze
|
|
12
|
+
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :picked_up_at
|
|
15
|
+
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :uses
|
|
18
|
+
|
|
19
|
+
# @param semanticId [String]
|
|
20
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, endDate: nil, fee: nil, quantity: nil, startDate: nil, selectedBy: nil, hasQuantity: nil, optionOf: nil, pickedUpAt: nil, uses: nil
|
|
21
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, endDate: nil, fee: nil, quantity: nil, startDate: nil, selectedBy: nil, hasQuantity: nil, optionOf: nil, pickedUpAt: nil, uses: nil)
|
|
22
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension, endDate: endDate, fee: fee, quantity: quantity, startDate: startDate, selectedBy: selectedBy, hasQuantity: hasQuantity, optionOf: optionOf)
|
|
23
|
+
@picked_up_at = pickedUpAt
|
|
24
|
+
@uses = uses
|
|
25
|
+
self.semanticType = "dfc-b:PickupOption"
|
|
26
|
+
registerSemanticProperty("dfc-b:pickedUpAt", &method("picked_up_at")).valueSetter = method("picked_up_at=")
|
|
27
|
+
registerSemanticProperty("dfc-b:uses", &method("uses")).valueSetter = method("uses=")
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/models/place.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Place
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'where_subject'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Place < WhereSubject
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Place".freeze
|
|
12
|
+
|
|
13
|
+
# @return [Array<SaleSession, String>]
|
|
14
|
+
attr_accessor :hosts
|
|
15
|
+
|
|
16
|
+
# @param semanticId [String]
|
|
17
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hosts: []
|
|
18
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil, hosts: [])
|
|
19
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
20
|
+
@hosts = hosts
|
|
21
|
+
self.semanticType = "dfc-b:Place"
|
|
22
|
+
registerSemanticProperty("dfc-b:hosts", &method("hosts")).valueSetter = method("hosts=")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Platform
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'ditributed_representation'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Platform < DitributedRepresentation
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Platform".freeze
|
|
12
|
+
|
|
13
|
+
# @param semanticId [String]
|
|
14
|
+
# @param date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil
|
|
15
|
+
def initialize(semanticId, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil)
|
|
16
|
+
super(semanticId, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
17
|
+
|
|
18
|
+
self.semanticType = "dfc-b:Platform"
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/models/point.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Point
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'geometry'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Point < Geometry
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Point".freeze
|
|
12
|
+
|
|
13
|
+
# @param semanticId [String]
|
|
14
|
+
# @param coordinates: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil
|
|
15
|
+
def initialize(semanticId, coordinates: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil)
|
|
16
|
+
super(semanticId, coordinates: coordinates, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
17
|
+
|
|
18
|
+
self.semanticType = "dfc-b:Point"
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Class from DFC Business Ontology: #Polygon
|
|
4
|
+
require_relative '../core/semantic_object'
|
|
5
|
+
require_relative 'geometry'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module DfcLinkmlConnector
|
|
9
|
+
module Models
|
|
10
|
+
class Polygon < Geometry
|
|
11
|
+
SEMANTIC_TYPE = "dfc-b:Polygon".freeze
|
|
12
|
+
|
|
13
|
+
# @param semanticId [String]
|
|
14
|
+
# @param coordinates: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil
|
|
15
|
+
def initialize(semanticId, coordinates: nil, date: nil, description: nil, name: nil, characteristicOf: nil, dimension: nil)
|
|
16
|
+
super(semanticId, coordinates: coordinates, date: date, description: description, name: name, characteristicOf: characteristicOf, dimension: dimension)
|
|
17
|
+
|
|
18
|
+
self.semanticType = "dfc-b:Polygon"
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Core::SemanticObject.type_registry[SEMANTIC_TYPE] = self
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|