Class: DataFoodConsortium::Connector::PhysicalPlace

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

Constant Summary collapse

SEMANTIC_TYPE =
"dfc-b:PhysicalPlace".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(semanticId, name: nil, description: nil, hostedSaleSessions: [], phoneNumbers: [], openingHours: [], addresses: [], mainContact: nil, theoreticalStocks: [], realStocks: [], features: []) ⇒ PhysicalPlace

Returns a new instance of PhysicalPlace.

Parameters:

  • semanticId (String)
  • name (String) (defaults to: nil)
  • description (String) (defaults to: nil)
  • hostedSaleSessions (ISaleSession) (defaults to: [])
  • phoneNumbers (IPhoneNumber) (defaults to: [])
  • openingHours (IOpeningHoursSpecification) (defaults to: [])
  • addresses (IAddress) (defaults to: [])
  • mainContact (IPerson) (defaults to: nil)
  • theoreticalStocks (ITheoreticalStock) (defaults to: [])
  • realStocks (IRealStock) (defaults to: [])
  • features (IGeoJsonFeature) (defaults to: [])


74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 74

def initialize(semanticId, name: nil, description: nil, hostedSaleSessions: [], phoneNumbers: [], openingHours: [], addresses: [], mainContact: nil, theoreticalStocks: [], realStocks: [], features: [])
	super(semanticId)
	@name = name
	@description = description
	@hostedSaleSessions = hostedSaleSessions
	@phoneNumbers = phoneNumbers
	@openingHours = openingHours
	@addresses = addresses
	@mainContact = mainContact
	@theoreticalStocks = theoreticalStocks
	@realStocks = realStocks
	@features = features
	self.semanticType = "dfc-b:PhysicalPlace"
	registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
	registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
	registerSemanticProperty("dfc-b:hosts", &method("hostedSaleSessions")).valueSetter = method("hostedSaleSessions=")
	registerSemanticProperty("dfc-b:hasPhoneNumber", &method("phoneNumbers")).valueSetter = method("phoneNumbers=")
	registerSemanticProperty("dfc-b:hasOpeningHours", &method("openingHours")).valueSetter = method("openingHours=")
	registerSemanticProperty("dfc-b:hasAddress", &method("addresses")).valueSetter = method("addresses=")
	registerSemanticProperty("dfc-b:hasMainContact", &method("mainContact")).valueSetter = method("mainContact=")
	registerSemanticProperty("dfc-b:localizes", &method("theoreticalStocks")).valueSetter = method("theoreticalStocks=")
	registerSemanticProperty("dfc-b:stores", &method("realStocks")).valueSetter = method("realStocks=")
	registerSemanticProperty("dfc-b:hasGeoJsonFeature", &method("features")).valueSetter = method("features=")
end

Instance Attribute Details

#addressesIAddress

Returns:

  • (IAddress)


49
50
51
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 49

def addresses
  @addresses
end

#descriptionString

Returns:

  • (String)


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

def description
  @description
end

#featuresIGeoJsonFeature

Returns:

  • (IGeoJsonFeature)


61
62
63
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 61

def features
  @features
end

#hostedSaleSessionsISaleSession

Returns:

  • (ISaleSession)


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

def hostedSaleSessions
  @hostedSaleSessions
end

#mainContactIPerson

Returns:

  • (IPerson)


52
53
54
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 52

def mainContact
  @mainContact
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

#openingHoursIOpeningHoursSpecification

Returns:

  • (IOpeningHoursSpecification)


46
47
48
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 46

def openingHours
  @openingHours
end

#phoneNumbersIPhoneNumber

Returns:

  • (IPhoneNumber)


43
44
45
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 43

def phoneNumbers
  @phoneNumbers
end

#realStocksIRealStock

Returns:

  • (IRealStock)


58
59
60
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 58

def realStocks
  @realStocks
end

#theoreticalStocksITheoreticalStock

Returns:

  • (ITheoreticalStock)


55
56
57
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 55

def theoreticalStocks
  @theoreticalStocks
end