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: []) ⇒ 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: [])


69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/datafoodconsortium/connector/physical_place.rb', line 69

def initialize(semanticId, name: nil, description: nil, hostedSaleSessions: [], phoneNumbers: [], openingHours: [], addresses: [], mainContact: nil, theoreticalStocks: [], realStocks: [])
  super(semanticId)
  @name = name
  @description = description
  @hostedSaleSessions = hostedSaleSessions
  @phoneNumbers = phoneNumbers
  @openingHours = openingHours
  @addresses = addresses
  @mainContact = mainContact
  @theoreticalStocks = theoreticalStocks
  @realStocks = realStocks
  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=")
end

Instance Attribute Details

#addressesIAddress

Returns:

  • (IAddress)


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

def addresses
  @addresses
end

#descriptionString

Returns:

  • (String)


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

def description
  @description
end

#hostedSaleSessionsISaleSession

Returns:

  • (ISaleSession)


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

def hostedSaleSessions
  @hostedSaleSessions
end

#mainContactIPerson

Returns:

  • (IPerson)


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

def mainContact
  @mainContact
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

#openingHoursIOpeningHoursSpecification

Returns:

  • (IOpeningHoursSpecification)


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

def openingHours
  @openingHours
end

#phoneNumbersIPhoneNumber

Returns:

  • (IPhoneNumber)


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

def phoneNumbers
  @phoneNumbers
end

#realStocksIRealStock

Returns:

  • (IRealStock)


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

def realStocks
  @realStocks
end

#theoreticalStocksITheoreticalStock

Returns:

  • (ITheoreticalStock)


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

def theoreticalStocks
  @theoreticalStocks
end