com.facetmap
Interface DateFacet

All Superinterfaces:
Facet
All Known Implementing Classes:
DateImpl, SimpleDateFacet

public interface DateFacet
extends Facet

Allows browsing of timeline data. DateFacet handles arbitrary timespans (much like SpectrumFacet) and/or provides common units of time as backward and forward headings; for example, a DateHeading representing a month might provide the entire year as a backward heading, and individual days as a forward heading.

DateFacet operates in Universal Coordinated Time (UTC); timezones are ignored in order to provide more consistent classification. If you find that your resources appear to be in the wrong DateHeading, with an error of a day or less, it may be because you used a local timezone when creating dates for your resources.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.Facet
Facet.Util
 
Method Summary
 DateHeading getDateHeading(java.util.Date instant)
          Return a DateHeading in this facet which represents only an instant.
 DateHeading getDateHeading(java.util.Date startInstant, java.util.Date endInstant)
          Return a DateHeading in this facet which represents a timespan.
 DateHeading getDateHeading(java.lang.String id)
          Return a previously defined DateHeading.
 
Methods inherited from interface com.facetmap.Facet
getHeading, getId, getRootHeading, getTitle
 

Method Detail

getDateHeading

DateHeading getDateHeading(java.util.Date startInstant,
                           java.util.Date endInstant)
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.

See Also:
com.facetmap.simple.DateHeadingBuilder

getDateHeading

DateHeading getDateHeading(java.util.Date instant)
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.


getDateHeading

DateHeading getDateHeading(java.lang.String id)
                           throws UnknownReferenceException
Return a previously defined DateHeading.

Throws:
UnknownReferenceException