/** * Build up these properties with a ascendancy number. * * @param ascendancynumber The ascendancy number. * @return this. */ public DisplayProperties ascendancyNumber(String ascendancynumber) { setAscendancyNumber(ascendancynumber); return this; }
/** * Build up these properties with a birth date. * * @param birthdate The birth date. * @return this. */ public DisplayProperties birthDate(String birthdate) { setBirthDate(birthdate); return this; }
/** * Build up these properties with a birth place. * * @param birthplace The birth place. * @return this. */ public DisplayProperties birthPlace(String birthplace) { setBirthPlace(birthplace); return this; }
/** * Build up these properties with a gender. * * @param gender The gender. * @return this. */ public DisplayProperties gender(String gender) { setGender(gender); return this; }
/** * Build up these properties with a death date. * * @param deathdate The death date. * @return this. */ public DisplayProperties deathDate(String deathdate) { setDeathDate(deathdate); return this; }
/** * Build up these properties with a death place. * * @param deathplace The death place. * @return this. */ public DisplayProperties deathPlace(String deathplace) { setDeathPlace(deathplace); return this; }
/** * Build up these properties with a descendancy number. * * @param descendancynumber The descendancy number. * @return this. */ public DisplayProperties descendancyNumber(String descendancynumber) { setDescendancyNumber(descendancynumber); return this; }
protected ArrayList<Person> buildArray(Gedcomx gx) { ArrayList<Person> ancestry = new ArrayList<Person>(); if (gx.getPersons() != null) { for (Person person : gx.getPersons()) { DisplayProperties display = person.getDisplayExtension(); if (display != null && display.getAscendancyNumber() != null) { try { int number = Integer.parseInt(display.getAscendancyNumber()); while (ancestry.size() < number) { ancestry.add(null); } ancestry.set(number - 1, person); } catch (NumberFormatException e) { //fall through... } } } } return ancestry; }
/** * Embed the specified person into this one. * * @param person The person to embed. */ public void embed(Person person) { this.isPrivate = this.isPrivate == null ? person.isPrivate : this.isPrivate; this.living = this.living == null ? person.living : this.living; this.principal = this.principal == null ? person.principal : this.principal; this.gender = this.gender == null ? person.gender : this.gender; if (this.display != null && person.display != null) { this.display.embed(person.display); } else if (person.display != null) { this.display = person.display; } if (person.names != null) { this.names = this.names == null ? new ArrayList<Name>() : this.names; this.names.addAll(person.names); } if (person.facts != null) { this.facts = this.facts == null ? new ArrayList<Fact>() : this.facts; this.facts.addAll(person.facts); } if (person.fields != null) { this.fields = this.fields == null ? new ArrayList<Field>() : this.fields; this.fields.addAll(person.fields); } super.embed(person); }
List<DescendancyNode> rootArray = new ArrayList<DescendancyNode>(); for (Person person : gx.getPersons()) { if (person.getDisplayExtension() != null && person.getDisplayExtension().getDescendancyNumber() != null) { String number = person.getDisplayExtension().getDescendancyNumber(); boolean spouse = number.endsWith("-S") || number.endsWith("-s"); if (spouse) {