Verified Owner
Top Inners
org.jabref.logic

public sealed Interface UiCommand

permits BlankWorkspace, SelectEntryKeys, OpenLibraries, AppendFilesToLibrary, AppendStreamToCurrentLibrary, AppendBibTeXToLibrary, Focus, AppendFileOrUrlToCurrentLibrary
Known Direct Implementers
org.jabref.logic.UiCommand.BlankWorkspace, org.jabref.logic.UiCommand.SelectEntryKeys, org.jabref.logic.UiCommand.OpenLibraries, org.jabref.logic.UiCommand.AppendFilesToLibrary, org.jabref.logic.UiCommand.AppendStreamToCurrentLibrary, org.jabref.logic.UiCommand.AppendBibTeXToLibrary, org.jabref.logic.UiCommand.Focus, org.jabref.logic.UiCommand.AppendFileOrUrlToCurrentLibrary
Annotations
@NullMarked
Imports
java.io.Reader, java.nio.file.Path, java.util.List, .Optional, org.jspecify.annotations.NullMarked, .Nullable

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static record
public static record
UiCommand.AppendFileOrUrlToCurrentLibrary

Deprecated used by the 2025 browser extension only
public static record
UiCommand.AppendFilesToLibrary

Supports both BibTeX and non-BibTeX.

public static record
UiCommand.AppendStreamToCurrentLibrary

Supports both BibTeX and non-BibTeX

public static record
public static record
public static record
public static record
org.jabref.logic back to summary

public final Record UiCommand.AppendBibTeXToLibrary

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
library:Optional<Path>
the target library; an empty Optional means the currently active library.
bibtex:String 
targetGroup:Optional<String>
name of a group the imported entries are additionally assigned to. If the group does not exist, it is created as a top-level group. An empty Optional means no group assignment.

"Twin" to AppendFilesToLibrary. Accepts BibTeX as text instead stored in a file.

Field Summary

Modifier and TypeField and Description
private final String
bibtex

Record Component accessed by bibtex().

private final Optional<Path>
library

Record Component accessed by library().

the target library; an empty Optional means the currently active library.
private final Optional<String>
targetGroup

Record Component accessed by targetGroup().

name of a group the imported entries are additionally assigned to.

Constructor Summary

AccessConstructor and Description
public
public
public
AppendBibTeXToLibrary(Path library, String bibtex, @Nullable String targetGroup)

public
AppendBibTeXToLibrary(Optional<Path> library, String bibtex, Optional<String> targetGroup)

Method Summary

Modifier and TypeMethod and Description
public String
bibtex()

Record Component getter of bibtex.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Optional<Path>
library()

Record Component getter of library.

Record Component the target library; an empty Optional means the currently active library.

public Optional<String>
targetGroup()

Record Component getter of targetGroup.

Record Component name of a group the imported entries are additionally assigned to.

private static Optional<String>
toGroup(@Nullable String targetGroup)

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

bibtexback to summary
private final String bibtex

Record Component accessed by bibtex().

libraryback to summary
private final Optional<Path> library

Record Component accessed by library().

the target library; an empty Optional means the currently active library.

targetGroupback to summary
private final Optional<String> targetGroup

Record Component accessed by targetGroup().

name of a group the imported entries are additionally assigned to. If the group does not exist, it is created as a top-level group. An empty Optional means no group assignment.

Constructor Detail

AppendBibTeXToLibraryback to summary
public AppendBibTeXToLibrary(String bibtex)
AppendBibTeXToLibraryback to summary
public AppendBibTeXToLibrary(String bibtex, @Nullable String targetGroup)
AppendBibTeXToLibraryback to summary
public AppendBibTeXToLibrary(Path library, String bibtex, @Nullable String targetGroup)
AppendBibTeXToLibraryback to summary
public AppendBibTeXToLibrary(Optional<Path> library, String bibtex, Optional<String> targetGroup)

Method Detail

bibtexback to summary
public String bibtex()

Record Component getter of bibtex.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

libraryback to summary
public Optional<Path> library()

Record Component getter of library.

Record Component
the target library; an empty Optional means the currently active library.
targetGroupback to summary
public Optional<String> targetGroup()

Record Component getter of targetGroup.

