User: Dallan Date: 12/25/11 omit: Submitter, Reference type, Restriction, >1 anci, >1 desi add: Uid, Address, phone, email, title (is a Name) change: alia from xref to Name
| 29 | * change: alia from xref to Name |
| 30 | */ |
| 31 | public class Person extends PersonFamilyCommonContainer { |
| 32 | private String id = null; |
| 33 | private List<Name> names = null; |
| 34 | private List<ParentFamilyRef> famc = null; |
| 35 | private List<SpouseFamilyRef> fams = null; |
| 36 | private List<Association> assos = null; |
| 37 | private String anci = null; |
| 38 | private String desi = null; |
| 39 | private String rfn = null; |
| 40 | private Address addr = null; |
| 41 | private String phon = null; |
| 42 | private String fax = null; |
| 43 | private String email = null; |
| 44 | private String emailTag = null; |
| 45 | private String _www = null; |
| 46 | private String wwwTag = null; |
| 47 | |
| 48 | public String getId() { |
| 49 | return id; |
| 50 | } |
| 51 | |
| 52 | public void setId(String id) { |
| 53 | this.id = id; |
| 54 | } |
| 55 | |
| 56 | public List<Name> getNames() { |
| 57 | return names != null ? names : Collections.<Name>emptyList(); |
| 58 | } |
| 59 | |
| 60 | public void setNames(List<Name> names) { |
| 61 | this.names = names; |
| 62 | } |
| 63 | |
| 64 | public void addName(Name name) { |
| 65 | if (names == null) { |
| 66 | names = new ArrayList<Name>(); |
| 67 | } |
| 68 | names.add(name); |
| 69 | } |
| 70 | |
| 71 | private List<Family> getFamilies(Gedcom gedcom, List<? extends SpouseFamilyRef> familyRefs) { |
| 72 | List<Family> families = new ArrayList<Family>(); |
| 73 | for (SpouseFamilyRef familyRef : familyRefs) { |
| 74 | Family family = familyRef.getFamily(gedcom); |
| 75 | if (family != null) { |
| 76 | families.add(family); |
| 77 | } |
| 78 | } |
| 79 | return families; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Convenience function to dereference parent family refs |
| 84 | * @param gedcom Gedcom |
| 85 | * @return list of parent families |
| 86 | */ |
| 87 | public List<Family> getParentFamilies(Gedcom gedcom) { |
| 88 | return getFamilies(gedcom, getParentFamilyRefs()); |
nothing calls this directly
no outgoing calls
no test coverage detected