org.rddl
Interface Resource

All Known Implementing Classes:
ContainerResourceImpl, ResourceImpl

public interface Resource

Resource

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.


Method Summary
 java.lang.String getBaseURI()
          The base URI may be indicated by the xml:base attribute.
 Container getContainer()
          The parent container of this resource.
 java.lang.String getFragmentId()
          The fragment id of the resource is according to XPointer and is either a raw name, child sequence or full XPointer.
 java.lang.String getHref()
          Get the resource xlink:href.
 java.lang.String getId()
          The ID of this resource, if present
 java.lang.String getLang()
          The xml:lang of this resource if any.
 java.lang.String getNature()
          Get the nature of the referenced resource.
 java.lang.String getPurpose()
          Get the resource xlink:arcrole.
 java.lang.String getTitle()
          Get the resource xlink:title.
 java.lang.String getURI()
          The URI referencing this resource.
 

Method Detail

getPurpose

public java.lang.String getPurpose()
Get the resource xlink:arcrole. <rddl:resource xlink:arcrole="..." />

This method gets the xlink:arcrole which corresponds to the type of the link. The arcrole may be either an absolute or relative URI reference, though under most circumstances will be an absolute URI. A fragment identifier should be present. The base URI is the URI of the RDDL document containing the resource. Purposes for well known types are defined in this RDDL document.

Returns:
The purpose for this resource

getNature

public java.lang.String getNature()

Get the nature of the referenced resource. The nature corresponds to the xlink:role.

Returns:
The nature

getBaseURI

public java.lang.String getBaseURI()
The base URI may be indicated by the xml:base attribute.
Returns:
A String representing the base URI.

getHref

public java.lang.String getHref()
Get the resource xlink:href. <rddl:resource xlink;href="..." />

This method gets the resource's URI which corresponds to the xlink:href. The href may be either an absolute or relative URI. The base URI is the URI of the RDDL document containing the resource.

Returns:
The href

getId

public java.lang.String getId()
The ID of this resource, if present
Returns:
The id.

getFragmentId

public java.lang.String getFragmentId()
The fragment id of the resource is according to XPointer and is either a raw name, child sequence or full XPointer.
Returns:
the fragment identifier

getURI

public java.lang.String getURI()
The URI referencing this resource.
Returns:
the URI

getLang

public java.lang.String getLang()
The xml:lang of this resource if any.
Returns:
The language code.

getTitle

public java.lang.String getTitle()
Get the resource xlink:title. <rddl:resource xlink:title="An example title" />

The title of an XLink is a short descriptive string which may appear in a menu

Returns:
the title

getContainer

public Container getContainer()
The parent container of this resource.
Returns:
the parent container