Search in sources :

Example 1 with BookTitle

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

the class MedlineImporter method addBookInformation.

private void addBookInformation(Map<String, String> fields, Book book) {
    if (book.getPublisher() != null) {
        Publisher publisher = book.getPublisher();
        putIfValueNotNull(fields, "publocation", publisher.getPublisherLocation());
        putStringFromSerializableList(fields, FieldName.PUBLISHER, publisher.getPublisherName().getContent());
    }
    if (book.getBookTitle() != null) {
        BookTitle title = book.getBookTitle();
        putStringFromSerializableList(fields, FieldName.TITLE, title.getContent());
    }
    if (book.getPubDate() != null) {
        addPubDate(fields, book.getPubDate());
    }
    if (book.getAuthorList() != null) {
        List<AuthorList> authorLists = book.getAuthorList();
        //authorLists size should be one
        if (authorLists.size() == 1) {
            for (AuthorList authorList : authorLists) {
                handleAuthors(fields, authorList);
            }
        } else {
            LOGGER.info(String.format("Size of authorlist was %s", authorLists.size()));
        }
    }
    putIfValueNotNull(fields, FieldName.VOLUME, book.getVolume());
    putIfValueNotNull(fields, FieldName.EDITION, book.getEdition());
    putIfValueNotNull(fields, "medium", book.getMedium());
    putIfValueNotNull(fields, "reportnumber", book.getReportNumber());
    if (book.getELocationID() != null) {
        for (ELocationID id : book.getELocationID()) {
            addElocationID(fields, id);
        }
    }
    if (book.getIsbn() != null) {
        fields.put(FieldName.ISBN, join(book.getIsbn(), ", "));
    }
}
Also used : AuthorList(org.jabref.logic.importer.fileformat.medline.AuthorList) ELocationID(org.jabref.logic.importer.fileformat.medline.ELocationID) Publisher(org.jabref.logic.importer.fileformat.medline.Publisher) BookTitle(org.jabref.logic.importer.fileformat.medline.BookTitle)

Aggregations

AuthorList (org.jabref.logic.importer.fileformat.medline.AuthorList)1 BookTitle (org.jabref.logic.importer.fileformat.medline.BookTitle)1 ELocationID (org.jabref.logic.importer.fileformat.medline.ELocationID)1 Publisher (org.jabref.logic.importer.fileformat.medline.Publisher)1