org.gedcomx.conclusion
Class Relationship

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.Subject
                  extended by 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
Relationship()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addFact(Fact fact)
          Add a fact conclusion.
 void addField(Field field)
          Add a reference to the record field values being used as evidence.
 Relationship analysis(Document analysis)
          Add a reference to the analysis for this conclusion.
 Relationship analysis(ResourceReference analysis)
          Add a reference to the analysis for this conclusion.
 Relationship analysis(URI analysis)
          Add a reference to the analysis for this conclusion.
 Relationship attribution(Attribution attribution)
          Build up this conclusion with attribution.
 Relationship confidence(ConfidenceLevel confidence)
          Build up this conclusion with a confidence level.
 Relationship confidence(URI confidence)
          Build up this conclusion with a confidence level.
 void embed(Relationship relationship)
           
 Relationship evidence(EvidenceReference evidence)
          Build up this subject with an evidence reference.
 Relationship evidence(Relationship evidence)
           
 Relationship extracted(Boolean extracted)
          Build up this subject with an extracted flag.
 Relationship fact(Fact fact)
          Build out this relationship with a fact.
 Relationship field(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.
 RelationshipType getKnownType()
          The enum referencing the known type of the relationship, or RelationshipType.OTHER if not known.
 ResourceReference getPerson1()
          A reference to a person in the relationship.
 ResourceReference getPerson2()
          A reference to a person in the relationship.
 URI getType()
          The type of this relationship.
 Relationship id(String id)
          Build up this object with an id.
 Relationship identifier(Identifier identifier)
          Build up this subject with an identifier.
 Relationship lang(String lang)
          Build up this conclusion with a lang.
 Relationship link(Link link)
          Build up this data with a link.
 Relationship link(String rel, URI href)
          Build up this data with a link.
 Relationship media(SourceDescription media)
          Build up this subject with a media reference.
 Relationship media(SourceReference media)
          Build up this subject with a media reference.
 Relationship note(Note note)
          Build up this conclusion with a note.
 Relationship person1(Person person1)
          Build out this relationship with a reference to person 1.
 Relationship person1(ResourceReference person1)
          Build out this relationship with a reference to person 1.
 Relationship person2(Person person2)
          Build out this relationship with a reference to person 2.
 Relationship person2(ResourceReference person2)
          Build out this relationship with a reference to person 2.
 void setFacts(List<Fact> facts)
          The fact conclusions for the relationship.
 void setFields(List<Field> fields)
          Set the list of fields being used as evidence.
 void setKnownType(RelationshipType type)
          Set the relationship type from a known enumeration of relationship types.
 void setPerson1(ResourceReference person1)
          A reference to a person in the relationship.
 void setPerson2(ResourceReference person2)
          A reference to a person in the relationship.
 void setType(URI type)
          The type of this relationship.
 Relationship sortKey(String sortKey)
          Build up this fact with a sort key.
 Relationship source(SourceDescription source)
          Build up this conclusion with a source reference.
 Relationship source(SourceReference sourceReference)
          Build up this conclusion with a source reference.
 Relationship type(RelationshipType type)
          Build out this relationship with a type.
 Relationship type(URI type)
          Build out this relationship with a type.
 
Methods inherited from class org.gedcomx.conclusion.Subject
addEvidence, addIdentifier, addMedia, embed, getEvidence, getExtracted, getIdentifiers, getMedia, getPersistentId, setEvidence, setExtracted, setIdentifiers, setMedia, setPersistentId
 
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, 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
 

Constructor Detail

Relationship

public Relationship()
Method Detail

id

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

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

link

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

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

link

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

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

lang

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

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

confidence

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

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

confidence

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

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

source

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

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

source

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

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

note

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

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

analysis

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

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

attribution

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

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

analysis

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

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

analysis

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

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

extracted

public Relationship extracted(Boolean extracted)
Description copied from class: Subject
Build up this subject with an extracted flag.

Overrides:
extracted in class Subject
Parameters:
extracted - The extracted flag.
Returns:
this.

identifier

public Relationship identifier(Identifier identifier)
Description copied from class: Subject
Build up this subject with an identifier.

Overrides:
identifier in class Subject
Parameters:
identifier - The identifier.
Returns:
this.

evidence

public Relationship evidence(EvidenceReference evidence)
Description copied from class: Subject
Build up this subject with an evidence reference.

Overrides:
evidence in class Subject
Parameters:
evidence - The evidence reference.
Returns:
this.

evidence

public Relationship evidence(Relationship evidence)

media

public Relationship media(SourceReference media)
Description copied from class: Subject
Build up this subject with a media reference.

Overrides:
media in class Subject
Parameters:
media - The media reference.
Returns:
this.

media

public Relationship media(SourceDescription media)
Description copied from class: Subject
Build up this subject with a media reference.

Overrides:
media in class Subject
Parameters:
media - The media reference.
Returns:
this.

sortKey

public Relationship sortKey(String sortKey)
Description copied from class: Conclusion
Build up this fact with a sort key.

Overrides:
sortKey in class Subject
Parameters:
sortKey - The sort key.
Returns:
this.

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, or RelationshipType.OTHER if not known.

Returns:
The enum referencing the known type of the relationship, or RelationshipType.OTHER if 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.

getFacts

public List<Fact> getFacts()
The fact conclusions for the relationship.

Specified by:
getFacts in interface HasFacts
Returns:
The fact conclusions for the relationship.

setFacts

public void setFacts(List<Fact> facts)
The fact conclusions for the relationship.

Specified by:
setFacts in interface HasFacts
Parameters:
facts - The fact conclusions for the relationship.

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.

getFields

public List<Field> getFields()
Get the fields being used as evidence.

Specified by:
getFields in interface HasFields
Returns:
The references to the record fields being used as evidence.

setFields

public void setFields(List<Field> fields)
Set the list of fields being used as evidence.

Specified by:
setFields in interface HasFields
Parameters:
fields - - List of fields

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)


Copyright © 2015. All rights reserved.