Package org.gedcomx.source
Class SourceCitation
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- 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
Constructors Constructor Description SourceCitation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddField(CitationField field)Add a reference to the citation fields.SourceCitationcitationTemplate(ResourceReference citationTemplate)Build out this source citation with a template.booleanequals(Object o)SourceCitationextensionElement(Object element)SourceCitationfield(CitationField fields)Build out this citation with a field.ResourceReferencegetCitationTemplate()A reference to the citation template for this citation.List<CitationField>getFields()The list of citation fields.StringgetLang()The language of the citation.StringgetValue()A rendering (as a string) of a source citation.inthashCode()SourceCitationid(String id)Build up this object with an id.SourceCitationlang(String lang)Build out this source citation with a lang.SourceCitationlink(String rel, URI href)Build up this data with a link.SourceCitationlink(Link link)Build up this data with a link.voidsetCitationTemplate(ResourceReference citationTemplate)A reference to the citation template for this citation.voidsetFields(List<CitationField> fields)The list of citation fields.voidsetLang(String lang)The language of the citation.voidsetValue(String value)A rendering (as a string) of a source citation.SourceCitationvalue(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
-
-
-
-
Method Detail
-
id
public SourceCitation 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 SourceCitation extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public SourceCitation 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 SourceCitation 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.
-
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.
-
-