Bibi
19 Oct 2005 21:04

ujap.bibi
Class KeyGenerator

java.lang.Object
  extended byujap.bibi.KeyGenerator
Direct Known Subclasses:
AuthorYearKey

public abstract class KeyGenerator
extends Object

Defines methods required for classes that generate keys for bibtex entries.

Author:
Ute Platzer

Nested Class Summary
private static class KeyGenerator.KeyDialog
           
 
Field Summary
static int GENERATE_ALL
          generate keys for all entries
static int GENERATE_NONE
          cancelled generation
static int GENERATE_ONLY_EMPTY
          generate keys only for those entries which have an empty key
static int GENERATE_SELECTED
          selected entry only
private static KeyGenerator.KeyDialog keyDialog
           
private static ResourceBundle resources
           
 
Constructor Summary
KeyGenerator()
           
 
Method Summary
abstract  void generateKey(Entry e, Collection allEntries)
          generate a key for a single Entry.
abstract  void generateKeysForAll(Collection c)
          generate keys for all Entries in the Collection
abstract  void generateKeysForEmpty(Collection c)
          generate keys for all Entries that do not have a key (null or empty String) yet.
 ResourceBundle getResources()
          get the ResourceBundle for this class
static int showDialog()
          returns one of the constants GENERATE_ALL, GENERATE_ONLY_EMPTY, GENERATE_NONE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

private static final ResourceBundle resources

GENERATE_ALL

public static final int GENERATE_ALL
generate keys for all entries

See Also:
Constant Field Values

GENERATE_ONLY_EMPTY

public static final int GENERATE_ONLY_EMPTY
generate keys only for those entries which have an empty key

See Also:
Constant Field Values

GENERATE_NONE

public static final int GENERATE_NONE
cancelled generation

See Also:
Constant Field Values

GENERATE_SELECTED

public static final int GENERATE_SELECTED
selected entry only

See Also:
Constant Field Values

keyDialog

private static KeyGenerator.KeyDialog keyDialog
Constructor Detail

KeyGenerator

public KeyGenerator()
Method Detail

generateKeysForAll

public abstract void generateKeysForAll(Collection c)
generate keys for all Entries in the Collection


generateKeysForEmpty

public abstract void generateKeysForEmpty(Collection c)
generate keys for all Entries that do not have a key (null or empty String) yet.


generateKey

public abstract void generateKey(Entry e,
                                 Collection allEntries)
generate a key for a single Entry.

Parameters:
e - the Entry for which to generate the key.
allEntries - a Collection of all entries; required because keys have to be unique and if the generator doesn't know all keys, it cannot be sure the newly generated one is unique.

getResources

public ResourceBundle getResources()
get the ResourceBundle for this class


showDialog

public static int showDialog()
returns one of the constants GENERATE_ALL, GENERATE_ONLY_EMPTY, GENERATE_NONE


Bibi
19 Oct 2005 21:04

Copyright ? 2002-2005 Ute Platzer. All Rights Reserved.