The entries are stored in BibDatabase, the other data in MetaData and the options relevant for this file in Defaults.
To get an instance for a .bib file, use org..
| Modifier and Type | Field and Description |
|---|---|
| private final BibDatabase | |
| private @Nullable CoarseChangeFilter | |
| private @Nullable DatabaseSynchronizer | |
| private DatabaseLocation | |
| private static final Logger | |
| private final MetaData | |
| private @Nullable Path | path
The path where this database was last saved to. |
| private final String | uid
Generate a random UID for unique of the concrete context In contrast to hashCode this stays unique |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | BibDatabaseContext(BibDatabase database, MetaData metaData, @Nullable Path path, DatabaseLocation location)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public static BibDatabaseContext | |
| public boolean | equals(@Nullable Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public FileDirectories | Returns: fixed-size record containing absolute paths (if configured)The file directory preferences preferences)Look up all configured file directories of this database. |
| public BibDatabase | |
| public Optional | |
| public Optional | Returns: Optional of the relevant Path, or Optional.empty() if none is defined.Get the path where this database was last saved to or loaded from, if any. |
| public @Nullable DatabaseSynchronizer | |
| public List | |
| public List | Returns: List of existing absolute pathsThe fileDirectory preferences preferences)Look up the directories set up for this database. |
| private Path | |
| public Optional | Returns: the path - or an empty optional, if none of the directories existsReturns the first existing file directory from |
| public Path | |
| public Character | getKeywordSeparator(Character fallbackKeywordSeparator)
The keyword separator of this library, falling back to the given separator (typically the global preference) when the library does not declare one |
| public Optional | getLibraryId()
The id used to address this library from the outside: the REST API ( |
| public DatabaseLocation | |
| public MetaData | |
| public BibDatabaseMode | |
| public String | Returns: The generated UID in UUIDv4 format with the prefix bibdatabasecontext_Get the generated UID for the current context. |
| public int | |
| public boolean | |
| public boolean | |
| public static BibDatabaseContext | |
| public static BibDatabaseContext | |
| public static BibDatabaseContext | |
| public void | |
| public void | |
| public String |
| database | back to summary |
|---|---|
| private final BibDatabase database | |
| dbmsListener | back to summary |
|---|---|
| private @Nullable CoarseChangeFilter dbmsListener | |
| dbmsSynchronizer | back to summary |
|---|---|
| private @Nullable DatabaseSynchronizer dbmsSynchronizer | |
| location | back to summary |
|---|---|
| private DatabaseLocation location | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| metaData | back to summary |
|---|---|
| private final MetaData metaData | |
| path | back to summary |
|---|---|
| private @Nullable Path path The path where this database was last saved to. | |
| uid | back to summary |
|---|---|
| private final String uid Generate a random UID for unique of the concrete context In contrast to hashCode this stays unique | |
| BibDatabaseContext | back to summary |
|---|---|
| public BibDatabaseContext() | |
| BibDatabaseContext | back to summary |
|---|---|
| public BibDatabaseContext(BibDatabase database) | |
| BibDatabaseContext | back to summary |
|---|---|
| public BibDatabaseContext(BibDatabase database, MetaData metaData) | |
| BibDatabaseContext | back to summary |
|---|---|
| public BibDatabaseContext(BibDatabase database, MetaData metaData, @Nullable Path path) | |
| BibDatabaseContext | back to summary |
|---|---|
| public BibDatabaseContext(BibDatabase database, MetaData metaData, @Nullable Path path, DatabaseLocation location) | |
| clearDatabasePath | back to summary |
|---|---|
| public void clearDatabasePath() | |
| clearDBMSSynchronizer | back to summary |
|---|---|
| public void clearDBMSSynchronizer() | |
| convertToLocalDatabase | back to summary |
|---|---|
| public void convertToLocalDatabase() | |
| convertToSharedDatabase | back to summary |
|---|---|
| public void convertToSharedDatabase(DatabaseSynchronizer dbmsSynchronizer) | |
| empty | back to summary |
|---|---|
| public static BibDatabaseContext empty() | |
| equals | back to summary |
|---|---|
| public boolean equals(@Nullable 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.
| |
| getAllFileDirectories | back to summary |
|---|---|
| public FileDirectories getAllFileDirectories(FilePreferences preferences) Look up all configured file directories of this database. The returned record contains the following directories:
| |
| getDatabase | back to summary |
|---|---|
| public BibDatabase getDatabase() | |
| getDatabaseDirectory | back to summary |
|---|---|
| public Optional | |
| getDatabasePath | back to summary |
|---|---|
| public Optional Get the path where this database was last saved to or loaded from, if any. | |
| getDBMSSynchronizer | back to summary |
|---|---|
| public @Nullable DatabaseSynchronizer getDBMSSynchronizer() | |
| getEntries | back to summary |
|---|---|
| public List | |
| getFileDirectories | back to summary |
|---|---|
| public List Look up the directories set up for this database. There can be up to four directory definitions for these files:
The settings are prioritized in the following order, and the first defined setting is used:
| |
| getFileDirectoryPath | back to summary |
|---|---|
private Path getFileDirectoryPath(String directory)
| |
| getFirstExistingFileDir | back to summary |
|---|---|
| public Optional Returns the first existing file directory from | |
| getFulltextIndexPath | back to summary |
|---|---|
public Path getFulltextIndexPath()
| |
| getKeywordSeparator | back to summary |
|---|---|
| public Character getKeywordSeparator(Character fallbackKeywordSeparator) The keyword separator of this library, falling back to the given separator (typically the global preference) when the library does not declare one | |
| getLibraryId | back to summary |
|---|---|
| public Optional The id used to address this library from the outside: the REST API ( | |
| getLocation | back to summary |
|---|---|
| public DatabaseLocation getLocation() | |
| getMetaData | back to summary |
|---|---|
| public MetaData getMetaData() | |
| getMode | back to summary |
|---|---|
| public BibDatabaseMode getMode() | |
| getUid | back to summary |
|---|---|
| public String getUid() Get the generated UID for the current context. Can be used to distinguish contexts with changing metadata etc This is required, because of
| |
| 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
Implementation Note This implementation needs to be consistent with equals. That means, as soon as a new entry is added to the database, two different instances of BibDatabaseContext are not equal - and thus, the hashCode also needs to change. This has the drawback, that one cannot create HashMaps from the BiDatabaseContext anymore, as the hashCode changes as soon as a new entry is added.
| |
| isBiblatexMode | back to summary |
|---|---|
| public boolean isBiblatexMode() | |
| isStudy | back to summary |
|---|---|
| public boolean isStudy() Returns whether this .bib file belongs to a | |
| of | back to summary |
|---|---|
| public static BibDatabaseContext of(Reader bibContentReader, ImportFormatPreferences importFormatPreferences) throws JabRefException | |
| of | back to summary |
|---|---|
| public static BibDatabaseContext of(String bibContent, ImportFormatPreferences importFormatPreferences) throws JabRefException | |
| of | back to summary |
|---|---|
| public static BibDatabaseContext of(InputStream bibContentStream, ImportFormatPreferences importFormatPreferences) throws JabRefException | |
| setDatabasePath | back to summary |
|---|---|
| public void setDatabasePath(@Nullable Path file) | |
| setMode | back to summary |
|---|---|
| public void setMode(BibDatabaseMode bibDatabaseMode) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |