如何使用Java读取(.bib)文件格式的内容

时间:2014-09-11 18:26:54

标签: java bibtex

我需要读取.bib文件并将其标记插入到bib-entries对象

文件很大(差不多4000行),所以我的第一个问题是使用什么(bufferrReader或FileReader) 一般格式是

@ARTICLE{orleans01DJ,
author = {Doug Orleans and Karl Lieberherr},
title = {{{DJ}: {Dynamic} Adaptive Programming in {Java}}},
journal = {Metalevel Architectures and Separation of Crosscutting Concerns 3rd
Int'l Conf. (Reflection 2001), {LNCS} 2192},
year = {2001},
pages = {73--80},
month = sep,
editor = {A. Yonezawa and S. Matsuoka},
owner = {Administrator},
publisher = {Springer-Verlag},
timestamp = {2009.03.09}
}

@ARTICLE{Ossher:1995:SOCR,
author = {Harold Ossher and Matthew Kaplan and William Harrison and Alexander
Katz},
title = {{Subject-Oriented Composition Rules}},
journal = {ACM SIG{\-}PLAN Notices},
year = {1995},
volume = {30},
pages = {235--250},
number = {10},
month = oct,
acknowledgement = {Nelson H. F. Beebe, University of Utah, Department of Mathematics,
110 LCB, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA,
Tel: +1 801 581 5254, FAX: +1 801 581 4148, e-mail: \path|beebe@math.utah.edu|,
\path|beebe@acm.org|, \path|beebe@computer.org| (Internet), URL:
\path|http://www.math.utah.edu/~beebe/|},
bibdate = {Fri Apr 30 12:33:10 MDT 1999},
coden = {SINODQ},
issn = {0362-1340},
keywords = {ACM; object-oriented programming systems; OOPSLA; programming languages;
SIGPLAN},
owner = {Administrator},
timestamp = {2009.02.26}
}

正如您所看到的,有些条目的行数多于行,条目以}结尾 以},或}},

结尾的条目

此外,有些参赛作品中间有{..},{..} .. 所以,我对如何开始阅读这个文件以及如何获取这些条目并操纵它们有点困惑。 任何帮助将受到高度赞赏。

1 个答案:

答案 0 :(得分:2)

我们目前正在JabRef讨论不同的选项。

这些是当前选项: