--import and --importToOpen , too.
| Modifier and Type | Class and Description |
|---|---|
| private 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 | 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
the path to the file which should be imported filePath)Overrides org. Parse the database in the specified file. |
| public ParserResult | importDatabase(BufferedReader
the input to read from 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.Implements abstract org. Check whether the source is in the correct format for this importer. |
| 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 specify
| |
| 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
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. Returns the name of this import format. The name must be unique. | |
| 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(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(BufferedReader reader) Implements abstract org. Doc from org. Check whether the source is in the correct format for this importer. 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 behaviour 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.
| |
| 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 |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Charset | |
| public boolean | |
| public final boolean | equals(Object
the reference object with which to compare. 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 |
|---|---|
| private 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.
| |