org.embl.ebi.escience.scuflui.facets
Class ToString

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.facets.ToString
All Implemented Interfaces:
FacetFinderSPI

public class ToString
extends java.lang.Object
implements FacetFinderSPI

Author:
Matthew Pocock

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.embl.ebi.escience.scuflui.spi.FacetFinderSPI
FacetFinderSPI.ColumnID
 
Constructor Summary
ToString()
           
 
Method Summary
 boolean canMakeFacets(DataThing dataThing)
          Indicate if this facet finder can decompose this DataThing.
 DataThing getFacet(DataThing dataThing, FacetFinderSPI.ColumnID colID)
          Get the value associated with a particular column of a data object.
 java.lang.String getName()
          Get a human readable name for this facetiser.
 java.util.Set getStandardColumns(DataThing dataThing)
          Get a Set of columns this facet finder can use on any data.
 boolean hasColumn(FacetFinderSPI.ColumnID colID)
          Indicate if this facet finder can return data for this column.
 FacetFinderSPI.ColumnID newColumn(DataThing dataThing)
          Get a new, independant column for a data item.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToString

public ToString()
Method Detail

canMakeFacets

public boolean canMakeFacets(DataThing dataThing)
Description copied from interface: FacetFinderSPI
Indicate if this facet finder can decompose this DataThing.

Specified by:
canMakeFacets in interface FacetFinderSPI
Parameters:
dataThing - the object to decompose
Returns:
true if it can, false otherwise

getStandardColumns

public java.util.Set getStandardColumns(DataThing dataThing)
Description copied from interface: FacetFinderSPI
Get a Set of columns this facet finder can use on any data. The returned Set should be immutable, and should not change. Users of this API should make a copy of this if they want to edit it. Calling mutators on the column ID should not affect the columns returned by previous or future invocations.

Specified by:
getStandardColumns in interface FacetFinderSPI
Parameters:
dataThing - the dataThing to get standard columns for, or null if default columns should be returned
Returns:
a Set (never null) containing the standard columns

newColumn

public FacetFinderSPI.ColumnID newColumn(DataThing dataThing)
Description copied from interface: FacetFinderSPI
Get a new, independant column for a data item. Call this method to get a column ID that can then be customised.

Specified by:
newColumn in interface FacetFinderSPI
Parameters:
dataThing - the data item to work with
Returns:
a new column ID

hasColumn

public boolean hasColumn(FacetFinderSPI.ColumnID colID)
Description copied from interface: FacetFinderSPI
Indicate if this facet finder can return data for this column.

Specified by:
hasColumn in interface FacetFinderSPI
Parameters:
colID - the ColumnID identifying the column
Returns:
true if the colID is known by this facet finder, false otherwise

getFacet

public DataThing getFacet(DataThing dataThing,
                          FacetFinderSPI.ColumnID colID)
Description copied from interface: FacetFinderSPI
Get the value associated with a particular column of a data object.

Specified by:
getFacet in interface FacetFinderSPI
Parameters:
dataThing - the object to decompose
colID - the column identifier
Returns:
a DataThing holding the value of that facet, or null if that column ID could not be fetched for dataThing

getName

public java.lang.String getName()
Description copied from interface: FacetFinderSPI
Get a human readable name for this facetiser.

Specified by:
getName in interface FacetFinderSPI
Returns:
the name