org.gedcomx.source
Class SourceDescription

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by org.gedcomx.source.SourceDescription
All Implemented Interfaces:
Attributable, HasNotes, HasTransientProperties, SupportsLinks, SupportsExtensionElements, ReferencesSources

public class SourceDescription
extends HypermediaEnabledData
implements Attributable, HasNotes, ReferencesSources

Represents a description of a source.


Field Summary
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
SourceDescription()
           
 
Method Summary
 SourceDescription about(URI about)
          Build out this source description with an about reference.
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 void addCitation(SourceCitation citation)
          Add a citation.
 void addField(Field field)
          Add a field to the source description.
 void addKnownStatus(ResourceStatusType status)
          Add the given ResourceStatusType's URI to the list of statuses.
 void addRights(URI rights)
          Add a rights.
 void addStatus(URI status)
          Add the given resource status type URI to the list of statuses.
 SourceDescription analysis(ResourceReference analysis)
          Build out this source description with an analyis.
 SourceDescription attribution(Attribution attribution)
          Build out this source description with attribution.
 SourceDescription citation(SourceCitation citation)
          Build out this source description with a citation.
 SourceDescription citation(String citation)
          Build out this source description with a citation.
 SourceDescription componentOf(SourceDescription componentOf)
          Build out this source description with a component of.
 SourceDescription componentOf(SourceReference componentOf)
          Build out this source description with a component of.
 SourceDescription coverage(Coverage coverage)
          Build out this source description with coverage.
 SourceDescription created(Date created)
          Build out this source description with a created date.
 SourceDescription description(String description)
          Build out this source description with a description.
 SourceDescription description(TextValue description)
          Build out this source description with a description.
 SourceDescription descriptorRef(ResourceReference descriptorRef)
          Build out this source description with a descriptor ref.
 void embed(SourceDescription description)
          Embed the specified description.
 SourceDescription field(Field field)
          Build this out with a field.
 URI getAbout()
          The URI (if applicable) of the actual source.
 ResourceReference getAnalysis()
          A reference to the analysis document explaining the analysis that went into this description of the source.
 Attribution getAttribution()
          The attribution metadata for this source description.
 SourceCitation getCitation()
          The preferred bibliographic citation for this source.
 List<SourceCitation> getCitations()
          The bibliographic citations for this source.
 SourceReference getComponentOf()
          A reference to the source that contains this source.
 List<Coverage> getCoverage()
          Declarations of the coverage of the source.
 Date getCreated()
          The date the source was created.
 List<TextValue> getDescriptions()
          Human-readable descriptions of the source.
 ResourceReference getDescriptorRef()
          Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.
 List<Field> getFields()
          The fields that are applicable to the resource being described.
 List<Identifier> getIdentifiers()
          The list of identifiers for the source.
 ResourceType getKnownType()
          The type of the resource being described.
 String getLang()
          The language of this genealogical data set.
 ResourceReference getMediator()
          A reference to the entity that mediates access to the described source.
 String getMediaType()
          Hint about the media (MIME) type of the resource being described.
 Date getModified()
          The date the source was last modified.
 List<Note> getNotes()
          Notes about a source.
 URI getPersistentId()
          Find the long-term, persistent identifier for this source from the list of identifiers.
 URI getReplacedBy()
          The URI that this resource has been replaced by.
 List<URI> getReplaces()
          The list of resources that this resource replaces.
 ResourceReference getRepository()
          Reference to an agent describing the repository in which the source is found.
 URI getResourceType()
          The type of the resource being described.
 List<URI> getRights()
          The rights for this source.
 String getSortKey()
          A sort key to be used in determining the position of this source relative to other sources in the same collection.
 List<SourceReference> getSources()
          References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).
 List<URI> getStatuses()
          The list of status types for the source.
 TextValue getTitle()
          The preferred title for this source description.
 TextValue getTitleLabel()
          A label for the title of this description.
 List<TextValue> getTitles()
          A list of titles for this source.
 String getVersion()
          gets the version of this resource
 SourceDescription id(String id)
          Build up this object with an id.
 SourceDescription identifier(Identifier identifier)
          Build out this source description with an identifier.
 SourceDescription lang(String lang)
          Build out this envelope with a lang.
 SourceDescription link(Link link)
          Build up this data with a link.
 SourceDescription link(String rel, URI href)
          Build up this data with a link.
 SourceDescription mediator(ResourceReference mediator)
          Build out this source description with a mediator.
 SourceDescription mediaType(String mediaType)
          Build out this source description with a media type.
 SourceDescription modified(Date modified)
          Build out this source description with a modified date.
 SourceDescription note(Note note)
          Build out this source description with a note.
 SourceDescription repository(Agent repository)
          Build out this source description with a repository.
 SourceDescription repository(ResourceReference repository)
          Build out this source description with a repository.
 SourceDescription resourceType(ResourceType resourceType)
          Build of this source description with a resource type.
 SourceDescription resourceType(URI resourceType)
          Build of this source description with a resource type.
 SourceDescription rights(URI rights)
          Build out this source description with a rights.
 void setAbout(URI about)
          The URI (if applicable) of the actual source.
 void setAnalysis(ResourceReference analysis)
          A reference to the analysis document explaining the analysis that went into this description of the source.
 void setAttribution(Attribution attribution)
          The attribution metadata for this source description.
 void setCitations(List<SourceCitation> citations)
          The bibliographic citations for this source.
 void setComponentOf(SourceReference componentOf)
          A reference to the source that contains this source.
 void setCoverage(List<Coverage> coverage)
          Declarations of the coverage of the source.
 void setCreated(Date created)
          The date the source was created.
 void setDescriptions(List<TextValue> descriptions)
          Human-readable descriptions of the source.
 void setDescriptorRef(ResourceReference descriptorRef)
          Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.
 void setFields(List<Field> fields)
          The fields that are applicable to the resource being described.
 void setIdentifiers(List<Identifier> identifiers)
          The list of identifiers of the source.
 void setKnownType(ResourceType type)
          The type of the resource being described.
 void setLang(String lang)
          The language of this genealogical data set.
 void setMediator(ResourceReference mediator)
          A reference to the entity that mediates access to the described source.
 void setMediatorURI(URI mediator)
          A reference to the entity that mediates access to the described source.
 void setMediaType(String mediaType)
          Hint about the media (MIME) type of the resource being described.
 void setModified(Date modified)
          The date the source was last modified.
 void setNotes(List<Note> notes)
          Notes about a source.
 void setPersistentId(URI persistentId)
          A long-term, persistent, globally unique identifier for this source.
 void setReplacedBy(URI replacedBy)
          The URI that this resource has been replaced by.
 void setReplaces(List<URI> replaces)
          The list of resources that this resource replaces.
 void setRepository(ResourceReference repository)
          Reference to an agent describing the repository in which the source is found.
 void setResourceType(URI resourceType)
          The type of the resource being described.
 void setRights(List<URI> rights)
          The rights for this source.
 void setSortKey(String sortKey)
          A sort key to be used in determining the position of this source relative to other sources in the same collection.
 void setSources(List<SourceReference> sources)
          References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).
 void setStatuses(List<URI> statuses)
          The list of status types for the source.
 void setTitleLabel(TextValue titleLabel)
          A label for the title of this description.
 void setTitles(List<TextValue> titles)
          A list of titles for this source.
 void setVersion(String version)
          sets the version of this resource
 SourceDescription sortKey(String sortKey)
          Build out this source description with a sort key.
 SourceDescription source(SourceReference source)
          Build out this source description by adding a source reference.
 SourceDescription title(String title)
          Build out this source description with a title.
 SourceDescription title(TextValue title)
          Build out this source description with a title.
 SourceDescription titleLabel(TextValue titleLabel)
          Build this out by applying a label for the title of this description.
 String toString()
          Provide a simple toString() method.
 SourceDescription version(String version)
          Build out this source description with a version.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceDescription

