Package org.gedcomx.records
Class CollectionContent
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- 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
Constructors Constructor Description CollectionContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionContentcompleteness(Float completeness)Build out this content with completeness.CollectionContentcount(Integer count)Build out this collection content with a count.CollectionContentextensionElement(Object element)FloatgetCompleteness()A completeness factor for this content; i.e.IntegergetCount()The count of the items applicable to this content aspect.ResourceTypegetKnownResourceType()The type of resource being covered in this collection.URIgetResourceType()The type of resource being covered in this collection.CollectionContentid(String id)Build up this object with an id.CollectionContentlink(String rel, URI href)Build up this data with a link.CollectionContentlink(Link link)Build up this data with a link.CollectionContentresourceType(URI resourceType)Build out the content with a resource type.CollectionContentresourceType(ResourceType resourceType)Build out the content with a resource type.voidsetCompleteness(Float completeness)A completeness factor for this content; i.e.voidsetCount(Integer count)The count of the items applicable to this content aspect.voidsetKnownResourceType(ResourceType type)The type of resource being covered in this collection.voidsetResourceType(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
-
-
-
-
Method Detail
-
id
public CollectionContent 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 CollectionContent extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public CollectionContent 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 CollectionContent link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- 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.
-
-