Class: DataFoodConsortium::Connector::Enterprise
- Defined in:
- lib/datafoodconsortium/connector/enterprise.rb
Instance Attribute Summary collapse
-
#catalogItems ⇒ Object
Returns the value of attribute catalogItems.
-
#customerCategories ⇒ Object
Returns the value of attribute customerCategories.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#suppliedProducts ⇒ Object
Returns the value of attribute suppliedProducts.
-
#vatNumber ⇒ Object
Returns the value of attribute vatNumber.
Attributes inherited from Agent
Instance Method Summary collapse
- #addCatalogItem(catalogItem) ⇒ Object
- #addCustomerCategory(customerCategory) ⇒ Object
- #addSupplyProduct(suppliedProduct) ⇒ Object
-
#initialize(name) ⇒ Enterprise
constructor
A new instance of Enterprise.
Methods inherited from Agent
#addContact, #addLocalization, #removeContact, #removeLocalization
Constructor Details
#initialize(name) ⇒ Enterprise
Returns a new instance of Enterprise.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 43 def initialize(name) super() self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Enterprise" self.name = name self.description = nil self.vatNumber = nil self.customerCategories = [] self.suppliedProducts = [] self.catalogItems = [] registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasName") { self.name } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasDescription") { self.description } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#VATnumber") { self.vatNumber } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#defines") { self.customerCategories } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#supplies") { self.suppliedProducts } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#manages") { self.catalogItems } end |
Instance Attribute Details
#catalogItems ⇒ Object
Returns the value of attribute catalogItems.
41 42 43 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 41 def catalogItems @catalogItems end |
#customerCategories ⇒ Object
Returns the value of attribute customerCategories.
39 40 41 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 39 def customerCategories @customerCategories end |
#description ⇒ Object
Returns the value of attribute description.
37 38 39 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 37 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 36 def name @name end |
#suppliedProducts ⇒ Object
Returns the value of attribute suppliedProducts.
40 41 42 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 40 def suppliedProducts @suppliedProducts end |
#vatNumber ⇒ Object
Returns the value of attribute vatNumber.
38 39 40 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 38 def vatNumber @vatNumber end |
Instance Method Details
#addCatalogItem(catalogItem) ⇒ Object
69 70 71 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 69 def addCatalogItem(catalogItem) self.catalogItems.push(catalogItem) end |
#addCustomerCategory(customerCategory) ⇒ Object
61 62 63 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 61 def addCustomerCategory(customerCategory) self.customerCategories.push(customerCategory) end |
#addSupplyProduct(suppliedProduct) ⇒ Object
65 66 67 |
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 65 def addSupplyProduct(suppliedProduct) self.suppliedProducts.push(suppliedProduct) end |