--import and --importToOpen , too.
| Modifier and Type | Class and Description |
|---|---|
| public static record |
| Modifier and Type | Field and Description |
|---|---|
| private final FileUpdateMonitor | |
| private final ImportFormatPreferences | |
| private static final Logger | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDescription()
Implements abstract org. Returns the description of the import format. |
| public static Charset | |
| private static BibtexImporter. | |
| public StandardFileType | getFileType()
Implements abstract org. Returns the type of files that this importer can read |
| public String | getId()
Implements abstract org. Returns a slug, which identifies this importer. |
| public String | getName()
Implements abstract org. Returns the name of this import format. |
| private static Optional | getSuppliedEncoding(BufferedReader reader)
Searches the file for "Encoding: myEncoding" and returns the found supplied encoding. |
| public ParserResult | importDatabase(Path filePath)
Overrides org. Parse the database in the specified file. |
| public ParserResult | |
| public ParserResult | importDatabase(@NonNull BufferedReader reader)
Implements abstract org. This method does not set the metadata encoding information. |
| public boolean | Returns: true as we have no effective way to decide whether a file is in BibTeX format or not. See https://github.com/JabRef/jabref/pull/379#issuecomment-158685726 for more details.Overrides org. Check whether the source is in the correct format for this importer. |
| private void | normalizeKeywordDelimiters(ParserResult result)
Postprocessing for imported entries that normalizes keyword separators to the library's delimiter. |
| fileMonitor | back to summary |
|---|---|
| private final FileUpdateMonitor fileMonitor | |
| importFormatPreferences | back to summary |
|---|---|
| private final ImportFormatPreferences importFormatPreferences | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| SIGNATURE | back to summary |
|---|---|
| private static final String SIGNATURE | |
| BibtexImporter | back to summary |
|---|---|
| public BibtexImporter(ImportFormatPreferences importFormatPreferences, FileUpdateMonitor fileMonitor) | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements abstract org. Doc from org. Returns the description of the import format. The description should specifywhat kind of entries from what sources and based on what specification it is able to importby what criteria it
| |
| getEncoding | back to summary |
|---|---|
| public static Charset getEncoding(Path filePath) throws IOException | |
| getEncodingResult | back to summary |
|---|---|
| private static BibtexImporter. Determines the encoding of the supplied BibTeX file. If a JabRef encoding information is present, this information is used.
If there is none present, | |
| getFileType | back to summary |
|---|---|
| public StandardFileType getFileType() Implements abstract org. Doc from org. Returns the type of files that this importer can read
| |
| getId | back to summary |
|---|---|
| public String getId() Implements abstract org. Doc from org. Returns a slug, which identifies this importer. Used, for example, to identify the importer in CLI. Typically, this name should be short, in English, and should not contain special characters like #, %, etc.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. Returns the name of this import format. Typically, this is a string that denotes file type or format. It can also be localized, like "XMP-annotated PDF".
| |
| getSuppliedEncoding | back to summary |
|---|---|
| private static Optional Searches the file for "Encoding: myEncoding" and returns the found supplied encoding. | |
| importDatabase | back to summary |
|---|---|
| public ParserResult importDatabase(Path filePath) throws IOException Overrides org. Doc from org. Parse the database in the specified file.
| |
| importDatabase | back to summary |
|---|---|
| public ParserResult importDatabase(InputStream filePath, BibtexImporter. | |
| importDatabase | back to summary |
|---|---|
| public ParserResult importDatabase(@NonNull BufferedReader reader) throws IOException Implements abstract org. This method does not set the metadata encoding information. The caller needs to set the encoding of the supplied reader manually to the metadata
| |
| isRecognizedFormat | back to summary |
|---|---|
| public boolean isRecognizedFormat(@NonNull BufferedReader reader) Overrides org. Doc from org. Check whether the source is in the correct format for this importer. All implementations need to reset the input stream to the beginning again - to enable importing at subsequent calls. The effect of this method is primarily to avoid unnecessary processing of files when searching for a suitable import format. If this method returns false, the import routine will move on to the next import format. Thus, the correct behavior is to return false if it is certain that the file is not of the suitable type, and true otherwise. Returning true is the safe choice if not certain.
| |
| normalizeKeywordDelimiters | back to summary |
|---|---|
| private void normalizeKeywordDelimiters(ParserResult result) Postprocessing for imported entries that normalizes keyword separators to the library's delimiter. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Charset | encoding
Record Component accessed by encoding(). |
| private final boolean | encodingExplicitlySupplied
Record Component accessed by encodingExplicitlySupplied(). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Charset | |
| public boolean | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| encoding | back to summary |
|---|---|
| private final Charset encoding Record Component accessed by encoding(). | |
| encodingExplicitlySupplied | back to summary |
|---|---|
| private final boolean encodingExplicitlySupplied Record Component accessed by encodingExplicitlySupplied(). | |
| EncodingResult | back to summary |
|---|---|
| public EncodingResult(Charset encoding, boolean encodingExplicitlySupplied) | |
| encoding | back to summary |
|---|---|
| public Charset encoding() Record Component getter of encoding. | |
| encodingExplicitlySupplied | back to summary |
|---|---|
| public boolean encodingExplicitlySupplied() Record Component getter of encodingExplicitlySupplied. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of 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. | |