Package org.dspace.submit.util

Examples of org.dspace.submit.util.SubmissionLookupPublication


                    dto.add(itemLookup);
                }
            }
            else
            {
                SubmissionLookupPublication manualPub = new SubmissionLookupPublication(
                        SubmissionLookupService.MANUAL_USER_INPUT);
                manualPub.add("title", titolo);
                manualPub.add("year", date);
                manualPub.add("allauthors", autori);

                Enumeration e = request.getParameterNames();

                while (e.hasMoreElements())
                {
                    String parameterName = (String) e.nextElement();
                    String parameterValue = request.getParameter(parameterName);

                    if (parameterName.startsWith("identifier_")
                            && StringUtils.isNotBlank(parameterValue))
                    {
                        manualPub
                                .add(parameterName.substring("identifier_"
                                        .length()), parameterValue);
                    }
                }
                List<Record> publications = new ArrayList<Record>();
View Full Code Here


        // TODO Auto-generated constructor stub
    }

    public static Record convertCrossRefDomToRecord(Element dataRoot)
    {
        MutableRecord record = new SubmissionLookupPublication("");

        String status = dataRoot.getAttribute("status");
        if (!"resolved".equals(status))
        {
            String msg = XMLUtils.getElementValue(dataRoot, "msg");
            String exMsg = status + " - " + msg;
            throw new RuntimeException(exMsg);
        }

        String doi = XMLUtils.getElementValue(dataRoot, "doi");
        if (doi != null)
            record.addValue("doi", new StringValue(doi));

        String itemType = doi != null ? XMLUtils.getElementAttribute(dataRoot,
                "doi", "type") : "unspecified";
        if (itemType != null)
            record.addValue("doiType", new StringValue(itemType));

        List<Element> identifier = XMLUtils.getElementList(dataRoot, "issn");
        for (Element ident : identifier)
        {
            if ("print".equalsIgnoreCase(ident.getAttribute("type"))
                    || StringUtils.isNotBlank(ident.getAttribute("type")))
            {
                String issn = ident.getTextContent().trim();
                if (issn != null)
                    record.addValue("printISSN", new StringValue(issn));
            }
            else
            {
                String eissn = ident.getTextContent().trim();
                if (eissn != null)
                    record.addValue("electronicISSN", new StringValue(eissn));
            }
        }
       
        List<Element> identifierisbn = XMLUtils.getElementList(dataRoot, "isbn");
        for (Element ident : identifierisbn)
        {
            if ("print".equalsIgnoreCase(ident.getAttribute("type"))
                    || StringUtils.isNotBlank(ident.getAttribute("type")))
            {
                String issn = ident.getTextContent().trim();
                if (issn != null)
                    record.addValue("printISBN", new StringValue(issn));
            }
            else
            {
                String eissn = ident.getTextContent().trim();
                if (eissn != null)
                    record.addValue("electronicISBN", new StringValue(eissn));
            }
        }

        String editionNumber = XMLUtils.getElementValue(dataRoot,
                "editionNumber");
        if (editionNumber != null)
            record.addValue("editionNumber", new StringValue(editionNumber));

        String volume = XMLUtils.getElementValue(dataRoot, "volume");
        if (volume != null)
            record.addValue("volume", new StringValue(volume));

        String issue = XMLUtils.getElementValue(dataRoot, "issue");
        if (issue != null)
            record.addValue("issue", new StringValue(issue));

        String year = XMLUtils.getElementValue(dataRoot, "year");
        if (year != null)
            record.addValue("year", new StringValue(year));

        String firstPage = XMLUtils.getElementValue(dataRoot, "first_page");
        if (firstPage != null)
            record.addValue("firstPage", new StringValue(firstPage));

        String lastPage = XMLUtils.getElementValue(dataRoot, "last_page");
        if (lastPage != null)
            record.addValue("lastPage", new StringValue(lastPage));

        String seriesTitle = XMLUtils.getElementValue(dataRoot, "series_title");
        if (seriesTitle != null)
            record.addValue("seriesTitle", new StringValue(seriesTitle));

        String journalTitle = XMLUtils.getElementValue(dataRoot,
                "journal_title");
        if (journalTitle != null)
            record.addValue("journalTitle", new StringValue(journalTitle));

        String volumeTitle = XMLUtils.getElementValue(dataRoot, "volume_title");
        if (volumeTitle != null)
            record.addValue("volumeTitle", new StringValue(volumeTitle));

        String articleTitle = XMLUtils.getElementValue(dataRoot,
                "article_title");
        if (articleTitle != null)
            record.addValue("articleTitle", new StringValue(articleTitle));

        String publicationType = XMLUtils.getElementValue(dataRoot,
                "pubblication_type");
        if (publicationType != null)
            record.addValue("publicationType", new StringValue(publicationType));

        List<String[]> authors = new LinkedList<String[]>();
        List<String[]> editors = new LinkedList<String[]>();
        List<String[]> translators = new LinkedList<String[]>();
        List<String[]> chairs = new LinkedList<String[]>();

        List<Element> contributors = XMLUtils.getElementList(dataRoot,
                "contributors");
        List<Element> contributor = null;
        if (contributors != null && contributors.size() > 0)
        {
            contributor = XMLUtils.getElementList(contributors.get(0),
                    "contributor");

            for (Element contrib : contributor)
            {

                String givenName = XMLUtils.getElementValue(contrib,
                        "given_name");
                String surname = XMLUtils.getElementValue(contrib, "surname");

                if ("editor".equalsIgnoreCase(contrib
                        .getAttribute("contributor_role")))
                {
                    editors.add(new String[] { givenName, surname });
                }
                else if ("chair".equalsIgnoreCase(contrib
                        .getAttribute("contributor_role")))
                {
                    chairs.add(new String[] { givenName, surname });
                }
                else if ("translator".equalsIgnoreCase(contrib
                        .getAttribute("contributor_role")))
                {
                    translators.add(new String[] { givenName, surname });
                }
                else
                {
                    authors.add(new String[] { givenName, surname });
                }
            }
        }

        if (authors.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String[] sArray : authors)
            {
                values.add(new StringValue(sArray[1] + ", " + sArray[0]));
            }
            record.addField("authors", values);
        }

        if (editors.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String[] sArray : editors)
            {
                values.add(new StringValue(sArray[1] + ", " + sArray[0]));
            }
            record.addField("editors", values);
        }

        if (translators.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String[] sArray : translators)
            {
                values.add(new StringValue(sArray[1] + ", " + sArray[0]));
            }
            record.addField("translators", values);
        }

        if (chairs.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String[] sArray : chairs)
            {
                values.add(new StringValue(sArray[1] + ", " + sArray[0]));
            }
            record.addField("chairs", values);
        }
        return record;
    }
