com.facetmap.simple
Class SimpleSpectrumHeading

java.lang.Object
  extended by com.facetmap.simple.SimpleHeading
      extended by com.facetmap.simple.SimpleSpectrumHeading
All Implemented Interfaces:
Heading, SpectrumHeading

public class SimpleSpectrumHeading
extends SimpleHeading
implements SpectrumHeading


Field Summary
 
Fields inherited from class com.facetmap.simple.SimpleHeading
id, title
 
Constructor Summary
protected SimpleSpectrumHeading(SimpleSpectrumFacet facet, java.lang.String title, int min, int max)
          Construct an anonymous SimpleSpectrumHeading.
protected SimpleSpectrumHeading(SimpleSpectrumFacet facet, java.lang.String id, java.lang.String title)
           
  SimpleSpectrumHeading(SimpleSpectrumFacet spectrum, java.lang.String id, java.lang.String title, int min, int max)
          Constructs an explicit heading that is retrievable by ID.
protected SimpleSpectrumHeading(java.lang.String id, java.lang.String title)
           
protected SimpleSpectrumHeading(java.lang.String id, java.lang.String title, int min, int max)
          Package constructor to create SpectrumHeadingImpl with no spectrum.
 
Method Summary
 Heading getBackwardHeading()
          Returns the root (the entire Spectrum), or no Headings (empty Enumeration) if this Heading is the root.
 Facet getFacet()
          Facet to which this Heading belongs.
 java.util.Iterator getForwardHeadings()
          Returns all defined Headings that are subsets of this Heading.
 int getMaximum()
           
 int getMinimum()
           
 SimpleFacet getSimpleFacet()
           
 SimpleSpectrumFacet getSimpleSpectrumFacet()
           
 java.lang.String getTitle()
          The descriptive name of this Heading, for display to users.
 boolean matches(Heading resourceHeading)
          Determines whether this heading matches the input heading, for the purposes of SimpleFacetmap routines.
 
Methods inherited from class com.facetmap.simple.SimpleHeading
getId, isRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.facetmap.Heading
getId, isRoot
 

Constructor Detail

SimpleSpectrumHeading

protected SimpleSpectrumHeading(java.lang.String id,
                                java.lang.String title,
                                int min,
                                int max)
Package constructor to create SpectrumHeadingImpl with no spectrum. If min and/or max are set to NO_MINIMUM and/or NO_MAXIMUM, respectively, the facet will adjust these values to reflect the smallest minimum and largest maximum values present in the facet's headings.


SimpleSpectrumHeading

protected SimpleSpectrumHeading(java.lang.String id,
                                java.lang.String title)

SimpleSpectrumHeading

protected SimpleSpectrumHeading(SimpleSpectrumFacet facet,
                                java.lang.String id,
                                java.lang.String title)

SimpleSpectrumHeading

protected SimpleSpectrumHeading(SimpleSpectrumFacet facet,
                                java.lang.String title,
                                int min,
                                int max)
Construct an anonymous SimpleSpectrumHeading.


SimpleSpectrumHeading

public SimpleSpectrumHeading(SimpleSpectrumFacet spectrum,
                             java.lang.String id,
                             java.lang.String title,
                             int min,
                             int max)
Constructs an explicit heading that is retrievable by ID. A title argument may be provided, or it may be left null, in which case the title will be created automatically; see getTitle() .

Method Detail

getMinimum

public int getMinimum()
Specified by:
getMinimum in interface SpectrumHeading

getMaximum

public int getMaximum()
Specified by:
getMaximum in interface SpectrumHeading

getSimpleSpectrumFacet

public SimpleSpectrumFacet getSimpleSpectrumFacet()

getFacet

public Facet getFacet()
Description copied from interface: Heading
Facet to which this Heading belongs. A Heading must belong to a Facet.

Specified by:
getFacet in interface Heading

getSimpleFacet

public SimpleFacet getSimpleFacet()

getTitle

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

Specified by:
getTitle in interface Heading
Overrides:
getTitle in class SimpleHeading

getBackwardHeading

public Heading getBackwardHeading()
Returns the root (the entire Spectrum), or no Headings (empty Enumeration) if this Heading is the root.

In future versions with nested spectral Headings, this could do some work to determine each outer Heading.

Specified by:
getBackwardHeading in interface Heading

getForwardHeadings

public java.util.Iterator getForwardHeadings()
Returns all defined Headings that are subsets of this Heading.

In future versions with nested spectral Headings, this should only return the outermost subsets.

Specified by:
getForwardHeadings in interface Heading

matches

public boolean matches(Heading resourceHeading)
Description copied from class: SimpleHeading
Determines whether this heading matches the input heading, for the purposes of SimpleFacetmap routines. In this method, a match of the resourceHeading's backward headings is not sufficient to return true; the resourceHeading itself must actually match. Beyond that, the definition of "match" is left to the implementation.

Note: if x.isRoot() && y.isRoot() , x must match y.

Overrides:
matches in class SimpleHeading