/** * Resource Directory Description Language (RDDL) API * * An XML-DEV project * http://www.rddl.org/ * * This module, both source code and documentation, is in the Public Domain, * and comes with NO WARRANTY * * @filename: resource.java * @class: org.rddl.Resource * @version: 0.1 * @date: 2001-01-06 * @author: Jonathan Borden jonathan@openhealth.org */ package org.rddl; import java.net.URLConnection; import java.io.InputStream; /** * Resource * *
* This module, both source code and documentation, is in the * Public Domain, and comes with NO WARRANTY. ** * @author Jonathan Borden jonathan@openhealth.org */ public interface Resource { /** 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.
* @return Thepurpose
for this resource
*/
public abstract String getPurpose();
/** Get the nature
of the referenced resource. The nature
corresponds to the xlink:role
.
*
nature
*/
public abstract String getNature();
/** The base URI may be indicated by the xml:base
attribute.
* @return A String representing the base URI.
*/
public abstract String getBaseURI();
/** 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.
* @return The href */ public abstract String getHref(); /** The ID of this resource, if present * @return The id. */ public abstract String getId(); /** The fragment id of the resource is according to XPointer and is either a raw name, child sequence or full XPointer. * @return the fragment identifier */ public abstract String getFragmentId(); /** The URI referencing this resource. * @return the URI */ public abstract String getURI(); /** Thexml:lang
of this resource if any.
* @return The language code.
*/
public abstract String getLang();
/** 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