Class: DataFoodConsortium::Connector::DefinedProduct
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::DefinedProduct
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/defined_product.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#alcoholPercentage ⇒ Object
Returns the value of attribute alcoholPercentage.
-
#allergenCharacteristics ⇒ Object
Returns the value of attribute allergenCharacteristics.
-
#catalogItems ⇒ Object
Returns the value of attribute catalogItems.
-
#certifications ⇒ Object
Returns the value of attribute certifications.
-
#claims ⇒ Object
Returns the value of attribute claims.
-
#description ⇒ Object
Returns the value of attribute description.
-
#geographicalOrigin ⇒ Object
Returns the value of attribute geographicalOrigin.
-
#lifetime ⇒ Object
Returns the value of attribute lifetime.
-
#name ⇒ Object
Returns the value of attribute name.
-
#natureOrigin ⇒ Object
Returns the value of attribute natureOrigin.
-
#nutrientCharacteristics ⇒ Object
Returns the value of attribute nutrientCharacteristics.
-
#partOrigin ⇒ Object
Returns the value of attribute partOrigin.
-
#physicalCharacteristics ⇒ Object
Returns the value of attribute physicalCharacteristics.
-
#productType ⇒ Object
Returns the value of attribute productType.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#usageOrStorageConditions ⇒ Object
Returns the value of attribute usageOrStorageConditions.
Instance Method Summary collapse
- #addAllergenCharacteristic(allergenCharacteristic) ⇒ Object
- #addCatalogItem(catalogItem) ⇒ Object
- #addCertification(certification) ⇒ Object
- #addClaim(claim) ⇒ Object
- #addNatureOrigin(natureOrigin) ⇒ Object
- #addNutrientCharacteristic(nutrientCharacteristic) ⇒ Object
- #addPartOrigin(partOrigin) ⇒ Object
- #addPhysicalCharacteristic(physicalCharacteristic) ⇒ Object
-
#initialize(name, description) ⇒ DefinedProduct
constructor
A new instance of DefinedProduct.
- #removeAllergenCharacteristic(allergenCharacteristic) ⇒ Object
- #removeCertification(certification) ⇒ Object
- #removeClaim(claim) ⇒ Object
- #removeNatureOrigin(natureOrigin) ⇒ Object
- #removeNutrientCharacteristic(nutrientCharacteristic) ⇒ Object
- #removePartOrigin(partOrigin) ⇒ Object
- #removePhysicalCharacteristic(physicalCharacteristic) ⇒ Object
Constructor Details
#initialize(name, description) ⇒ DefinedProduct
Returns a new instance of DefinedProduct.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 58 def initialize(name, description) super() self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#DefinedProduct" self.name = name self.description = description self.productType = nil self.quantity = nil self.alcoholPercentage = nil self.lifetime = nil self.claims = [] self.usageOrStorageConditions = nil self.allergenCharacteristics = [] self.nutrientCharacteristics = [] self.physicalCharacteristics = [] self.geographicalOrigin = nil self.catalogItems = [] self.certifications = [] self.natureOrigin = [] self.partOrigin = [] registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#name") { self.name } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#description") { self.description } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasType") { self.productType } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasQuantity") { self.quantity } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#alcoholPercentage") { self.alcoholPercentage } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#lifetime") { self.lifetime } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasClaim") { self.claims } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#usageOrStorageCondition") { self.usageOrStorageConditions } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasAllergenCharacteristic") { self.allergenCharacteristics } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasNutrientCharacteristic") { self.nutrientCharacteristics } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPhysicalCharacteristic") { self.physicalCharacteristics } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasGeographicalOrigin") { self.geographicalOrigin } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#referencedBy") { self.catalogItems } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCertification") { self.certifications } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasNatureOrigin") { self.natureOrigin } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPartOrigin") { self.partOrigin } end |
Instance Attribute Details
#alcoholPercentage ⇒ Object
Returns the value of attribute alcoholPercentage.
45 46 47 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 45 def alcoholPercentage @alcoholPercentage end |
#allergenCharacteristics ⇒ Object
Returns the value of attribute allergenCharacteristics.
49 50 51 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 49 def allergenCharacteristics @allergenCharacteristics end |
#catalogItems ⇒ Object
Returns the value of attribute catalogItems.
53 54 55 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 53 def catalogItems @catalogItems end |
#certifications ⇒ Object
Returns the value of attribute certifications.
54 55 56 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 54 def certifications @certifications end |
#claims ⇒ Object
Returns the value of attribute claims.
47 48 49 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 47 def claims @claims end |
#description ⇒ Object
Returns the value of attribute description.
42 43 44 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 42 def description @description end |
#geographicalOrigin ⇒ Object
Returns the value of attribute geographicalOrigin.
52 53 54 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 52 def geographicalOrigin @geographicalOrigin end |
#lifetime ⇒ Object
Returns the value of attribute lifetime.
46 47 48 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 46 def lifetime @lifetime end |
#name ⇒ Object
Returns the value of attribute name.
41 42 43 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 41 def name @name end |
#natureOrigin ⇒ Object
Returns the value of attribute natureOrigin.
55 56 57 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 55 def natureOrigin @natureOrigin end |
#nutrientCharacteristics ⇒ Object
Returns the value of attribute nutrientCharacteristics.
50 51 52 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 50 def nutrientCharacteristics @nutrientCharacteristics end |
#partOrigin ⇒ Object
Returns the value of attribute partOrigin.
56 57 58 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 56 def partOrigin @partOrigin end |
#physicalCharacteristics ⇒ Object
Returns the value of attribute physicalCharacteristics.
51 52 53 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 51 def physicalCharacteristics @physicalCharacteristics end |
#productType ⇒ Object
Returns the value of attribute productType.
43 44 45 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 43 def productType @productType end |
#quantity ⇒ Object
Returns the value of attribute quantity.
44 45 46 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 44 def quantity @quantity end |
#usageOrStorageConditions ⇒ Object
Returns the value of attribute usageOrStorageConditions.
48 49 50 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 48 def usageOrStorageConditions @usageOrStorageConditions end |
Instance Method Details
#addAllergenCharacteristic(allergenCharacteristic) ⇒ Object
104 105 106 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 104 def addAllergenCharacteristic(allergenCharacteristic) self.allergenCharacteristics.push(allergenCharacteristic) end |
#addCatalogItem(catalogItem) ⇒ Object
144 145 146 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 144 def addCatalogItem(catalogItem) self.catalogItems.push(catalogItem) end |
#addCertification(certification) ⇒ Object
148 149 150 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 148 def addCertification(certification) self.certifications.push(certification) end |
#addClaim(claim) ⇒ Object
96 97 98 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 96 def addClaim(claim) self.claims.push(claim) end |
#addNatureOrigin(natureOrigin) ⇒ Object
116 117 118 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 116 def addNatureOrigin(natureOrigin) self.natureOrigin.push(natureOrigin) end |
#addNutrientCharacteristic(nutrientCharacteristic) ⇒ Object
108 109 110 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 108 def addNutrientCharacteristic(nutrientCharacteristic) self.nutrientCharacteristics.push(nutrientCharacteristic) end |
#addPartOrigin(partOrigin) ⇒ Object
120 121 122 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 120 def addPartOrigin(partOrigin) self.partOrigin.push(partOrigin) end |
#addPhysicalCharacteristic(physicalCharacteristic) ⇒ Object
112 113 114 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 112 def addPhysicalCharacteristic(physicalCharacteristic) self.physicalCharacteristics.push(physicalCharacteristic) end |
#removeAllergenCharacteristic(allergenCharacteristic) ⇒ Object
124 125 126 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 124 def removeAllergenCharacteristic(allergenCharacteristic) raise "Not implemented" end |
#removeCertification(certification) ⇒ Object
152 153 154 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 152 def removeCertification(certification) raise "Not implemented" end |
#removeClaim(claim) ⇒ Object
100 101 102 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 100 def removeClaim(claim) raise "Not implemented" end |
#removeNatureOrigin(natureOrigin) ⇒ Object
136 137 138 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 136 def removeNatureOrigin(natureOrigin) raise "Not implemented" end |
#removeNutrientCharacteristic(nutrientCharacteristic) ⇒ Object
128 129 130 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 128 def removeNutrientCharacteristic(nutrientCharacteristic) raise "Not implemented" end |
#removePartOrigin(partOrigin) ⇒ Object
140 141 142 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 140 def removePartOrigin(partOrigin) raise "Not implemented" end |
#removePhysicalCharacteristic(physicalCharacteristic) ⇒ Object
132 133 134 |
# File 'lib/datafoodconsortium/connector/defined_product.rb', line 132 def removePhysicalCharacteristic(physicalCharacteristic) raise "Not implemented" end |