Package org.openscience.cdk.dict
Class DictionaryDatabase
- java.lang.Object
-
- org.openscience.cdk.dict.DictionaryDatabase
-
-
Field Summary
Fields Modifier and Type Field Description static String
DICTREFPROPERTYNAME
-
Constructor Summary
Constructors Constructor Description DictionaryDatabase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dictionary
getDictionary(String dictionaryName)
String[]
getDictionaryEntries(String dictionaryName)
Returns a String[] with the id's of all entries in the specified database.Entry[]
getDictionaryEntry(String dictionaryName)
String[]
getDictionaryNames()
Returns a String[] with the names of the known dictionaries.boolean
hasDictionary(String name)
Returns true if the database contains the dictionary.boolean
hasEntry(String dictName, String entryID)
Returns true if the given dictionary contains the given entry.Iterator<String>
listDictionaries()
Returns true if the database contains the dictionary.void
readDictionary(Reader reader, String name)
Reads a custom dictionary into the database.
-
-
-
Field Detail
-
DICTREFPROPERTYNAME
public static final String DICTREFPROPERTYNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
readDictionary
public void readDictionary(Reader reader, String name)
Reads a custom dictionary into the database.- Parameters:
reader
- The reader from which the dictionary data will be readname
- The name of the dictionary
-
getDictionaryNames
public String[] getDictionaryNames()
Returns a String[] with the names of the known dictionaries.- Returns:
- The names of the dictionaries
-
getDictionary
public Dictionary getDictionary(String dictionaryName)
-
getDictionaryEntries
public String[] getDictionaryEntries(String dictionaryName)
Returns a String[] with the id's of all entries in the specified database.- Parameters:
dictionaryName
- The name of the dictionary- Returns:
- The entry names for the specified dictionary
-
hasDictionary
public boolean hasDictionary(String name)
Returns true if the database contains the dictionary.
-
listDictionaries
public Iterator<String> listDictionaries()
Returns true if the database contains the dictionary.
-
-