Luigi Homepage

net.cw.luigi.index
Class IndexConfigurationImpl

java.lang.Object
  extended by net.cw.luigi.index.IndexConfigurationImpl
All Implemented Interfaces:
IndexConfiguration

public class IndexConfigurationImpl
extends Object
implements IndexConfiguration

Basic implementation of the IndexConfiguration. This class uses an ordinary ChangeEventSupport to fire events

Version:
$Revision: 1.4 $
Author:
Tiago Silveira
See Also:
net.cw.connector.event.ChangeEventSupport, fireIndexChanged()

Constructor Summary
IndexConfigurationImpl(File location, Analyzer analyzer, EventChannel dispatcher)
          Constructor for the IndexConfigurationImpl object
IndexConfigurationImpl(String location, Analyzer analyzer, EventChannel dispatcher)
          Deprecated. use constructor with File as location parameter
 
Method Summary
 void addChangeEventListener(ChangeEventListener listener)
          Adds a ChangeEventListener to the IndexConfigurationImpl object
 void fireIndexChanged()
          fires a ChangeEvent of type CHANGE_EVENT, with this instance as source, and empty (null) values
 Analyzer getAnalyzer()
          Gets the analyzer attribute of the IndexConfigurationImpl object
 Directory getDirectory(boolean deleteContents)
          Gets the directory attribute of the IndexConfigurationImpl object
 String getIndexName()
          Gets the indexName attribute of the IndexConfigurationImpl object
protected  String getLocation()
          Deprecated. use getLocationAsFile
protected  File getLocationAsFile()
          Gets the location attribute of the IndexConfigurationImpl object
protected  Directory openDirectory(boolean create)
           
 void removeChangeEventListener(ChangeEventListener listener)
          TODO: Description of the Method
protected  void setLocation(File value)
          Sets the location attribute of the IndexConfigurationImpl object
protected  void setLocation(String value)
          Deprecated. use setLocationAsFile
 String toString()
          TODO: Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexConfigurationImpl

public IndexConfigurationImpl(String location,
                              Analyzer analyzer,
                              EventChannel dispatcher)
Deprecated. use constructor with File as location parameter

Constructor for the IndexConfigurationImpl object

Parameters:
location - TODO: Description of the Parameter
analyzer - TODO: Description of the Parameter
dispatcher - TODO: Description of the Parameter

IndexConfigurationImpl

public IndexConfigurationImpl(File location,
                              Analyzer analyzer,
                              EventChannel dispatcher)
Constructor for the IndexConfigurationImpl object

Parameters:
location - TODO: Description of the Parameter
analyzer - TODO: Description of the Parameter
dispatcher - TODO: Description of the Parameter
Method Detail

getLocation

protected String getLocation()
Deprecated. use getLocationAsFile

Gets the location attribute of the IndexConfigurationImpl object

Returns:
The location value

getLocationAsFile

protected File getLocationAsFile()
Gets the location attribute of the IndexConfigurationImpl object

Returns:
The location value

setLocation

protected void setLocation(String value)
Deprecated. use setLocationAsFile

Sets the location attribute of the IndexConfigurationImpl object

Parameters:
value - The new location

setLocation

protected void setLocation(File value)
Sets the location attribute of the IndexConfigurationImpl object

Parameters:
value - The new location

getIndexName

public String getIndexName()
Gets the indexName attribute of the IndexConfigurationImpl object

Specified by:
getIndexName in interface IndexConfiguration
Returns:
The index name value

openDirectory

protected Directory openDirectory(boolean create)
                           throws IOException
Throws:
IOException

getDirectory

public Directory getDirectory(boolean deleteContents)
                       throws IOException
Gets the directory attribute of the IndexConfigurationImpl object

Specified by:
getDirectory in interface IndexConfiguration
Parameters:
deleteContents - if true, will delete any contents of the directory
Returns:
The directory value
Throws:
IOException - TODO: Description of the Exception

getAnalyzer

public Analyzer getAnalyzer()
Gets the analyzer attribute of the IndexConfigurationImpl object

Specified by:
getAnalyzer in interface IndexConfiguration
Returns:
The analyzer value

addChangeEventListener

public void addChangeEventListener(ChangeEventListener listener)
Adds a ChangeEventListener to the IndexConfigurationImpl object

Specified by:
addChangeEventListener in interface IndexConfiguration
Parameters:
listener - The ChangeEventListener to be added

removeChangeEventListener

public void removeChangeEventListener(ChangeEventListener listener)
TODO: Description of the Method

Specified by:
removeChangeEventListener in interface IndexConfiguration
Parameters:
listener - TODO: Description of the Parameter

fireIndexChanged

public void fireIndexChanged()
fires a ChangeEvent of type CHANGE_EVENT, with this instance as source, and empty (null) values

Specified by:
fireIndexChanged in interface IndexConfiguration

toString

public String toString()
TODO: Description of the Method

Overrides:
toString in class Object
Returns:
TODO: Description of the Return Value

Luigi Homepage