Package org.gedcomx.records
Class Collection
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.records.Collection
-
- All Implemented Interfaces:
Attributable,HasTransientProperties,SupportsLinks,SupportsExtensionElements
public class Collection extends HypermediaEnabledData implements Attributable
A collection of genealogical resources.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Collection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddContent(CollectionContent content)Add a reference to the record content values being used as evidence.Collectionattribution(Attribution attribution)Build out this collection with attribution.Collectioncontent(CollectionContent content)Build out this collection with content.voidembed(Collection collection)Embed another collection.CollectionextensionElement(Object element)AttributiongetAttribution()Attribution metadata for this collection.List<CollectionContent>getContent()Descriptions of the content of this collection.List<Identifier>getIdentifiers()The list of identifiers for the source.StringgetLang()The language of this description of the collection.IntegergetSize()The size of the collection, in terms of the number of items in this collection.StringgetTitle()A title for the collection.Collectionid(String id)Build up this object with an id.Collectionidentifier(Identifier identifier)Build out this collection with an identifier.Stream<Identifier>identifiers()Create a stream for the identifiers.Collectionlang(String lang)Build out this collection with a lang.Collectionlink(String rel, URI href)Build up this data with a link.Collectionlink(Link link)Build up this data with a link.voidsetAttribution(Attribution attribution)Attribution metadata for this collection.voidsetContent(List<CollectionContent> content)Descriptions of the content of this collection.voidsetIdentifiers(List<Identifier> identifiers)The list of identifiers of the source.voidsetLang(String lang)The language of this description of the collection.voidsetSize(Integer size)The size of the collection, in terms of the number of items in this collection.voidsetTitle(String title)A title for the collection.Collectionsize(Integer size)Build out this collection with size.Collectiontitle(String title)Build out this collection with a title.-
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 Collection 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 Collection extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public Collection 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 Collection 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 this description of the collection. See http://www.w3.org/International/articles/language-tags/- Returns:
- The language of this description of the collection
-
setLang
public void setLang(String lang)
The language of this description of the collection. See http://www.w3.org/International/articles/language-tags/- Parameters:
lang- The language of this description of the collection.
-
lang
public Collection lang(String lang)
Build out this collection with a lang.- Parameters:
lang- The lang.- Returns:
- this.
-
getTitle
public String getTitle()
A title for the collection.- Returns:
- A title for the collection.
-
setTitle
public void setTitle(String title)
A title for the collection.- Parameters:
title- A title for the collection.
-
title
public Collection title(String title)
Build out this collection with a title.- Parameters:
title- the title.- Returns:
- this.
-
identifiers
public Stream<Identifier> identifiers()
Create a stream for the identifiers.- Returns:
- a stream for the identifiers.
-
getIdentifiers
public List<Identifier> getIdentifiers()
The list of identifiers for the source.- Returns:
- The list of identifiers for the source.
-
setIdentifiers
public void setIdentifiers(List<Identifier> identifiers)
The list of identifiers of the source.- Parameters:
identifiers- The list of identifiers of the source.
-
identifier
public Collection identifier(Identifier identifier)
Build out this collection with an identifier.- Parameters:
identifier- the identifier.- Returns:
- this.
-
getContent
public List<CollectionContent> getContent()
Descriptions of the content of this collection.- Returns:
- Descriptions of the content of this collection.
-
setContent
public void setContent(List<CollectionContent> content)
Descriptions of the content of this collection.- Parameters:
content- Descriptions of the content of this collection.
-
content
public Collection content(CollectionContent content)
Build out this collection with content.- Parameters:
content- The content.- Returns:
- this.
-
addContent
public void addContent(CollectionContent content)
Add a reference to the record content values being used as evidence.- Parameters:
content- The content to be added.
-
getAttribution
public Attribution getAttribution()
Attribution metadata for this collection.- Specified by:
getAttributionin interfaceAttributable- Returns:
- Attribution metadata for this collection.
-
setAttribution
public void setAttribution(Attribution attribution)
Attribution metadata for this collection.- Specified by:
setAttributionin interfaceAttributable- Parameters:
attribution- Attribution metadata for this collection.
-
attribution
public Collection attribution(Attribution attribution)
Build out this collection with attribution.- Parameters:
attribution- The attribution.- Returns:
- this.
-
getSize
public Integer getSize()
The size of the collection, in terms of the number of items in this collection.- Returns:
- The size of the collection, in terms of the number of items in this collection.
-
setSize
public void setSize(Integer size)
The size of the collection, in terms of the number of items in this collection.- Parameters:
size- The size of the collection, in terms of the number of items in this collection.
-
size
public Collection size(Integer size)
Build out this collection with size.- Parameters:
size- the size.- Returns:
- this.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
embed
public void embed(Collection collection)
Embed another collection.- Parameters:
collection- The collection to embed.
-
-