Class: Header_data_record
- Inherits:
-
GEDCOMBase
- Object
- GEDCOMBase
- Header_data_record
- Defined in:
- lib/gedcom/header_data_record.rb
Overview
Internal representation of the GEDCOM DATA in a SOUR record in a level 0 HEAD record type This is not the same record type as DATA tags in level 0 SOUR record.
HEADER:=
n HEAD {1:1}
+1 SOUR <APPROVED_SYSTEM_ID> {1:1}
...
+2 DATA <NAME_OF_SOURCE_DATA> {0:1}
+3 DATE <PUBLICATION_DATE> {0:1}
+3 COPR <COPYRIGHT_SOURCE_DATA> {0:1}
...
...
NAME_OF_SOURCE_DATA:= Size=1:90
The name of the electronic data source that was used to obtain the data in this transmission. For
example, the data may have been obtained from a CD-ROM disc that was named "U.S. 1880
CENSUS CD-ROM vol. 13."
PUBLICATION_DATE:= Size=10:11
<DATE_EXACT>:= <DAY> <MONTH> <YEAR_GREG> {Size=10:11}
The date this source was published or created.
COPYRIGHT_SOURCE_DATA:= Size=1:90
A copyright statement required by the owner of data from which this information was down- loaded.
For example, when a GEDCOM down-load is requested from the Ancestral File, this would be the
copyright statement to indicate that the data came from a copyrighted source.
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
-
#copyright_record ⇒ Object
Returns the value of attribute copyright_record.
-
#data_source ⇒ Object
Returns the value of attribute data_source.
-
#date ⇒ Object
Returns the value of attribute date.
-
#note_citation_record ⇒ Object
Returns the value of attribute note_citation_record.
Attributes inherited from GEDCOMBase
Instance Method Summary collapse
- #copyright ⇒ Object
-
#initialize(*a) ⇒ Header_data_record
constructor
new sets up the state engine arrays @this_level and @sub_level, which drive the to_gedcom method generating GEDCOM output.
Methods inherited from GEDCOMBase
#changed, #changed?, #created?, #find, #locked?, no_tabs, #private?, #save, tabs, #to_db, #to_gedcom, #to_s, #token_to_s
Constructor Details
#initialize(*a) ⇒ Header_data_record
new sets up the state engine arrays @this_level and @sub_level, which drive the to_gedcom method generating GEDCOM output.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/gedcom/header_data_record.rb', line 40 def initialize(*a) super(*a) @this_level = [ [:print, "DATA", :data_source] ] @sub_level = [ #level + 1 [:print, "DATE", :date], #[:print, "COPR", :copyright], #GEDCOM5.5 [:walk, nil, :copyright_record], #GEDCOM5.5.1 "COPR" [:walk, nil, :note_citation_record], ] end |
Instance Attribute Details
#copyright_record ⇒ Object
Returns the value of attribute copyright_record.
34 35 36 |
# File 'lib/gedcom/header_data_record.rb', line 34 def copyright_record @copyright_record end |
#data_source ⇒ Object
Returns the value of attribute data_source.
34 35 36 |
# File 'lib/gedcom/header_data_record.rb', line 34 def data_source @data_source end |
#date ⇒ Object
Returns the value of attribute date.
34 35 36 |
# File 'lib/gedcom/header_data_record.rb', line 34 def date @date end |
#note_citation_record ⇒ Object
Returns the value of attribute note_citation_record.
35 36 37 |
# File 'lib/gedcom/header_data_record.rb', line 35 def note_citation_record @note_citation_record end |
Instance Method Details
#copyright ⇒ Object
51 52 53 |
# File 'lib/gedcom/header_data_record.rb', line 51 def copyright copyright_record != nil ? copyright_record.first.copyright : nil end |