public class JournalAbbreviations
extends java.lang.Object
Constructor and Description |
---|
JournalAbbreviations() |
JournalAbbreviations(java.io.File file) |
JournalAbbreviations(java.lang.String resource) |
Modifier and Type | Method and Description |
---|---|
boolean |
abbreviate(BibtexDatabase database,
BibtexEntry entry,
java.lang.String fieldName,
javax.swing.undo.CompoundEdit ce,
boolean withDots)
Abbreviate the journal name of the given entry.
|
java.lang.String |
dotsToNodots(java.lang.String name) |
java.util.Iterator<java.lang.String> |
fullNameIterator()
Get an iterator for the known journals in alphabetical order.
|
java.lang.String |
getAbbreviatedName(java.lang.String journalName,
boolean withDots)
Attempts to get the abbreviated name of the journal given.
|
java.lang.String |
getFullName(java.lang.String journalName)
Attempts to get the full name of the abbreviation given.
|
java.util.Map<java.lang.String,java.lang.String> |
getJournals() |
static javax.swing.JComponent |
getNameSwitcher(EntryEditor entryEditor,
FieldEditor editor,
javax.swing.undo.UndoManager undoManager)
Create a control panel for the entry editor's journal field, to toggle
abbreviated/full journal name
|
javax.swing.table.TableModel |
getTableModel() |
boolean |
isAbbreviatedName(java.lang.String journalName) |
boolean |
isKnownName(java.lang.String journalName) |
void |
readJournalList(java.io.File file) |
void |
readJournalList(java.io.Reader in)
Read the given file, which should contain a list of journal names and their
abbreviations.
|
void |
readJournalList(java.lang.String resourceFileName) |
boolean |
unabbreviate(BibtexDatabase database,
BibtexEntry entry,
java.lang.String fieldName,
javax.swing.undo.CompoundEdit ce)
Unabbreviate the journal name of the given entry.
|
public JournalAbbreviations()
public JournalAbbreviations(java.lang.String resource)
public JournalAbbreviations(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.util.Iterator<java.lang.String> fullNameIterator()
public boolean isKnownName(java.lang.String journalName)
public boolean isAbbreviatedName(java.lang.String journalName)
public java.lang.String dotsToNodots(java.lang.String name)
public java.lang.String getAbbreviatedName(java.lang.String journalName, boolean withDots)
journalName
- The journal name to abbreviate.withDots
- True if the abbreviation should have dots.
if only the first character should be.public java.lang.String getFullName(java.lang.String journalName)
journalName
- The abbreviation to resolve.public void readJournalList(java.lang.String resourceFileName)
public void readJournalList(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void readJournalList(java.io.Reader in) throws java.io.FileNotFoundException
in
- java.io.FileNotFoundException
public boolean abbreviate(BibtexDatabase database, BibtexEntry entry, java.lang.String fieldName, javax.swing.undo.CompoundEdit ce, boolean withDots)
database
- The database the entry belongs to, or null if no database.entry
- The entry to be treated.fieldName
- The field name (e.g. "journal")ce
- If the entry is changed, add an edit to this compound.withDots
- True if the abbreviations should have dots.public boolean unabbreviate(BibtexDatabase database, BibtexEntry entry, java.lang.String fieldName, javax.swing.undo.CompoundEdit ce)
entry
- The entry to be treated.fieldName
- The field name (e.g. "journal")ce
- If the entry is changed, add an edit to this compound.public java.util.Map<java.lang.String,java.lang.String> getJournals()
public static javax.swing.JComponent getNameSwitcher(EntryEditor entryEditor, FieldEditor editor, javax.swing.undo.UndoManager undoManager)
editor
- The FieldEditor for the journal field.public javax.swing.table.TableModel getTableModel()