public interface Dictionary
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Called when the dictionary is no longer needed.
|
<T extends AttributeValue> |
getAttributeValues(Attribute<T> att)
Return the set of known attribute values for an attribute.
|
String |
getName()
Returns a short descriptive name of the dictionary.
|
Set<Attribute<?>> |
getSupportedAttributes()
Get a set of all attributes used by this dictionary.
|
SearchFieldSelection |
getSupportedFields(SearchMode searchmode)
Return the search fields for which a search of the given mode is supported for
this dictionary implementation.
|
Iterator<DictionaryEntry> |
search(SearchMode searchmode,
Object[] parameters)
Searches for entries in the dictionary.
|
boolean |
supports(SearchMode searchmode,
boolean fully)
Test if this dictionary supports searches of a certain type.
|
String getName()
Iterator<DictionaryEntry> search(SearchMode searchmode, Object[] parameters) throws SearchException
searchmode
- The requested search mode. The search mode must be supported by this
dictionary.parameters
- Search parameters as required by the searchmode
.
The parameters must be valid for the selected search mode according to
List.isValid
.SearchException
- if the search mode is not supported or there was an error
during the search.boolean supports(SearchMode searchmode, boolean fully)
search
with this search mode will throw an exception.searchmode
- The search mode to test.fully
- If true
, test if the search mode is fully supported, if
false
, test if it is partially supported.Set<Attribute<?>> getSupportedAttributes()
<T extends AttributeValue> Set<T> getAttributeValues(Attribute<T> att)
PartOfSpeech
attributes.
An example for non-constant values,
which will not be returned by this method, are
InformationAttributeValues
.
In this case, an empty set is returned. For unsupported attributes,
null
will be returned.SearchFieldSelection getSupportedFields(SearchMode searchmode)
SearchFieldSelection
parameter, at least one search field must be
selected in the SearchFieldSelection
object returned.IllegalArgumentException
- if the search mode is unsupported or does not take a
SearchFieldSelection
as parameter.void dispose()
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.