Class DictionaryDatabase


  • public class DictionaryDatabase
    extends Object
    Database of dictionaries listing entries with compounds, fragments and entities.
    Author:
    Egon Willighagen
    Source code:
    main
    Belongs to CDK module:
    dict
    Keywords:
    dictionary
    Created on:
    2003-04-06
    • Constructor Detail

      • DictionaryDatabase

        public DictionaryDatabase()
    • 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 read
        name - 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
      • 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
      • getDictionaryEntry

        public Entry[] getDictionaryEntry​(String dictionaryName)
      • 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.
      • hasEntry

        public boolean hasEntry​(String dictName,
                                String entryID)
        Returns true if the given dictionary contains the given entry.