org.weborganic.bastille.flint.config
Interface IFlintConfig

All Known Implementing Classes:
BaseDefaultConfig, ComplexConfig, SimpleConfig

public interface IFlintConfig

An interface for the flint configurations.

This API is used by Bastille to know how it should use Flint.

Implement this interface, if you're using a non-standard configuration.


Method Summary
 File getDirectory()
           
 IndexConfig getIndexConfig(String name)
           
 List<String> getIndexNames()
           
 List<File> getTemplates()
           
 boolean hasMultiple()
          Indicates whether flint is configured for multiple indexes.
 void reload()
          Causes the config to be reloaded.
 File toFile(Document doc)
          Returns the file corresponding to the specified document.
 String toPath(File f)
          Returns the value of the path field for the specified file.
 

Method Detail

getDirectory

File getDirectory()
Returns:
the root directory containing the index or indexes.

hasMultiple

boolean hasMultiple()
Indicates whether flint is configured for multiple indexes.

Returns:
true if Flint is configured for multiple indexes; false for a single index.

getTemplates

List<File> getTemplates()
Returns:
the list of templates to generate iXML.

getIndexNames

List<String> getIndexNames()
Returns:
the list of index names.

getIndexConfig

IndexConfig getIndexConfig(String name)
Parameters:
name - The name of the index
Returns:
the index configuration for the specified index.

reload

void reload()
Causes the config to be reloaded.


toFile

File toFile(Document doc)
Returns the file corresponding to the specified document.

This method is used to determine whether changes in some files require reindexing and is typically used by the indexing process.

Parameters:
doc - The Lucene document
Returns:
The file that was used to generate it.

toPath

String toPath(File f)
Returns the value of the path field for the specified file.

Parameters:
f - for the specified file.
Returns:
the corresponding path or "" if an error occurs