Class: Individual_attribute_record
- Inherits:
-
Event_record
- Object
- GEDCOMBase
- Event_record
- Individual_attribute_record
- Defined in:
- lib/gedcom/individual_attribute_record.rb
Overview
Internal representation of the GEDCOM Individual_Attribute_Structure. Individual_attribute_record subclasses Event_record, as they share the same class attributes as events.
=INDIVIDUAL_ATTRIBUTE_STRUCTURE:= 0:M Note that this structure can occur many times an Individual_record. n SEX <SEX_VALUE> 0:1 +1 <<EVENT_DETAIL>> 0:1 n CAST <CASTE_NAME> 1:1 +1 <<EVENT_DETAIL>> 0:1 n DSCR <PHYSICAL_DESCRIPTION> 1:1 +1 <<EVENT_DETAIL>> 0:1 n EDUC <SCHOLASTIC_ACHIEVEMENT> 1:1 +1 <<EVENT_DETAIL>> 0:1 n IDNO <NATIONAL_ID_NUMBER> 1:1 +1 <<EVENT_DETAIL>> 0:1 n NATI <NATIONAL_OR_TRIBAL_ORIGIN> 1:1 +1 <<EVENT_DETAIL>> 0:1 n NCHI <COUNT_OF_CHILDREN> 1:1 +1 <<EVENT_DETAIL>> 0:1 n NMR <COUNT_OF_MARRIAGES> 1:1 +1 <<EVENT_DETAIL>> 0:1 n OCCU <OCCUPATION> 1:1 +1 <<EVENT_DETAIL>> 0:1 n PROP <POSSESSIONS> 1:1 +1 <<EVENT_DETAIL>> 0:1 n RELI <RELIGIOUS_AFFILIATION> 1:1 +1 <<EVENT_DETAIL>> 0:1 n RESI 1:1 +1 <<EVENT_DETAIL>> 0:1 n SSN <SOCIAL_SECURITY_NUMBER> 0:1 +1 <<EVENT_DETAIL>> 0:1 n TITL <NOBILITY_TYPE_TITLE> 1:1 +1 <<EVENT_DETAIL>> 0:1
Note:: The usage of IDNO requires that the subordinate TYPE tag be used to define what kind of number is assigned to IDNO.
Also Note that SEX has been added here, and removed from the Individual_record. This allows SEX To be included multiple times, and have associated events (e.g. a sex change). I also do not check That the SEX_VALUE is M,F or U. to allow for the XXY, XXXY and X and other genetic anomolies associated with gender that might need to be recorded. None of this affects reading GEDCOM files, and will not affect the writing of them if you don't add an event, or use non-standard SEX_VALUEs.
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.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Event_record
#address_email, #address_fax, #address_record, #address_web_page, #adoption_record, #age, #agency, #cause_record, #date_record, #event_age_record, #event_descriptor, #event_status, #event_type, #lds_date_status, #lds_slgc_family_ref, #lds_temp_code, #multimedia_citation_record, #note_citation_record, #phonenumber, #place_record, #religion, #restriction, #source_citation_record, #submitter_ref
Attributes inherited from GEDCOMBase
Instance Method Summary collapse
-
#attr_type ⇒ Object
attr_type retrieves the attribute type from the Event_record#event_type field.
-
#attr_type=(value) ⇒ Object
attr_type= stores the attribute type in the event_type field.
-
#is_attribute?(attribute) ⇒ Boolean
is_attribute? tests that this Individual_attribute_record is of this attribute type.
-
#value ⇒ Object
value retrieves the value from the Event_record#event_status.
-
#value=(value) ⇒ Object
value= stores the value in the Event_record#event_status.
Methods inherited from Event_record
#date, #initialize, #is_event?, #place, #to_gedcom
Methods inherited from GEDCOMBase
#changed, #changed?, #created?, #find, #initialize, #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
This class inherits a constructor from Event_record
Instance Method Details
#attr_type ⇒ Object
attr_type retrieves the attribute type from the Event_record#event_type field. this minor hack lets us share methods with the event class.
62 63 64 |
# File 'lib/gedcom/individual_attribute_record.rb', line 62 def attr_type @event_type end |
#attr_type=(value) ⇒ Object
attr_type= stores the attribute type in the event_type field. this minor hack lets us share methods with the event class.
56 57 58 |
# File 'lib/gedcom/individual_attribute_record.rb', line 56 def attr_type=(value) @event_type = value end |
#is_attribute?(attribute) ⇒ Boolean
is_attribute? tests that this Individual_attribute_record is of this attribute type. The attribute type is stored in the the Event_record#event_type field. this minor hack lets us share methods with the event class. This make sense, as the GEDCOM INDIVIDUAL_ATTRIBUTE_STRUCTURE has GEDCOM <<EVENT_DETAIL>> tags at level +1.
70 71 72 |
# File 'lib/gedcom/individual_attribute_record.rb', line 70 def is_attribute?(attribute) is_event?(attribute) end |
#value ⇒ Object
value retrieves the value from the Event_record#event_status. this minor hack lets us share methods with the event class.
82 83 84 |
# File 'lib/gedcom/individual_attribute_record.rb', line 82 def value @event_status end |
#value=(value) ⇒ Object
value= stores the value in the Event_record#event_status. this minor hack lets us share methods with the event class.
76 77 78 |
# File 'lib/gedcom/individual_attribute_record.rb', line 76 def value=(value) @event_status = value end |