public class PropertiesSynonymProvider extends Object implements SynonymProvider
A=B B=CThis synonym provider will return B as a synonym for A and vice versa. The same applies to B and C. However A is not considered a synonym for C, nor C a synonym for A.
Constructor and Description |
---|
PropertiesSynonymProvider() |
Modifier and Type | Method and Description |
---|---|
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. |
public void initialize(FileSystemResource fsr) throws IOException
synonymProviderConfigPath
parameter. The resource may be
null
if the configuration parameter is not set.initialize
in interface SynonymProvider
fsr
- the file system resource to the synonym provider
configuration.IOException
- if an error occurs while initializing the synonym
provider.public String[] getSynonyms(String term)
term
.getSynonyms
in interface SynonymProvider
term
- a search term.term
or an empty
array if no synonyms are known.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.