org.gedcomx.records
Class CollectionContent

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

public class CollectionContent
extends HypermediaEnabledData

A description of the content of a collection by resource type.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
CollectionContent()
           
 
Method Summary
 CollectionContent completeness(Float completeness)
          Build out this content with completeness.
 CollectionContent count(Integer count)
          Build out this collection content with a count.
 Float getCompleteness()
          A completeness factor for this content; i.e.
 Integer getCount()
          The count of the items applicable to this content aspect.
 ResourceType getKnownResourceType()
          The type of resource being covered in this collection.
 URI getResourceType()
          The type of resource being covered in this collection.
 CollectionContent id(String id)
          Build up this object with an id.
 CollectionContent link(Link link)
          Build up this data with a link.
 CollectionContent link(String rel, URI href)
          Build up this data with a link.
 CollectionContent resourceType(ResourceType resourceType)
          Build out the content with a resource type.
 CollectionContent resourceType(URI resourceType)
          Build out the content with a resource type.
 void setCompleteness(Float completeness)
          A completeness factor for this content; i.e.
 void setCount(Integer count)
          The count of the items applicable to this content aspect.
 void setKnownResourceType(ResourceType type)
          The type of resource being covered in this collection.
 void setResourceType(URI resourceType)
          The type of resource being covered in this collection.
 
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

CollectionContent

public CollectionContent()
Method Detail

id

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

link

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

getResourceType

public URI getResourceType()
The type of resource being covered in this collection.

Returns:
The type of resource being covered in this collection.

setResourceType

public void setResourceType(URI resourceType)
The type of resource being covered in this collection.

Parameters:
resourceType - The type of resource being covered in this collection.

resourceType

public CollectionContent resourceType(URI resourceType)
Build out the content with a resource type.

Parameters:
resourceType - The resource type.
Returns:
this.

resourceType

public CollectionContent resourceType(ResourceType resourceType)
Build out the content with a resource type.

Parameters:
resourceType - The resource type.
Returns:
this.

getKnownResourceType

public ResourceType getKnownResourceType()
The type of resource being covered in this collection.

Returns:
The type of resource being covered in this collection.

setKnownResourceType

public void setKnownResourceType(ResourceType type)
The type of resource being covered in this collection.

Parameters:
type - The type of resource being covered in this collection.

getCount

public Integer getCount()
The count of the items applicable to this content aspect.

Returns:
The count of the items applicable to this content aspect.

setCount

public void setCount(Integer count)
The count of the items applicable to this content aspect.

Parameters:
count - The count of the items applicable to this content aspect.

count

public CollectionContent count(Integer count)
Build out this collection content with a count.

Parameters:
count - The count.
Returns:
this.

getCompleteness

public Float getCompleteness()
A completeness factor for this content; i.e. what percentage of the total number of items in the collection is included in this content aspect. The completeness factor is a value between 0 and 1.

Returns:
A completeness factor for this content aspect, a value between 0 and 1.

setCompleteness

public void setCompleteness(Float completeness)
A completeness factor for this content; i.e. what percentage of the total number of items in the collection is included in this content aspect. The completeness factor is a value between 0 and 1.

Parameters:
completeness - A completeness factor for this content aspect, a value between 0 and 1.

completeness

public CollectionContent completeness(Float completeness)
Build out this content with completeness.

Parameters:
completeness - The completeness.
Returns:
this.


Copyright © 2015. All rights reserved.