com.facetmap
Interface SpectrumFacet

All Superinterfaces:
Facet
All Known Implementing Classes:
SimpleSpectrumFacet, SpectrumImpl

public interface SpectrumFacet
extends Facet

Represents a scalar Facet that doesn't necessarily have discrete Headings. This is a good structure for numerical headings, such as years, prices, heights, etc. The user, when browsing, will generally have the power to arbitrarily specify minimum and maximum values for this dimension in facetspace, so predefined Headings need not be created, though they can be. The visible light spectrum, though continuous, designates ranges of light wavelength, such as red (420-480), orange (480-540), etc. A SpectrumFacet may do the same, and thereby predefine ranges: Headings presented as browsing suggestions to the user, with predefined titles. A year spectrum can define eras, a price spectrum can define price ranges, and so on. These predefined ranges may nest, e.g. "Under $100" may contain "Bargains under $20".


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.Facet
Facet.Util
 
Field Summary
static int NO_MAXIMUM
           
static int NO_MINIMUM
          The allowable extremes are set so that the number of possible values in any range is a positive number.
 
Method Summary
 int getDefinedHeadingCount()
           
 SpectrumHeading getSpectrumHeading(int value)
          Get a SpectrumHeading that represents a single discrete value, not a range.
 SpectrumHeading getSpectrumHeading(int min, int max)
          Encapsulates a range of values in this Spectrum as a Heading.
 SpectrumHeading getSpectrumHeading(java.lang.String id)
           
 
Methods inherited from interface com.facetmap.Facet
getHeading, getId, getRootHeading, getTitle
 

Field Detail

NO_MINIMUM

static final int NO_MINIMUM
The allowable extremes are set so that the number of possible values in any range is a positive number.

See Also:
Constant Field Values

NO_MAXIMUM

static final int NO_MAXIMUM
See Also:
Constant Field Values
Method Detail

getSpectrumHeading

SpectrumHeading getSpectrumHeading(int min,
                                   int max)
Encapsulates a range of values in this Spectrum as a Heading. If the specified minimum or maximum is beyond the range of the Spectrum, this method may silently accept the arguments anyway. The result will be the same as if they were within the Spectrum, since no Resource can be classified with a value outside the Spectrum.


getSpectrumHeading

SpectrumHeading getSpectrumHeading(int value)
Get a SpectrumHeading that represents a single discrete value, not a range. This is usually the sort of SpectrumHeading mapped to a Resource.


getSpectrumHeading

SpectrumHeading getSpectrumHeading(java.lang.String id)
                                   throws UnknownReferenceException
Throws:
UnknownReferenceException

getDefinedHeadingCount

int getDefinedHeadingCount()