1 16 17 package org.apache.taglibs.standard.lang.jpath.example; 18 19 20 import java.util.ArrayList ; 21 import java.util.Collection ; 22 23 24 public class Person { 25 private int id; 26 private String firstName = "" ; 27 private String lastName = "" ; 28 private String gender = "" ; 29 private Collection spouseFamilies; 30 private Collection childFamilies; 31 private Person father = null ; 32 private Event birth; 33 private Event death; 34 private Event burial; 35 private String note; 36 37 public Person(int id, String firstName, 38 String lastName, 39 String gender, 40 Event birth, 41 Event death, 42 Event burial, 43 String note) { 44 this.id = id; 45 this.firstName = firstName; 46 this.lastName = lastName; 47 this.gender = gender; 48 this.spouseFamilies = new ArrayList (); 49 this.childFamilies = new ArrayList (); 50 this.birth = birth; 51 this.death = death; 52 this.burial = burial; 53 this.note = note; 54 } 55 56 public int getId() { 57 return id; 58 } 59 60 public String getLastName() { 61 return lastName; 62 } 63 64 public String getFirstName() { 65 return firstName; 66 } 67 68 public String getGender() { 69 return gender; 70 } 71 72 public Event getBirth() { 73 return birth; 74 } 75 76 public Event getDeath() { 77 return death; 78 } 79 80 public Event getBurial() { 81 return burial; 82 } 83 84 public String getNote() { 85 return note; 86 } 87 88 public Collection getSpouseFamilies() { 89 return spouseFamilies; 90 } 91 92 public Collection getChildFamilies() { 93 return childFamilies; 94 } 95 96 public void addSpouseFamily(Family spouseFamily) { 97 spouseFamilies.add(spouseFamily); 98 } 99 100 public void addChildFamily(Family childFamily) { 101 childFamilies.add(childFamily); 102 } 103 104 } 105 | Popular Tags |