Class: Corporate_record

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

Overview

The Corparte_record is part of the HEAD records SOUR record.

=HEADER:= 0 HEAD 1:1 1 SOUR <APPROVED_SYSTEM_ID> 1:1 … n CORP <NAME_OF_BUSINESS> 0:1 +1 <<ADDRESS_STRUCTURE>> 0:1 +1 PHON <PHONE_NUMBER> 0:3 (defined in the Address structure)

==NAME_OF_BUSINESS:= Size=1:90 Name of the business, corporation, or person that produced or commissioned the product.

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.

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) ⇒ Corporate_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
# File 'lib/gedcom/corporate_record.rb', line 47

def initialize(*a)
  super(*a)
  @this_level = [ [:print, "CORP", :company_name] ]
  @sub_level =  [  #level + 1
                  [: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],
                ]
end

Instance Attribute Details

#address_emailObject

GEDCOM 5.5.1 Draft



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

def address_email
  @address_email
end

#address_faxObject

GEDCOM 5.5.1 Draft



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

def address_fax
  @address_fax
end

#address_recordObject

Returns the value of attribute address_record.



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

def address_record
  @address_record
end

#address_web_pageObject

GEDCOM 5.5.1 Draft



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

def address_web_page
  @address_web_page
end

#company_nameObject

Returns the value of attribute company_name.



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

def company_name
  @company_name
end

#note_citation_recordObject

Returns the value of attribute note_citation_record.



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

def note_citation_record
  @note_citation_record
end

#phonenumberObject

Returns the value of attribute phonenumber.



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

def phonenumber
  @phonenumber
end