com.facetmap
Class Facet.Util

java.lang.Object
  extended by com.facetmap.Facet.Util
Enclosing interface:
Facet

public static class Facet.Util
extends java.lang.Object


Field Summary
static java.text.DateFormat DEFAULT_DATE_FORMAT
          The default DateFormat is "yyyy-MM-dd HH:mm"
static java.text.DateFormat DEFAULT_TIME_FORMAT
           
 
Constructor Summary
Facet.Util()
           
 
Method Summary
static DateHeading findDateHeading(DateFacet facet, java.lang.String id)
           
static Heading findHeading(Facet facet, java.lang.String id)
          More forgiving than Facet.getHeading(), this method tries as hard as it can to find a Heading that corresponds to the given identifier.
static SpectrumHeading findSpectrumHeading(SpectrumFacet facet, java.lang.String id)
          Looks up headings in two ways: first, by association with the given ID, and unsuccessful, then treats the ID as a value within this spectrum and produces an implicit heading for that value.
static TaxonomyHeading findTaxonomyHeading(TaxonomyFacet facet, java.lang.String id)
           
static java.util.Date parseDateValue(java.lang.String attributeValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATE_FORMAT

public static final java.text.DateFormat DEFAULT_DATE_FORMAT
The default DateFormat is "yyyy-MM-dd HH:mm"


DEFAULT_TIME_FORMAT

public static final java.text.DateFormat DEFAULT_TIME_FORMAT
Constructor Detail

Facet.Util

public Facet.Util()
Method Detail

findHeading

public static Heading findHeading(Facet facet,
                                  java.lang.String id)
                           throws UnknownReferenceException
More forgiving than Facet.getHeading(), this method tries as hard as it can to find a Heading that corresponds to the given identifier. Dispatches to more specific method, based on type of Facet. This dispatch isn't performed by the class tables themselves -- because the Facet objects are not responsible for this sort of logic.

This logic could go somewhere where it's more widely useful, though.

Throws:
UnknownReferenceException

findTaxonomyHeading

public static TaxonomyHeading findTaxonomyHeading(TaxonomyFacet facet,
                                                  java.lang.String id)
                                           throws UnknownReferenceException
Throws:
UnknownReferenceException

findSpectrumHeading

public static SpectrumHeading findSpectrumHeading(SpectrumFacet facet,
                                                  java.lang.String id)
                                           throws UnknownReferenceException
Looks up headings in two ways: first, by association with the given ID, and unsuccessful, then treats the ID as a value within this spectrum and produces an implicit heading for that value.

Throws:
UnknownReferenceException

findDateHeading

public static DateHeading findDateHeading(DateFacet facet,
                                          java.lang.String id)
                                   throws UnknownReferenceException
Throws:
UnknownReferenceException

parseDateValue

public static java.util.Date parseDateValue(java.lang.String attributeValue)