Verified Owner
Top Inners Constructors Methods
org.jabref.logic.openoffice.action

public Class ExportCited

extends Object
Class Inheritance
Imports
java.util.ArrayList, .HashSet, .LinkedHashSet, .List, .Optional, .SequencedSet, .Set, java.util.function.BiFunction, org.jabref.logic.JabRefException, org.jabref.logic.openoffice.frontend.OOFrontend, org.jabref.model.database.BibDatabase, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.openoffice.style.CitedReference, org.jabref.model.openoffice.uno.NoDocumentException, org.jabref.model.openoffice.util.OOResult, com.sun.star.lang.WrappedTargetException, com.sun.star.text.XTextDocument

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static record

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static OOResult<ExportCited.GenerateDatabaseResult, JabRefException>
generateDatabase(com.sun.star.text.XTextDocument doc, List<BibDatabase>
The databases to look up the citation keys in the document from.
databases
)

Returns: A new database, with cloned entries.

private static ExportCited.GenerateDatabaseResult
public static ExportCited.GenerateDatabaseResult
public static ExportCited.GenerateDatabaseResult
private static Optional<ExportCited.LookupResult>
lookupByCitationKey(String citationKey, List<BibDatabase> databases)

private static Optional<ExportCited.LookupResult>
lookupByIdentifier(String identifier, List<BibDatabase> databases)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ExportCitedback to summary
private ExportCited()

Method Detail

generateDatabaseback to summary
public static OOResult<ExportCited.GenerateDatabaseResult, JabRefException> generateDatabase(com.sun.star.text.XTextDocument doc, List<BibDatabase> databases)
Parameters
databases:List<BibDatabase>

The databases to look up the citation keys in the document from.

Returns:OOResult<ExportCited.GenerateDatabaseResult, JabRefException>

A new database, with cloned entries. If a key is not found, it is added to result.unresolvedKeys

Cross references (in StandardField.CROSSREF) are followed (not recursively): If the referenced entry is found, it is included in the result. If it is not found, it is silently ignored.

generateDatabaseback to summary
private static ExportCited.GenerateDatabaseResult generateDatabase(List<String> identifiers, List<BibDatabase> databases, BiFunction<String, List<BibDatabase>, Optional<ExportCited.LookupResult>> lookupFunction)
generateDatabaseFromCitationKeysback to summary
public static ExportCited.GenerateDatabaseResult generateDatabaseFromCitationKeys(List<String> citationKeys, List<BibDatabase> databases)
generateDatabaseFromIdentifiersback to summary
public static ExportCited.GenerateDatabaseResult generateDatabaseFromIdentifiers(List<String> identifiers, List<BibDatabase> databases)
lookupByCitationKeyback to summary
private static Optional<ExportCited.LookupResult> lookupByCitationKey(String citationKey, List<BibDatabase> databases)
lookupByIdentifierback to summary
private static Optional<ExportCited.LookupResult> lookupByIdentifier(String identifier, List<BibDatabase> databases)
org.jabref.logic.openoffice.action back to summary

public Class ExportCited.GenerateDatabaseResult

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.logic.openoffice.action.ExportCited.GenerateDatabaseResult

Field Summary

Modifier and TypeField and Description
public final BibDatabase
public final List<String>
unresolvedKeys

null: not done; isEmpty: no unresolved

Constructor Summary

AccessConstructor and Description
pack-priv
GenerateDatabaseResult(List<String> unresolvedKeys, BibDatabase newDatabase)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

newDatabaseback to summary
public final BibDatabase newDatabase
unresolvedKeysback to summary
public final List<String> unresolvedKeys

null: not done; isEmpty: no unresolved

Constructor Detail

GenerateDatabaseResultback to summary
pack-priv GenerateDatabaseResult(List<String> unresolvedKeys, BibDatabase newDatabase)
org.jabref.logic.openoffice.action back to summary

private final Record ExportCited.LookupResult

extends Record
Class Inheritance
Record Components
entry:BibEntry 
database:BibDatabase 

Field Summary

Modifier and TypeField and Description
private final BibDatabase
database

Record Component accessed by database().

private final BibEntry
entry

Record Component accessed by entry().

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public BibDatabase
database()

Record Component getter of database.

public BibEntry
entry()

Record Component getter of entry.

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

databaseback to summary
private final BibDatabase database

Record Component accessed by database().

entryback to summary
private final BibEntry entry

Record Component accessed by entry().

Constructor Detail

LookupResultback to summary
private LookupResult(BibEntry entry, BibDatabase database)

Method Detail

databaseback to summary
public BibDatabase database()

Record Component getter of database.

entryback to summary
public BibEntry entry()

Record Component getter of entry.

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.