Class: DataFoodConsortium::Connector::Enterprise

Inherits:
Agent
  • Object
show all
Defined in:
lib/datafoodconsortium/connector/enterprise.rb

Instance Attribute Summary collapse

Attributes inherited from Agent

#contacts, #localizations

Instance Method Summary collapse

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

#catalogItemsObject

Returns the value of attribute catalogItems.



41
42
43
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 41

def catalogItems
  @catalogItems
end

#customerCategoriesObject

Returns the value of attribute customerCategories.



39
40
41
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 39

def customerCategories
  @customerCategories
end

#descriptionObject

Returns the value of attribute description.



37
38
39
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 37

def description
  @description
end

#nameObject

Returns the value of attribute name.



36
37
38
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 36

def name
  @name
end

#suppliedProductsObject

Returns the value of attribute suppliedProducts.



40
41
42
# File 'lib/datafoodconsortium/connector/enterprise.rb', line 40

def suppliedProducts
  @suppliedProducts
end

#vatNumberObject

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