Package org.gedcomx.common
Class Attribution
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.common.Attribution
-
- All Implemented Interfaces:
HasTransientProperties,SupportsExtensionElements
public class Attribution extends ExtensibleData
Attribution for genealogical information. Attribution is used to model who is contributing/modifying information, when they contributed it, and why they are making the contribution/modification.
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Attribution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributionchangeMessage(String changeMessage)Build up this attribution with a change message.AttributionchangeMessageResource(URI changeMessageResource)Build up this attribution with a change message resource.Attributioncontributor(Agent agent)Build up this attribution with a contributor.Attributioncontributor(ResourceReference contributor)Build up this attribution with a contributor.Attributioncontributor(URI contributor)Build up this attribution with a contributor.Attributioncreated(Date created)Build up this attribution with a created date.Attributioncreator(Agent agent)Build up this attribution with a creator.Attributioncreator(ResourceReference creator)Build up this attribution with a creator.Attributioncreator(URI creator)Build up this attribution with a creator.booleanequals(Object o)AttributionextensionElement(Object element)StringgetChangeMessage()The "change message" for the attributed data provided by the contributor.URIgetChangeMessageResource()A reference to the change message for the attributed data provided by the contributor.ResourceReferencegetContributor()Reference to the contributor of the attributed data.DategetCreated()The created timestamp for the attributed data.ResourceReferencegetCreator()Reference to the creator of the attributed data.DategetModified()The modified timestamp for the attributed data.inthashCode()Attributionid(String id)Build up this object with an id.Attributionmodified(Date modified)Build up this attribution with a modified date.voidsetChangeMessage(String changeMessage)The "change message" for the attributed data provided by the contributor.voidsetChangeMessageResource(URI changeMessageResource)A reference to the change message for the attributed data provided by the contributor.voidsetContributor(ResourceReference contributor)Reference to the contributor of the attributed data.voidsetCreated(Date created)The created timestamp for the attributed data.voidsetCreator(ResourceReference creator)Reference to the creator of the attributed data.voidsetModified(Date modified)The modified timestamp for the attributed data.StringtoString()Provide a simple toString() method.-
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 Attribution 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 Attribution extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
getContributor
public ResourceReference getContributor()
Reference to the contributor of the attributed data.- Returns:
- Reference to the contributor of the attributed data.
-
setContributor
public void setContributor(ResourceReference contributor)
Reference to the contributor of the attributed data.- Parameters:
contributor- Reference to the contributor of the attributed data.
-
contributor
public Attribution contributor(ResourceReference contributor)
Build up this attribution with a contributor.- Parameters:
contributor- The contributor.- Returns:
- this.
-
contributor
public Attribution contributor(URI contributor)
Build up this attribution with a contributor.- Parameters:
contributor- The contributor.- Returns:
- this.
-
contributor
public Attribution contributor(Agent agent)
Build up this attribution with a contributor.- Parameters:
agent- The contributor.- Returns:
- this.
-
getCreator
public ResourceReference getCreator()
Reference to the creator of the attributed data. The creator might be different from the contributor if the attributed data has been modified since it was created.- Returns:
- Reference to the creator of the attributed data.
-
setCreator
public void setCreator(ResourceReference creator)
Reference to the creator of the attributed data. The creator might be different from the contributor if the attributed data has been modified since it was created.- Parameters:
creator- Reference to the creator of the attributed data.
-
creator
public Attribution creator(ResourceReference creator)
Build up this attribution with a creator.- Parameters:
creator- The creator.- Returns:
- this.
-
creator
public Attribution creator(URI creator)
Build up this attribution with a creator.- Parameters:
creator- The creator.- Returns:
- this.
-
creator
public Attribution creator(Agent agent)
Build up this attribution with a creator.- Parameters:
agent- The creator.- Returns:
- this.
-
getModified
public Date getModified()
The modified timestamp for the attributed data.- Returns:
- The modified timestamp for the attributed data.
-
setModified
public void setModified(Date modified)
The modified timestamp for the attributed data.- Parameters:
modified- The modified timestamp for the attributed data.
-
modified
public Attribution modified(Date modified)
Build up this attribution with a modified date.- Parameters:
modified- The modified date.- Returns:
- this.
-
getCreated
public Date getCreated()
The created timestamp for the attributed data.- Returns:
- The created timestamp for the attributed data.
-
setCreated
public void setCreated(Date created)
The created timestamp for the attributed data.- Parameters:
created- The created timestamp for the attributed data.
-
created
public Attribution created(Date created)
Build up this attribution with a created date.- Parameters:
created- The created date.- Returns:
- this.
-
getChangeMessage
public String getChangeMessage()
The "change message" for the attributed data provided by the contributor.- Returns:
- The "change message" for the attributed data provided by the contributor.
-
setChangeMessage
public void setChangeMessage(String changeMessage)
The "change message" for the attributed data provided by the contributor.- Parameters:
changeMessage- The "change message" for the attributed data provided by the contributor.
-
changeMessage
public Attribution changeMessage(String changeMessage)
Build up this attribution with a change message.- Parameters:
changeMessage- The change message.- Returns:
- this.
-
getChangeMessageResource
public URI getChangeMessageResource()
A reference to the change message for the attributed data provided by the contributor.- Returns:
- A reference to the change message for the attributed data provided by the contributor.
-
setChangeMessageResource
public void setChangeMessageResource(URI changeMessageResource)
A reference to the change message for the attributed data provided by the contributor.- Parameters:
changeMessageResource- A reference to the change message for the attributed data provided by the contributor.
-
changeMessageResource
public Attribution changeMessageResource(URI changeMessageResource)
Build up this attribution with a change message resource.- Parameters:
changeMessageResource- The change message resource.- Returns:
- this.
-
toString
public String toString()
Provide a simple toString() method.- Overrides:
toStringin classExtensibleData
-
-