Package org.gedcomx.source
Class SourceReference
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.source.SourceReference
-
- All Implemented Interfaces:
Attributable,HasTransientProperties,SupportsLinks,SupportsExtensionElements
public class SourceReference extends HypermediaEnabledData implements Attributable
An attributable reference to a description of a source.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description SourceReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddQualifier(Qualifier qualifier)Add a qualifier.SourceReferenceattribution(Attribution attribution)Build up this source reference with attribution.SourceReferencedescription(SourceDescription description)Build up this source reference with a description reference.SourceReferencedescriptionId(String descriptionId)Build up this source iderence with a description iderence.SourceReferencedescriptionRef(URI descriptionRef)Build up this source reference with a description reference.booleanequals(Object o)SourceReferenceextensionElement(Object element)AttributiongetAttribution()The attribution metadata for this source reference.StringgetDescriptionId()Id of the source being referenced.URIgetDescriptionRef()A reference to a description of the source being referenced.List<Qualifier>getQualifiers()The qualifiers associated with this source reference.inthashCode()SourceReferenceid(String id)Build up this object with an id.SourceReferencelink(String rel, URI href)Build up this data with a link.SourceReferencelink(Link link)Build up this data with a link.SourceReferencequalifier(Qualifier qualifier)Build up this source reference with a qualifier.Stream<Qualifier>qualifiers()Create a stream for the qualifiers.voidsetAttribution(Attribution attribution)The attribution metadata for this source reference.voidsetDescriptionId(String descriptionId)Id of the source being referenced.voidsetDescriptionRef(URI descriptionRef)A reference to a description of the source being referenced.voidsetQualifiers(List<Qualifier> qualifiers)Set the qualifiers associated with this source reference.-
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 SourceReference 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 SourceReference extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
link
public SourceReference link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classHypermediaEnabledData- Parameters:
link- The link.- Returns:
- this.
-
link
public SourceReference 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.
-
getAttribution
public Attribution getAttribution()
The attribution metadata for this source reference.- Specified by:
getAttributionin interfaceAttributable- Returns:
- The attribution metadata for this source reference.
-
setAttribution
public void setAttribution(Attribution attribution)
The attribution metadata for this source reference.- Specified by:
setAttributionin interfaceAttributable- Parameters:
attribution- The attribution metadata for this source reference.
-
attribution
public SourceReference attribution(Attribution attribution)
Build up this source reference with attribution.- Parameters:
attribution- The attribution.- Returns:
- this.
-
getDescriptionRef
public URI getDescriptionRef()
A reference to a description of the source being referenced.- Returns:
- A reference to a description of the source being referenced.
-
setDescriptionRef
public void setDescriptionRef(URI descriptionRef)
A reference to a description of the source being referenced.- Parameters:
descriptionRef- A reference to a description of the source being referenced.
-
descriptionRef
public SourceReference descriptionRef(URI descriptionRef)
Build up this source reference with a description reference.- Parameters:
descriptionRef- The description ref.- Returns:
- this.
-
getDescriptionId
public String getDescriptionId()
Id of the source being referenced.- Returns:
- Id of the source being referenced.
-
setDescriptionId
public void setDescriptionId(String descriptionId)
Id of the source being referenced.- Parameters:
descriptionId- Id of the source being referenced.
-
descriptionId
public SourceReference descriptionId(String descriptionId)
Build up this source iderence with a description iderence.- Parameters:
descriptionId- The description id.- Returns:
- this.
-
description
public SourceReference description(SourceDescription description)
Build up this source reference with a description reference.- Parameters:
description- The description.- Returns:
- this.
-
qualifiers
public Stream<Qualifier> qualifiers()
Create a stream for the qualifiers.- Returns:
- a stream for the qualifiers.
-
getQualifiers
public List<Qualifier> getQualifiers()
The qualifiers associated with this source reference.- Returns:
- The qualifiers associated with this source reference.
-
setQualifiers
public void setQualifiers(List<Qualifier> qualifiers)
Set the qualifiers associated with this source reference.- Parameters:
qualifiers- qualifiers to associate with this source reference.
-
qualifier
public SourceReference qualifier(Qualifier qualifier)
Build up this source reference with a qualifier.- Parameters:
qualifier- The qualifier.- Returns:
- this.
-
addQualifier
public void addQualifier(Qualifier qualifier)
Add a qualifier.- Parameters:
qualifier- The qualifier.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
-