org.rddl
Interface Namespace

All Known Subinterfaces:
Container

public interface Namespace

A Namespace is associated with a URI reference. The Namespace interface defines a collection of resources.


Method Summary
 Resource getResourceFromId(java.lang.String id)
          Selects a resource given a particular id.
 java.util.Iterator getResources()
          Obtain an Iterator over all the resources contained in the namespace.
 java.util.SortedMap getResourcesFromHref(java.lang.String href)
          Select a set of resources given the destination xlink:href
 java.util.SortedMap getResourcesFromIdRange(java.lang.String id0, java.lang.String id1)
          Select a set of resources given a range of ids.
 java.util.SortedMap getResourcesFromLang(java.lang.String lang)
          Select a set of resources having a specified xml:lang
 java.util.SortedMap getResourcesFromNature(java.lang.String role)
          A resource is qualified by its Nature.
 java.util.SortedMap getResourcesFromPurpose(java.lang.String purpose)
          A resource is qualified by its Purpose.
 java.util.SortedMap getResourcesFromTitle(java.lang.String title)
          Select a set of resources having a specified xlink:title
 java.lang.String getURI()
          The namespace URI for the namespace.
 

Method Detail

getResourcesFromNature

public java.util.SortedMap getResourcesFromNature(java.lang.String role)
A resource is qualified by its Nature.
Parameters:
role - The RDDL nature is specified by the xlink:role
Returns:
java.util.SortedMap the resources having the specified role

getResourcesFromPurpose

public java.util.SortedMap getResourcesFromPurpose(java.lang.String purpose)
A resource is qualified by its Purpose.
Parameters:
purpose - The purpose of a RDDL resource is specified by an xlink:arcrole
Returns:
The collection of resources matching the purpose

getResourcesFromHref

public java.util.SortedMap getResourcesFromHref(java.lang.String href)
Select a set of resources given the destination xlink:href
Parameters:
href - The xlink:href URI
Returns:
The collection of resources matching the xlink:href

getResourcesFromTitle

public java.util.SortedMap getResourcesFromTitle(java.lang.String title)
Select a set of resources having a specified xlink:title
Parameters:
title - The xlink:title
Returns:
the collection of resources having the xlink:title

getResourcesFromLang

public java.util.SortedMap getResourcesFromLang(java.lang.String lang)
Select a set of resources having a specified xml:lang
Parameters:
lang - The xml:lang
Returns:
A collection of selected resources

getResourcesFromIdRange

public java.util.SortedMap getResourcesFromIdRange(java.lang.String id0,
                                                   java.lang.String id1)

Select a set of resources given a range of ids. The ids are specified in alphanumeric order. The idiom: "foo","foo/0" is inclusive.

Parameters:
id0 - The start of the range
id1 - The end of the range
Returns:
A collection of selected resources

getResourceFromId

public Resource getResourceFromId(java.lang.String id)
Selects a resource given a particular id.
Parameters:
id - The id
Returns:
The selected resource

getResources

public java.util.Iterator getResources()
Obtain an Iterator over all the resources contained in the namespace.
Returns:
The resources in the namespace

getURI

public java.lang.String getURI()
The namespace URI for the namespace.
Returns:
A String representing the namespace URI.