public SourceDescription()
Method Detail

getLang

public String getLang()
The language of this genealogical data set. See http://www.w3.org/International/articles/language-tags/. Note that some language-enabled elements MAY override the language.

Returns:
The language of the genealogical data.

setLang

public void setLang(String lang)
The language of this genealogical data set. See http://www.w3.org/International/articles/language-tags/. Note that some language-enabled elements MAY override the language.

Parameters:
lang - The language of this genealogical data.

lang

public SourceDescription lang(String lang)
Build out this envelope with a lang.

Parameters:
lang - The lang.
Returns:
this.

id

public SourceDescription 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 SourceDescription 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 SourceDescription 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 the resource being described.

Returns:
The type of the resource being described.

setResourceType

public void setResourceType(URI resourceType)
The type of the resource being described.

Parameters:
resourceType - The type of the resource being described.

resourceType

public SourceDescription resourceType(URI resourceType)
Build of this source description with a resource type.

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

resourceType

public SourceDescription resourceType(ResourceType resourceType)
Build of this source description with a resource type.

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

getKnownType

public ResourceType getKnownType()
The type of the resource being described.

Returns:
The type of the resource being described.

setKnownType

public void setKnownType(ResourceType type)
The type of the resource being described.

Parameters:
type - The type of the resource being described.

