Class: DataFoodConsortium::Connector::Offer

Inherits:
Object
  • Object
show all
Includes:
VirtualAssembly::Semantizer::SemanticObject
Defined in:
lib/datafoodconsortium/connector/offer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(offeredItem, offeredTo) ⇒ Offer

Returns a new instance of Offer.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/datafoodconsortium/connector/offer.rb', line 37

def initialize(offeredItem, offeredTo)
	super()
	self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Offer"
	self.offeredItem = offeredItem
	self.offeredTo = offeredTo
	self.price = nil
	self.stockLimitation = nil
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#price") { self.price }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredItem") { self.offeredItem }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredTo") { self.offeredTo }
end

Instance Attribute Details

#offeredItemObject

Returns the value of attribute offeredItem.



34
35
36
# File 'lib/datafoodconsortium/connector/offer.rb', line 34

def offeredItem
  @offeredItem
end

#offeredToObject

Returns the value of attribute offeredTo.



35
36
37
# File 'lib/datafoodconsortium/connector/offer.rb', line 35

def offeredTo
  @offeredTo
end

#priceObject

Returns the value of attribute price.



32
33
34
# File 'lib/datafoodconsortium/connector/offer.rb', line 32

def price
  @price
end

#stockLimitationObject

Returns the value of attribute stockLimitation.



33
34
35
# File 'lib/datafoodconsortium/connector/offer.rb', line 33

def stockLimitation
  @stockLimitation
end

Instance Method Details

#addOffer(offer) ⇒ Object



51
52
53
# File 'lib/datafoodconsortium/connector/offer.rb', line 51

def addOffer(offer)
	self..push(offer)
end