org.apache.jackrabbit.core.query.lucene
Interface SynonymProvider

All Known Implementing Classes:
PropertiesSynonymProvider

public interface SynonymProvider

SynonymProvider defines an interface for a component that returns synonyms for a given term.


Method Summary
 String[] getSynonyms(String term)
          Returns an array of terms that are considered synonyms for the given term.
 void initialize(FileSystemResource fsr)
          Initializes the synonym provider and passes the file system resource to the synonym provider configuration defined by the configuration value of the synonymProviderConfigPath parameter.
 

Method Detail

initialize

void initialize(FileSystemResource fsr)
                throws IOException
Initializes the synonym provider and passes the file system resource to the synonym provider configuration defined by the configuration value of the synonymProviderConfigPath parameter. The resource may be null if the configuration parameter is not set.

Parameters:
fsr - the file system resource to the synonym provider configuration.
Throws:
IOException - if an error occurs while initializing the synonym provider.

getSynonyms

String[] getSynonyms(String term)
Returns an array of terms that are considered synonyms for the given term.

Parameters:
term - a search term.
Returns:
an array of synonyms for the given term or an empty array if no synonyms are known.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.