getRights

public List<URI> getRights()
The rights for this source.

Returns:
The rights for this source.

setRights

public void setRights(List<URI> rights)
The rights for this source.

Parameters:
rights - The rights for this source.

rights

public SourceDescription rights(URI rights)
Build out this source description with a rights.

Parameters:
rights - The rights.
Returns:
this.

addRights

public void addRights(URI rights)
Add a rights.

Parameters:
rights - The rights to be added.

getCitation

public SourceCitation getCitation()
The preferred bibliographic citation for this source.

Returns:
The preferred bibliographic citation for this source.

getCitations

public List<SourceCitation> getCitations()
The bibliographic citations for this source.

Returns:
The bibliographic citations for this source.

setCitations

public void setCitations(List<SourceCitation> citations)
The bibliographic citations for this source.

Parameters:
citations - The bibliographic citations for this source.

citation

public SourceDescription citation(SourceCitation citation)
Build out this source description with a citation.

Parameters:
citation - The citation.
Returns:
this.

citation

public SourceDescription citation(String citation)
Build out this source description with a citation.

Parameters:
citation - The citation.
Returns:
this.

addCitation

public void addCitation(SourceCitation citation)
Add a citation.

Parameters:
citation - The citation to be added.

getMediaType

public String getMediaType()
Hint about the media (MIME) type of the resource being described.

Returns:
Hint about the media (MIME) type of the resource being described.

setMediaType

public void setMediaType(String mediaType)
Hint about the media (MIME) type of the resource being described.

Parameters:
mediaType - Hint about the media (MIME) type of the resource being described.

mediaType

public SourceDescription mediaType(String mediaType)
Build out this source description with a media type.

Parameters:
mediaType - The media type.
Returns:
this.

getAbout

public URI getAbout()
The URI (if applicable) of the actual source.

Returns:
The URI (if applicable) of the actual source.

setAbout

public void setAbout(URI about)
The URI (if applicable) of the actual source.

Parameters:
about - The URI (if applicable) of the actual source.

about

public SourceDescription about(URI about)
Build out this source description with an about reference.

Parameters:
about - the about.
Returns:
this.

getMediator

public ResourceReference getMediator()
A reference to the entity that mediates access to the described source.

Returns:
A reference to the entity that mediates access to the described source.

setMediator

public void setMediator(ResourceReference mediator)
A reference to the entity that mediates access to the described source.

Parameters:
mediator - A reference to the entity that mediates access to the described source.

mediator

public SourceDescription mediator(ResourceReference mediator)
Build out this source description with a mediator.

Parameters:
mediator - The mediator.
Returns:
this.

setMediatorURI

public void setMediatorURI(URI mediator)
A reference to the entity that mediates access to the described source.

Parameters:
mediator - A reference to the entity that mediates access to the described source.

getSources

public List<SourceReference> getSources()
References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).

Specified by:
getSources in interface ReferencesSources
Returns:
References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).

setSources

public void setSources(List<SourceReference> sources)
References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).

Specified by:
setSources in interface ReferencesSources
Parameters:
sources - References to any sources to which this source is related (usually applicable to sources that are derived from or contained in another source).

source

public SourceDescription source(SourceReference source)
Build out this source description by adding a source reference.

Parameters:
source - The source reference.
Returns:
this.

getAnalysis

public ResourceReference getAnalysis()
A reference to the analysis document explaining the analysis that went into this description of the source.

Returns:
A reference to the analysis document explaining the analysis that went into this description of the source.

setAnalysis

public void setAnalysis(ResourceReference analysis)
A reference to the analysis document explaining the analysis that went into this description of the source.

Parameters:
analysis - A reference to the analysis document explaining the analysis that went into this description of the source.

analysis

public SourceDescription analysis(ResourceReference analysis)
Build out this source description with an analyis.

Parameters:
analysis - The analysis.
Returns:
this.

getComponentOf

public SourceReference getComponentOf()
A reference to the source that contains this source.