View Full Code Here

public class ArxivUtils
{

    public static Record convertArxixDomToRecord(Element dataRoot)
    {
        MutableRecord record = new SubmissionLookupPublication("");

        String articleTitle = XMLUtils.getElementValue(dataRoot, "title");
        if (articleTitle != null)
            record.addValue("title", new StringValue(articleTitle));
        String summary = XMLUtils.getElementValue(dataRoot, "summary");
        if (summary != null)
            record.addValue("summary", new StringValue(summary));
        String year = XMLUtils.getElementValue(dataRoot, "published");
        if (year != null)
            record.addValue("published", new StringValue(year));
        String splashPageUrl = XMLUtils.getElementValue(dataRoot, "id");
        if (splashPageUrl != null)
            record.addValue("id", new StringValue(splashPageUrl));
        String comment = XMLUtils.getElementValue(dataRoot, "arxiv:comment");
        if (comment != null)
            record.addValue("comment", new StringValue(comment));

        List<Element> links = XMLUtils.getElementList(dataRoot, "link");
        if (links != null)
        {
            for (Element link : links)
            {
                if ("related".equals(link.getAttribute("rel"))
                        && "pdf".equals(link.getAttribute("title")))
                {
                    String pdfUrl = link.getAttribute("href");
                    if (pdfUrl != null)
                        record.addValue("pdfUrl", new StringValue(pdfUrl));
                }
            }
        }

        String doi = XMLUtils.getElementValue(dataRoot, "arxiv:doi");
        if (doi != null)
            record.addValue("doi", new StringValue(doi));
        String journalRef = XMLUtils.getElementValue(dataRoot,
                "arxiv:journal_ref");
        if (journalRef != null)
            record.addValue("journalRef", new StringValue(journalRef));

        List<String> primaryCategory = new LinkedList<String>();
        List<Element> primaryCategoryList = XMLUtils.getElementList(dataRoot,
                "arxiv:primary_category");
        if (primaryCategoryList != null)
        {
            for (Element primaryCategoryElement : primaryCategoryList)
            {
                primaryCategory
                        .add(primaryCategoryElement.getAttribute("term"));
            }
        }

        if (primaryCategory.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String s : primaryCategory)
            {
                values.add(new StringValue(s));
            }
            record.addField("primaryCategory", values);
        }

