Modifier and Type | Field and Description |
---|---|
private Map | |
private final ObservableList | entries
State attributes |
private final Map | |
private String | |
private final EventBus | |
private static final Logger | |
private String | |
private String | |
private static final Pattern | |
private String |
Access | Constructor and Description |
---|---|
public | |
public | |
public |
Modifier and Type | Method and Description |
---|---|
public synchronized void | |
public void | |
public boolean | containsEntryWithId(String id)
Returns whether an entry with the given ID exists (-> entry_type + hashcode). |
public void | |
public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
public String | Returns: The generated sharedDatabaseIDGenerates and sets a random ID which is globally unique. |
public Set | Returns: set of fieldnames, that are visibleReturns a set of Strings, that contains all field names that are visible. |
public ObservableList | |
public synchronized List | Returns: list of entries that contains the given keyCollects entries having the specified citation key and returns these entries as list. |
public List | getEntriesSorted(Comparator<BibEntry> comparator)
Returns the list of entries sorted by the given comparator. |
public synchronized Optional | |
public BibEntry | |
public int | |
public String | |
public String | |
public long | getNumberOfCitationKeyOccurrences(String key)
Returns the number of occurrences of the given citation key in this database. |
public synchronized Optional | |
public Optional | |
public Optional | |
public BibtexString | |
public Optional | |
public int | |
public Set | |
public Collection | |
public List | |
public boolean | |
public int | |
public boolean | |
public synchronized boolean | |
public int | |
public synchronized void | |
public synchronized void | |
public synchronized void | |
public synchronized void | |
public synchronized void | insertEntry(BibEntry
entry to insert entry, EntriesEventSource source the event is sent from eventSource)Inserts the entry. |
public boolean | isDuplicateCitationKeyExisting(String key)
Checks if there is more than one occurrence of the citation key. |
public boolean | |
public void | |
public void | registerListener(Object
listener (subscriber) to add listener)Registers a listener object (subscriber) to the internal event bus. |
private void | |
public synchronized void | |
public synchronized void | removeEntries(List<BibEntry>
Entry to delete toBeDeleted, EntriesEventSource Source the event is sent from eventSource)Removes the given entries. |
public synchronized void | |
public synchronized void | |
public void | |
private String | |
public String | resolveForStrings(String content)
Resolves any references to strings contained in this field content, if possible. |
public List | Returns: a list of bibtexentries, with all strings resolved. It is dependent on the value of inPlace whether copies are made or the given BibtexEntries are modified.A collection of BibtexEntries in which all strings of the form
#xxx# will be resolved against the hash map of string
references stored in the database. entriesToResolve, boolean If inPlace is true then the given BibtexEntries will be modified, if false then copies of the BibtexEntries are made before resolving the strings. inPlace)Take the given collection of BibEntry and resolve any string references. |
public BibEntry | Returns: a BibEntry with all string references resolved. It is dependent on the value of inPlace whether a copy is made or the given BibtexEntries is modified.A BibEntry in which all strings of the form #xxx# will be
resolved against the hash map of string references stored in
the database. entry, boolean If inPlace is true then the given BibEntry will be
modified, if false then a copy is made using close made before
resolving the strings. inPlace)Take the given BibEntry and resolve any string references. |
private String | |
public void | |
public void | |
public synchronized void | |
public void | |
public void | setStrings(List<BibtexString>
The collection of strings to set stringsToAdd)Replaces the existing lists of BibTexString with the given one Duplicates throw KeyCollisionException |
public void |
bibtexStrings | back to summary |
---|---|
private Map<String, BibtexString> bibtexStrings |
entries | back to summary |
---|---|
private final ObservableList<BibEntry> entries State attributes |
entriesId | back to summary |
---|---|
private final Map<String, BibEntry> entriesId |
epilog | back to summary |
---|---|
private String epilog |
eventBus | back to summary |
---|---|
private final EventBus eventBus |
LOGGER | back to summary |
---|---|
private static final Logger LOGGER |
newLineSeparator | back to summary |
---|---|
private String newLineSeparator |
preamble | back to summary |
---|---|
private String preamble |
RESOLVE_CONTENT_PATTERN | back to summary |
---|---|
private static final Pattern RESOLVE_CONTENT_PATTERN |
sharedDatabaseID | back to summary |
---|---|
private String sharedDatabaseID |
BibDatabase | back to summary |
---|---|
public BibDatabase(List<BibEntry> entries, String newLineSeparator) |
BibDatabase | back to summary |
---|---|
public BibDatabase(List<BibEntry> entries) |
BibDatabase | back to summary |
---|---|
public BibDatabase() |
addString | back to summary |
---|---|
public synchronized void addString(BibtexString string) throws KeyCollisionException Inserts a Bibtex String. |
clearSharedDatabaseID | back to summary |
---|---|
public void clearSharedDatabaseID() |
containsEntryWithId | back to summary |
---|---|
public boolean containsEntryWithId(String id) Returns whether an entry with the given ID exists (-> entry_type + hashcode). |
copyPreamble | back to summary |
---|---|
public void copyPreamble(BibDatabase database) Copies the preamble of another BibDatabase.
|
equals | back to summary |
---|---|
public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. |
generateSharedDatabaseID | back to summary |
---|---|
public String generateSharedDatabaseID() Generates and sets a random ID which is globally unique.
|
getAllVisibleFields | back to summary |
---|---|
public Set Returns a set of Strings, that contains all field names that are visible. This means that the fields are not internal fields. Internal fields are fields, that are starting with "_". |
getEntries | back to summary |
---|---|
public ObservableList |
getEntriesByCitationKey | back to summary |
---|---|
public synchronized List Collects entries having the specified citation key and returns these entries as list. The order of the entries is the order they appear in the database. |
getEntriesSorted | back to summary |
---|---|
public List Returns the list of entries sorted by the given comparator. |
getEntryByCitationKey | back to summary |
---|---|
public synchronized Optional Returns the entry with the given citation key. |
getEntryById | back to summary |
---|---|
public BibEntry getEntryById(String id) |
getEntryCount | back to summary |
---|---|
public int getEntryCount() Returns the number of entries. |
getEpilog | back to summary |
---|---|
public String getEpilog() |
getNewLineSeparator | back to summary |
---|---|
public String getNewLineSeparator() Returns the string used to indicate a linebreak |
getNumberOfCitationKeyOccurrences | back to summary |
---|---|
public long getNumberOfCitationKeyOccurrences(String key) Returns the number of occurrences of the given citation key in this database. |
getPreamble | back to summary |
---|---|
public synchronized Optional Returns the database's preamble. If the preamble text consists only of whitespace, then also an empty optional is returned. |
getReferencedEntry | back to summary |
---|---|
public Optional |
getSharedDatabaseID | back to summary |
---|---|
public Optional |
getString | back to summary |
---|---|
public BibtexString getString(String id) Returns the string with the given id. |
getStringByName | back to summary |
---|---|
public Optional Returns the string with the given name/label |
getStringCount | back to summary |
---|---|
public int getStringCount() Returns the number of strings. |
getStringKeySet | back to summary |
---|---|
public Set Returns a Set of keys to all BibtexString objects in the database. These are in no sorted order. |
getStringValues | back to summary |
---|---|
public Collection Returns a Collection of all BibtexString objects in the database. These are in no particular order. |
getUsedStrings | back to summary |
---|---|
public List Get all strings used in the entries. |
hasEntries | back to summary |
---|---|
public boolean hasEntries() Checks if the database contains entries. |
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
hasNoStrings | back to summary |
---|---|
public boolean hasNoStrings() Check if there are strings. |
hasStringByName | back to summary |
---|---|
public synchronized boolean hasStringByName(String label) Returns true if a string with the given label already exists. |
indexOf | back to summary |
---|---|
public int indexOf(BibEntry bibEntry)
Implementation Note New entries are always added to the end of the list and always get a higher ID.
See Implementation Note IDs are zero-padded strings, so there is no need to convert them to integers for comparison.
|
insertEntries | back to summary |
---|---|
public synchronized void insertEntries(BibEntry... entries) |
insertEntries | back to summary |
---|---|
public synchronized void insertEntries(List<BibEntry> entries) |
insertEntries | back to summary |
---|---|
public synchronized void insertEntries(List<BibEntry> newEntries, EntriesEventSource eventSource) |
insertEntry | back to summary |
---|---|
public synchronized void insertEntry(BibEntry entry) |
insertEntry | back to summary |
---|---|
public synchronized void insertEntry(BibEntry entry, EntriesEventSource eventSource) Inserts the entry.
|
isDuplicateCitationKeyExisting | back to summary |
---|---|
public boolean isDuplicateCitationKeyExisting(String key) Checks if there is more than one occurrence of the citation key. |
isShared | back to summary |
---|---|
public boolean isShared() |
postEvent | back to summary |
---|---|
public void postEvent(Object event) |
registerListener | back to summary |
---|---|
public void registerListener(Object listener) Registers a listener object (subscriber) to the internal event bus. The following events are posted:
-
|
relayEntryChangeEvent | back to summary |
---|---|
private void relayEntryChangeEvent(FieldChangedEvent event)
|
removeEntries | back to summary |
---|---|
public synchronized void removeEntries(List<BibEntry> toBeDeleted) Removes the given entries.
The entries removed based on the id |
removeEntries | back to summary |
---|---|
public synchronized void removeEntries(List<BibEntry> toBeDeleted, EntriesEventSource eventSource) Removes the given entries.
The entries are removed based on the id
|
removeEntry | back to summary |
---|---|
public synchronized void removeEntry(BibEntry bibEntry) |
removeEntry | back to summary |
---|---|
public synchronized void removeEntry(BibEntry bibEntry, EntriesEventSource eventSource) |
removeString | back to summary |
---|---|
public void removeString(String id) Removes the string with the given id. |
resolveContent | back to summary |
---|---|
private String resolveContent(String result, Set<String> usedIds, Set<String> allUsedIds) |
resolveForStrings | back to summary |
---|---|
public String resolveForStrings(String content) Resolves any references to strings contained in this field content, if possible. |
resolveForStrings | back to summary |
---|---|
public List Take the given collection of BibEntry and resolve any string references.
|
resolveForStrings | back to summary |
---|---|
public BibEntry resolveForStrings(BibEntry entry, boolean inPlace) Take the given BibEntry and resolve any string references.
|
resolveString | back to summary |
---|---|
private String resolveString(String label, Set<String> usedIds, Set<String> allUsedIds) If the label represents a string contained in this database, returns that string's content. Resolves references to other strings, taking care not to follow a circular reference pattern. If the string is undefined, returns null. |
setEpilog | back to summary |
---|---|
public void setEpilog(String epilog) |
setNewLineSeparator | back to summary |
---|---|
public void setNewLineSeparator(String newLineSeparator) Set the newline separator. |
setPreamble | back to summary |
---|---|
public synchronized void setPreamble(String preamble) Sets the database's preamble. |
setSharedDatabaseID | back to summary |
---|---|
public void setSharedDatabaseID(String sharedDatabaseID) |
setStrings | back to summary |
---|---|
public void setStrings(List<BibtexString> stringsToAdd) Replaces the existing lists of BibTexString with the given one Duplicates throw KeyCollisionException
|
unregisterListener | back to summary |
---|---|
public void unregisterListener(Object listener) Unregisters an listener object.
|