com.facetmap.simple
Class SimpleHeading

java.lang.Object
  extended by com.facetmap.simple.SimpleHeading
All Implemented Interfaces:
Heading
Direct Known Subclasses:
SimpleCompoundHeading, SimpleDateHeading, SimpleSpectrumHeading, SimpleTaxonomyHeading

public abstract class SimpleHeading
extends java.lang.Object
implements Heading

Base class for some Heading implementations in this package.


Field Summary
protected  java.lang.String id
           
protected  java.lang.String title
           
 
Constructor Summary
SimpleHeading(java.lang.String id, java.lang.String title)
           
 
Method Summary
 java.lang.String getId()
          Unique identifier of a predefined Heading.
 java.lang.String getTitle()
          The descriptive name of this Heading, for display to users.
 boolean isRoot()
          Returns true if this Heading is the root, the starting Heading, of its Facet.
 boolean matches(Heading resourceHeading)
          Determines whether this heading matches the input heading, for the purposes of SimpleFacetmap routines.
 
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
getBackwardHeading, getFacet, getForwardHeadings
 

Field Detail

id

protected java.lang.String id

title

protected java.lang.String title
Constructor Detail

SimpleHeading

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

getId

public java.lang.String getId()
Description copied from interface: Heading
Unique identifier of a predefined Heading. This can be null if the Heading is not explicitly defined as an input to the Facetmap engine.

Specified by:
getId in interface Heading

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

isRoot

public boolean isRoot()
Description copied from interface: Heading
Returns true if this Heading is the root, the starting Heading, of its Facet.

Specified by:
isRoot in interface Heading
See Also:
Facet.getRootHeading()

matches

public boolean matches(Heading resourceHeading)
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.