Use:
BibtexParser parser = new BibtexParser(reader);
ParserResult result = parser.parse();
or
ParserResult result = BibtexParser.parse(reader);
Can be used stand-alone.
Main using method: org.
Opposite class: org.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private GroupTreeNode | |
| private BibDatabase | |
| private static final DocumentBuilderFactory | |
| private Set | |
| private boolean | |
| private final ImportFormatPreferences | |
| private int | |
| private static final Logger | |
| private static final Integer | |
| private final MetaDataParser | |
| private final Map | |
| private ParserResult | |
| private final Deque | |
| private PushbackReader |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private boolean | |
| private String | |
| private String | Returns: the text read so farPuts all text that has been read from the reader, including newlines, etc., since the last call of this method into a string. |
| private String | |
| private String | |
| public Collection | |
| private void | |
| private boolean | |
| private boolean | |
| private boolean | |
| public ParserResult | |
| private void | |
| private void | parseBibDeskComment(String comment, Map<String, String> meta)
Parses comment types found in BibDesk, to migrate BibDesk Static Groups to JabRef. |
| private void | |
| private StringBuilder | |
| private String | |
| private void | |
| public List | |
| private BibEntry | |
| private void | |
| private String | |
| private ParserResult | |
| private void | |
| private String | |
| private String | |
| private StringBuilder | |
| private void | |
| public Optional | |
| private BibtexString | |
| private String | parseTextToken()
This method is used to parse string labels, field names, entry type and numbers outside brackets. |
| private int | |
| private char[] | |
| private String | |
| private String | Returns: a String without eof charactersRemoves all eof characters from a StringBuilder and returns a new String with the resulting content |
| private int | |
| private StringBuilder | removeWhitespaces(StringBuilder toRemove)
returns a new |
| public static Optional | Returns: AnOptional<BibEntry>. Optional.empty() if non was found or an error occurred.Parses BibtexEntries from the given string and returns one entry found (or null if none found) It is undetermined which entry is returned, so use this in case you know there is only one entry in the string. |
| private String | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void |
| BIB_DESK_ROOT_GROUP_NAME | back to summary |
|---|---|
| private static final String BIB_DESK_ROOT_GROUP_NAME | |
| bibDeskGroupTreeNode | back to summary |
|---|---|
| private GroupTreeNode bibDeskGroupTreeNode | |
| database | back to summary |
|---|---|
| private BibDatabase database | |
| DOCUMENT_BUILDER_FACTORY | back to summary |
|---|---|
| private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY | |
| entryTypes | back to summary |
|---|---|
| private Set<BibEntryType> entryTypes | |
| eof | back to summary |
|---|---|
| private boolean eof | |
| importFormatPreferences | back to summary |
|---|---|
| private final ImportFormatPreferences importFormatPreferences | |
| line | back to summary |
|---|---|
| private int line | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| LOOKAHEAD | back to summary |
|---|---|
| private static final Integer LOOKAHEAD | |
| metaDataParser | back to summary |
|---|---|
| private final MetaDataParser metaDataParser | |
| parsedBibdeskGroups | back to summary |
|---|---|
| private final Map<String, String> parsedBibdeskGroups | |
| parserResult | back to summary |
|---|---|
| private ParserResult parserResult | |
| pureTextFromFile | back to summary |
|---|---|
| private final Deque<Character> pureTextFromFile | |
| pushbackReader | back to summary |
|---|---|
| private PushbackReader pushbackReader | |
| BibtexParser | back to summary |
|---|---|
| public BibtexParser(ImportFormatPreferences importFormatPreferences, FileUpdateMonitor fileMonitor) | |
| BibtexParser | back to summary |
|---|---|
| public BibtexParser(ImportFormatPreferences importFormatPreferences) | |
| addBibDeskGroupEntriesToJabRefGroups | back to summary |
|---|---|
| private void addBibDeskGroupEntriesToJabRefGroups() Adds BibDesk group entries to the JabRef database | |
| checkEpilog | back to summary |
|---|---|
| private void checkEpilog() | |
| consume | back to summary |
|---|---|
| private void consume(char expected) throws IOException | |
| consume | back to summary |
|---|---|
| private void consume(char firstOption, char secondOption) throws IOException | |
| consumeUncritically | back to summary |
|---|---|
| private boolean consumeUncritically(char expected) throws IOException | |
| determineNewLineSeparator | back to summary |
|---|---|
| private String determineNewLineSeparator() throws IOException | |
| dumpTextReadSoFarToString | back to summary |
|---|---|
| private String dumpTextReadSoFarToString() Puts all text that has been read from the reader, including newlines, etc., since the last call of this method into a string. Removes the JabRef file header, if it is found
| |
| fixKey | back to summary |
|---|---|
| private String fixKey() throws IOException Tries to restore the key
| |
| getPureTextFromFile | back to summary |
|---|---|
| private String getPureTextFromFile() | |
| getStringValues | back to summary |
|---|---|
| public Collection | |
| initializeParserResult | back to summary |
|---|---|
| private void initializeParserResult(String newLineSeparator) | |
| isClosingBracketNext | back to summary |
|---|---|
| private boolean isClosingBracketNext() | |
| isEOFCharacter | back to summary |
|---|---|
| private boolean isEOFCharacter(int character) | |
| isEscapeSymbol | back to summary |
|---|---|
| private boolean isEscapeSymbol(char character) | |
| parse | back to summary |
|---|---|
| public ParserResult parse(Reader in) throws IOException Parses BibTeX data found when reading from reader. The reader will be consumed. Multiple calls to parse() return the same results
Handling of encoding is done at | |
| parseAndAddEntry | back to summary |
|---|---|
| private void parseAndAddEntry(String type) | |
| parseBibDeskComment | back to summary |
|---|---|
| private void parseBibDeskComment(String comment, Map<String, String> meta) throws ParseException Parses comment types found in BibDesk, to migrate BibDesk Static Groups to JabRef. | |
| parseBibtexString | back to summary |
|---|---|
| private void parseBibtexString() throws IOException | |
| parseBracketedFieldContent | back to summary |
|---|---|
| private StringBuilder parseBracketedFieldContent() throws IOException This is called if a field in the form of | |
| parseBracketedText | back to summary |
|---|---|
| private String parseBracketedText() throws IOException | |
| parseDatabaseID | back to summary |
|---|---|
| private void parseDatabaseID() throws IOException | |
| parseEntries | back to summary |
|---|---|
| public List Implements org.
| |
| parseEntry | back to summary |
|---|---|
| private BibEntry parseEntry(String entryType) throws IOException | |
| parseField | back to summary |
|---|---|
| private void parseField(BibEntry entry) throws IOException | |
| parseFieldContent | back to summary |
|---|---|
| private String parseFieldContent(Field field) throws IOException | |
| parseFileContent | back to summary |
|---|---|
| private ParserResult parseFileContent() throws IOException | |
| parseJabRefComment | back to summary |
|---|---|
| private void parseJabRefComment(Map<String, String> meta) | |
| parseKey | back to summary |
|---|---|
| private String parseKey() throws IOException This method is used to parse the citation key of an entry. | |
| parsePreamble | back to summary |
|---|---|
| private String parsePreamble() throws IOException | |
| parseQuotedFieldExactly | back to summary |
|---|---|
| private StringBuilder parseQuotedFieldExactly() throws IOException | |
| parseRemainingContent | back to summary |
|---|---|
| private void parseRemainingContent() | |
| parseSingleEntry | back to summary |
|---|---|
| public Optional | |
| parseString | back to summary |
|---|---|
| private BibtexString parseString() throws IOException | |
| parseTextToken | back to summary |
|---|---|
| private String parseTextToken() throws IOException This method is used to parse string labels, field names, entry type and numbers outside brackets. | |
| peek | back to summary |
|---|---|
| private int peek() throws IOException | |
| peekTwoCharacters | back to summary |
|---|---|
| private char[] peekTwoCharacters() throws IOException | |
| purge | back to summary |
|---|---|
| private String purge(String context, String stringToPurge) Purges the given stringToPurge (if it exists) from the given context
| |
| purgeEOFCharacters | back to summary |
|---|---|
| private String purgeEOFCharacters(String input) Removes all eof characters from a StringBuilder and returns a new String with the resulting content
| |
| read | back to summary |
|---|---|
| private int read() throws IOException | |
| removeWhitespaces | back to summary |
|---|---|
| private StringBuilder removeWhitespaces(StringBuilder toRemove) returns a new | |
| singleFromString | back to summary |
|---|---|
| public static Optional Parses BibtexEntries from the given string and returns one entry found (or null if none found) It is undetermined which entry is returned, so use this in case you know there is only one entry in the string. | |
| skipAndRecordWhitespace | back to summary |
|---|---|
| private String skipAndRecordWhitespace(int character) throws IOException | |
| skipOneNewline | back to summary |
|---|---|
| private void skipOneNewline() throws IOException | |
| skipSpace | back to summary |
|---|---|
| private void skipSpace() throws IOException | |
| skipWhitespace | back to summary |
|---|---|
| private void skipWhitespace() throws IOException | |
| unread | back to summary |
|---|---|
| private void unread(int character) throws IOException | |
| unreadBuffer | back to summary |
|---|---|
| private void unreadBuffer(StringBuilder stringBuilder) throws IOException pushes buffer back into input
| |