Class: DataFoodConsortium::Connector::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(street, postalCode, city, country) ⇒ Address

Returns a new instance of Address.



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

def initialize(street, postalCode, city, country)
	super()
	self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Address"
	self.street = street
	self.postalCode = postalCode
	self.city = city
	self.country = country
	
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasStreet") { self.street }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasPostalCode") { self.postalCode }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCity") { self.city }
	registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#hasCountry") { self.country }
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



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

def city
  @city
end

#countryObject

Returns the value of attribute country.



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

def country
  @country
end

#postalCodeObject

Returns the value of attribute postalCode.



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

def postalCode
  @postalCode
end

#streetObject

Returns the value of attribute street.



30
31
32
# File 'lib/datafoodconsortium/connector/address.rb', line 30

def street
  @street
end