org.gedcomx.source
Class SourceCitation

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by org.gedcomx.source.SourceCitation
All Implemented Interfaces:
HasTransientProperties, SupportsLinks, SupportsExtensionElements

public class SourceCitation
extends HypermediaEnabledData

Represents a source citation.


Field Summary
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
SourceCitation()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addField(CitationField field)
          Add a reference to the citation fields.
 SourceCitation citationTemplate(ResourceReference citationTemplate)
          Build out this source citation with a template.
 SourceCitation field(CitationField fields)
          Build out this citation with a field.
 ResourceReference getCitationTemplate()
          A reference to the citation template for this citation.
 List<CitationField> getFields()
          The list of citation fields.
 String getLang()
          The language of the citation.
 String getValue()
          A rendering (as a string) of a source citation.
 SourceCitation id(String id)
          Build up this object with an id.
 SourceCitation lang(String lang)
          Build out this source citation with a lang.
 SourceCitation link(Link link)
          Build up this data with a link.
 SourceCitation link(String rel, URI href)
          Build up this data with a link.
 void setCitationTemplate(ResourceReference citationTemplate)
          A reference to the citation template for this citation.
 void setFields(List<CitationField> fields)
          The list of citation fields.
 void setLang(String lang)
          The language of the citation.
 void setValue(String value)
          A rendering (as a string) of a source citation.
 SourceCitation value(String value)
          Build out this source citation with a value.
 
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

SourceCitation

public SourceCitation()
Method Detail

id

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

getLang

public String getLang()
The language of the citation. See http://www.w3.org/International/articles/language-tags/

Returns:
The language of the note.

setLang

public void setLang(String lang)
The language of the citation. See http://www.w3.org/International/articles/language-tags/

Parameters:
lang - The language of the citation.

lang

public SourceCitation lang(String lang)
Build out this source citation with a lang.

Parameters:
lang - The lang.
Returns:
this.

getValue

public String getValue()
A rendering (as a string) of a source citation. This rendering should be the most complete rendering available.

Returns:
A rendering (as a string) of a source citation. This rendering should be the most complete rendering available.

setValue

public void setValue(String value)
A rendering (as a string) of a source citation. This rendering should be the most complete rendering available.

Parameters:
value - A rendering (as a string) of a source citation. This rendering should be the most complete rendering available.

value

public SourceCitation value(String value)
Build out this source citation with a value.

Parameters:
value - The value.
Returns:
this.

getCitationTemplate

public ResourceReference getCitationTemplate()
A reference to the citation template for this citation.

Returns:
A reference to the citation template for this citation.

setCitationTemplate

public void setCitationTemplate(ResourceReference citationTemplate)
A reference to the citation template for this citation.

Parameters:
citationTemplate - A reference to the citation template for this citation.

citationTemplate

public SourceCitation citationTemplate(ResourceReference citationTemplate)
Build out this source citation with a template.

Parameters:
citationTemplate - The template.
Returns:
this.

getFields

public List<CitationField> getFields()
The list of citation fields.

Returns:
The list of citation fields.

setFields

public void setFields(List<CitationField> fields)
The list of citation fields.

Parameters:
fields - The list of citation fields.

field

public SourceCitation field(CitationField fields)
Build out this citation with a field.

Parameters:
fields - The field.
Returns:
This.

addField

public void addField(CitationField field)
Add a reference to the citation fields.

Parameters:
field - The field to be added.

accept

public void accept(GedcomxModelVisitor visitor)
Accept a visitor.

Parameters:
visitor - The visitor.


Copyright © 2015. All rights reserved.