Package org.gedcomx.common
Class ResourceReference
- java.lang.Object
-
- org.gedcomx.common.ResourceReference
-
public final class ResourceReference extends Object
A generic reference to a resource.- Author:
- Ryan Heaton
-
-
Constructor Summary
Constructors Constructor Description ResourceReference()ResourceReference(URI resource)ResourceReference(URI resource)ResourceReference(URI resource, String resourceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)URIgetResource()The URI to the resource.StringgetResourceId()The resource id of the resource being referenced.inthashCode()ResourceReferenceresource(URI resource)Build up this resource reference with a resource.ResourceReferenceresourceId(String resourceId)Build up this resource reference with a resource id.voidsetResource(URI resource)The URI to the resource.voidsetResourceId(String resourceId)The resource id of the resource being referenced.StringtoString()Provide a simple toString() method.
-
-
-
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.
- See Also:
- http://www.w3.org/TR/webarch/#identification
-
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.- See Also:
- http://www.w3.org/TR/webarch/#identification
-
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.
-
-