Example:
Some commment
@misc{key,
fieldName = {fieldValue},
otherFieldName = {otherFieldValue}
}
Then,
BibEntry#commentsBeforeEntryBibEntry#typeBibEntry#fields using they hashmap key InternalField#KEY_FIELDBibEntry#fields
In case you search for a builder as described in Item 2 of the book "Effective Java", you won't find one. Please use the methods withCitationKey(String) and withField(Field, String). All these methods set hasChanged() to false. In case changed, use withChanged(boolean).
| Modifier and Type | Field and Description |
|---|---|
| private boolean | changed
Marks whether the complete serialization, which was read from file, should be used. |
| private String | commentsBeforeEntry
The part before the start of the entry |
| public static final EntryType | |
| private final EventBus | |
| private ObservableMap | |
| private final MultiKeyMap | fieldsAsKeywords
Cache that stores the field as keyword lists (format <Field, Separator, Keyword list>) |
| private final Map | fieldsAsWords
Map to store the words in every field |
| private String | |
| private final Map | latexFreeFields
Cache that stores latex free versions of fields. |
| private static final Logger | |
| private String | parsedSerialization
Stores the text "rendering" of the entry as read by the BibTeX reader. |
| private final SharedBibEntryData | |
| private final ObjectProperty |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | |
| public Optional | |
| public void | addKeyword(String
Keyword to add keyword, Character delimiter)Check if a keyword already exists (case insensitive), if not: add it |
| public void | |
| public void | addKeywords(Collection<String>
Keywords to add keywords, Character delimiter)Add multiple keywords to entry |
| public boolean | Returns: true if all fields are set or could be resolved, false otherwise.An array of field names to be checked. fields, BibDatabase The database in which to look up crossref'd entries, if any. This argument can be null, meaning
that no attempt will be made to follow crossrefs. database)Determines whether this entry has all the given fields present. |
| public Optional | |
| public Optional | clearField(Field
The field to clear. field)Remove the mapping for the field name, and notify listeners about the change. |
| public Optional | clearField(Field
the field to clear. field, EntriesEventSource the source a new eventSource)FieldChangedEvent should be posten from.Remove the mapping for the field name, and notify listeners about
the change including the |
| public Object | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| private Optional | Returns: determined field valuethe field field, BiFunction<BibEntry, Field, Optional<String>> the method to get the value of a given field in a given entry getFieldValue)Internal method used to get the content of a field (or its alias)
Used by |
| private Optional | genericGetResolvedFieldOrAlias(Field field, BibDatabase database, BiFunction<BibEntry, Field, Optional<String>> getFieldOrAlias)
|
| public String | Returns: A short textual description of the entry in the format: Author1, Author2: Title (Year)The maximum number of characters (additional
characters are replaced with "..."). Set to 0 to disable truncation. maxCharacters)
|
| public Optional | |
| public com.tobiasdiez.easybind.optional.OptionalBinding | |
| public Optional | |
| public List | |
| public Optional | |
| public KeywordList | |
| public Set | |
| public com.tobiasdiez.easybind.optional.OptionalBinding | |
| public Optional | |
| public Map | |
| public Optional | getFieldOrAlias(Field field)
Returns the contents of the given field or its alias as an Optional The following aliases are considered (old bibtex <-> new biblatex) based on the biblatex documentation, chapter 2.2.5: address <-> location annote <-> annotation archiveprefix <-> eprinttype journal <-> journaltitle key <-> sortkey pdf <-> file primaryclass <-> eprintclass school <-> institution These work bidirectional. |
| public Optional | Returns: the stored latex-free content of the field (or its alias)the name of the field name)Return the LaTeX-free contents of the given field or its alias an Optional
For details see also |
| public SequencedSet | getFields()
Returns an unmodifiable sequence containing the names of all fields that are set for this particular entry. |
| public SequencedSet | |
| public ObservableMap | |
| public Collection | |
| public List | Returns: the list of linked files, is never null but can be empty. Changes to the underlying list will have no effect on the entry itself. UseaddFile(LinkedFile).Gets a list of linked files. |
| public String | |
| public Optional | |
| public KeywordList | |
| public Optional | |
| public Observable[] | |
| public String | |
| public Optional | Returns: will return the publication date of the entry or null if no year was found.Will return the publication date of the given bibtex entry conforming to ISO 8601, i.e. either YYYY or YYYY-MM. |
| public Optional | |
| public Optional | Returns: The resolved field value or null if not found.The field to return the value of. field, BibDatabase maybenull
The database of the bibtex entry. database)Returns the text stored in the given field of the given bibtex entry which belongs to the given database. |
| public Optional | |
| public KeywordList | |
| public SharedBibEntryData | |
| private Optional | Returns: the mapped field or null if there is no valid mapping availablefield name of the BibEntry targetField, EntryType type of the BibEntry targetEntry, EntryType type of the cross-referenced BibEntry sourceEntry)Map an (empty) field of a BibEntry to a field of a cross-referenced entry. |
| public Optional | Returns: an Optional containing the title of a BibTeX entry in case it exists, otherwise return an empty Optional.Returns the title of the given BibTeX entry as an Optional. |
| public EntryType | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public int | hashCode()
Overrides java. On purpose, this hashes the "content" of the BibEntry, not the |
| private void | |
| public boolean | |
| public void | |
| public void | |
| public Optional | |
| public Optional | |
| public void | |
| public Optional | |
| public void | replaceDownloadedFile(String
the link to the file, which was downloaded linkToDownloadedFile, LinkedFile the path to be added to the entry downloadedFile)Helper method to add a downloaded file to the entry. |
| public Optional | |
| public void | |
| public Optional | setCitationKey(String
The cite key to set. Must not be null; use newKey)clearCiteKey() to remove the cite key.Sets the citation key. |
| public void | |
| public void | |
| public Optional | |
| public void | |
| public Optional | setField(Field
The field to set field, String The value to set value, EntriesEventSource Source the event is sent from eventSource)Set a field, and notify listeners about the change. |
| public Optional | |
| public Optional | |
| public void | |
| public Optional | |
| public void | |
| public Optional | |
| public Optional | setType(EntryType newType, EntriesEventSource eventSource)
Sets this entry's type and sets the changed flag to true If the new entry type equals the old entry type no changed flag is set. |
| public String | |
| public ObjectProperty | |
| public void | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry | |
| public BibEntry |
| changed | back to summary |
|---|---|
| private boolean changed Marks whether the complete serialization, which was read from file, should be used.
Is set to | |
| commentsBeforeEntry | back to summary |
|---|---|
| private String commentsBeforeEntry The part before the start of the entry | |
| DEFAULT_TYPE | back to summary |
|---|---|
| public static final EntryType DEFAULT_TYPE | |
| eventBus | back to summary |
|---|---|
| private final EventBus eventBus | |
| fields | back to summary |
|---|---|
| private ObservableMap<Field, String> fields | |
| fieldsAsKeywords | back to summary |
|---|---|
| private final MultiKeyMap<StandardField, Character, KeywordList> fieldsAsKeywords Cache that stores the field as keyword lists (format <Field, Separator, Keyword list>) | |
| fieldsAsWords | back to summary |
|---|---|
| private final Map<Field, Set<String>> fieldsAsWords Map to store the words in every field | |
| id | back to summary |
|---|---|
| private String id | |
| latexFreeFields | back to summary |
|---|---|
| private final Map<Field, String> latexFreeFields Cache that stores latex free versions of fields. | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| parsedSerialization | back to summary |
|---|---|
| private String parsedSerialization Stores the text "rendering" of the entry as read by the BibTeX reader. Includes comments. | |
| sharedBibEntryData | back to summary |
|---|---|
| private final SharedBibEntryData sharedBibEntryData | |
| type | back to summary |
|---|---|
| private final ObjectProperty<EntryType> type | |
| BibEntry | back to summary |
|---|---|
| public BibEntry() Constructs a new BibEntry. The internal ID is set to IdGenerator.next() | |
| BibEntry | back to summary |
|---|---|
| public BibEntry(String citationKey) | |
| BibEntry | back to summary |
|---|---|
| public BibEntry(EntryType type) Constructs a new BibEntry. The internal ID is set to IdGenerator.next() | |
| BibEntry | back to summary |
|---|---|
| public BibEntry(EntryType type, String citationKey) | |
| addFile | back to summary |
|---|---|
| public Optional | |
| addFile | back to summary |
|---|---|
| public Optional | |
| addKeyword | back to summary |
|---|---|
| public void addKeyword(String keyword, Character delimiter) Check if a keyword already exists (case insensitive), if not: add it
| |
| addKeyword | back to summary |
|---|---|
| public void addKeyword(Keyword keyword, Character delimiter) | |
| addKeywords | back to summary |
|---|---|
| public void addKeywords(Collection<String> keywords, Character delimiter) Add multiple keywords to entry
| |
| allFieldsPresent | back to summary |
|---|---|
| public boolean allFieldsPresent(Collection<OrFields> fields, BibDatabase database) Determines whether this entry has all the given fields present. If a non-null database argument is given, this method will try to look up missing fields in entries linked by the "crossref" field, if any.
| |
| clearCiteKey | back to summary |
|---|---|
| public Optional | |
| clearField | back to summary |
|---|---|
| public Optional Remove the mapping for the field name, and notify listeners about the change.
| |
| clearField | back to summary |
|---|---|
| public Optional Remove the mapping for the field name, and notify listeners about
the change including the
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a clone of this entry. Useful for copying. This will set a new ID for the cloned entry to be able to distinguish both copies. Does not port the listeners.
| |
| 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. | |
| genericGetFieldOrAlias | back to summary |
|---|---|
| private Optional Internal method used to get the content of a field (or its alias)
Used by | |
| genericGetResolvedFieldOrAlias | back to summary |
|---|---|
| private Optional | |
| getAuthorTitleYear | back to summary |
|---|---|
public String getAuthorTitleYear(int maxCharacters)
| |
| getCitationKey | back to summary |
|---|---|
| public Optional If not present, | |
| getCiteKeyBinding | back to summary |
|---|---|
| public com.tobiasdiez.easybind.optional.OptionalBinding | |
| getDOI | back to summary |
|---|---|
| public Optional | |
| getEntryLinkList | back to summary |
|---|---|
| public List | |
| getField | back to summary |
|---|---|
| public Optional Returns the contents of the given field as an Optional. | |
| getFieldAsKeywords | back to summary |
|---|---|
| public KeywordList getFieldAsKeywords(Field field, Character keywordSeparator) | |
| getFieldAsWords | back to summary |
|---|---|
| public Set | |
| getFieldBinding | back to summary |
|---|---|
| public com.tobiasdiez.easybind.optional.OptionalBinding | |
| getFieldLatexFree | back to summary |
|---|---|
| public Optional | |
| getFieldMap | back to summary |
|---|---|
| public Map | |
| getFieldOrAlias | back to summary |
|---|---|
| public Optional Returns the contents of the given field or its alias as an Optional
The following aliases are considered (old bibtex <-> new biblatex) based
on the biblatex documentation, chapter 2.2.5: Special attention is paid to dates: (see the biblatex documentation, chapter 2.3.8) The fields 'year' and 'month' are used if the 'date' field is empty. Conversely, getFieldOrAlias("year") also tries to extract the year from the 'date' field (analogously for 'month'). | |
| getFieldOrAliasLatexFree | back to summary |
|---|---|
| public Optional Return the LaTeX-free contents of the given field or its alias an Optional
For details see also | |
| getFields | back to summary |
|---|---|
| public SequencedSet Returns an unmodifiable sequence containing the names of all fields that are set for this particular entry. | |
| getFields | back to summary |
|---|---|
| public SequencedSet Returns an unmodifiable sequence containing the names of all fields that are a) set for this particular entry and b) matching the given predicate | |
| getFieldsObservable | back to summary |
|---|---|
| public ObservableMap | |
| getFieldValues | back to summary |
|---|---|
| public Collection | |
| getFiles | back to summary |
|---|---|
| public List Gets a list of linked files.
| |
| getId | back to summary |
|---|---|
| public String getId() Returns this entry's ID. It is used internally to distinguish different BibTeX entries.
It is not the citation key (which is stored in the | |
| getISBN | back to summary |
|---|---|
| public Optional | |
| getKeywords | back to summary |
|---|---|
| public KeywordList getKeywords(Character delimiter) | |
| getMonth | back to summary |
|---|---|
| public Optional | |
| getObservables | back to summary |
|---|---|
| public Observable[] getObservables() Returns a list of observables that represent the data of the entry. | |
| getParsedSerialization | back to summary |
|---|---|
| public String getParsedSerialization() | |
| getPublicationDate | back to summary |
|---|---|
| public Optional Will return the publication date of the given bibtex entry conforming to ISO 8601, i.e. either YYYY or YYYY-MM. | |
| getResolvedFieldOrAlias | back to summary |
|---|---|
| public Optional | |
| getResolvedFieldOrAlias | back to summary |
|---|---|
| public Optional Returns the text stored in the given field of the given bibtex entry which belongs to the given database. If a database is given, this function will try to resolve any string references in the field-value. Also, if a database is given, this function will try to find values for unset fields in the entry linked by the "crossref" field, if any.
| |
| getResolvedFieldOrAliasLatexFree | back to summary |
|---|---|
| public Optional | |
| getResolvedKeywords | back to summary |
|---|---|
| public KeywordList getResolvedKeywords(Character delimiter, BibDatabase database) | |
| getSharedBibEntryData | back to summary |
|---|---|
| public SharedBibEntryData getSharedBibEntryData() | |
| getSourceField | back to summary |
|---|---|
| private Optional Map an (empty) field of a BibEntry to a field of a cross-referenced entry. | |
| getTitle | back to summary |
|---|---|
| public Optional Returns the title of the given BibTeX entry as an Optional. | |
| getType | back to summary |
|---|---|
| public EntryType getType() Returns this entry's type. | |
| getUserComments | back to summary |
|---|---|
| public String getUserComments() | |
| hasChanged | back to summary |
|---|---|
| public boolean hasChanged() | |
| hasCitationKey | back to summary |
|---|---|
| public boolean hasCitationKey() | |
| hasField | back to summary |
|---|---|
| public boolean hasField(Field field) Returns true if the entry has the given field, or false if it is not set. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. On purpose, this hashes the "content" of the BibEntry, not the
| |
| invalidateFieldCache | back to summary |
|---|---|
| private void invalidateFieldCache(Field field) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| mergeWith | back to summary |
|---|---|
| public void mergeWith(BibEntry other) Merge this entry's fields with another BibEntry. Non-intersecting fields will be automatically merged. In cases of intersection, priority is given to THIS entry's field value.
| |
| mergeWith | back to summary |
|---|---|
| public void mergeWith(BibEntry other, Set<Field> otherPrioritizedFields) Merge this entry's fields with another BibEntry. Non-intersecting fields will be automatically merged. In cases of intersection, priority is given to THIS entry's field value, UNLESS specified otherwise in the arguments. | |
| putKeywords | back to summary |
|---|---|
| public Optional | |
| putKeywords | back to summary |
|---|---|
| public Optional | |
| registerListener | back to summary |
|---|---|
| public void registerListener(Object object) | |
| removeKeywords | back to summary |
|---|---|
| public Optional | |
| replaceDownloadedFile | back to summary |
|---|---|
| public void replaceDownloadedFile(String linkToDownloadedFile, LinkedFile downloadedFile) Helper method to add a downloaded file to the entry. Use-case: URL is contained in the file, the file is downloaded and should then replace the url. This method. adds the given path (as file) to the entry and removes the url.
| |
| replaceKeywords | back to summary |
|---|---|
| public Optional | |
| setChanged | back to summary |
|---|---|
| public void setChanged(boolean changed) | |
| setCitationKey | back to summary |
|---|---|
| public Optional Sets the citation key. Note This is not the internal Id of this entry. The internal Id is always present, whereas the citation key might not be present.
| |
| setCommentsBeforeEntry | back to summary |
|---|---|
| public void setCommentsBeforeEntry(String parsedComments) | |
| setDate | back to summary |
|---|---|
| public void setDate(Date date) | |
| setEntryLinkList | back to summary |
|---|---|
| public Optional | |
| setField | back to summary |
|---|---|
| public void setField(Map<Field, String> fields) Sets a number of fields simultaneously. The given HashMap contains field names as keys, each mapped to the value to set. | |
| setField | back to summary |
|---|---|
| public Optional Set a field, and notify listeners about the change.
| |
| setField | back to summary |
|---|---|
| public Optional Set a field, and notify listeners about the change. | |
| setFiles | back to summary |
|---|---|
| public Optional | |
| setId | back to summary |
|---|---|
| public void setId(String id) Sets this entry's identifier (ID). The entry is also updated in the shared database - provided the database containing it doesn't veto the change.
| |
| setMonth | back to summary |
|---|---|
| public Optional | |
| setParsedSerialization | back to summary |
|---|---|
| public void setParsedSerialization(String parsedSerialization) | |
| setType | back to summary |
|---|---|
| public Optional Sets this entry's type. | |
| setType | back to summary |
|---|---|
| public Optional Sets this entry's type and sets the changed flag to true | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. This returns a canonical BibTeX serialization. Special characters such as "{" or "&" are NOT escaped, but written as is. In case the JabRef "hack" for distinguishing "field = value" and "field = {value}" (in .bib files) is used, it is output as "field = {#value#}", which may cause headaches in debugging. We nevertheless do it this way to a) enable debugging the internal representation and b) save time at this method. Serializes all fields, even the JabRef internal ones. Does NOT serialize "KEY_FIELD" as field, but as key.
| |
| typeProperty | back to summary |
|---|---|
| public ObjectProperty | |
| unregisterListener | back to summary |
|---|---|
| public void unregisterListener(Object object) | |
| withChanged | back to summary |
|---|---|
| public BibEntry withChanged(boolean changed) Required to trigger new serialization of the entry.
Reason: We don't have a | |
| withCitationKey | back to summary |
|---|---|
| public BibEntry withCitationKey(String newKey) | |
| withDate | back to summary |
|---|---|
| public BibEntry withDate(Date date) | |
| withField | back to summary |
|---|---|
| public BibEntry withField(Field field, String value) | |
| withFields | back to summary |
|---|---|
| public BibEntry withFields(Map<Field, String> content) A copy is made of the parameter | |
| withFiles | back to summary |
|---|---|
| public BibEntry withFiles(List<LinkedFile> files) | |
| withMonth | back to summary |
|---|---|
| public BibEntry withMonth(Month parsedMonth) | |
| withSharedBibEntryData | back to summary |
|---|---|
| public BibEntry withSharedBibEntryData(int sharedId, int version) | |
| withSharedBibEntryData | back to summary |
|---|---|
| public BibEntry withSharedBibEntryData(SharedBibEntryData sharedBibEntryData) | |
| withUserComments | back to summary |
|---|---|
| public BibEntry withUserComments(String commentsBeforeEntry) | |