001    /*
002     Copyright (c) 2012, Regents of the University of Colorado
003     All rights reserved.
004    
005     Redistribution and use in source and binary forms, with or without modification, 
006     are permitted provided that the following conditions are met:
007    
008     * Redistributions of source code must retain the above copyright notice, this 
009        list of conditions and the following disclaimer.
010       
011     * Redistributions in binary form must reproduce the above copyright notice, 
012        this list of conditions and the following disclaimer in the documentation 
013        and/or other materials provided with the distribution.
014       
015     * Neither the name of the University of Colorado nor the names of its 
016        contributors may be used to endorse or promote products derived from this 
017        software without specific prior written permission.
018    
019     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
022     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
023     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
024     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
025     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
026     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
027     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
028     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
029     */
030    package edu.ucdenver.ccp.medline.parser;
031    
032    import java.util.List;
033    
034    import lombok.Getter;
035    import lombok.ToString;
036    
037    import com.thoughtworks.xstream.annotations.XStreamAlias;
038    import com.thoughtworks.xstream.annotations.XStreamImplicit;
039    
040    import edu.ucdenver.ccp.medline.parser.MedlineCitation.Abstract;
041    import edu.ucdenver.ccp.medline.parser.MedlineCitation.AuthorList;
042    import edu.ucdenver.ccp.medline.parser.MedlineCitation.Date;
043    import edu.ucdenver.ccp.medline.parser.MedlineCitation.KeywordList;
044    import edu.ucdenver.ccp.medline.parser.MedlineCitation.PubMedId;
045    import edu.ucdenver.ccp.medline.parser.PubmedArticle.ArticleIdList;
046    
047    /**
048     * @author Center for Computational Pharmacology, UC Denver; ccpsupport@ucdenver.edu
049     * 
050     */
051    @Getter
052    @ToString
053    @XStreamAlias("BookDocument")
054    public class BookDocument {
055    
056            @XStreamAlias("PMID")
057            private PubMedId pmid;
058    
059            @XStreamAlias("ArticleIdList")
060            private ArticleIdList articleIdList;
061    
062            @XStreamAlias("Book")
063            private Book book;
064    
065            @XStreamAlias("ArticleTitle")
066            private String articleTitle;
067    
068            @XStreamImplicit(itemFieldName = "Language")
069            private List<String> languages;
070    
071            @XStreamAlias("AuthorList")
072            private AuthorList authorList;
073    
074            @XStreamAlias("Abstract")
075            private Abstract theAbstract;
076    
077            @XStreamAlias("Sections")
078            private SectionList sectionList;
079            
080            @XStreamAlias("KeywordList")
081            private KeywordList keywordList;
082            
083            @XStreamAlias("ContributionDate")
084            private Date contributionDate;
085    
086            @XStreamAlias("DateRevised")
087            private Date dateRevised;
088    
089            @Getter
090            @ToString
091            public static class SectionList {
092                    @XStreamImplicit
093                    private List<Section> sections;
094            }
095    
096            @Getter
097            @ToString
098            @XStreamAlias("Section")
099            public static class Section {
100                    @XStreamAlias("SectionTitle")
101                    private String sectionTitle;
102            }
103    
104            @Getter
105            @ToString
106            public static class Book {
107                    
108                    @XStreamAlias("Publisher")
109                    private Publisher publisher;
110                    
111                    @XStreamAlias("BookTitle")
112                    private String bookTitle;
113                    
114                    @XStreamAlias("PubDate")
115                    private Date pubDate;
116                    
117                    @XStreamAlias("BeginningDate")
118                    private Date beginningDate;
119                    
120                    @XStreamAlias("EndingDate")
121                    private Date endingDate;
122                    
123                    @XStreamAlias("AuthorList")
124                    private AuthorList authorList;
125                    
126                    @XStreamAlias("Medium")
127                    private String medium;
128            }
129            
130            @Getter
131            @ToString
132            @XStreamAlias("Publisher")
133            public static class Publisher {
134                    @XStreamAlias("PublisherName")
135                    private String name;
136                    
137                    @XStreamAlias("PublisherLocation")
138                    private String location;
139                    
140            }
141    
142    }