org.gedcomx.records
Class FieldDescriptor

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by 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
FieldDescriptor()
           
 
Method Summary
 void addDescription(TextValue description)
          Add a description.
 FieldDescriptor description(String description)
          Build out this descriptor with a description.
 FieldDescriptor description(TextValue description)
          Build out this descriptor with a description.
 List<TextValue> getDescriptions()
          The description of the field.
 String getOriginalLabel()
          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.
 FieldDescriptor id(String id)
          Build up this object with an id.
 FieldDescriptor link(Link link)
          Build up this data with a link.
 FieldDescriptor link(String rel, URI href)
          Build up this data with a link.
 FieldDescriptor originalLabel(String originalLabel)
          Build out this field descriptor with an original label.
 void setDescriptions(List<TextValue> descriptions)
          The description of the field.
 void setOriginalLabel(String originalLabel)
          The original label for the field, as stated on the original record.
 void setValues(List<FieldValueDescriptor> values)
          Descriptors of the values that are applicable to the field.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldDescriptor

public FieldDescriptor()
Method Detail

id

public FieldDescriptor id(String id)
Description copied from class: ExtensibleData
Build up this object with an id.

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

link

public FieldDescriptor link(Link link)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class HypermediaEnabledData
Parameters:
link - The link.
Returns:
this.

link

public FieldDescriptor link(String rel,
                            URI href)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class HypermediaEnabledData
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.

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.

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.


Copyright © 2015. All rights reserved.