Class: Multimedia_obje_format_record

Inherits:
GEDCOMBase show all
Defined in:
lib/gedcom/multimedia_format_record.rb

Overview

Almost the same structure inline in OBJE record.

Note TITL subordinate to FILE, rather than at same level.
     TYPE used, where MEDI used in Link version.

MULTIMEDIA_RECORD:=

0 @XREF:OBJE@ OBJE                     {0:M}
  +1 FILE <MULTIMEDIA_FILE_REFN>       {1:M}	New in 5.5.1
  	+2 FORM	 <MULTIMEDIA_FORMAT>        {1:1} Was as level 1 in GEDCOM 5.5
  		+3 TYPE <SOURCE_MEDIA_TYPE>       {0:1} New in 5.5.1
  	+2 TITL <DESCRIPTIVE_TITLE>         {0:1} Was as level 1 in GEDCOM 5.5
  ....

The attributes are all arrays for the level +1 tags/records.

  • Those ending in _ref are GEDCOM XREF index keys

  • Those ending in _record are array of classes of that type.

  • The remainder are arrays of attributes that could be present in this record.

Instance Attribute Summary collapse

Attributes inherited from GEDCOMBase

#restriction

Instance Method Summary collapse

Methods inherited from GEDCOMBase

#changed, #changed?, #created?, #find, #initialize, #locked?, no_tabs, #private?, #save, tabs, #to_db, #to_s, #token_to_s

Constructor Details

This class inherits a constructor from GEDCOMBase

Instance Attribute Details

#formatObject

Returns the value of attribute format.



61
62
63
# File 'lib/gedcom/multimedia_format_record.rb', line 61

def format
  @format
end

#media_typeObject

Returns the value of attribute media_type.



61
62
63
# File 'lib/gedcom/multimedia_format_record.rb', line 61

def media_type
  @media_type
end

#note_citation_recordObject

for user defined tags



62
63
64
# File 'lib/gedcom/multimedia_format_record.rb', line 62

def note_citation_record
  @note_citation_record
end

Instance Method Details

#to_gedcom(level = 0) ⇒ Object



66
67
68
69
70
71
72
73
74
75
# File 'lib/gedcom/multimedia_format_record.rb', line 66

def to_gedcom(level=0)
  
  @this_level =  [ [:print, "FORM", :format]]
  @sub_level =  [#level 1
                  [:print, "TYPE",    :media_type ],            
                  [:walk, nil,        :note_citation_record ],      #for user defined tags
                ]
  
  super(level)
end

#typeObject



77
78
79
# File 'lib/gedcom/multimedia_format_record.rb', line 77

def type
  :media_type
end