RePEc (Research Papers in Economics) is a collaborative effort of over 100 volunteers in 49 countries to enhance the dissemination of research in economics. The heart of the project is a decentralized database of working papers, journal articles and software components. All RePEc material is freely available. At the time of writing RePEc holds over 300.000 items.
NEP (New Economic Papers is an announcement service which filters information on new additions to RePEc into edited reports. The goal is to provide subscribers with up-to-date information to the research literature.
This importer is capable of importing NEP messages into JabRef.
There is no officially defined message format for NEP. NEP messages are assumed to have (and almost always have) the form given by the following semi-formal grammar:
NEPMessage:
MessageSection NEPMessage
MessageSection
MessageSection:
OverviewMessageSection
OtherMessageSection
# we skip the overview
OverviewMessageSection:
'In this issue we have: ' SectionSeparator OtherStuff
OtherMessageSection:
SectionSeparator OtherMessageSectionContent
# we skip other stuff and read only full working paper references
OtherMessageSectionContent:
WorkingPaper EmptyLine OtherMessageSectionContent
OtherStuff EmptyLine OtherMessageSectionContent
''
OtherStuff:
NonEmptyLine OtherStuff
NonEmptyLine
NonEmptyLine:
a non-empty String that does not start with a number followed by a '.'
# working papers are recognized by a number followed by a '.'
# in a non-overview section
WorkingPaper:
Number'.' WhiteSpace TitleString EmptyLine Authors EmptyLine Abstract AdditionalFields
Number'.' WhiteSpace TitleString AdditionalFields Abstract AdditionalFields
TitleString:
a String that may span several lines and should be joined
# there must be at least one author
Authors:
Author '\n' Authors
Author '\n'
# optionally, an institution is given for an author
Author:
AuthorName
AuthorName '(' Institution ')'
# there are no rules about the name, it may be firstname lastname or lastname, firstname or anything else
AuthorName:
a non-empty String without '(' or ')' characters, not spanning more that one line
Institution:
a non-empty String that may span several lines
Abstract:
a (possibly empty) String that may span several lines
AdditionalFields:
AdditionalField '\n' AdditionalFields
EmptyLine AdditionalFields
''
AdditionalField:
'Keywords:' KeywordList
'URL:' non-empty String
'Date:' DateString
'JEL:' JelClassificationList
'By': Authors
KeywordList:
Keyword ',' KeywordList
Keyword ';' KeywordList
Keyword
Keyword:
non-empty String that does not contain ',' (may contain whitespace)
# if no date is given, the current year as given by the system clock is assumed
DateString:
'yyyy-MM-dd'
'yyyy-MM'
'yyyy'
JelClassificationList:
JelClassification JelClassificationList
JelClassification
# the JEL Classifications are set into a new BIBTEX-field 'jel'
# they will appear if you add it as a field to one of the BIBTex Entry sections
JelClassification:
one of the allowed classes, see http://ideas.repec.org/j/
SectionSeparator:
'\n-----------------------------'
| Modifier and Type | Field and Description |
|---|---|
| private final ImportFormatPreferences | |
| private boolean | |
| private String | |
| private int | |
| private static final Logger | |
| private String | |
| private static final Collection |
| 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 StandardFileType | getFileType()
Implements abstract org. Returns the type of files that this importer can read |
| public String | getId()
Implements abstract org. Returns a slug, which identifies this importer. |
| public String | getName()
Implements abstract org. Returns the name of this import format. |
| public ParserResult | importDatabase(@NonNull BufferedReader reader)
Implements abstract org. Parse the database in the source. |
| public boolean | isRecognizedFormat(@NonNull Reader reader)
Overrides org. #isRecognizedFormat(BufferedReader) without the requirement to reset |
| public boolean | isRecognizedFormat(@NonNull BufferedReader reader)
Overrides org. Check whether the source is in the correct format for this importer. |
| private boolean | |
| private void | |
| private void | parseAdditionalFields(BibEntry be, boolean multilineUrlFieldAllowed, BufferedReader in)
Implements grammar rule "AdditionalFields". |
| private void | |
| private void | |
| private void | |
| private String | |
| private boolean |
| importFormatPreferences | back to summary |
|---|---|
| private final ImportFormatPreferences importFormatPreferences | |
| inOverviewSection | back to summary |
|---|---|
| private boolean inOverviewSection | |
| lastLine | back to summary |
|---|---|
| private String lastLine | |
| line | back to summary |
|---|---|
| private int line | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| preLine | back to summary |
|---|---|
| private String preLine | |
| RECOGNIZED_FIELDS | back to summary |
|---|---|
| private static final Collection<String> RECOGNIZED_FIELDS | |
| RepecNepImporter | back to summary |
|---|---|
| public RepecNepImporter(ImportFormatPreferences importFormatPreferences) | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements abstract org. Doc from org. Returns the description of the import format. The description should specifywhat kind of entries from what sources and based on what specification it is able to importby what criteria it
| |
| getFileType | back to summary |
|---|---|
| public StandardFileType getFileType() Implements abstract org. Doc from org. Returns the type of files that this importer can read
| |
| getId | back to summary |
|---|---|
| public String getId() Implements abstract org. Doc from org. Returns a slug, which identifies this importer. Used, for example, to identify the importer in CLI. Typically, this name should be short, in English, and should not contain special characters like #, %, etc.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. Returns the name of this import format. Typically, this is a string that denotes file type or format. It can also be localized, like "XMP-annotated PDF".
| |
| importDatabase | back to summary |
|---|---|
| public ParserResult importDatabase(@NonNull BufferedReader reader) throws IOException Implements abstract org. Doc from org. Parse the database in the source. This method can be called in two different contexts - either when importing in a specified format, or when importing in unknown format. In the latter case, JabRef cycles through all available import formats. No error messages or feedback is displayed from individual import formats in this case. If importing in a specified format and an empty library is returned, JabRef reports that no entries were found. If your format is binary-based (PDF, ZIP-based, or others), then you should not solely override this method. For binary formats do this:
| |
| isRecognizedFormat | back to summary |
|---|---|
| public boolean isRecognizedFormat(@NonNull Reader reader) throws IOException Overrides org. Doc from org. #isRecognizedFormat(BufferedReader) without the requirement to reset
| |
| isRecognizedFormat | back to summary |
|---|---|
| public boolean isRecognizedFormat(@NonNull BufferedReader reader) throws IOException Overrides org. Doc from org. Check whether the source is in the correct format for this importer. All implementations need to reset the input stream to the beginning again - to enable importing at subsequent calls. 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 behavior 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.
| |
| isStartOfWorkingPaper | back to summary |
|---|---|
| private boolean isStartOfWorkingPaper() if line starts with a string of the form 'x. ' and we are not in the overview section, we have a working paper entry we are interested in | |
| parseAbstract | back to summary |
|---|---|
| private void parseAbstract(BibEntry be, BufferedReader in) throws IOException Implements grammar rule "Abstract".
| |
| parseAdditionalFields | back to summary |
|---|---|
| private void parseAdditionalFields(BibEntry be, boolean multilineUrlFieldAllowed, BufferedReader in) throws IOException Implements grammar rule "AdditionalFields". | |
| parseAuthors | back to summary |
|---|---|
| private void parseAuthors(BibEntry be, BufferedReader in) throws IOException Implements grammar rule "Authors"
| |
| parseTitleString | back to summary |
|---|---|
| private void parseTitleString(BibEntry be, BufferedReader in) throws IOException Implements grammar rule "TitleString".
| |
| readLine | back to summary |
|---|---|
| private void readLine(BufferedReader in) throws IOException | |
| readMultipleLines | back to summary |
|---|---|
| private String readMultipleLines(BufferedReader in) throws IOException Read multiple lines. Reads multiple lines until either
is found. Whitespace at start or end of lines is trimmed except for one blank character.
| |
| startsWithKeyword | back to summary |
|---|---|
| private boolean startsWithKeyword(Collection<String> keywords) | |