Package org.gedcomx.records
Class FieldDescriptor
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.records.FieldDescriptor
-
- All Implemented Interfaces:
HasTransientProperties,SupportsLinks,SupportsExtensionElements
public class FieldDescriptor extends HypermediaEnabledData
A description of a field in a record.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description FieldDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescription(TextValue description)Add a description.FieldDescriptordescription(String description)Build out this descriptor with a description.FieldDescriptordescription(TextValue description)Build out this descriptor with a description.Stream<TextValue>descriptions()Create a stream for the descriptions.FieldDescriptorextensionElement(Object element)List<TextValue>getDescriptions()The description of the field.StringgetOriginalLabel()The original label for the field, as stated on the original record.List<FieldValueDescriptor>getValues()Descriptors of the values that are applicable to the field.FieldDescriptorid(String id)Build up this object with an id.FieldDescriptorlink(String rel, URI href)Build up this data with a link.FieldDescriptorlink(Link link)Build up this data with a link.FieldDescriptororiginalLabel(String originalLabel)Build out this field descriptor with an original label.voidsetDescriptions(List<TextValue> descriptions)The description of the field.voidsetOriginalLabel(String originalLabel)The original label for the field, as stated on the original record.voidsetValues(List<FieldValueDescriptor> values)Descriptors of the values that are applicable to the field.Stream<FieldValueDescriptor>values()Create a stream for the values.-
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, toString
-
-
-
-
Method Detail
-
id
public FieldDescriptor 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 FieldDescriptor extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public FieldDescriptor link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
link- The link.- Returns:
- this.
-
link
public FieldDescriptor link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
getOriginalLabel
public String getOriginalLabel()
The original label for the field, as stated on the original record.- Returns:
- The original label for the field, as stated on the original record.
-
setOriginalLabel
public void setOriginalLabel(String originalLabel)
The original label for the field, as stated on the original record.- Parameters:
originalLabel- The original label for the field, as stated on the original record.
-
originalLabel
public FieldDescriptor originalLabel(String originalLabel)
Build out this field descriptor with an original label.- Parameters:
originalLabel- The original label.- Returns:
- this.
-
descriptions
public Stream<TextValue> descriptions()
Create a stream for the descriptions.- Returns:
- a stream for the descriptions.
-
getDescriptions
public List<TextValue> getDescriptions()
The description of the field.- Returns:
- The description of the field.
-
setDescriptions
public void setDescriptions(List<TextValue> descriptions)
The description of the field.- Parameters:
descriptions- The description of the field.
-
description
public FieldDescriptor description(TextValue description)
Build out this descriptor with a description.- Parameters:
description- The description.- Returns:
- this.
-
description
public FieldDescriptor description(String description)
Build out this descriptor with a description.- Parameters:
description- The description.- Returns:
- this.
-
addDescription
public void addDescription(TextValue description)
Add a description.- Parameters:
description- The description to be added.
-
values
public Stream<FieldValueDescriptor> values()
Create a stream for the values.- Returns:
- a stream for the values.
-
getValues
public List<FieldValueDescriptor> getValues()
Descriptors of the values that are applicable to the field.- Returns:
- Descriptors of the values that are applicable to the field.
-
setValues
public void setValues(List<FieldValueDescriptor> values)
Descriptors of the values that are applicable to the field.- Parameters:
values- Descriptors of the values that are applicable to the field.
-
-