org.gedcomx.common
Class EvidenceReference

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by 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
EvidenceReference()
           
EvidenceReference(URI resource)
           
EvidenceReference(URI resource, String resourceId)
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 EvidenceReference attribution(Attribution attribution)
          Build up this evidence reference with an attribution.
 Attribution getAttribution()
          Attribution metadata for this evidence reference.
 URI getResource()
          The URI to the resource being referenced as evidence.
 String getResourceId()
          The resource id of the resource being referenced.
 EvidenceReference id(String id)
          Build up this object with an id.
 EvidenceReference link(Link link)
          Build up this data with a link.
 EvidenceReference link(String rel, URI href)
          Build up this data with a link.
 EvidenceReference resource(URI resource)
          Build up this reference with a resource URI.
 EvidenceReference resourceId(String resourceId)
          Build up this reference with a resource id.
 void setAttribution(Attribution attribution)
          Attribution metadata for evidence reference.
 void setResource(URI resource)
          The URI to the resource being referenced as evidence.
 void setResourceId(String resourceId)
          The resource id of the resource being referenced.
 String toString()
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EvidenceReference

public EvidenceReference()

EvidenceReference

public EvidenceReference(URI resource)

EvidenceReference

public EvidenceReference(URI resource,
                         String resourceId)
Method Detail

link

public EvidenceReference 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.

link

public EvidenceReference 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.

id

public EvidenceReference id(String id)
Description copied from class: ExtensibleData
Build up this object with an id.

Overrides:
id in class ExtensibleData
Parameters:
id - The id.

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.

getResource

public URI getResource()
The URI to the resource being referenced as evidence.

Returns:
The URI to the resource.

setResource

public void setResource(URI resource)
The URI to the resource being referenced as evidence.

Parameters:
resource - The URI to the resource.

resource

public EvidenceReference resource(URI resource)
Build up this reference with a resource URI.

Parameters:
resource - The resource.

getAttribution

public Attribution getAttribution()
Attribution metadata for this evidence reference.

Specified by:
getAttribution in interface Attributable
Returns:
Attribution metadata for evidence reference.

setAttribution

public void setAttribution(Attribution attribution)
Attribution metadata for evidence reference.

Specified by:
setAttribution in interface Attributable
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:
toString in class ExtensibleData


Copyright © 2015. All rights reserved.