Package org.gedcomx.conclusion
Class Date
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.conclusion.Date
-
- All Implemented Interfaces:
HasTransientProperties,HasFields,SupportsExtensionElements
public class Date extends ExtensibleData implements HasFields
A concluded genealogical date.
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Date()
-
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.voidaddNormalizedExtension(TextValue normalizedExtension)Add a normalized extension to the list.Dateconfidence(URI confidence)Build up this conclusion with a confidence level.Dateconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.booleanequals(Object o)DateextensionElement(Object element)Datefield(Field field)Build up this date with a field.Dateformal(String formal)Build up this date with a formal representation of the date.Dateformal(GedcomxDate formal)Build up this date with a formal representation of the date.URIgetConfidence()The level of confidence the contributor has about the data.List<Field>getFields()Get the fields being used as evidence.StringgetFormal()The standardized and/or normalized formal value.ConfidenceLevelgetKnownConfidenceLevel()The value of a the known confidence level, orConfidenceLevel.OTHERif not known.List<TextValue>getNormalizedExtensions()The list of normalized values for the date, provided for display purposes by the application.StringgetOriginal()The original text as supplied by the user.inthashCode()Dateid(String id)Build up this object with an id.Stream<TextValue>normalizedExtensions()Create a stream for the normalized value extensions.Dateoriginal(String original)Build up this date with original text as supplied by the user.voidsetConfidence(URI confidence)The level of confidence the contributor has about the data.voidsetFields(List<Field> fields)Set the list of fields being used as evidence.voidsetFormal(String formal)The standardized and/or normalized formal value.voidsetFormalDate(GedcomxDate formal)The standardized and/or normalized formal value.voidsetKnownConfidenceLevel(ConfidenceLevel level)Set the confidence level from a known enumeration of confidence levels.voidsetNormalizedExtensions(List<TextValue> normalized)The list of normalized values for the date, provided for display purposes by the application.voidsetOriginal(String original)The original text as supplied by the user.StringtoString()Provide a simple toString() method.-
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty
-
-
-
-
Method Detail
-
id
public Date id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classExtensibleData- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public Date extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
getOriginal
public String getOriginal()
The original text as supplied by the user.- Returns:
- The original text as supplied by the user.
-
setOriginal
public void setOriginal(String original)
The original text as supplied by the user.- Parameters:
original- The original text as supplied by the user.
-
original
public Date original(String original)
Build up this date with original text as supplied by the user.- Parameters:
original- the original text.- Returns:
- this.
-
getFormal
public String getFormal()
The standardized and/or normalized formal value.- Returns:
- The formal value.
-
setFormal
public void setFormal(String formal)
The standardized and/or normalized formal value.- Parameters:
formal- The formal value.
-
setFormalDate
public void setFormalDate(GedcomxDate formal)
The standardized and/or normalized formal value.- Parameters:
formal- The formal value.
-
formal
public Date formal(String formal)
Build up this date with a formal representation of the date.- Parameters:
formal- The formal date.- Returns:
- this.
-
formal
public Date formal(GedcomxDate formal)
Build up this date with a formal representation of the date.- Parameters:
formal- The formal date.- Returns:
- this.
-
getConfidence
public URI getConfidence()
The level of confidence the contributor has about the data.- Returns:
- The level of confidence the contributor has about the data.
-
setConfidence
public void setConfidence(URI confidence)
The level of confidence the contributor has about the data.- Parameters:
confidence- The level of confidence the contributor has about the data.
-
confidence
public Date confidence(URI confidence)
Build up this conclusion with a confidence level.- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Date confidence(ConfidenceLevel confidence)
Build up this conclusion with a confidence level.- Parameters:
confidence- The confidence level.- Returns:
- this.
-
getKnownConfidenceLevel
public ConfidenceLevel getKnownConfidenceLevel()
The value of a the known confidence level, orConfidenceLevel.OTHERif not known.- Returns:
- The value of a the known confidence level, or
ConfidenceLevel.OTHERif not known.
-
setKnownConfidenceLevel
public void setKnownConfidenceLevel(ConfidenceLevel level)
Set the confidence level from a known enumeration of confidence levels.- Parameters:
level- The known level.
-
normalizedExtensions
public Stream<TextValue> normalizedExtensions()
Create a stream for the normalized value extensions.- Returns:
- a stream for the normalized value extensions.
-
getNormalizedExtensions
public List<TextValue> getNormalizedExtensions()
The list of normalized values for the date, provided for display purposes by the application. Normalized values are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.- Returns:
- The list of normalized values for the date, provided for display purposes by the application. Normalized values are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.
-
setNormalizedExtensions
public void setNormalizedExtensions(List<TextValue> normalized)
The list of normalized values for the date, provided for display purposes by the application. Normalized values are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.- Parameters:
normalized- The list of normalized values for the date, provided for display purposes by the application. Normalized values are not specified by GEDCOM X core, but as extension elements by GEDCOM X RS.
-
addNormalizedExtension
public void addNormalizedExtension(TextValue normalizedExtension)
Add a normalized extension to the list.- Parameters:
normalizedExtension- The normalizedExtension to be added.
-
field
public Date field(Field field)
Build up this date 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:ExtensibleDataProvide a simple toString() method.- Overrides:
toStringin classExtensibleData
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-