Class: Repository_record

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

Overview

Internal representation of the GEDCOM REPO record type This class is referenced through the Repository_citation_record class.

=REPOSITORY_RECORD:= 0 @<XREF:REPO>@ REPO 0:M +1 NAME <NAME_OF_REPOSITORY> 0:1 +1 <<ADDRESS_STRUCTURE>> 0:1 +1 <<NOTE_STRUCTURE>> 0:M +1 REFN <USER_REFERENCE_NUMBER> 0:M +2 TYPE <USER_REFERENCE_TYPE> 0:1 +1 RIN <AUTOMATED_RECORD_ID> 0:1 +1 <<CHANGE_DATE>> 0:1

The attributes are all arrays for the +1 level 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 the REPO 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) ⇒ Repository_record

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



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/gedcom/repository_record.rb', line 47

def initialize(*a)
  super(*a)
  @this_level = [ [:xref, "REPO", :repository_ref]]
  @sub_level =  [#level 1
                  [:print, "NAME",    :repository_name ],
                  [:print, "PHON",    :phonenumber ],
                  [:print, "EMAIL", :address_email],
                  [:print, "WWW", :address_web_page],
                  [:print, "FAX", :address_fax],
                  [:walk, nil,    :address_record ],
                  [:walk, nil,    :note_citation_record ],
                  [:walk, nil,     :refn_record ],
                  [:print, "RIN",    :automated_record_id ],
                  [:walk, nil,    :change_date_record ],
                ]
end

Instance Attribute Details

#address_emailObject

GEDCOM 5.5.1 Draft



42
43
44
# File 'lib/gedcom/repository_record.rb', line 42

def address_email
  @address_email
end

#address_faxObject

GEDCOM 5.5.1 Draft



42
43
44
# File 'lib/gedcom/repository_record.rb', line 42

def address_fax
  @address_fax
end

#address_recordObject

Returns the value of attribute address_record.



40
41
42
# File 'lib/gedcom/repository_record.rb', line 40

def address_record
  @address_record
end

#address_web_pageObject

GEDCOM 5.5.1 Draft



42
43
44
# File 'lib/gedcom/repository_record.rb', line 42

def address_web_page
  @address_web_page
end

#automated_record_idObject

Returns the value of attribute automated_record_id.



41
42
43
# File 'lib/gedcom/repository_record.rb', line 41

def automated_record_id
  @automated_record_id
end

#change_date_recordObject

Returns the value of attribute change_date_record.



41
42
43
# File 'lib/gedcom/repository_record.rb', line 41

def change_date_record
  @change_date_record
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



40
41
42
# File 'lib/gedcom/repository_record.rb', line 40

def note_citation_record
  @note_citation_record
end

#phonenumberObject

Returns the value of attribute phonenumber.



40
41
42
# File 'lib/gedcom/repository_record.rb', line 40

def phonenumber
  @phonenumber
end

#refn_recordObject

Returns the value of attribute refn_record.



41
42
43
# File 'lib/gedcom/repository_record.rb', line 41

def refn_record
  @refn_record
end

#repository_nameObject

Returns the value of attribute repository_name.



40
41
42
# File 'lib/gedcom/repository_record.rb', line 40

def repository_name
  @repository_name
end

#repository_refObject

Returns the value of attribute repository_ref.



40
41
42
# File 'lib/gedcom/repository_record.rb', line 40

def repository_ref
  @repository_ref
end