com.facetmap.sql
Class LinearFacet

java.lang.Object
  extended by com.facetmap.simple.SimpleFacet
      extended by com.facetmap.simple.SimpleTaxonomyFacet
          extended by com.facetmap.sql.LinearFacet
All Implemented Interfaces:
Facet, SqlFacet, TaxonomyFacet
Direct Known Subclasses:
DateImpl, SpectrumImpl, TaxonomyImpl

public class LinearFacet
extends SimpleTaxonomyFacet
implements SqlFacet


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.facetmap.Facet
Facet.Util
 
Field Summary
protected  java.lang.String endCol
           
protected  int facetIndex
           
protected  java.lang.String startCol
           
 
Fields inherited from class com.facetmap.simple.SimpleFacet
facetid, index, nameMap, rootHeading, title
 
Constructor Summary
LinearFacet(Facet sourceTaxonomy)
           
LinearFacet(java.lang.String id, java.lang.String title, IndexedHeading rootHeading)
           
 
Method Summary
 Heading getHeading(java.lang.String id)
          Retrieves the Heading, with the specified ID, that is contained by this Facet.
 IndexedHeading getIndexedHeading(java.lang.String id)
           
 SqlFacetSpace getSqlFacetSpace()
           
 Heading getSqlHeading(Heading sourceHeading)
          Returns the Heading from this SqlFacet that corresponds to the input sourceHeading.
 java.lang.String getTableName()
           
 void setSqlFacetSpace(SqlFacetSpace sqlFacetSpace)
           
 void sqlCreate(java.sql.Connection connection, java.lang.String vendor)
           
 
Methods inherited from class com.facetmap.simple.SimpleTaxonomyFacet
addHeading, appendHeadingInto, getHeadingCount, getSimpleTaxonomyHeading, getTaxonomyHeading, insertHeadingInto, size
 
Methods inherited from class com.facetmap.simple.SimpleFacet
connectHeading, containsHeading, getId, getRootHeading, getTitle, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.facetmap.Facet
getId, getRootHeading, getTitle
 

Field Detail

facetIndex

protected int facetIndex

startCol

protected java.lang.String startCol

endCol

protected java.lang.String endCol
Constructor Detail

LinearFacet

public LinearFacet(Facet sourceTaxonomy)

LinearFacet

public LinearFacet(java.lang.String id,
                   java.lang.String title,
                   IndexedHeading rootHeading)
Parameters:
id - - the String id of this facet.
title - - the display title of this facet.
rootHeading - - the root heading, complete with all descendants to be recognized by this facet.
Method Detail

getSqlFacetSpace

public SqlFacetSpace getSqlFacetSpace()
Specified by:
getSqlFacetSpace in interface SqlFacet

setSqlFacetSpace

public void setSqlFacetSpace(SqlFacetSpace sqlFacetSpace)
Specified by:
setSqlFacetSpace in interface SqlFacet

sqlCreate

public void sqlCreate(java.sql.Connection connection,
                      java.lang.String vendor)
               throws java.sql.SQLException
Specified by:
sqlCreate in interface SqlFacet
Throws:
java.sql.SQLException

getIndexedHeading

public IndexedHeading getIndexedHeading(java.lang.String id)
                                 throws UnknownReferenceException
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
Throws:
UnknownReferenceException

getHeading

public Heading getHeading(java.lang.String id)
                   throws UnknownReferenceException
Description copied from interface: Facet
Retrieves the Heading, with the specified ID, that is contained by this Facet. If the facet doesn't recognize the ID, it will throw UnknownReferenceException.

Specified by:
getHeading in interface Facet
Overrides:
getHeading in class SimpleTaxonomyFacet
Throws:
UnknownReferenceException

getTableName

public java.lang.String getTableName()