Search in sources :

Example 1 with JournalIssue

use of org.jabref.logic.importer.fileformat.medline.JournalIssue in project jabref by JabRef.

the class MedlineImporter method addArticleInformation.

private void addArticleInformation(Map<String, String> fields, List<Object> content) {
    for (Object object : content) {
        if (object instanceof Journal) {
            Journal journal = (Journal) object;
            putIfValueNotNull(fields, FieldName.JOURNAL, journal.getTitle());
            ISSN issn = journal.getISSN();
            if (issn != null) {
                putIfValueNotNull(fields, FieldName.ISSN, issn.getContent());
            }
            JournalIssue journalIssue = journal.getJournalIssue();
            putIfValueNotNull(fields, FieldName.VOLUME, journalIssue.getVolume());
            putIfValueNotNull(fields, FieldName.ISSUE, journalIssue.getIssue());
            addPubDate(fields, journalIssue.getPubDate());
        } else if (object instanceof ArticleTitle) {
            ArticleTitle articleTitle = (ArticleTitle) object;
            fields.put(FieldName.TITLE, StringUtil.stripBrackets(articleTitle.getContent().toString()));
        } else if (object instanceof Pagination) {
            Pagination pagination = (Pagination) object;
            addPagination(fields, pagination);
        } else if (object instanceof ELocationID) {
            ELocationID eLocationID = (ELocationID) object;
            addElocationID(fields, eLocationID);
        } else if (object instanceof Abstract) {
            Abstract abs = (Abstract) object;
            addAbstract(fields, abs);
        } else if (object instanceof AuthorList) {
            AuthorList authors = (AuthorList) object;
            handleAuthors(fields, authors);
        }
    }
}
Also used : Pagination(org.jabref.logic.importer.fileformat.medline.Pagination) JournalIssue(org.jabref.logic.importer.fileformat.medline.JournalIssue) Abstract(org.jabref.logic.importer.fileformat.medline.Abstract) ISSN(org.jabref.logic.importer.fileformat.medline.ISSN) AuthorList(org.jabref.logic.importer.fileformat.medline.AuthorList) ArticleTitle(org.jabref.logic.importer.fileformat.medline.ArticleTitle) ELocationID(org.jabref.logic.importer.fileformat.medline.ELocationID) Journal(org.jabref.logic.importer.fileformat.medline.Journal)

Aggregations

Abstract (org.jabref.logic.importer.fileformat.medline.Abstract)1 ArticleTitle (org.jabref.logic.importer.fileformat.medline.ArticleTitle)1 AuthorList (org.jabref.logic.importer.fileformat.medline.AuthorList)1 ELocationID (org.jabref.logic.importer.fileformat.medline.ELocationID)1 ISSN (org.jabref.logic.importer.fileformat.medline.ISSN)1 Journal (org.jabref.logic.importer.fileformat.medline.Journal)1 JournalIssue (org.jabref.logic.importer.fileformat.medline.JournalIssue)1 Pagination (org.jabref.logic.importer.fileformat.medline.Pagination)1