        List<String> category = new LinkedList<String>();
        List<Element> categoryList = XMLUtils.getElementList(dataRoot,
                "category");
        if (categoryList != null)
        {
            for (Element categoryElement : categoryList)
            {
                category.add(categoryElement.getAttribute("term"));
            }
        }

        if (category.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String s : category)
            {
                values.add(new StringValue(s));
            }
            record.addField("category", values);
        }

        List<String> authors = new LinkedList<String>();
        List<String> authorsWithAffiliations = new LinkedList<String>();
        List<Element> authorList = XMLUtils.getElementList(dataRoot, "author");
        if (authorList != null)
        {
            for (Element authorElement : authorList)
            {
              String authorName = XMLUtils.getElementValue(authorElement, "name");
              String authorAffiliation = XMLUtils.getElementValue(authorElement, "arxiv:affiliation");
             
              authors.add(authorName);
              authorsWithAffiliations.add(authorName +": " + authorAffiliation);
            }
        }

        if (authors.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String sArray : authors)
            {
                values.add(new StringValue(sArray));
            }
            record.addField("author", values);
        }
       
        if (authorsWithAffiliations.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String sArray : authorsWithAffiliations)
            {
                values.add(new StringValue(sArray));
            }
            record.addField("authorWithAffiliation", values);
        }

        return record;
    }
View Full Code Here

