Class: DataFoodConsortium::Connector::SuppliedProduct

Inherits:
DefinedProduct
  • Object
show all
Defined in:
lib/datafoodconsortium/connector/supplied_product.rb

Instance Attribute Summary collapse

Attributes inherited from DefinedProduct

#alcoholPercentage, #allergenCharacteristics, #catalogItems, #certifications, #claims, #description, #geographicalOrigin, #lifetime, #name, #natureOrigin, #nutrientCharacteristics, #partOrigin, #physicalCharacteristics, #productType, #quantity, #usageOrStorageConditions

Instance Method Summary collapse

Methods inherited from DefinedProduct

#addAllergenCharacteristic, #addCatalogItem, #addCertification, #addClaim, #addNatureOrigin, #addNutrientCharacteristic, #addPartOrigin, #addPhysicalCharacteristic, #removeAllergenCharacteristic, #removeCertification, #removeClaim, #removeNatureOrigin, #removeNutrientCharacteristic, #removePartOrigin, #removePhysicalCharacteristic

Constructor Details

#initialize(semanticId, totalTheoreticalStock: 0.0, name: "", description: "", productType: nil, quantity: nil, alcoholPercentage: 0.0, lifetime: "", claims: [], usageOrStorageConditions: "", allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: []) ⇒ SuppliedProduct

Returns a new instance of SuppliedProduct.

Parameters:

  • semanticId (String)
  • totalTheoreticalStock (Real) (defaults to: 0.0)
  • name (String) (defaults to: "")
  • description (String) (defaults to: "")
  • productType (IProductType) (defaults to: nil)
  • quantity (Quantifiable) (defaults to: nil)
  • alcoholPercentage (Real) (defaults to: 0.0)
  • lifetime (String) (defaults to: "")
  • claims (Claimable) (defaults to: [])
  • usageOrStorageConditions (String) (defaults to: "")
  • allergenCharacteristics (IAllergenCharacteristic) (defaults to: [])
  • nutrientCharacteristics (INutrientCharacteristic) (defaults to: [])
  • physicalCharacteristics (IPhysicalCharacteristic) (defaults to: [])
  • geographicalOrigin (IGeographicalOrigin) (defaults to: nil)
  • catalogItems (ICatalogItem) (defaults to: [])
  • certifications (ICertification) (defaults to: [])
  • natureOrigin (INatureOrigin) (defaults to: [])
  • partOrigin (IPartOrigin) (defaults to: [])


51
52
53
54
55
56
# File 'lib/datafoodconsortium/connector/supplied_product.rb', line 51

def initialize(semanticId, totalTheoreticalStock: 0.0, name: "", description: "", productType: nil, quantity: nil, alcoholPercentage: 0.0, lifetime: "", claims: [], usageOrStorageConditions: "", allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [])
	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)
	@totalTheoreticalStock = totalTheoreticalStock
	self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#SuppliedProduct"
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#totalTheoreticalStock") { self.totalTheoreticalStock }
end

Instance Attribute Details

#totalTheoreticalStockReal

Returns:

  • (Real)


31
32
33
# File 'lib/datafoodconsortium/connector/supplied_product.rb', line 31

def totalTheoreticalStock
  @totalTheoreticalStock
end