com.facetmap.sql
Class DateImpl
java.lang.Object
com.facetmap.simple.SimpleFacet
com.facetmap.simple.SimpleTaxonomyFacet
com.facetmap.sql.LinearFacet
com.facetmap.sql.DateImpl
- All Implemented Interfaces:
- DateFacet, Facet, SqlFacet, TaxonomyFacet
public class DateImpl
- extends LinearFacet
- implements DateFacet
| Nested classes/interfaces inherited from interface com.facetmap.Facet |
Facet.Util |
|
Constructor Summary |
DateImpl(DateFacet sourceDate)
|
DateImpl(java.lang.String id,
java.lang.String title,
java.lang.String rootHeadingTitle,
java.util.Date startInstant,
java.util.Date endInstant)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateImpl
public DateImpl(DateFacet sourceDate)
DateImpl
public DateImpl(java.lang.String id,
java.lang.String title,
java.lang.String rootHeadingTitle,
java.util.Date startInstant,
java.util.Date endInstant)
connectHeading
public void connectHeading(SimpleHeading heading)
- Rewritten for DateImpl so that auto-generated forward headings are not
indexed (which would potentially take up a lot of space). This
- Overrides:
connectHeading in class SimpleFacet
defineHeading
public DateHeading defineHeading(java.lang.String id,
java.lang.String title,
java.util.Date startInstant,
java.util.Date endInstant)
throws DataException
- Throws:
DataException
createAnonymousDateHeading
public DateHeadingImpl createAnonymousDateHeading(java.util.Date startInstant,
java.util.Date endInstant)
getDateHeading
public DateHeading getDateHeading(java.util.Date startInstant,
java.util.Date endInstant)
- Description copied from interface:
DateFacet
- Return a DateHeading in this facet which represents a timespan.
This is a low-level heading factory method that uses java.util.Date .
The java.util.Date object represents an instant in time, and is
therefore not really suitable for most browsing experiences, where
you want to specify an interval, say, a DateHeading that represents
a certain month. So it's usually easier to create common DateHeading
objects with
com.facetmap.simple.DateHeadingBuilder, which
wraps DateFacet and provides more usable methods to get DateHeadings.
- Specified by:
getDateHeading in interface DateFacet
- See Also:
com.facetmap.simple.DateHeadingBuilder
getDateHeading
public DateHeading getDateHeading(java.util.Date instant)
- Description copied from interface:
DateFacet
- Return a DateHeading in this facet which represents only an instant.
The returned Heading is typically appropriate for mapping to a
Resource, but usually not so useful for making a Selection.
- Specified by:
getDateHeading in interface DateFacet
getDateHeading
public DateHeading getDateHeading(java.lang.String id)
throws UnknownReferenceException
- Description copied from interface:
DateFacet
- Return a previously defined DateHeading.
- Specified by:
getDateHeading in interface DateFacet
- Throws:
UnknownReferenceException
getSqlHeading
public Heading getSqlHeading(Heading sourceHeading)
throws UnknownReferenceException
- Description copied from interface:
SqlFacet
- Returns the Heading from this SqlFacet that corresponds to the input
sourceHeading. This is used to rapidly translate true resource headings
to SQL-based resource headings.
If no such heading exists in this SqlFacet (and if it is not correct
behavior to create it), then this method returns null. This method may
throw UnknownReferenceException if the sourceHeading contains
references which do not resolve correctly.
- Specified by:
getSqlHeading in interface SqlFacet- Overrides:
getSqlHeading in class LinearFacet
- Throws:
UnknownReferenceException