Package org.gedcomx.common
Class Note
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.common.Note
-
- All Implemented Interfaces:
Attributable,HasText,HasTransientProperties,SupportsLinks,SupportsExtensionElements
public class Note extends HypermediaEnabledData implements Attributable, HasText
A note about a genealogical resource (e.g. conclusion or source).- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Note()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.Noteattribution(Attribution attribution)Build up this note with attribution.booleanequals(Object o)NoteextensionElement(Object element)AttributiongetAttribution()Attribution metadata for a note.StringgetLang()The language of the note.StringgetSubject()The subject of the note.StringgetText()The text of the note.inthashCode()Noteid(String id)Build up this object with an id.Notelang(String lang)Build up this note with a locale.Notelink(String rel, URI href)Build up this data with a link.Notelink(Link link)Build up this data with a link.voidsetAttribution(Attribution attribution)Attribution metadata for a note.voidsetLang(String lang)The language of the note.voidsetSubject(String text)The subject of the note.voidsetText(String text)The text of the note.Notesubject(String text)Build up this note with a subject.Notetext(String text)Build up this note with some text.StringtoString()Provide a simple toString() method.-
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 Note 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 Note extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public Note 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.
-
link
public Note link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
link- The link.- Returns:
- this.
-
getLang
public String getLang()
The language of the note. 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 note. See http://www.w3.org/International/articles/language-tags/- Parameters:
lang- The language of the note.
-
lang
public Note lang(String lang)
Build up this note with a locale.- Parameters:
lang- The locale.- Returns:
- this.
-
getSubject
public String getSubject()
The subject of the note. This is a short title describing the contents of the note text.- Returns:
- The subject of the note.
-
setSubject
public void setSubject(String text)
The subject of the note.- Parameters:
text- The subject of the note.
-
subject
public Note subject(String text)
Build up this note with a subject.- Parameters:
text- The subject.- Returns:
- this.
-
getText
public String getText()
The text of the note.
-
setText
public void setText(String text)
The text of the note.
-
text
public Note text(String text)
Build up this note with some text.- Parameters:
text- The text.- Returns:
- this.
-
getAttribution
public Attribution getAttribution()
Attribution metadata for a note.- Specified by:
getAttributionin interfaceAttributable- Returns:
- Attribution metadata for a note.
-
setAttribution
public void setAttribution(Attribution attribution)
Attribution metadata for a note.- Specified by:
setAttributionin interfaceAttributable- Parameters:
attribution- Attribution metadata for a note.
-
attribution
public Note attribution(Attribution attribution)
Build up this note with attribution.- Parameters:
attribution- The attribution.- Returns:
- this.
-
toString
public String toString()
Description copied from class:ExtensibleDataProvide a simple toString() method.- Overrides:
toStringin classExtensibleData
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-