Package org.gedcomx.records
Class Field
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.records.Field
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,SupportsLinks,SupportsExtensionElements,ReferencesSources
public class Field extends Conclusion
A field of a record.
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Field()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)voidaddValue(FieldValue value)Add a reference to the record value values being used as evidence.booleanequals(Object o)FieldextensionElement(Object element)FieldTypegetKnownType()The known type of the field.URIgetType()The type of the field.List<FieldValue>getValues()The set of values for the field.inthashCode()Fieldid(String id)Build up this object with an id.Fieldlink(String rel, URI href)Build up this data with a link.Fieldlink(Link link)Build up this data with a link.voidsetKnownType(FieldType type)The type of the field.voidsetType(URI type)The type of the field.voidsetValues(List<FieldValue> values)The set of values for the field.StringtoString()Provide a simple toString() method.Fieldtype(URI type)Build out this field with a type.Fieldtype(FieldType type)Build out this field with a type.Fieldvalue(FieldValue value)Build out this field with a field value.Stream<FieldValue>values()Create a stream for the values.-
Methods inherited from class org.gedcomx.conclusion.Conclusion
addNote, addSource, analysis, analysis, analysis, attribution, confidence, confidence, embed, getAnalysis, getAttribution, getConfidence, getKnownConfidenceLevel, getLang, getNotes, getSortKey, getSources, lang, note, notes, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, sortKey, source, source, 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
-
-
-
-
Method Detail
-
id
public Field 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 Field extensionElement(Object element)
- Overrides:
extensionElementin classConclusion
-
link
public Field link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
link- The link.- Returns:
- this.
-
link
public Field 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.
-
getType
public URI getType()
The type of the field.- Returns:
- The type of the field.
-
setType
public void setType(URI type)
The type of the field.- Parameters:
type- The type of the field.
-
type
public Field type(URI type)
Build out this field with a type.- Parameters:
type- The type.- Returns:
- this.
-
type
public Field type(FieldType type)
Build out this field with a type.- Parameters:
type- The type.- Returns:
- this.
-
getKnownType
public FieldType getKnownType()
The known type of the field.- Returns:
- The type of the field.
-
setKnownType
public void setKnownType(FieldType type)
The type of the field.- Parameters:
type- The type of the field.
-
values
public Stream<FieldValue> values()
Create a stream for the values.- Returns:
- a stream for the values.
-
getValues
public List<FieldValue> getValues()
The set of values for the field.- Returns:
- The set of values for the field.
-
setValues
public void setValues(List<FieldValue> values)
The set of values for the field.- Parameters:
values- The set of values for the field.
-
value
public Field value(FieldValue value)
Build out this field with a field value.- Parameters:
value- The value.- Returns:
- this.
-
addValue
public void addValue(FieldValue value)
Add a reference to the record value values being used as evidence.- Parameters:
value- The value to be added.
-
accept
public void accept(GedcomxModelVisitor visitor)
-
toString
public String toString()
Provide a simple toString() method.- Overrides:
toStringin classConclusion
-
-