org.gedcomx.conclusion
Class Family

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by org.gedcomx.conclusion.Conclusion
              extended by org.gedcomx.conclusion.Family
All Implemented Interfaces:
Attributable, HasNotes, HasTransientProperties, SupportsLinks, SupportsExtensionElements, ReferencesSources

public class Family
extends Conclusion

A family view, meaning up to two parents and a list of children who have those parents in common. Relationships carry the canonical information for this view, and the relationships must be used to get Facts (lineage types, marriages, etc.) about the relationships covered by a Family. The Family class provides a convenient way to see the typical family views without having to do the calculations to derive them. There should only be one family for each unique set of parents, and only one for each single-parent family with a particular parent. While in theory a Family object could


Field Summary
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
Family()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addChild(ResourceReference child)
          Add a child.
 Family analysis(Document analysis)
          Add a reference to the analysis for this conclusion.
 Family analysis(ResourceReference analysis)
          Add a reference to the analysis for this conclusion.
 Family analysis(URI analysis)
          Add a reference to the analysis for this conclusion.
 Family attribution(Attribution attribution)
          Build up this conclusion with attribution.
 Family child(ResourceReference child)
          Build out this family by adding a child.
 Family confidence(ConfidenceLevel confidence)
          Build up this conclusion with a confidence level.
 Family confidence(URI confidence)
          Build up this conclusion with a confidence level.
 void embed(Family family)
           
 List<ResourceReference> getChildren()
          A list of references to the children of this family.
 Boolean getIncludesKnownChildren()
          Flag indicating whether the list of known children are included in this family view.
 ResourceReference getParent1()
          A reference to a parent in the family.
 ResourceReference getParent2()
          A reference to a parent in the family.
 Boolean getPreferred()
          Flag indicating whether this family is the "preferred" one in the list of families as spouses or families as parents for the main person in a GedcomX document.
 Family id(String id)
          Build up this object with an id.
 Family lang(String lang)
          Build up this conclusion with a lang.
 Family link(Link link)
          Build up this data with a link.
 Family link(String rel, URI href)
          Build up this data with a link.
 Family note(Note note)
          Build up this conclusion with a note.
 Family parent1(ResourceReference parent1)
          Build out this family with a reference to parent1.
 Family parent2(ResourceReference parent2)
          Build out this family with a reference to parent2.
 void setChildren(List<ResourceReference> children)
          A list of references to the children of this family.
 void setIncludesKnownChildren(Boolean includesKnownChildren)
           
 void setParent1(ResourceReference parent1)
          A reference to a parent in the family.
 void setParent2(ResourceReference parent2)
          A reference to a parent in the family.
 void setPreferred(Boolean isPreferred)
           
 Family source(SourceDescription source)
          Build up this conclusion with a source reference.
 Family source(SourceReference sourceReference)
          Build up this conclusion with a source reference.
 
Methods inherited from class org.gedcomx.conclusion.Conclusion
addNote, addSource, embed, getAnalysis, getAttribution, getConfidence, getKnownConfidenceLevel, getLang, getNotes, getSortKey, getSources, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, sortKey, toString
 
Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, setLinks
 
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Family

public Family()
Method Detail

getParent1

public ResourceReference getParent1()
A reference to a parent in the family. The name "parent1" is used only to distinguish it from the other parent in this family and implies neither order nor role.

Returns:
A reference to a parent in the family. The name "parent1" is used only to distinguish it from the other parent in this family and implies neither order nor role.

setParent1

public void setParent1(ResourceReference parent1)
A reference to a parent in the family. The name "parent1" is used only to distinguish it from the other parent in this family and implies neither order nor role.

Parameters:
parent1 - A reference to a parent in the family. The name "parent1" is used only to distinguish it from the other parent in this family and implies neither order nor role.

parent1

public Family parent1(ResourceReference parent1)
Build out this family with a reference to parent1.

Parameters:
parent1 - Parent 1.
Returns:
this.

getParent2

public ResourceReference getParent2()
A reference to a parent in the family. The name "parent2" is used only to distinguish it from the other parent in this family and implies neither order nor role.

