Logo Search packages:      
Sourcecode: cdk version File versions  Download package

String [] org::openscience::cdk::dict::DictionaryDatabase::getDictionaryEntries ( String  dictionaryName  )  [inline]

Returns a String[] with the id's of all entries in the specified database.

Definition at line 134 of file DictionaryDatabase.java.

References org::openscience::cdk::tools::LoggingTool::error(), org::openscience::cdk::dict::Dictionary::getEntries(), org::openscience::cdk::dict::Entry::getLabel(), and org::openscience::cdk::tools::LoggingTool::info().

                                                                {
        Dictionary dictionary = getDictionary(dictionaryName);
        if (dictionary == null) {
            logger.error("Cannot find requested dictionary");
            return new String[0];
        } else {
            // FIXME: dummy method that needs an implementation
            Entry[] entries = dictionary.getEntries();
            String[] entryNames = new String[entries.length];
            logger.info("Found ", "" + entryNames.length, " entries in dictionary ", 
              dictionaryName);
            for (int i=0; i<entries.length; i++) {
                entryNames[i] = entries[i].getLabel();
            }
            return entryNames;
        }
    }


Generated by  Doxygen 1.6.0   Back to index