org.gedcomx.records
Class Collection

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by 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
Collection()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addContent(CollectionContent content)
          Add a reference to the record content values being used as evidence.
 Collection attribution(Attribution attribution)
          Build out this collection with attribution.
 Collection content(CollectionContent content)
          Build out this collection with content.
 void embed(Collection collection)
          Embed another collection.
 Attribution getAttribution()
          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.
 String getLang()
          The language of this description of the collection.
 Integer getSize()
          The size of the collection, in terms of the number of items in this collection.
 String getTitle()
          A title for the collection.
 Collection id(String id)
          Build up this object with an id.
 Collection identifier(Identifier identifier)
          Build out this collection with an identifier.
 Collection lang(String lang)
          Build out this collection with a lang.
 Collection link(Link link)
          Build up this data with a link.
 Collection link(String rel, URI href)
          Build up this data with a link.
 void setAttribution(Attribution attribution)
          Attribution metadata for this collection.
 void setContent(List<CollectionContent> content)
          Descriptions of the content of this collection.
 void setIdentifiers(List<Identifier> identifiers)
          The list of identifiers of the source.
 void setLang(String lang)
          The language of this description of the collection.
 void setSize(Integer size)
          The size of the collection, in terms of the number of items in this collection.
 void setTitle(String title)
          A title for the collection.
 Collection size(Integer size)
          Build out this collection with size.
 Collection title(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Collection

public Collection()
Method Detail

id

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

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:
getAttribution in interface Attributable
Returns:
Attribution metadata for this collection.

setAttribution

public void setAttribution(Attribution attribution)
Attribution metadata for this collection.

Specified by:
setAttribution in interface Attributable
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.


Copyright © 2015. All rights reserved.