Beispiel #1
0
        /**
         * Inserts the entry, given that its ID is not already in use.
         * use Util.createId(...) to make up a unique ID for an entry.
         */
        public bool insertEntry(BibtexEntry entry)
        {
            lock (_lock) {
            string id = entry.getId();
            if (getEntryById(id) != null)
            {
              throw new KeyCollisionException(
                    "ID is already in use, please choose another");
            }
            _entries.Add(id, entry);

            return checkForDuplicateKeyAndAdd(null, entry.getCiteKey(), false);
            }
        }