| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final Map | |
| private final ObservableList | entries
State attributes |
| private static final Comparator | |
| private final Map | |
| private String | |
| private final EventBus | |
| private static final Logger | |
| private String | |
| private @Nullable String | |
| private static final Pattern | |
| private @Nullable String | |
| private Map |
| 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 o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| private void | |
| 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 Set | |
| public synchronized List | |
| public List | getEntriesSorted(Comparator<BibEntry> comparator)
Returns the list of entries sorted by the given comparator. |
| public synchronized Optional | |
| public Optional | |
| 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 @NonNull Optional | |
| private Set | |
| public Optional | |
| public Optional | |
| public Optional | |
| public Optional | |
| public int | |
| public Set | |
| public Collection | |
| public List | |
| public boolean | |
| public int | |
| public boolean | |
| public synchronized boolean | |
| private void | |
| 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. |
| private void | |
| public boolean | isDuplicateCitationKeyExisting(String key)
Checks if there is more than one occurrence of the citation key. |
| public boolean | |
| private boolean | |
| private List | |
| 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(@NonNull List<BibEntry>
Entry to delete toBeDeleted, EntriesEventSource Source the event is sent from eventSource)Removes the given entries. |
| public synchronized void | |
| public synchronized void | |
| private void | |
| public void | |
| private String | |
| public String | resolveForStrings(@NonNull 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 entriesToResolve, boolean #xxx# will be resolved against the hash map of string references stored in the database.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 @NonNull Optional | |
| 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 |
| private List | |
| public void | |
| private void |
| BATCH_REPLACEMENT_THRESHOLD | back to summary |
|---|---|
| private static final int BATCH_REPLACEMENT_THRESHOLD | |
| citationIndex | back to summary |
|---|---|
| private final Map<String, Set<BibEntry>> citationIndex | |
| entries | back to summary |
|---|---|
| private final ObservableList<BibEntry> entries State attributes | |
| ENTRY_ID_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<BibEntry> ENTRY_ID_COMPARATOR | |
| entryIdToBibEntry | back to summary |
|---|---|
| private final Map<String, BibEntry> entryIdToBibEntry | |
| 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 @Nullable String preamble | |
| RESOLVE_CONTENT_PATTERN | back to summary |
|---|---|
| private static final Pattern RESOLVE_CONTENT_PATTERN | |
| sharedDatabaseID | back to summary |
|---|---|
| private @Nullable String sharedDatabaseID | |
| stringToBibtexString | back to summary |
|---|---|
| private Map<String, BibtexString> stringToBibtexString | |
| 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.
| |
| forEachCitationKey | back to summary |
|---|---|
| private void forEachCitationKey(BibEntry entry, Consumer<String> keyConsumer) | |
| 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. | |
| getEntriesForCitationKey | back to summary |
|---|---|
| public Set | |
| getEntriesSnapshot | back to summary |
|---|---|
| public synchronized List Returns an immutable, stable snapshot of the current entries. | |
| 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 Optional | |
| 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 @NonNull Optional Returns the database's preamble. If the preamble text consists only of whitespace, then also an empty optional is returned. | |
| getReferencedCitationKeys | back to summary |
|---|---|
| private Set | |
| getReferencedEntry | back to summary |
|---|---|
| public Optional | |
| getSharedDatabaseID | back to summary |
|---|---|
| public Optional | |
| getString | back to summary |
|---|---|
| public Optional 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. | |
| indexEntry | back to summary |
|---|---|
| private void indexEntry(BibEntry entry) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(@NonNull BibEntry bibEntry)
Implementation Note insertEntries keeps the list sorted by the ids handed out by IdGenerator, so binary search finds the index. 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(@NonNull 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.
| |
| insertSmallBatch | back to summary |
|---|---|
| private void insertSmallBatch(List<BibEntry> sortedNewEntries) | |
| 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() | |
| isSortedById | back to summary |
|---|---|
| private boolean isSortedById(List<BibEntry> entries) | |
| mergeSortedEntries | back to summary |
|---|---|
| private List | |
| 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(@NonNull 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) | |
| removeEntryFromIndex | back to summary |
|---|---|
| private void removeEntryFromIndex(BibEntry entry) | |
| 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(@NonNull 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 @NonNull Optional 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(@Nullable 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
| |
| sortEntriesById | back to summary |
|---|---|
| private List | |
| unregisterListener | back to summary |
|---|---|
| public void unregisterListener(Object listener) Unregisters an listener object.
| |
| updateCitationIndexForFieldChange | back to summary |
|---|---|
| private void updateCitationIndexForFieldChange(FieldChangedEvent event) | |