*/
public class CiNiiUtils
{
    public static Record convertCiNiiDomToRecord(Element xmlRoot)
    {
        MutableRecord record = new SubmissionLookupPublication("");

        List<Element> list = XMLUtils.getElementList(xmlRoot, "rdf:Description");
        // Valid CiNii record should have three rdf:Description elements
        if (list.size() < 3)
        {
            return record;
        }

        Element description_ja = list.get(0);     // Japanese description
        Element description_en = list.get(1);     // English description
        // Element description3 = list.get(2);  // Authors information: NOT USE here

        String language = XMLUtils.getElementValue(description_ja, "dc:language");
        language = language != null ? language.toLowerCase() : "ja";
        record.addValue("language", new StringValue(language));

        if ("ja".equals(language) || "jpn".equals(language))
        {
            String title = XMLUtils.getElementValue(description_ja, "dc:title");
            if (title != null)
            {
                record.addValue("title", new StringValue(title));
            }
            String titleAlternative = XMLUtils.getElementValue(description_en, "dc:title");
            if (titleAlternative != null)
            {
                record.addValue("titleAlternative", new StringValue(titleAlternative));
            }

            List<Value> authors = getAuthors(description_ja);
            if (authors.size() > 0)
            {
                record.addField("authors", authors);
            }
            List<Value> authorAlternative = getAuthors(description_en);
            if (authorAlternative.size() > 0)
            {
                record.addField("auhtorAlternative", authorAlternative);
            }

            String publisher = XMLUtils.getElementValue(description_ja, "dc:publisher");
            if (publisher != null)
            {
                record.addValue("publisher", new StringValue(publisher));
            }
        }
        else
        {
            String title = XMLUtils.getElementValue(description_en, "dc:title");
            if (title != null)
            {
                record.addValue("title", new StringValue(title));
            }
            String titleAlternative = XMLUtils.getElementValue(description_ja, "dc:title");
            if (titleAlternative != null)
            {
                record.addValue("titleAlternative", new StringValue(titleAlternative));
            }

            List<Value> authors = getAuthors(description_en);
            if (authors.size() > 0)
            {
                record.addField("authors", authors);
            }
            List<Value> authorAlternative = getAuthors(description_ja);
            if (authorAlternative.size() > 0)
            {
                record.addField("authorAlternative", authorAlternative);
            }

            String publisher = XMLUtils.getElementValue(description_en, "dc:publisher");
            if (publisher != null)
            {
                record.addValue("publisher", new StringValue(publisher));
            }
        }

        String abstract_ja = XMLUtils.getElementValue(description_ja, "dc:description");
        String abstract_en = XMLUtils.getElementValue(description_en, "dc:description");
        if (abstract_ja != null && abstract_en != null)
        {
            List<Value> description = new LinkedList<Value>();
            description.add(new StringValue(abstract_ja));
            description.add(new StringValue(abstract_en));
            record.addField("description", description);
        }
        else if (abstract_ja != null)
        {
            record.addValue("description", new StringValue(abstract_ja));
        }
        else if (abstract_en != null)
        {
            record.addValue("description", new StringValue(abstract_en));
        }

        List<Value> subjects = getSubjects(description_ja);
        subjects.addAll(getSubjects(description_en));
        if (subjects.size() > 0)
        {
            record.addField("subjects", subjects);
        }

        String journal_j = XMLUtils.getElementValue(description_ja, "prism:publicationName");
        String journal_e = XMLUtils.getElementValue(description_en, "prism:publicationName");
        if (journal_j != null && journal_e != null)
        {
            record.addValue("journal", new StringValue(journal_j+" = "+journal_e));
        }
        else if (journal_j != null)
        {
           
            record.addValue("journal", new StringValue(journal_j));
        }
        else if (journal_e != null)
        {
           
            record.addValue("journal", new StringValue(journal_e));
        }

        String volume = XMLUtils.getElementValue(description_ja, "prism:volume");
        if (volume != null)
        {
            record.addValue("volume", new StringValue(volume));
        }

        String issue = XMLUtils.getElementValue(description_ja, "prism:number");
        if (issue != null)
        {
            record.addValue("issue", new StringValue(issue));
        }

        String spage = XMLUtils.getElementValue(description_ja, "prism:startingPage");
        if (spage != null)
        {
            record.addValue("spage", new StringValue(spage));
        }

        String epage = XMLUtils.getElementValue(description_ja, "prism:endingPage");
        if (epage != null)
        {
            record.addValue("epage", new StringValue(epage));
        }

        String pages = XMLUtils.getElementValue(description_ja, "prism:pageRange");
        if (pages != null && spage == null)
        {
            int pos = pages.indexOf("-");
            if (pos > -1)
            {
                spage = pages.substring(0, pos);
                epage = pages.substring(pos+1, pages.length() - pos);
                if (!epage.equals("") && spage.length() > epage.length())
                {
                    epage = spage.substring(0, spage.length() - epage.length()) + epage;
                }
            }
            else
            {
                spage = pages;
                epage = "";
            }
            record.addValue("spage", new StringValue(spage));
            if (!epage.equals("") && epage == null)
            {
                record.addValue("epage", new StringValue(epage));
            }
        }

        String issn = XMLUtils.getElementValue(description_ja, "prism:issn");
        if (issn != null)
        {
            record.addValue("issn", new StringValue(issn));
        }

        String issued = XMLUtils.getElementValue(description_ja, "prism:publicationDate");
        if (issued != null)
        {
            record.addValue("issued", new StringValue(issued));
        }

        String ncid = XMLUtils.getElementValue(description_ja, "cinii:ncid");
        if (ncid != null)
        {
            record.addValue("ncid", new StringValue(ncid));
        }

        String naid = XMLUtils.getElementValue(description_ja, "cinii:naid");
        if (naid != null)
        {
            record.addValue("naid", new StringValue(naid));
        }

        return record;
    }
View Full Code Here

public class PubmedUtils
{

    public static Record convertPubmedDomToRecord(Element pubArticle)
    {
        MutableRecord record = new SubmissionLookupPublication("");

        Map<String, String> monthToNum = new HashMap<String, String>();
        monthToNum.put("Jan", "01");
        monthToNum.put("Feb", "02");
        monthToNum.put("Mar", "03");
        monthToNum.put("Apr", "04");
        monthToNum.put("May", "05");
        monthToNum.put("Jun", "06");
        monthToNum.put("Jul", "07");
        monthToNum.put("Aug", "08");
        monthToNum.put("Sep", "09");
        monthToNum.put("Oct", "10");
        monthToNum.put("Nov", "11");
        monthToNum.put("Dec", "12");

        Element medline = XMLUtils.getSingleElement(pubArticle,
                "MedlineCitation");

        Element article = XMLUtils.getSingleElement(medline, "Article");
        Element pubmed = XMLUtils.getSingleElement(pubArticle, "PubmedData");

        Element identifierList = XMLUtils.getSingleElement(pubmed,
                "ArticleIdList");
        if (identifierList != null)
        {
            List<Element> identifiers = XMLUtils.getElementList(identifierList,
                    "ArticleId");
            if (identifiers != null)
            {
                for (Element id : identifiers)
                {
                    if ("pubmed".equals(id.getAttribute("IdType")))
                    {
                        String pubmedID = id.getTextContent().trim();
                        if (pubmedID != null)
                            record.addValue("pubmedID", new StringValue(
                                    pubmedID));
                    }
                    else if ("doi".equals(id.getAttribute("IdType")))
                    {
                        String doi = id.getTextContent().trim();
                        if (doi != null)
                            record.addValue("doi", new StringValue(doi));
                    }
                }
            }
        }

        String status = XMLUtils.getElementValue(pubmed, "PublicationStatus");
        if (status != null)
            record.addValue("publicationStatus", new StringValue(status));

        String pubblicationModel = XMLUtils.getElementAttribute(medline,
                "Article", "PubModel");
        if (pubblicationModel != null)
            record.addValue("pubModel", new StringValue(
                    pubblicationModel));

        String title = XMLUtils.getElementValue(article, "ArticleTitle");
        if (title != null)
            record.addValue("articleTitle", new StringValue(title));

        Element abstractElement = XMLUtils
                .getSingleElement(article, "Abstract");
        if (abstractElement == null)
        {
            abstractElement = XMLUtils.getSingleElement(medline,
                    "OtherAbstract");
        }
        if (abstractElement != null)
        {
            String summary = XMLUtils.getElementValue(abstractElement,
                    "AbstractText");
            if (summary != null)
                record.addValue("abstractText", new StringValue(summary));
        }

        List<String[]> authors = new LinkedList<String[]>();
        Element authorList = XMLUtils.getSingleElement(article, "AuthorList");
        if (authorList != null)
        {
            List<Element> authorsElement = XMLUtils.getElementList(authorList,
                    "Author");
            if (authorsElement != null)
            {
                for (Element author : authorsElement)
                {
                    if (StringUtils.isBlank(XMLUtils.getElementValue(author,
                            "CollectiveName")))
                    {
                        authors.add(new String[] {
                                XMLUtils.getElementValue(author, "ForeName"),
                                XMLUtils.getElementValue(author, "LastName") });
                    }
                }
            }
        }
        if (authors.size() > 0)
        {
            List<Value> values = new LinkedList<Value>();
            for (String[] sArray : authors)
            {
                values.add(new StringValue(sArray[1] + ", " + sArray[0]));
            }
            record.addField("author", values);
        }

        Element journal = XMLUtils.getSingleElement(article, "Journal");
        if (journal != null)
        {
            List<Element> jnumbers = XMLUtils.getElementList(journal, "ISSN");
            if (jnumbers != null)
            {
                for (Element jnumber : jnumbers)
                {
                    if ("Print".equals(jnumber.getAttribute("IssnType")))
                    {
                        String issn = jnumber.getTextContent().trim();
                        if (issn != null)
                            record.addValue("printISSN", new StringValue(issn));
                    }
                    else
                    {
                        String eissn = jnumber.getTextContent().trim();
                        if (eissn != null)
                            record.addValue("electronicISSN", new StringValue(eissn));
                    }
                }
            }

            String journalTitle = XMLUtils.getElementValue(journal, "Title");
            if (journalTitle != null)
                record.addValue("journalTitle", new StringValue(journalTitle));

            Element journalIssueElement = XMLUtils.getSingleElement(journal,
                    "JournalIssue");
            if (journalIssueElement != null)
            {
                String volume = XMLUtils.getElementValue(journalIssueElement,
                        "Volume");
                if (volume != null)
                    record.addValue("journalVolume", new StringValue(volume));

                String issue = XMLUtils.getElementValue(journalIssueElement,
                        "Issue");
                if (issue != null)
                    record.addValue("journalIssue", new StringValue(issue));

                Element pubDateElement = XMLUtils.getSingleElement(
                        journalIssueElement, "PubDate");

                String pubDate = null;
                if (pubDateElement != null)
                {
                  pubDate = XMLUtils.getElementValue(pubDateElement, "Year");

                    String mounth = XMLUtils.getElementValue(pubDateElement,
                            "Month");
                    String day = XMLUtils
                            .getElementValue(pubDateElement, "Day");
                    if (StringUtils.isNotBlank(mounth)
                            && monthToNum.containsKey(mounth))
                    {
                      pubDate += "-" + monthToNum.get(mounth);
                        if (StringUtils.isNotBlank(day))
                        {
                          pubDate += "-" + (day.length() == 1 ? "0" + day : day);
                        }
                    }
                }
                if (pubDate == null){
                  pubDate = XMLUtils.getElementValue(pubDateElement, "MedlineDate");
                }
                if (pubDate != null)
                    record.addValue("pubDate", new StringValue(pubDate));
            }

            String language = XMLUtils.getElementValue(article, "Language");
            if (language != null)
                record.addValue("language", new StringValue(language));

            List<String> type = new LinkedList<String>();
            Element publicationTypeList = XMLUtils.getSingleElement(article,
                    "PublicationTypeList");
            if (publicationTypeList != null)
            {
                List<Element> publicationTypes = XMLUtils.getElementList(
                        publicationTypeList, "PublicationType");
                for (Element publicationType : publicationTypes)
                {
                    type.add(publicationType.getTextContent().trim());
                }
            }
            if (type.size() > 0)
            {
                List<Value> values = new LinkedList<Value>();
                for (String s : type)
                {
                    values.add(new StringValue(s));
                }
                record.addField("publicationType", values);
            }

            List<String> primaryKeywords = new LinkedList<String>();
            List<String> secondaryKeywords = new LinkedList<String>();
            Element keywordsList = XMLUtils.getSingleElement(medline,
                    "KeywordList");
            if (keywordsList != null)
            {
                List<Element> keywords = XMLUtils.getElementList(keywordsList,
                        "Keyword");
                for (Element keyword : keywords)
                {
                    if ("Y".equals(keyword.getAttribute("MajorTopicYN")))
                    {
                        primaryKeywords.add(keyword.getTextContent().trim());
                    }
                    else
                    {
                        secondaryKeywords.add(keyword.getTextContent().trim());
                    }
                }
            }
            if (primaryKeywords.size() > 0)
            {
                List<Value> values = new LinkedList<Value>();
                for (String s : primaryKeywords)
                {
                    values.add(new StringValue(s));
                }
                record.addField("primaryKeyword", values);
            }
            if (secondaryKeywords.size() > 0)
            {
                List<Value> values = new LinkedList<Value>();
                for (String s : secondaryKeywords)
                {
                    values.add(new StringValue(s));
                }
                record.addField("secondaryKeyword", values);
            }

            List<String> primaryMeshHeadings = new LinkedList<String>();
            List<String> secondaryMeshHeadings = new LinkedList<String>();
            Element meshHeadingsList = XMLUtils.getSingleElement(medline,
                    "MeshHeadingList");
            if (meshHeadingsList != null)
            {
                List<Element> meshHeadings = XMLUtils.getElementList(
                        meshHeadingsList, "MeshHeading");
                for (Element meshHeading : meshHeadings)
                {
                    if ("Y".equals(XMLUtils.getElementAttribute(meshHeading,
                            "DescriptorName", "MajorTopicYN")))
                    {
                        primaryMeshHeadings.add(XMLUtils.getElementValue(
                                meshHeading, "DescriptorName"));
                    }
                    else
                    {
                        secondaryMeshHeadings.add(XMLUtils.getElementValue(
                                meshHeading, "DescriptorName"));
                    }
                }
            }
            if (primaryMeshHeadings.size() > 0)
            {
                List<Value> values = new LinkedList<Value>();
                for (String s : primaryMeshHeadings)
                {
                    values.add(new StringValue(s));
                }
                record.addField("primaryMeshHeading", values);
            }
            if (secondaryMeshHeadings.size() > 0)
            {
                List<Value> values = new LinkedList<Value>();
                for (String s : secondaryMeshHeadings)
                {
                    values.add(new StringValue(s));
                }
                record.addField("secondaryMeshHeading", values);
            }

            Element paginationElement = XMLUtils.getSingleElement(article,
                    "Pagination");
            if (paginationElement != null)
            {
                String startPage = XMLUtils.getElementValue(paginationElement,
                        "StartPage");
                String endPage = XMLUtils.getElementValue(paginationElement,
                        "EndPage");
                if (StringUtils.isBlank(startPage))
                {
                    startPage = XMLUtils.getElementValue(paginationElement,
                            "MedlinePgn");
                }

                if (startPage != null)
                    record.addValue("startPage", new StringValue(startPage));
                if (endPage != null)
                    record.addValue("endPage", new StringValue(endPage));
            }
        }

        return record;
    }
View Full Code Here

TOP

Related Classes of org.dspace.submit.util.SubmissionLookupPublication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.