org.gedcomx.conclusion
Class Fact

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.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
Fact()
          Create a fact.
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.
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.
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addField(Field field)
          Add a reference to the record field values being used as evidence.
 void addQualifier(Qualifier qualifier)
          Add a qualifier.
 Fact analysis(Document analysis)
          Add a reference to the analysis for this conclusion.
 Fact analysis(ResourceReference analysis)
          Add a reference to the analysis for this conclusion.
 Fact analysis(URI analysis)
          Add a reference to the analysis for this conclusion.
 Fact attribution(Attribution attribution)
          Build up this conclusion with attribution.
 Fact confidence(ConfidenceLevel confidence)
          Build up this conclusion with a confidence level.
 Fact confidence(URI confidence)
          Build up this conclusion with a confidence level.
 Fact date(Date date)
          Build up this fact with a date.
 Fact field(Field field)
          Build up this fact with a field.
 Date getDate()
          The date of applicability of this fact.
 List<Field> getFields()
          Get the fields being used as evidence.
 FactType getKnownType()
          The enum referencing the known type of the fact, or FactType.OTHER if not known.
 PlaceReference getPlace()
          The place of applicability of this fact.
 Boolean getPrimary()
          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.
 URI getType()
          The type of the fact.
 String getValue()
          The value as supplied by the user.
 Fact id(String id)
          Build up this object with an id.
 Fact lang(String lang)
          Build up this conclusion with a lang.
 Fact link(Link link)
          Build up this data with a link.
 Fact link(String rel, URI href)
          Build up this data with a link.
 Fact note(Note note)
          Build up this conclusion with a note.
 Fact place(PlaceReference place)
          Build up this fact with a place.
 Fact primary(Boolean primary)
          Build up this fact with a 'primary' flag.
 Fact qualifier(Qualifier qualifier)
          Build up this fact with a qualifier.
 void setDate(Date date)
          The date of applicability of this fact.
 void setFields(List<Field> fields)
          Set the list of fields being used as evidence.
 void setKnownType(FactType knownType)
          Set the type of this fact from a known enumeration of fact types.
 void setPlace(PlaceReference place)
          The place of applicability of this fact.
 void setPrimary(Boolean primary)
          Indicator of whether this fact is the "primary" fact of the record from which the subject was extracted.
 void setQualifiers(List<Qualifier> qualifiers)
          Set the qualifiers associated with this fact.
 void setType(URI type)
          The type of the fact.
 void setValue(String value)
          The value as supplied by the user.
 Fact sortKey(String sortKey)
          Build up this fact with a sort key.
 Fact source(SourceDescription source)
          Build up this conclusion with a source reference.
 Fact source(SourceReference sourceReference)
          Build up this conclusion with a source reference.
 String toString()
          Provide a simple toString() method.
 Fact type(FactType type)
          Build up this fact with a type.
 Fact type(URI type)
          Build up this fact with a type.
 Fact value(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, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources
 
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

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: ExtensibleData
Build up this object with an id.

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

link

public Fact 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 Fact 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 Fact 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 Fact 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 Fact 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 Fact 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 Fact 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 Fact 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.

attribution

public Fact 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 Fact 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.

analysis

public Fact 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 Fact 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.

sortKey

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

Overrides:
sortKey in class Conclusion
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, or FactType.OTHER if not known.

Returns:
The enum referencing the known type of the fact, or FactType.OTHER if 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:
getDate in interface HasDateAndPlace
Returns:
The date of applicability of this fact.

setDate

public void setDate(Date date)
The date of applicability of this fact.

Specified by:
setDate in interface HasDateAndPlace
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:
getPlace in interface HasDateAndPlace
Returns:
The place of applicability of this fact.

setPlace

public void setPlace(PlaceReference place)
The place of applicability of this fact.

Specified by:
setPlace in interface HasDateAndPlace
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.

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.

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 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: Conclusion
Provide a simple toString() method.

Overrides:
toString in class Conclusion

accept

public void accept(GedcomxModelVisitor visitor)
Accept a visitor.

Parameters:
visitor - The visitor.


Copyright © 2015. All rights reserved.