public class ParserResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ParserResult |
FILE_LOCKED |
static ParserResult |
INVALID_FORMAT |
Constructor and Description |
---|
ParserResult(BibtexDatabase base,
java.util.HashMap<java.lang.String,java.lang.String> metaData,
java.util.HashMap<java.lang.String,BibtexEntryType> entryTypes) |
ParserResult(java.util.Collection<BibtexEntry> entries) |
Modifier and Type | Method and Description |
---|---|
void |
addDuplicateKey(java.lang.String key)
Add a key to the list of duplicated BibTeX keys found in the database.
|
void |
addWarning(java.lang.String s)
Add a parser warning.
|
BibtexDatabase |
getDatabase() |
java.lang.String[] |
getDuplicateKeys()
Get all duplicated keys found in the database.
|
java.lang.String |
getEncoding()
Returns the name of the encoding used during parsing, or null if not specified
(indicates that prefs.get("defaultEncoding") was used).
|
java.util.HashMap<java.lang.String,BibtexEntryType> |
getEntryTypes() |
java.lang.String |
getErrorMessage() |
java.io.File |
getFile() |
int |
getJabrefMajorVersion() |
int |
getJabrefMinor2Version() |
int |
getJabrefMinorVersion() |
java.lang.String |
getJabrefVersion()
Find which version of JabRef, if any, produced this bib file.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getMetaData() |
boolean |
hasDuplicateKeys()
Query whether any duplicated BibTeX keys have been found in the database.
|
boolean |
hasWarnings() |
boolean |
isInvalid() |
boolean |
isPostponedAutosaveFound() |
void |
setEncoding(java.lang.String enc)
Sets the variable indicating which encoding was used during parsing.
|
void |
setErrorMessage(java.lang.String errorMessage) |
void |
setFile(java.io.File f) |
void |
setInvalid(boolean invalid) |
void |
setJabrefMajorVersion(int jabrefMajorVersion) |
void |
setJabrefMinor2Version(int jabrefMinor2Version) |
void |
setJabrefMinorVersion(int jabrefMinorVersion) |
void |
setJabrefVersion(java.lang.String jabrefVersion)
Set the JabRef version number string for this parser result.
|
void |
setPostponedAutosaveFound(boolean postponedAutosaveFound) |
void |
setToOpenTab(boolean toOpenTab) |
boolean |
toOpenTab()
Check if this base is marked to be added to the currently open tab.
|
java.lang.String[] |
warnings() |
public static ParserResult INVALID_FORMAT
public static ParserResult FILE_LOCKED
public ParserResult(java.util.Collection<BibtexEntry> entries)
public ParserResult(BibtexDatabase base, java.util.HashMap<java.lang.String,java.lang.String> metaData, java.util.HashMap<java.lang.String,BibtexEntryType> entryTypes)
public boolean toOpenTab()
public void setToOpenTab(boolean toOpenTab)
public java.lang.String getJabrefVersion()
public void setJabrefVersion(java.lang.String jabrefVersion)
jabrefVersion
- The version number string.public int getJabrefMajorVersion()
public void setJabrefMajorVersion(int jabrefMajorVersion)
public int getJabrefMinorVersion()
public void setJabrefMinorVersion(int jabrefMinorVersion)
public int getJabrefMinor2Version()
public void setJabrefMinor2Version(int jabrefMinor2Version)
public BibtexDatabase getDatabase()
public java.util.HashMap<java.lang.String,java.lang.String> getMetaData()
public java.util.HashMap<java.lang.String,BibtexEntryType> getEntryTypes()
public java.io.File getFile()
public void setFile(java.io.File f)
public void setEncoding(java.lang.String enc)
enc
- String the name of the encoding.public java.lang.String getEncoding()
public void addWarning(java.lang.String s)
s
- String Warning text. Must be pretranslated. Only added if there isn't already a dupe.public boolean hasWarnings()
public java.lang.String[] warnings()
public void addDuplicateKey(java.lang.String key)
key
- The duplicated keypublic boolean hasDuplicateKeys()
public java.lang.String[] getDuplicateKeys()
public boolean isPostponedAutosaveFound()
public void setPostponedAutosaveFound(boolean postponedAutosaveFound)
public boolean isInvalid()
public void setInvalid(boolean invalid)
public java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String errorMessage)