Returns:
A reference to the source that contains this source.

setComponentOf

public void setComponentOf(SourceReference componentOf)
A reference to the source that contains this source.

Parameters:
componentOf - A reference to the source that contains this source.

componentOf

public SourceDescription componentOf(SourceReference componentOf)
Build out this source description with a component of.

Parameters:
componentOf - The component of.
Returns:
this.

componentOf

public SourceDescription componentOf(SourceDescription componentOf)
Build out this source description with a component of.

Parameters:
componentOf - The component of.
Returns:
this.

getTitle

public TextValue getTitle()
The preferred title for this source description.

Returns:
The preferred title for this source description.

getTitles

public List<TextValue> getTitles()
A list of titles for this source.

Returns:
A list of titles for this source.

setTitles

public void setTitles(List<TextValue> titles)
A list of titles for this source.

Parameters:
titles - A list of titles for this source.

title

public SourceDescription title(TextValue title)
Build out this source description with a title.

Parameters:
title - The title.
Returns:
this.

title

public SourceDescription title(String title)
Build out this source description with a title.

Parameters:
title - The title.
Returns:
this.

getTitleLabel

public TextValue getTitleLabel()
A label for the title of this description.

Returns:
A label for the title of this description.

setTitleLabel

public void setTitleLabel(TextValue titleLabel)
A label for the title of this description.

Parameters:
titleLabel - A label for the title of this description.

titleLabel

public SourceDescription titleLabel(TextValue titleLabel)
Build this out by applying a label for the title of this description.

Parameters:
titleLabel - The title label.
Returns:
this.

getNotes

public List<Note> getNotes()
Notes about a source.

Specified by:
getNotes in interface HasNotes
Returns:
Notes about a source.

setNotes

public void setNotes(List<Note> notes)
Notes about a source.

Specified by:
setNotes in interface HasNotes
Parameters:
notes - Notes about a source.

note

public SourceDescription note(Note note)
Build out this source description with a note.

Parameters:
note - the note.
Returns:
this.

getAttribution

public Attribution getAttribution()
The attribution metadata for this source description.

Specified by:
getAttribution in interface Attributable
Returns:
The attribution metadata for this source description.

setAttribution

public void setAttribution(Attribution attribution)
The attribution metadata for this source description.

Specified by:
setAttribution in interface Attributable
Parameters:
attribution - The attribution metadata for this source description.

attribution

public SourceDescription attribution(Attribution attribution)
Build out this source description with attribution.

Parameters:
attribution - The attribution.
Returns:
this.

accept

public void accept(GedcomxModelVisitor visitor)
Accept a visitor.

Parameters:
visitor - The visitor.

getPersistentId

public URI getPersistentId()
Find the long-term, persistent identifier for this source from the list of identifiers.

Returns:
The long-term, persistent identifier for this source.

setPersistentId

public void setPersistentId(URI persistentId)
A long-term, persistent, globally unique identifier for this source.

Parameters:
persistentId - A long-term, persistent, globally unique identifier for this source.

getReplacedBy

public URI getReplacedBy()
The URI that this resource has been replaced by.


setReplacedBy

public void setReplacedBy(URI replacedBy)
The URI that this resource has been replaced by. This resource is some kind of duplicate of that other one. This happens when a newer or better version is found, and this one is thus deprecated; or when this resource is merged into another one and this one is thus tombstoned or deleted.

Parameters:
replacedBy - - URI of a resource that replaces this one.

getReplaces

public List<URI> getReplaces()
The list of resources that this resource replaces.

Returns:
The list of identifiers for the source.

setReplaces

public void setReplaces(List<URI> replaces)
The list of resources that this resource replaces.

Parameters:
replaces - The list of identifiers of the source.

getStatuses

public List<URI> getStatuses()
The list of status types for the source.

Returns:
The list of status types for the source.

setStatuses

public void setStatuses(List<URI> statuses)
The list of status types for the source.

Parameters:
statuses - The list of identifiers of the source.

addKnownStatus

public void addKnownStatus(ResourceStatusType status)
Add the given ResourceStatusType's URI to the list of statuses.

Parameters:
status - - ResourceStatusType to add to the statuses list.

addStatus

public void addStatus(URI status)
Add the given resource status type URI to the list of statuses.

Parameters:
status - - URI to add to the list of statuses.

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 SourceDescription identifier(Identifier identifier)
Build out this source description with an identifier.

