Package org.gedcomx.conclusion
Class FamilyView
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.FamilyView
-
- All Implemented Interfaces:
HasTransientProperties,SupportsLinks,SupportsExtensionElements
public class FamilyView extends HypermediaEnabledData
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 data type 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.
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description FamilyView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(ResourceReference child)Add a child.FamilyViewchild(ResourceReference child)Build out this family by adding a child.voidembed(FamilyView family)List<ResourceReference>getChildren()A list of references to the children of this family.ResourceReferencegetParent1()A reference to a parent in the family.ResourceReferencegetParent2()A reference to a parent in the family.FamilyViewparent1(ResourceReference parent1)Build out this family with a reference to parent1.FamilyViewparent2(ResourceReference parent2)Build out this family with a reference to parent2.voidsetChildren(List<ResourceReference> children)A list of references to the children of this family.voidsetParent1(ResourceReference parent1)A reference to a parent in the family.voidsetParent2(ResourceReference parent2)A reference to a parent in the family.-
Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, link, link, setLinks
-
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, extensionElement, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, id, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty, toString
-
-
-
-
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 FamilyView 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 FamilyView 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 FamilyView 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.
-
embed
public void embed(FamilyView family)
-
-