com.facetmap.sql
Class DateHeadingImpl

java.lang.Object
  extended by com.facetmap.simple.SimpleHeading
      extended by com.facetmap.simple.SimpleTaxonomyHeading
          extended by com.facetmap.sql.IndexedHeading
              extended by com.facetmap.sql.DateHeadingImpl
All Implemented Interfaces:
DateHeading, Heading, SqlHeading, TaxonomyHeading

public class DateHeadingImpl
extends IndexedHeading
implements DateHeading


Field Summary
protected  CalendarUnit calendarUnit
           
static java.text.DateFormat FORMAT_DATE
           
static java.text.DateFormat FORMAT_DAY
           
static java.text.DateFormat FORMAT_MONTH
           
static java.text.DateFormat FORMAT_YEAR
           
static long minuteOffset
           
 
Fields inherited from class com.facetmap.sql.IndexedHeading
NEEDS_SIZING, NO_SIZING, SIZED, sizedToResources
 
Fields inherited from class com.facetmap.simple.SimpleTaxonomyHeading
facet, treeNode
 
Fields inherited from class com.facetmap.simple.SimpleHeading
id, title
 
Constructor Summary
DateHeadingImpl(DateHeading sourceHeading)
          Because DateHeadings tend to generate their forward headings upon request, this constructor will not copy any forward headings of the source Heading.
DateHeadingImpl(java.lang.String id, java.lang.String title, java.util.Date startInstant, java.util.Date endInstant)
           
 
Method Summary
 java.lang.String createTitle()
           
static java.util.Date dateFromInt(int dateRepresentation)
           
 Heading getBackwardHeading()
          Zooms out to the next CalendarUnit, or the root heading, whichever is smaller.
 java.util.Date getEndInstant()
           
 java.util.Iterator getForwardHeadings()
          See Facet for the definition of a forward heading.
 java.util.Date getStartInstant()
           
static int intFromDate(java.util.Date date)
           
 java.lang.String toString()
           
 
Methods inherited from class com.facetmap.sql.IndexedHeading
getLinearFacet, getRange, setNominalParent, sqlFilterClause, sqlMap, sqlUnmap
 
Methods inherited from class com.facetmap.simple.SimpleTaxonomyHeading
getBackwardHeadings, getChildCount, getFacet, getParent, getSimpleTaxonomyFacet, getTreeNode, setSimpleTaxonomyFacet, setTreeNode
 
Methods inherited from class com.facetmap.simple.SimpleHeading
getId, getTitle, isRoot, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.facetmap.Heading
getFacet, getId, getTitle, isRoot
 

Field Detail

calendarUnit

protected CalendarUnit calendarUnit

minuteOffset

public static final long minuteOffset
See Also:
Constant Field Values

FORMAT_DATE

public static java.text.DateFormat FORMAT_DATE

FORMAT_YEAR

public static java.text.DateFormat FORMAT_YEAR

FORMAT_MONTH

public static java.text.DateFormat FORMAT_MONTH

FORMAT_DAY

public static java.text.DateFormat FORMAT_DAY
Constructor Detail

DateHeadingImpl

public DateHeadingImpl(DateHeading sourceHeading)
Because DateHeadings tend to generate their forward headings upon request, this constructor will not copy any forward headings of the source Heading. The constructed DateHeadingImpl will have the same start and end instants as the source Heading, but define its own forward headings of unit years, months, and days.


DateHeadingImpl

public DateHeadingImpl(java.lang.String id,
                       java.lang.String title,
                       java.util.Date startInstant,
                       java.util.Date endInstant)
Method Detail

getBackwardHeading

public Heading getBackwardHeading()
Zooms out to the next CalendarUnit, or the root heading, whichever is smaller. As required by Heading, returns null if this is the root heading.

Specified by:
getBackwardHeading in interface Heading
Overrides:
getBackwardHeading in class SimpleTaxonomyHeading

getForwardHeadings

public java.util.Iterator getForwardHeadings()
Description copied from interface: Heading
See Facet for the definition of a forward heading. This method returns an empty Iterator if the Heading has no forward headings.

Specified by:
getForwardHeadings in interface Heading
Overrides:
getForwardHeadings in class SimpleTaxonomyHeading

dateFromInt

public static java.util.Date dateFromInt(int dateRepresentation)

intFromDate

public static int intFromDate(java.util.Date date)

getEndInstant

public java.util.Date getEndInstant()
Specified by:
getEndInstant in interface DateHeading

getStartInstant

public java.util.Date getStartInstant()
Specified by:
getStartInstant in interface DateHeading

createTitle

public java.lang.String createTitle()

toString

public java.lang.String toString()
Overrides:
toString in class SimpleTaxonomyHeading