Package org.gedcomx.conclusion
Class Relationship
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.conclusion.Subject
-
- org.gedcomx.conclusion.Relationship
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,HasFacts,SupportsLinks,HasFields,SupportsExtensionElements,ReferencesSources
public class Relationship extends Subject implements HasFacts, HasFields
A relationship between two or more persons.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Relationship()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddFact(Fact fact)Add a fact conclusion.voidaddField(Field field)Add a reference to the record field values being used as evidence.Relationshipanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Relationshipanalysis(URI analysis)Add a reference to the analysis for this conclusion.Relationshipanalysis(Document analysis)Add a reference to the analysis for this conclusion.Relationshipattribution(Attribution attribution)Build up this conclusion with attribution.Relationshipconfidence(URI confidence)Build up this conclusion with a confidence level.Relationshipconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.voidembed(Relationship relationship)Relationshipevidence(EvidenceReference evidence)Build up this subject with an evidence reference.Relationshipevidence(Relationship evidence)RelationshipextensionElement(Object element)Relationshipextracted(Boolean extracted)Build up this subject with an extracted flag.Relationshipfact(Fact fact)Build out this relationship with a fact.Relationshipfield(Field field)Build out this relationship with a field.List<Fact>getFacts()The fact conclusions for the relationship.List<Field>getFields()Get the fields being used as evidence.RelationshipTypegetKnownType()The enum referencing the known type of the relationship, orRelationshipType.OTHERif not known.ResourceReferencegetPerson1()A reference to a person in the relationship.ResourceReferencegetPerson2()A reference to a person in the relationship.URIgetType()The type of this relationship.Relationshipid(String id)Build up this object with an id.Relationshipidentifier(Identifier identifier)Build up this subject with an identifier.Relationshiplang(String lang)Build up this conclusion with a lang.Relationshiplink(String rel, URI href)Build up this data with a link.Relationshiplink(Link link)Build up this data with a link.Relationshipmedia(SourceDescription media)Build up this subject with a media reference.Relationshipmedia(SourceReference media)Build up this subject with a media reference.Relationshipnote(Note note)Build up this conclusion with a note.Relationshipperson1(ResourceReference person1)Build out this relationship with a reference to person 1.Relationshipperson1(Person person1)Build out this relationship with a reference to person 1.Relationshipperson2(ResourceReference person2)Build out this relationship with a reference to person 2.Relationshipperson2(Person person2)Build out this relationship with a reference to person 2.voidsetFacts(List<Fact> facts)The fact conclusions for the relationship.voidsetFields(List<Field> fields)Set the list of fields being used as evidence.voidsetKnownType(RelationshipType type)Set the relationship type from a known enumeration of relationship types.voidsetPerson1(ResourceReference person1)A reference to a person in the relationship.voidsetPerson2(ResourceReference person2)A reference to a person in the relationship.voidsetType(URI type)The type of this relationship.RelationshipsortKey(String sortKey)Build up this fact with a sort key.Relationshipsource(SourceDescription source)Build up this conclusion with a source reference.Relationshipsource(SourceReference sourceReference)Build up this conclusion with a source reference.Relationshiptype(URI type)Build out this relationship with a type.Relationshiptype(RelationshipType type)Build out this relationship with a type.-
Methods inherited from class org.gedcomx.conclusion.Subject
addEvidence, addIdentifier, addMedia, embed, evidence, getEvidence, getExtracted, getIdentifiers, getMedia, getPersistentId, identifiers, media, setEvidence, setExtracted, setIdentifiers, setMedia, setPersistentId
-
Methods inherited from class org.gedcomx.conclusion.Conclusion
addNote, addSource, embed, getAnalysis, getAttribution, getConfidence, getKnownConfidenceLevel, getLang, getNotes, getSortKey, getSources, notes, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, sources, 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
-
Methods inherited from interface org.gedcomx.common.Attributable
getAttribution, setAttribution
-
-
-
-
Method Detail
-
id
public Relationship id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.
-
extensionElement
public Relationship extensionElement(Object element)
- Overrides:
extensionElementin classSubject
-
link
public Relationship link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
link
public Relationship link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
lang
public Relationship lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.
-
confidence
public Relationship confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Relationship confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Relationship source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
source
public Relationship source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
note
public Relationship note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.
-
analysis
public Relationship analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
attribution
public Relationship attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classSubject- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Relationship analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
analysis
public Relationship analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
extracted
public Relationship extracted(Boolean extracted)
Description copied from class:SubjectBuild up this subject with an extracted flag.
-
identifier
public Relationship identifier(Identifier identifier)
Description copied from class:SubjectBuild up this subject with an identifier.- Overrides:
identifierin classSubject- Parameters:
identifier- The identifier.- Returns:
- this.
-
evidence
public Relationship evidence(EvidenceReference evidence)
Description copied from class:SubjectBuild up this subject with an evidence reference.
-
evidence
public Relationship evidence(Relationship evidence)
-
media
public Relationship media(SourceReference media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
media
public Relationship media(SourceDescription media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
sortKey
public Relationship sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.
-
getType
public URI getType()
The type of this relationship.- Returns:
- The type of this relationship.
-
setType
public void setType(URI type)
The type of this relationship.- Parameters:
type- The type of this relationship.
-
type
public Relationship type(URI type)
Build out this relationship with a type.- Parameters:
type- The type.- Returns:
- this.
-
type
public Relationship type(RelationshipType type)
Build out this relationship with a type.- Parameters:
type- The type.- Returns:
- this.
-
getKnownType
public RelationshipType getKnownType()
The enum referencing the known type of the relationship, orRelationshipType.OTHERif not known.- Returns:
- The enum referencing the known type of the relationship, or
RelationshipType.OTHERif not known.
-
setKnownType
public void setKnownType(RelationshipType type)
Set the relationship type from a known enumeration of relationship types.- Parameters:
type- The relationship type.
-
getPerson1
public ResourceReference getPerson1()
A reference to a person in the relationship. The name "person1" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".- Returns:
- A reference to a person in the relationship. The name "person1" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".
-
setPerson1
public void setPerson1(ResourceReference person1)
A reference to a person in the relationship. The name "person1" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".- Parameters:
person1- A reference to a person in the relationship. The name "person1" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".
-
person1
public Relationship person1(ResourceReference person1)
Build out this relationship with a reference to person 1.- Parameters:
person1- person 1.- Returns:
- this.
-
person1
public Relationship person1(Person person1)
Build out this relationship with a reference to person 1.- Parameters:
person1- person 1.- Returns:
- this.
-
getPerson2
public ResourceReference getPerson2()
A reference to a person in the relationship. The name "person2" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".- Returns:
- A reference to a person in the relationship. The name "person2" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".
-
setPerson2
public void setPerson2(ResourceReference person2)
A reference to a person in the relationship. The name "person2" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".- Parameters:
person2- A reference to a person in the relationship. The name "person2" is used only to distinguish it from the other person in this relationship and implies neither order nor role. When the relationship type implies direction, it goes from "person1" to "person2".
-
person2
public Relationship person2(ResourceReference person2)
Build out this relationship with a reference to person 2.- Parameters:
person2- person 2.- Returns:
- this.
-
person2
public Relationship person2(Person person2)
Build out this relationship with a reference to person 2.- Parameters:
person2- person 2.- Returns:
- this.
-
fact
public Relationship fact(Fact fact)
Build out this relationship with a fact.- Parameters:
fact- The fact.- Returns:
- this
-
addFact
public void addFact(Fact fact)
Add a fact conclusion.- Parameters:
fact- The fact conclusion to be added.
-
field
public Relationship field(Field field)
Build out this relationship with a field.- Parameters:
field- The field.- Returns:
- this.
-
addField
public void addField(Field field)
Add a reference to the record field values being used as evidence.- Parameters:
field- The field to be added.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
embed
public void embed(Relationship relationship)
-
-