Package org.gedcomx.conclusion
Class Fact
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.conclusion.Fact
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,HasDateAndPlace,SupportsLinks,HasFields,SupportsExtensionElements,ReferencesSources
public class Fact extends Conclusion implements HasDateAndPlace, HasFields
A conclusion about a fact applicable to a person or relationship.
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Fact()Create a fact.Fact(FactType factType, String value)Create a fact with the passed in type and values.Fact(FactType factType, String date, String place)Create a date/place fact with the passed in type and values.Fact(FactType factType, Date date, PlaceReference place)Create a date/place fact with the passed in type and values.Fact(FactType factType, Date date, PlaceReference place, String value)Create a date/place fact with the passed in type and values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddField(Field field)Add a reference to the record field values being used as evidence.voidaddQualifier(Qualifier qualifier)Add a qualifier.Factanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Factanalysis(URI analysis)Add a reference to the analysis for this conclusion.Factanalysis(Document analysis)Add a reference to the analysis for this conclusion.Factattribution(Attribution attribution)Build up this conclusion with attribution.Factconfidence(URI confidence)Build up this conclusion with a confidence level.Factconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.Factdate(Date date)Build up this fact with a date.FactextensionElement(Object element)Factfield(Field field)Build up this fact with a field.DategetDate()The date of applicability of this fact.List<Field>getFields()Get the fields being used as evidence.FactTypegetKnownType()The enum referencing the known type of the fact, orFactType.OTHERif not known.PlaceReferencegetPlace()The place of applicability of this fact.BooleangetPrimary()Indicator of whether this fact is the "primary" fact of the record from which the subject was extracted.List<Qualifier>getQualifiers()The qualifiers associated with this fact.URIgetType()The type of the fact.StringgetValue()The value as supplied by the user.Factid(String id)Build up this object with an id.Factlang(String lang)Build up this conclusion with a lang.Factlink(String rel, URI href)Build up this data with a link.Factlink(Link link)Build up this data with a link.Factnote(Note note)Build up this conclusion with a note.Factplace(PlaceReference place)Build up this fact with a place.Factprimary(Boolean primary)Build up this fact with a 'primary' flag.Factqualifier(Qualifier qualifier)Build up this fact with a qualifier.Stream<Qualifier>qualifiers()Create a stream for the qualifiers.voidsetDate(Date date)The date of applicability of this fact.voidsetFields(List<Field> fields)Set the list of fields being used as evidence.voidsetKnownType(FactType knownType)Set the type of this fact from a known enumeration of fact types.voidsetPlace(PlaceReference place)The place of applicability of this fact.voidsetPrimary(Boolean primary)Indicator of whether this fact is the "primary" fact of the record from which the subject was extracted.voidsetQualifiers(List<Qualifier> qualifiers)Set the qualifiers associated with this fact.voidsetType(URI type)The type of the fact.voidsetValue(String value)The value as supplied by the user.FactsortKey(String sortKey)Build up this fact with a sort key.Factsource(SourceDescription source)Build up this conclusion with a source reference.Factsource(SourceReference sourceReference)Build up this conclusion with a source reference.StringtoString()Provide a simple toString() method.Facttype(URI type)Build up this fact with a type.Facttype(FactType type)Build up this fact with a type.Factvalue(String value)Build up this fact with a value.-
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
-
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
-
-
-
-
Constructor Detail
-
Fact
public Fact()
Create a fact.
-
Fact
public Fact(FactType factType, String value)
Create a fact with the passed in type and values.- Parameters:
factType- the fact type.value- The value as supplied by the user.
-
Fact
public Fact(FactType factType, String date, String place)
Create a date/place fact with the passed in type and values.- Parameters:
factType- the fact type.date- The date of applicability of this fact.place- The place of applicability of this fact.
-
Fact
public Fact(FactType factType, Date date, PlaceReference place)
Create a date/place fact with the passed in type and values.- Parameters:
factType- the fact type.date- The date of applicability of this fact.place- The place of applicability of this fact.
-
Fact
public Fact(FactType factType, Date date, PlaceReference place, String value)
Create a date/place fact with the passed in type and values.- Parameters:
factType- the fact type.date- The date of applicability of this fact.place- The place of applicability of this fact.value- The value as supplied by the user.
-
-
Method Detail
-
id
public Fact id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classConclusion- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public Fact extensionElement(Object element)
- Overrides:
extensionElementin classConclusion
-
link
public Fact link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
link
public Fact link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
link- The link.- Returns:
- this.
-
lang
public Fact lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.- Overrides:
langin classConclusion- Parameters:
lang- The lang.- Returns:
- this.
-
confidence
public Fact confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Fact confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Fact source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
sourceReference- The source reference.- Returns:
- this.
-
source
public Fact source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
source- The source description being referenced.- Returns:
- this.
-
note
public Fact note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.- Overrides:
notein classConclusion- Parameters:
note- The note.- Returns:
- this.
-
attribution
public Fact attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classConclusion- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Fact analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Fact analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Fact analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
sortKey
public Fact sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.- Overrides:
sortKeyin classConclusion- Parameters:
sortKey- The sort key.- Returns:
- this.
-
getType
public URI getType()
The type of the fact.- Returns:
- The type of the fact.
-
setType
public void setType(URI type)
The type of the fact.- Parameters:
type- The type of the fact.
-
type
public Fact type(URI type)
Build up this fact with a type.- Parameters:
type- The type.- Returns:
- this
-
type
public Fact type(FactType type)
Build up this fact with a type.- Parameters:
type- The type.- Returns:
- this
-
getKnownType
public FactType getKnownType()
The enum referencing the known type of the fact, orFactType.OTHERif not known.- Returns:
- The enum referencing the known type of the fact, or
FactType.OTHERif not known.
-
setKnownType
public void setKnownType(FactType knownType)
Set the type of this fact from a known enumeration of fact types.- Parameters:
knownType- the fact type.
-
getPrimary
public Boolean getPrimary()
Indicator of whether this fact is the "primary" fact of the record from which the subject was extracted. Applicable only to extracted persons/relationships. The meaning of this flag outside the scope of an extracted subject is undefined.- Returns:
- Whether this fact is the primary fact of the record from which the subject was extracted.
-
setPrimary
public void setPrimary(Boolean primary)
Indicator of whether this fact is the "primary" fact of the record from which the subject was extracted. Applicable only to extracted persons/relationships. The meaning of this flag outside the scope of an extracted subject is undefined.- Parameters:
primary- Whether this fact is the primary fact of the record from which the subject was extracted.
-
primary
public Fact primary(Boolean primary)
Build up this fact with a 'primary' flag.- Parameters:
primary- The primary flag.- Returns:
- this.
-
getDate
public Date getDate()
The date of applicability of this fact.- Specified by:
getDatein interfaceHasDateAndPlace- Returns:
- The date of applicability of this fact.
-
setDate
public void setDate(Date date)
The date of applicability of this fact.- Specified by:
setDatein interfaceHasDateAndPlace- Parameters:
date- The date of applicability of this fact.
-
date
public Fact date(Date date)
Build up this fact with a date.- Parameters:
date- the date.- Returns:
- this.
-
getPlace
public PlaceReference getPlace()
The place of applicability of this fact.- Specified by:
getPlacein interfaceHasDateAndPlace- Returns:
- The place of applicability of this fact.
-
setPlace
public void setPlace(PlaceReference place)
The place of applicability of this fact.- Specified by:
setPlacein interfaceHasDateAndPlace- Parameters:
place- The place of applicability of this fact.
-
place
public Fact place(PlaceReference place)
Build up this fact with a place.- Parameters:
place- The place.- Returns:
- this.
-
getValue
public String getValue()
The value as supplied by the user.- Returns:
- The value as supplied by the user.
-
setValue
public void setValue(String value)
The value as supplied by the user.- Parameters:
value- The value as supplied by the user.
-
value
public Fact value(String value)
Build up this fact with a value.- Parameters:
value- The value.- Returns:
- this.
-
qualifiers
public Stream<Qualifier> qualifiers()
Create a stream for the qualifiers.- Returns:
- a stream for the qualifiers.
-
getQualifiers
public List<Qualifier> getQualifiers()
The qualifiers associated with this fact.- Returns:
- The qualifiers associated with this fact.
-
setQualifiers
public void setQualifiers(List<Qualifier> qualifiers)
Set the qualifiers associated with this fact.- Parameters:
qualifiers- qualifiers to associate with this fact.
-
qualifier
public Fact qualifier(Qualifier qualifier)
Build up this fact with a qualifier.- Parameters:
qualifier- The qualifier.- Returns:
- this.
-
addQualifier
public void addQualifier(Qualifier qualifier)
Add a qualifier.- Parameters:
qualifier- The qualifier.
-
field
public Fact field(Field field)
Build up this fact 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.
-
toString
public String toString()
Description copied from class:ConclusionProvide a simple toString() method.- Overrides:
toStringin classConclusion
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-