Class: AIXM::Feature::NavigationalAid Abstract

Inherits:
AIXM::Feature show all
Includes:
Association
Defined in:
lib/aixm/feature/navigational_aid.rb,
lib/aixm/feature/navigational_aid/dme.rb,
lib/aixm/feature/navigational_aid/ndb.rb,
lib/aixm/feature/navigational_aid/vor.rb,
lib/aixm/feature/navigational_aid/tacan.rb,
lib/aixm/feature/navigational_aid/marker.rb,
lib/aixm/feature/navigational_aid/designated_point.rb

Overview

This class is abstract.

Direct Known Subclasses

DME, DesignatedPoint, Marker, NDB, VOR

Defined Under Namespace

Classes: DME, DesignatedPoint, Marker, NDB, TACAN, VOR

Constant Summary

Constants inherited from AIXM::Feature

REGION_RE

Instance Attribute Summary collapse

Attributes inherited from AIXM::Feature

#region, #source

Instance Method Summary collapse

Methods included from Association

included

Methods inherited from AIXM::Feature

#==

Constructor Details

#initialize(source: nil, region: nil, organisation:, id:, name: nil, xy:, z: nil) ⇒ NavigationalAid

Returns a new instance of NavigationalAid.


34
35
36
37
# File 'lib/aixm/feature/navigational_aid.rb', line 34

def initialize(source: nil, region: nil, organisation:, id:, name: nil, xy:, z: nil)
  super(source: source, region: region)
  self.organisation, self.id, self.name, self.xy, self.z = organisation, id, name, xy, z
end

Instance Attribute Details

#idString

Returns published identifier.

Returns:

  • (String)

    published identifier


17
18
19
# File 'lib/aixm/feature/navigational_aid.rb', line 17

def id
  @id
end

#nameString?

Returns name of the navigational aid.

Returns:

  • (String, nil)

    name of the navigational aid


20
21
22
# File 'lib/aixm/feature/navigational_aid.rb', line 20

def name
  @name
end

#remarksString?

Returns free text remarks.

Returns:

  • (String, nil)

    free text remarks


32
33
34
# File 'lib/aixm/feature/navigational_aid.rb', line 32

def remarks
  @remarks
end

#timetableAIXM::Component::Timetable?

Returns operating hours.

Returns:


29
30
31
# File 'lib/aixm/feature/navigational_aid.rb', line 29

def timetable
  @timetable
end

#xyAIXM::XY

Returns geographic position.

Returns:


23
24
25
# File 'lib/aixm/feature/navigational_aid.rb', line 23

def xy
  @xy
end

#zAIXM::Z?

Returns elevation in :qnh.

Returns:

  • (AIXM::Z, nil)

    elevation in :qnh


26
27
28
# File 'lib/aixm/feature/navigational_aid.rb', line 26

def z
  @z
end

Instance Method Details

#inspectString

Returns:

  • (String)

40
41
42
# File 'lib/aixm/feature/navigational_aid.rb', line 40

def inspect
  %Q(#<#{self.class} id=#{id.inspect} name=#{name.inspect}>)
end

#kindString

Returns fully descriptive combination of #class and #type key.

Returns:

  • (String)

    fully descriptive combination of #class and #type key


74
75
76
# File 'lib/aixm/feature/navigational_aid.rb', line 74

def kind
  [self.class.name.split('::').last, type_key].compact.join(':')
end

#organisationAIXM::Feature::Organisation

Returns superior organisation.

Returns:


14
# File 'lib/aixm/feature/navigational_aid.rb', line 14

belongs_to :organisation, as: :member