org.compass.gps.device.jdbc.mapping
Class DataColumnToPropertyMapping

java.lang.Object
  extended by org.compass.gps.device.jdbc.mapping.AbstractColumnMapping
      extended by org.compass.gps.device.jdbc.mapping.AbstractColumnToPropertyMapping
          extended by org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping
All Implemented Interfaces:
ColumnMapping, ColumnToPropertyMapping

public class DataColumnToPropertyMapping
extends AbstractColumnToPropertyMapping

Maps a data column to Compass Resource Property.

The PropertyIndex defaults to Property.Index.TOKENIZED. the PropertyStore defaults to Property.Store.YES, the PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.

Author:
kimchy

Constructor Summary
DataColumnToPropertyMapping()
          Creates an empty data column to property mapping.
DataColumnToPropertyMapping(int columnIndex, String propertyName)
          Creates a new data column to propery mapping given the column index and the property name.
DataColumnToPropertyMapping(int columnIndex, String propertyName, Property.Index propertyIndex, Property.Store propertyStore)
          Creates a new data column to propery mapping given the column index, property name, PropertyIndex, and PropertyStore.
DataColumnToPropertyMapping(int columnIndex, String propertyName, Property.Index propertyIndex, Property.Store propertyStore, Property.TermVector propertyTermVector)
          Creates a new data column to propery mapping given the column index, property name, PropertyIndex, and PropertyStore.
DataColumnToPropertyMapping(String columnName, String propertyName)
          Creates a new data column to propery mapping given the column name and the property name.
DataColumnToPropertyMapping(String columnName, String propertyName, Property.Index propertyIndex, Property.Store propertyStore)
          Creates a new data column to propery mapping given the column name, property name, PropertyIndex, and PropertyStore.
DataColumnToPropertyMapping(String columnName, String propertyName, Property.Index propertyIndex, Property.Store propertyStore, Property.TermVector propertyTermVector)
          Creates a new data column to propery mapping given the column name, property name, PropertyIndex, and PropertyStore.
 
Method Summary
 float getBoost()
          Returns the property boost level.
 Property.Index getPropertyIndex()
          Returns the property index option.
 Property.Store getPropertyStore()
          Returns the property store option.
 Property.TermVector getPropertyTermVector()
          Returns the property termVector option.
 void setBoost(float boost)
           
 void setPropertyIndex(Property.Index propertyIndex)
           
 void setPropertyIndexString(String propertyIndex)
           
 void setPropertyStore(Property.Store propertyStore)
           
 void setPropertyStoreString(String propertyStore)
           
 void setPropertyTermVector(Property.TermVector propertyTermVector)
           
 void setPropertyTermVectorString(String propertyTermVector)
           
 
Methods inherited from class org.compass.gps.device.jdbc.mapping.AbstractColumnToPropertyMapping
getAnalyzer, getConverter, getExcludeFromAll, getPropertyName, setAnalyzer, setConverter, setExcludeFromAll, setPropertyName, toString
 
Methods inherited from class org.compass.gps.device.jdbc.mapping.AbstractColumnMapping
getColumnIndex, getColumnName, isUsingColumnIndex, setColumnIndex, setColumnName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compass.gps.device.jdbc.mapping.ColumnMapping
getColumnIndex, getColumnName, isUsingColumnIndex
 

Constructor Detail

DataColumnToPropertyMapping

public DataColumnToPropertyMapping()
Creates an empty data column to property mapping. Must set at least the colum index or colum name, and the property name.

The PropertyIndex defaults to Property.Index.TOKENIZED. the PropertyStore defaults to Property.Store.YES, the PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.


DataColumnToPropertyMapping

public DataColumnToPropertyMapping(int columnIndex,
                                   String propertyName)
Creates a new data column to propery mapping given the column index and the property name.

The PropertyIndex defaults to Property.Index.TOKENIZED. the PropertyStore defaults to Property.Store.YES, the PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.

Parameters:
columnIndex - The data column index that will be used to look up the column value.
propertyName - The Compass Resource Property name.

DataColumnToPropertyMapping

public DataColumnToPropertyMapping(String columnName,
                                   String propertyName)
Creates a new data column to propery mapping given the column name and the property name.

The PropertyIndex defaults to Property.Index.TOKENIZED. the PropertyStore defaults to Property.Store.YES, the PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.

Parameters:
columnName - The data column name that will be used to look up the column value.
propertyName - The Compass Resource Property name.

DataColumnToPropertyMapping

public DataColumnToPropertyMapping(int columnIndex,
                                   String propertyName,
                                   Property.Index propertyIndex,
                                   Property.Store propertyStore)
Creates a new data column to propery mapping given the column index, property name, PropertyIndex, and PropertyStore.

The PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.

Parameters:
columnIndex - The data column index that will be used to look up the column value.
propertyName - The Compass Resource Property name.
propertyIndex -
propertyStore -

DataColumnToPropertyMapping

public DataColumnToPropertyMapping(String columnName,
                                   String propertyName,
                                   Property.Index propertyIndex,
                                   Property.Store propertyStore)
Creates a new data column to propery mapping given the column name, property name, PropertyIndex, and PropertyStore.

The PropertyTermVector defaults to Property.TermVector.NO and the Boost defaults to 1.0f.

Parameters:
columnName - The data column name that will be used to look up the column value.
propertyName - The Compass Resource Property name.
propertyIndex -
propertyStore -

DataColumnToPropertyMapping

public DataColumnToPropertyMapping(int columnIndex,
                                   String propertyName,
                                   Property.Index propertyIndex,
                                   Property.Store propertyStore,
                                   Property.TermVector propertyTermVector)
Creates a new data column to propery mapping given the column index, property name, PropertyIndex, and PropertyStore.

Parameters:
columnIndex - The data column index that will be used to look up the column value.
propertyName - The Compass Resource Property name.
propertyIndex -
propertyStore -
propertyTermVector -

DataColumnToPropertyMapping

public DataColumnToPropertyMapping(String columnName,
                                   String propertyName,
                                   Property.Index propertyIndex,
                                   Property.Store propertyStore,
                                   Property.TermVector propertyTermVector)
Creates a new data column to propery mapping given the column name, property name, PropertyIndex, and PropertyStore.

Parameters:
columnName - The data column name that will be used to look up the column value.
propertyName - The Compass Resource Property name.
propertyIndex -
propertyStore -
propertyTermVector -
Method Detail

getPropertyIndex

public Property.Index getPropertyIndex()
Description copied from interface: ColumnToPropertyMapping
Returns the property index option.


setPropertyIndex

public void setPropertyIndex(Property.Index propertyIndex)

setPropertyIndexString

public void setPropertyIndexString(String propertyIndex)

getPropertyStore

public Property.Store getPropertyStore()
Description copied from interface: ColumnToPropertyMapping
Returns the property store option.


setPropertyStore

public void setPropertyStore(Property.Store propertyStore)

setPropertyStoreString

public void setPropertyStoreString(String propertyStore)

getPropertyTermVector

public Property.TermVector getPropertyTermVector()
Description copied from interface: ColumnToPropertyMapping
Returns the property termVector option.


setPropertyTermVector

public void setPropertyTermVector(Property.TermVector propertyTermVector)

setPropertyTermVectorString

public void setPropertyTermVectorString(String propertyTermVector)

getBoost

public float getBoost()
Description copied from interface: ColumnToPropertyMapping
Returns the property boost level.


setBoost

public void setBoost(float boost)


Copyright (c) 2004-2008 The Compass Project.