com.facetmap.simple
Class SimpleFacet

java.lang.Object
  extended by com.facetmap.simple.SimpleFacet
All Implemented Interfaces:
Facet
Direct Known Subclasses:
SimpleSpectrumFacet, SimpleTaxonomyFacet

public class SimpleFacet
extends java.lang.Object
implements Facet

Base class for some facet implementations in this package.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.Facet
Facet.Util
 
Field Summary
protected  java.lang.String facetid
           
protected  java.util.Vector index
           
protected  java.util.Hashtable nameMap
           
protected  Heading rootHeading
           
protected  java.lang.String title
           
 
Constructor Summary
SimpleFacet(java.lang.String id, java.lang.String title, SimpleHeading rootHeading)
           
 
Method Summary
 void connectHeading(SimpleHeading heading)
           
 boolean containsHeading(java.lang.String id)
           
 Heading getHeading(java.lang.String id)
          Retrieves the Heading, with the specified ID, that is contained by this Facet.
 java.lang.String getId()
          Unique identifier.
 Heading getRootHeading()
          A facet structure is rooted at the heading returned by this method.
 java.lang.String getTitle()
          The descriptive name of this structure, for display to users.
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

protected java.lang.String title

facetid

protected java.lang.String facetid

rootHeading

protected Heading rootHeading

index

protected java.util.Vector index

nameMap

protected java.util.Hashtable nameMap
Constructor Detail

SimpleFacet

public SimpleFacet(java.lang.String id,
                   java.lang.String title,
                   SimpleHeading rootHeading)
Method Detail

getHeading

public Heading getHeading(java.lang.String id)
                   throws UnknownReferenceException
Description copied from interface: Facet
Retrieves the Heading, with the specified ID, that is contained by this Facet. If the facet doesn't recognize the ID, it will throw UnknownReferenceException.

Specified by:
getHeading in interface Facet
Throws:
UnknownReferenceException

containsHeading

public boolean containsHeading(java.lang.String id)

getId

public java.lang.String getId()
Description copied from interface: Facet
Unique identifier.

Specified by:
getId in interface Facet

getRootHeading

public Heading getRootHeading()
Description copied from interface: Facet
A facet structure is rooted at the heading returned by this method. The root provides a starting point for navigation through this facet structure; the root will be one of the headings in the Selection that contains all Resources. The root Heading should have no backward Heading.

In most cases, Resources that are not mapped to any Heading in this Facet are implicitly mapped to this function's return value. Selection.getBackwardSelections(). In some subinterfaces, the root takes on a more familiar role, e.g. the root node of a Taxonomy.

Specified by:
getRootHeading in interface Facet
See Also:
Selection.getForwardSelections(com.facetmap.Facet)

getTitle

public java.lang.String getTitle()
Description copied from interface: Facet
The descriptive name of this structure, for display to users.

Specified by:
getTitle in interface Facet

setTitle

public void setTitle(java.lang.String title)

connectHeading

public void connectHeading(SimpleHeading heading)