Parameters:
identifier - the identifier.
Returns:
this.

getSortKey

public String getSortKey()
A sort key to be used in determining the position of this source relative to other sources in the same collection.

Returns:
A sort key to be used in determining the position of this source relative to other sources in the same collection.

setSortKey

public void setSortKey(String sortKey)
A sort key to be used in determining the position of this source relative to other sources in the same collection.

Parameters:
sortKey - A sort key to be used in determining the position of this source relative to other sources in the same collection.

sortKey

public SourceDescription sortKey(String sortKey)
Build out this source description with a sort key.

Parameters:
sortKey - The sort key.
Returns:
This.

getDescriptions

public List<TextValue> getDescriptions()
Human-readable descriptions of the source.

Returns:
Human-readable descriptions of the source.

setDescriptions

public void setDescriptions(List<TextValue> descriptions)
Human-readable descriptions of the source.

Parameters:
descriptions - Human-readable descriptions of the source.

description

public SourceDescription description(TextValue description)
Build out this source description with a description.

Parameters:
description - The description.
Returns:
this.

description

public SourceDescription description(String description)
Build out this source description with a description.

Parameters:
description - The description.
Returns:
this.

getCreated

public Date getCreated()
The date the source was created.

Returns:
The date the source was created.

setCreated

public void setCreated(Date created)
The date the source was created.

Parameters:
created - The date the source was created.

created

public SourceDescription created(Date created)
Build out this source description with a created date.

Parameters:
created - The created date.
Returns:
this.

getModified

public Date getModified()
The date the source was last modified.

Returns:
The date the source was last modified.

setModified

public void setModified(Date modified)
The date the source was last modified.

Parameters:
modified - The date the source was last modified.

modified

public SourceDescription modified(Date modified)
Build out this source description with a modified date.

Parameters:
modified - the modified date.

getCoverage

public List<Coverage> getCoverage()
Declarations of the coverage of the source.

Returns:
Declarations of the coverage of the source.

setCoverage

public void setCoverage(List<Coverage> coverage)
Declarations of the coverage of the source.

Parameters:
coverage - Declarations of the coverage of the source.

coverage

public SourceDescription coverage(Coverage coverage)
Build out this source description with coverage.

Parameters:
coverage - The coverage.
Returns:
this.

getFields

public List<Field> getFields()
The fields that are applicable to the resource being described.

Returns:
The fields that are applicable to the resource being described.

setFields

public void setFields(List<Field> fields)
The fields that are applicable to the resource being described.

Parameters:
fields - The fields that are applicable to the resource being described.

field

public SourceDescription field(Field field)
Build this out with a field.

Parameters:
field - The field.
Returns:
this.

addField

public void addField(Field field)
Add a field to the source description.

Parameters:
field - The field to be added.

getRepository

public ResourceReference getRepository()
Reference to an agent describing the repository in which the source is found.

Returns:
Reference to an agent describing the repository in which the source is found.

setRepository

public void setRepository(ResourceReference repository)
Reference to an agent describing the repository in which the source is found.

Parameters:
repository - Reference to an agent describing the repository in which the source is found.

repository

public SourceDescription repository(Agent repository)
Build out this source description with a repository.

Parameters:
repository - The repository.
Returns:
this.

repository

public SourceDescription repository(ResourceReference repository)
Build out this source description with a repository.

Parameters:
repository - The repository.
Returns:
this.

getDescriptorRef

public ResourceReference getDescriptorRef()
Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.

Returns:
Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.

setDescriptorRef

public void setDescriptorRef(ResourceReference descriptorRef)
Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.

Parameters:
descriptorRef - Reference to a descriptor of fields and type of data that can be expected to be extracted from the source.

descriptorRef

public SourceDescription descriptorRef(ResourceReference descriptorRef)
Build out this source description with a descriptor ref.

Parameters:
descriptorRef - The descriptor ref.
Returns:
this.

getVersion

public String getVersion()
gets the version of this resource

Returns:
The version of this resource

setVersion

public void setVersion(String version)
sets the version of this resource

Parameters:
version - the version of this resource

version

public SourceDescription version(String version)
Build out this source description with a version.

Parameters:
version - the version of this resource
Returns:
this.

embed

public void embed(SourceDescription description)
Embed the specified description.

Parameters:
description - The description to embed.

toString

public String toString()
Provide a simple toString() method.

Overrides:
toString in class ExtensibleData


Copyright © 2015. All rights reserved.