com.facetmap.simple
Class SimpleCompoundHeadingFacet

java.lang.Object
  extended by com.facetmap.simple.SimpleCompoundHeadingFacet
All Implemented Interfaces:
CompoundHeadingFacet, Facet
Direct Known Subclasses:
CompoundLinearFacet

public class SimpleCompoundHeadingFacet
extends java.lang.Object
implements CompoundHeadingFacet

By default, the CompoundHeadingFacet has the same ID and title as the underlying facet. This would prevent you from adding a CompoundHeadingFacet to a FacetSpace which already contains the underlying facet, but you wouldn't ordinarily do that anyway.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.CompoundHeadingFacet
CompoundHeadingFacet.Util
 
Field Summary
protected  Facet facet
           
protected  CompoundHeading rootHeading
           
 
Constructor Summary
SimpleCompoundHeadingFacet(Facet facet)
           
 
Method Summary
 CompoundHeading getCompoundHeading(java.util.Collection headings)
           
 CompoundHeading getCompoundHeading(java.util.List headingList)
          This is the base factory method in CompoundFacet.
 CompoundHeading getCompoundHeading(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.
 Facet getUnderlyingFacet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

facet

protected Facet facet

rootHeading

protected CompoundHeading rootHeading
Constructor Detail

SimpleCompoundHeadingFacet

public SimpleCompoundHeadingFacet(Facet facet)
Method Detail

getCompoundHeading

public CompoundHeading getCompoundHeading(java.lang.String id)
                                   throws UnknownReferenceException
Specified by:
getCompoundHeading in interface CompoundHeadingFacet
Throws:
UnknownReferenceException

getCompoundHeading

public CompoundHeading getCompoundHeading(java.util.Collection headings)
Specified by:
getCompoundHeading in interface CompoundHeadingFacet

getCompoundHeading

public CompoundHeading getCompoundHeading(java.util.List headingList)
This is the base factory method in CompoundFacet. It instantiates a new CompoundHeading. Other factory methods delegate to this one.


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

getUnderlyingFacet

public Facet getUnderlyingFacet()
Specified by:
getUnderlyingFacet in interface CompoundHeadingFacet

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