org.gedcomx.common
Class ResourceReference

java.lang.Object
  extended by org.gedcomx.common.ResourceReference

public final class ResourceReference
extends Object

A generic reference to a resource.

Author:
Ryan Heaton

Constructor Summary
ResourceReference()
           
ResourceReference(URI resource)
           
ResourceReference(URI resource)
           
ResourceReference(URI resource, String resourceId)
           
 
Method Summary
 URI getResource()
          The URI to the resource.
 String getResourceId()
          The resource id of the resource being referenced.
 ResourceReference resource(URI resource)
          Build up this resource reference with a resource.
 ResourceReference resourceId(String resourceId)
          Build up this resource reference with a resource id.
 void setResource(URI resource)
          The URI to the resource.
 void setResourceId(String resourceId)
          The resource id of the resource being referenced.
 String toString()
          Provide a simple toString() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceReference

public ResourceReference()

ResourceReference

public ResourceReference(URI resource)

ResourceReference

public ResourceReference(URI resource)

ResourceReference

public ResourceReference(URI resource,
                         String resourceId)
Method Detail

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 ResourceReference resourceId(String resourceId)
Build up this resource reference with a resource id.

Parameters:
resourceId - The resource id.
Returns:
this.

getResource

public URI getResource()
The URI to the resource. For more information, see Architecture of the World Wide Web, Volume One, Section 2

Returns:
The URI to the resource.

setResource

public void setResource(URI resource)
The URI to the resource. For more information, see Architecture of the World Wide Web, Volume One, Section 2

Parameters:
resource - The URI to the resource.

resource

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

Parameters:
resource - The resource.
Returns:
this.

toString

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

Overrides:
toString in class Object


Copyright © 2015. All rights reserved.