Package org.gedcomx.common
Class EvidenceReference
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.common.EvidenceReference
-
- All Implemented Interfaces:
Attributable,HasTransientProperties,SupportsLinks,SupportsExtensionElements
public final class EvidenceReference extends HypermediaEnabledData implements Attributable
A reference to a resource that is being used as evidence.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description EvidenceReference()EvidenceReference(URI resource)EvidenceReference(URI resource, String resourceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.EvidenceReferenceattribution(Attribution attribution)Build up this evidence reference with an attribution.EvidenceReferenceextensionElement(Object element)AttributiongetAttribution()Attribution metadata for this evidence reference.URIgetResource()The URI to the resource being referenced as evidence.StringgetResourceId()The resource id of the resource being referenced.EvidenceReferenceid(String id)Build up this object with an id.EvidenceReferencelink(String rel, URI href)Build up this data with a link.EvidenceReferencelink(Link link)Build up this data with a link.EvidenceReferenceresource(URI resource)Build up this reference with a resource URI.EvidenceReferenceresourceId(String resourceId)Build up this reference with a resource id.voidsetAttribution(Attribution attribution)Attribution metadata for evidence reference.voidsetResource(URI resource)The URI to the resource being referenced as evidence.voidsetResourceId(String resourceId)The resource id of the resource being referenced.StringtoString()Provide a simple toString() method.-
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
-
-
-
-
Method Detail
-
link
public EvidenceReference 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 EvidenceReference 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.
-
id
public EvidenceReference 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 EvidenceReference extensionElement(Object element)
- Overrides:
extensionElementin classExtensibleData
-
getResourceId
public String getResourceId()
The resource id of the resource being referenced. Used as an extension attribute when resolving the resource is inconvenient.- Returns:
- The resource id of the resource being referenced.
-
setResourceId
public void setResourceId(String resourceId)
The resource id of the resource being referenced. Used as an extension attribute when resolving the resource is inconvenient.- Parameters:
resourceId- The resource id of the resource being referenced.
-
resourceId
public EvidenceReference resourceId(String resourceId)
Build up this reference with a resource id.- Parameters:
resourceId- The resource id.- Returns:
- this.
-
getResource
public URI getResource()
The URI to the resource being referenced as evidence.- Returns:
- The URI to the resource.
- See Also:
- http://www.w3.org/TR/webarch/#identification
-
setResource
public void setResource(URI resource)
The URI to the resource being referenced as evidence.- Parameters:
resource- The URI to the resource.- See Also:
- http://www.w3.org/TR/webarch/#identification
-
resource
public EvidenceReference resource(URI resource)
Build up this reference with a resource URI.- Parameters:
resource- The resource.- Returns:
- this
-
getAttribution
public Attribution getAttribution()
Attribution metadata for this evidence reference.- Specified by:
getAttributionin interfaceAttributable- Returns:
- Attribution metadata for evidence reference.
-
setAttribution
public void setAttribution(Attribution attribution)
Attribution metadata for evidence reference.- Specified by:
setAttributionin interfaceAttributable- Parameters:
attribution- Attribution metadata for evidence reference.
-
attribution
public EvidenceReference attribution(Attribution attribution)
Build up this evidence reference with an attribution.- Parameters:
attribution- The attribution.- Returns:
- this.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
toString
public String toString()
Provide a simple toString() method.- Overrides:
toStringin classExtensibleData
-
-