com.facetmap
Interface Resource

All Known Implementing Classes:
DynamicFacetSpaceResource, Movie, SimpleResource, SqlResource

public interface Resource

The ultimate object of desire, to put it one way. The point of Facetmap navigation is to find a Resource, so a Resource can be any object that benefits from faceted classification.

Resources divide their metadata into Headings and attributes. Each datum in a Resource either should be used in faceted browsing, or it shouldn't. If it's used in faceted browsing, it's a Heading; if not, it's an attribute. This class provides accessors for both types of data.


Field Summary
static java.lang.Object LOCATION
          A common attribute key to represent a path or URL for the resource.
static java.lang.Object TITLE
          A common attribute key to represent a descriptive title for the resource.
 
Method Summary
 java.lang.String getAttribute(java.lang.Object key)
           
 Heading getHeading(int index)
          A Heading bound to this Resource.
 int getHeadingCount()
          Bind this Resource to the specified Heading.
 int getId()
          Unique identifier.
 

Field Detail

LOCATION

static final java.lang.Object LOCATION
A common attribute key to represent a path or URL for the resource.


TITLE

static final java.lang.Object TITLE
A common attribute key to represent a descriptive title for the resource.

Method Detail

getId

int getId()
Unique identifier.


getHeading

Heading getHeading(int index)
A Heading bound to this Resource. Because Facetmap requires that each Facet be explicitly listed in the FacetSpace, an integer index must be provided. The index corresponds to the order of the Facets in the FacetSpace.

Returns:
The bound Heading in the specified Facet.

getHeadingCount

int getHeadingCount()
Bind this Resource to the specified Heading. If a different Heading in the same Facet has already been bound to this Resource, that bond may be erased.

Throws:
DataException - if the specified Heading does not belong to a Facet.

getAttribute

java.lang.String getAttribute(java.lang.Object key)