Class: Submitter_record

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

Overview

Internal representation of the GEDCOM SUBM record type

=SUBMITTER_RECORD:= 0 @<XREF:SUBM>@ SUBM 0:M +1 NAME <SUBMITTER_NAME> 1:1 +1 <<ADDRESS_STRUCTURE>> 0:1 +1 PHON <PHONE_NUMBER> 0:3 (defined in the Address structure) +1 <<MULTIMEDIA_LINK>> 0:M +1 LANG <LANGUAGE_PREFERENCE> 0:3 +1 RFN <SUBMITTER_REGISTERED_RFN> 0:1 +1 RIN <AUTOMATED_RECORD_ID> 0:1 +1 <<CHANGE_DATE>> 0:1

I also recognise notes in this record, so I can handle user tags as notes. +1 <<NOTE_STRUCTURE>> 0:M

The submitter record identifies an individual or organization that contributed information contained in the GEDCOM transmission. All records in the transmission are assumed to be submitted by the SUBMITTER referenced in the HEADer, unless a SUBMitter reference inside a specific record points at a different SUBMITTER record.

The attributes are all arrays. * 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 the SUBM records.

GEDCOM 5.5.1 Draft adds (at same level as ADDR) I have not included these in the Address_record, but include them in the parent records that include ADDRESS_STRUCTURE. This is functionally equivalent, as they are not sub-records of ADDR, but at the same level.

n EMAIL <ADDRESS_EMAIL> 0:3 n FAX <ADDRESS_FAX> 0:3 n WWW <ADDRESS_WEB_PAGE> 0:3

==ADDRESS_EMAIL:= SIZE=5:120 An electronic address that can be used for contact such as an email address.

== ADDRESS_FAX:= SIZE=5:60 A FAX telephone number appropriate for sending data facsimiles.

==ADDRESS_WEB_PAGE:= SIZE=5:120 The world wide web page address.

Instance Attribute Summary collapse

Attributes inherited from GEDCOMBase

#restriction

Instance Method Summary collapse

Methods inherited from GEDCOMBase

#changed, #changed?, #created?, #find, #locked?, no_tabs, #private?, #save, tabs, #to_db, #to_gedcom, #to_s, #to_s_ordered, #to_s_r, #token_to_s, #xref_check

Constructor Details

#initialize(*a) ⇒ Submitter_record

new sets up the state engine arrays @this_level and @sub_level, which drive the to_gedcom method generating GEDCOM output.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/gedcom/submitter_record.rb', line 56

def initialize(*a)
  super(*a)
  @this_level = [ [:xref, "SUBM", :submitter_ref] ]
  @sub_level =  [ #level + 1
                  [:walk, nil,    :name_record ],
                  [:walk, nil,    :address_record ],
                  [:print, "PHON",    :phone ],
                  [:print, "EMAIL",    :address_email ],
                  [:print, "FAX",    :address_fax ],
                  [:print, "WWW",    :address_web_page ],
                  [:print, "LANG",    :language_list ],
                  [:walk, nil,    :multimedia_citation_record ],
                  [:walk, nil,    :note_citation_record ],
                  [:print, "RFN",    :lds_submitter_id ],
                  [:print, "RIN",    :automated_record_id ],
                  [:walk, nil,    :change_date_record ],
                ]
end

Instance Attribute Details

#address_emailObject

GEDCOM 5.5.1 Draft



51
52
53
# File 'lib/gedcom/submitter_record.rb', line 51

def address_email
  @address_email
end

#address_faxObject

GEDCOM 5.5.1 Draft



51
52
53
# File 'lib/gedcom/submitter_record.rb', line 51

def address_fax
  @address_fax
end

#address_recordObject

Returns the value of attribute address_record.



49
50
51
# File 'lib/gedcom/submitter_record.rb', line 49

def address_record
  @address_record
end

#address_web_pageObject

GEDCOM 5.5.1 Draft



51
52
53
# File 'lib/gedcom/submitter_record.rb', line 51

def address_web_page
  @address_web_page
end

#automated_record_idObject

Returns the value of attribute automated_record_id.



50
51
52
# File 'lib/gedcom/submitter_record.rb', line 50

def automated_record_id
  @automated_record_id
end

#change_date_recordObject

Returns the value of attribute change_date_record.



50
51
52
# File 'lib/gedcom/submitter_record.rb', line 50

def change_date_record
  @change_date_record
end

#language_listObject

Returns the value of attribute language_list.



50
51
52
# File 'lib/gedcom/submitter_record.rb', line 50

def language_list
  @language_list
end

#lds_submitter_idObject

Returns the value of attribute lds_submitter_id.



50
51
52
# File 'lib/gedcom/submitter_record.rb', line 50

def lds_submitter_id
  @lds_submitter_id
end

#multimedia_citation_recordObject

Returns the value of attribute multimedia_citation_record.



49
50
51
# File 'lib/gedcom/submitter_record.rb', line 49

def multimedia_citation_record
  @multimedia_citation_record
end

#name_recordObject

Returns the value of attribute name_record.



49
50
51
# File 'lib/gedcom/submitter_record.rb', line 49

def name_record
  @name_record
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



50
51
52
# File 'lib/gedcom/submitter_record.rb', line 50

def note_citation_record
  @note_citation_record
end

#phoneObject

Returns the value of attribute phone.



49
50
51
# File 'lib/gedcom/submitter_record.rb', line 49

def phone
  @phone
end

#submitter_refObject

Returns the value of attribute submitter_ref.



49
50
51
# File 'lib/gedcom/submitter_record.rb', line 49

def submitter_ref
  @submitter_ref
end