Record Component
name of a group the imported entries are additionally assigned to. If the group does not exist, it is created as a top-level group. An empty Optional means no group assignment.
toGroupback to summary
private static Optional<String> toGroup(@Nullable String targetGroup)
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.AppendFileOrUrlToCurrentLibrary

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Annotations
@Deprecated
Record Components
location:String 

Deprecated

used by the 2025 browser extension only

Field Summary

Modifier and TypeField and Description
private final String
location

Record Component accessed by location().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public String
location()

Record Component getter of location.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

locationback to summary
private final String location

Record Component accessed by location().

Constructor Detail

AppendFileOrUrlToCurrentLibraryback to summary
public AppendFileOrUrlToCurrentLibrary(String location)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

locationback to summary
public String location()

Record Component getter of location.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.AppendFilesToLibrary

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
library:Optional<Path>
the target library; an empty Optional means the currently active library.
toAppend:List<Path> 

Supports both BibTeX and non-BibTeX.

Field Summary

Modifier and TypeField and Description
private final Optional<Path>
library

Record Component accessed by library().

the target library; an empty Optional means the currently active library.
private final List<Path>
toAppend

Record Component accessed by toAppend().

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Optional<Path>
library()

Record Component getter of library.

Record Component the target library; an empty Optional means the currently active library.

public List<Path>
toAppend()

Record Component getter of toAppend.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

libraryback to summary
private final Optional<Path> library

Record Component accessed by library().

the target library; an empty Optional means the currently active library.

toAppendback to summary
private final List<Path> toAppend

Record Component accessed by toAppend().

Constructor Detail

AppendFilesToLibraryback to summary
public AppendFilesToLibrary(List<Path> toAppend)
AppendFilesToLibraryback to summary
public AppendFilesToLibrary(Optional<Path> library, List<Path> toAppend)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

libraryback to summary
public Optional<Path> library()

Record Component getter of library.

Record Component
the target library; an empty Optional means the currently active library.
toAppendback to summary
public List<Path> toAppend()

Record Component getter of toAppend.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.AppendStreamToCurrentLibrary

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
toAppend:Reader 

Supports both BibTeX and non-BibTeX

Field Summary

Modifier and TypeField and Description
private final Reader
toAppend

Record Component accessed by toAppend().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Reader
toAppend()

Record Component getter of toAppend.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

toAppendback to summary
private final Reader toAppend

Record Component accessed by toAppend().

Constructor Detail

AppendStreamToCurrentLibraryback to summary
public AppendStreamToCurrentLibrary(Reader toAppend)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toAppendback to summary
public Reader toAppend()

Record Component getter of toAppend.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.BlankWorkspace

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
no record components

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Constructor Detail

BlankWorkspaceback to summary
public BlankWorkspace()

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.Focus

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
no record components

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Constructor Detail

Focusback to summary
public Focus()

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.OpenLibraries

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
toImport:List<Path> 

Field Summary

Modifier and TypeField and Description
private final List<Path>
toImport

Record Component accessed by toImport().

Constructor Summary

AccessConstructor and Description
public
OpenLibraries(List<Path> toImport)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public List<Path>
toImport()

Record Component getter of toImport.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

toImportback to summary
private final List<Path> toImport

Record Component accessed by toImport().

Constructor Detail

OpenLibrariesback to summary
public OpenLibraries(List<Path> toImport)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toImportback to summary
public List<Path> toImport()

Record Component getter of toImport.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

org.jabref.logic back to summary

public final Record UiCommand.SelectEntryKeys

extends Record
implements UiCommand
Class Inheritance
All Implemented Interfaces
org.jabref.logic.UiCommand
Record Components
citationKey:List<String> 

Field Summary

Modifier and TypeField and Description
private final List<String>
citationKey

Record Component accessed by citationKey().

Constructor Summary

AccessConstructor and Description
public
SelectEntryKeys(List<String> citationKey)

Method Summary

Modifier and TypeMethod and Description
public List<String>
citationKey()

Record Component getter of citationKey.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

citationKeyback to summary
private final List<String> citationKey

Record Component accessed by citationKey().

Constructor Detail

SelectEntryKeysback to summary
public SelectEntryKeys(List<String> citationKey)

Method Detail

citationKeyback to summary
public List<String> citationKey()

Record Component getter of citationKey.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.