Returns:
A reference to a parent in the family. The name "parent2" is used only to distinguish it from the other parent in this family and implies neither order nor role.

setParent2

public void setParent2(ResourceReference parent2)
A reference to a parent in the family. The name "parent2" is used only to distinguish it from the other parent in this family and implies neither order nor role.

Parameters:
parent2 - A reference to a parent in the family. The name "parent2" is used only to distinguish it from the other parent in this family and implies neither order nor role.

parent2

public Family parent2(ResourceReference parent2)
Build out this family with a reference to parent2.

Parameters:
parent2 - Parent 2.
Returns:
this.

getChildren

public List<ResourceReference> getChildren()
A list of references to the children of this family.

Returns:
A list of references to the children of this family.

setChildren

public void setChildren(List<ResourceReference> children)
A list of references to the children of this family.

Parameters:
children - A list of references to the children of this family.

child

public Family child(ResourceReference child)
Build out this family by adding a child.

Parameters:
child - The child to add.
Returns:
this.

addChild

public void addChild(ResourceReference child)
Add a child.

Parameters:
child - The child to add.

id

public Family id(String id)
Description copied from class: ExtensibleData
Build up this object with an id.

Overrides:
id in class Conclusion
Parameters:
id - The id.

link

public Family link(String rel,
                   URI href)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class Conclusion
Parameters:
rel - The rel.
href - The href.
Returns:
this.

link

public Family link(Link link)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class Conclusion
Parameters:
link - The link.
Returns:
this.

lang

public Family lang(String lang)
Description copied from class: Conclusion
Build up this conclusion with a lang.

Overrides:
lang in class Conclusion
Parameters:
lang - The lang.
Returns:
this.

confidence

public Family confidence(URI confidence)
Description copied from class: Conclusion
Build up this conclusion with a confidence level.

Overrides:
confidence in class Conclusion
Parameters:
confidence - The confidence level.
Returns:
this.

confidence

public Family confidence(ConfidenceLevel confidence)
Description copied from class: Conclusion
Build up this conclusion with a confidence level.

Overrides:
confidence in class Conclusion
Parameters:
confidence - The confidence level.
Returns:
this.

source

public Family source(SourceReference sourceReference)
Description copied from class: Conclusion
Build up this conclusion with a source reference.

Overrides:
source in class Conclusion
Parameters:
sourceReference - The source reference.
Returns:
this.

source

public Family source(SourceDescription source)
Description copied from class: Conclusion
Build up this conclusion with a source reference.

Overrides:
source in class Conclusion
Parameters:
source - The source description being referenced.
Returns:
this.

note

public Family note(Note note)
Description copied from class: Conclusion
Build up this conclusion with a note.

Overrides:
note in class Conclusion
Parameters:
note - The note.
Returns:
this.

analysis

public Family analysis(ResourceReference analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

attribution

public Family attribution(Attribution attribution)
Description copied from class: Conclusion
Build up this conclusion with attribution.

Overrides:
attribution in class Conclusion
Parameters:
attribution - The attribution.
Returns:
this.

analysis

public Family analysis(Document analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

analysis

public Family analysis(URI analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

getIncludesKnownChildren

public Boolean getIncludesKnownChildren()
Flag indicating whether the list of known children are included in this family view. If false, then there may be only one child (for the main person), but no siblings included, for example. Note that even when false, there may not actually be any (additional) known children for the family. This flag just indicates that even if they are more children, they weren't included.

Returns:
true if this family object contains all of the known children, false or null otherwise.

setIncludesKnownChildren

public void setIncludesKnownChildren(Boolean includesKnownChildren)

getPreferred

public Boolean getPreferred()
Flag indicating whether this family is the "preferred" one in the list of families as spouses or families as parents for the main person in a GedcomX document. Note that this preference is likely a per-user setting.

Returns:
true if this family is the preferred set of parents or spouse, depending on whether the main person is a child or a parent in the family, respectively.

setPreferred

public void setPreferred(Boolean isPreferred)

accept

public void accept(GedcomxModelVisitor visitor)
Accept a visitor.

Parameters:
visitor - The visitor to accept.

embed

public void embed(Family family)


Copyright © 2015. All rights reserved.