public abstract class ImportFormat extends java.lang.Object implements java.lang.Comparable<ImportFormat>
Importers are sorted according to following criteria
| Constructor and Description |
|---|
ImportFormat()
Constructor for custom importers.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ImportFormat importer) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCLIId()
Short, one token ID to identify the format from the command line.
|
java.lang.String |
getDescription()
Description of the ImportFormat.
|
java.lang.String |
getExtensions()
Extensions that this importer can read.
|
abstract java.lang.String |
getFormatName()
Name of this import format.
|
boolean |
getIsCustomImporter()
Wether this importer is a custom importer.
|
int |
hashCode() |
abstract java.util.List<BibtexEntry> |
importEntries(java.io.InputStream in,
OutputPrinter status)
Parse the entries in the source, and return a List of BibtexEntry
objects.
|
abstract boolean |
isRecognizedFormat(java.io.InputStream in)
Check whether the source is in the correct format for this importer.
|
void |
setIsCustomImporter(boolean isCustomImporter)
Sets if this is a custom importer.
|
java.lang.String |
toString() |
public abstract boolean isRecognizedFormat(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic abstract java.util.List<BibtexEntry> importEntries(java.io.InputStream in, OutputPrinter status) throws java.io.IOException
java.io.IOExceptionpublic abstract java.lang.String getFormatName()
The name must be unique.
nullpublic java.lang.String getExtensions()
null for the defaultpublic java.lang.String getCLIId()
public java.lang.String getDescription()
Implementors of ImportFormats should override this. Ideally, it should specify
recognizes an import format
public final void setIsCustomImporter(boolean isCustomImporter)
For custom importers added dynamically to JabRef, this will be set automatically by JabRef.
isCustomImporter - if this is a custom importerpublic final boolean getIsCustomImporter()
Custom importers will have precedence over built-in importers.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(ImportFormat importer)
compareTo in interface java.lang.Comparable<ImportFormat>