Class: Repository_citation_record

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

Overview

Internal representation of a reference to the GEDCOM REPO citation record type The actual REPO record is stored in the Repository_record class.

=SOURCE_REPOSITORY_CITATION:=

n REPO @XREF:REPO@ 1:1 +1 <<NOTE_STRUCTURE>> 0:M +1 CALN <SOURCE_CALL_NUMBER> 0:M +2 MEDI <SOURCE_MEDIA_TYPE> 0:1

This structure is used within a source record to point to a name and address record of the holder of the source document. Formal and informal repository name and addresses are stored in the REPOSITORY_RECORD. Informal repositories include owner's of an unpublished work or of a rare published source, or a keeper of personal collections. An example would be the owner of a family Bible containing unpublished family genealogical entries. More formal repositories, such as the Family History Library, should show a call number of the source at that repository. The call number of that source should be recorded using a subordinate CALN tag. Systems which do not structure a repository name and address interface should store the information about where the source record is stored in the <<NOTE_STRUCTURE>> of this structure.

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.

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_citation_record

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



34
35
36
37
38
39
40
41
# File 'lib/gedcom/repository_citation_record.rb', line 34

def initialize(*a)
  super(*a)
  @this_level =  [ [:xref, "REPO", :repository_ref] ] 
  @sub_level =  [ #level + 1
                  [:walk, nil, :repository_caln],
                  [:walk, nil, :note_citation_record],
                ]
end

Instance Attribute Details

#note_citation_recordObject

Returns the value of attribute note_citation_record.



29
30
31
# File 'lib/gedcom/repository_citation_record.rb', line 29

def note_citation_record
  @note_citation_record
end

#repository_calnObject

Returns the value of attribute repository_caln.



29
30
31
# File 'lib/gedcom/repository_citation_record.rb', line 29

def repository_caln
  @repository_caln
end

#repository_refObject

Returns the value of attribute repository_ref.



29
30
31
# File 'lib/gedcom/repository_citation_record.rb', line 29

def repository_ref
  @repository_ref
end