Project

General

Profile

Download (2.53 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.model.reference;
11

    
12

    
13
import javax.persistence.Entity;
14
import javax.persistence.Transient;
15
import javax.xml.bind.annotation.XmlAccessType;
16
import javax.xml.bind.annotation.XmlAccessorType;
17
import javax.xml.bind.annotation.XmlElement;
18
import javax.xml.bind.annotation.XmlType;
19

    
20
import org.apache.log4j.Logger;
21

    
22
import eu.etaxonomy.cdm.strategy.cache.reference.BookDefaultCacheStrategy;
23

    
24
/**
25
 * @author m.doering
26
 * @version 1.0
27
 * @created 08-Nov-2007 13:06:13
28
 */
29
@XmlAccessorType(XmlAccessType.FIELD)
30
@XmlType(name = "Book", propOrder = {
31
    "edition",
32
    "isbn",
33
    "nomRefBase"
34
})
35
@Entity
36
public class Book extends PrintedUnitBase implements INomenclaturalReference, Cloneable {
37
	
38
	private static final Logger logger = Logger.getLogger(Book.class);
39
	
40
    @XmlElement(name = "Edition")
41
	private String edition;
42

    
43
    @XmlElement(name = "ISBN")
44
	private String isbn;
45
	
46
    @XmlElement(name = "NomRefBase")
47
	private NomenclaturalReferenceHelper nomRefBase = NomenclaturalReferenceHelper.NewInstance(this);
48

    
49

    
50
	public static Book NewInstance(){
51
		return new Book();
52
	}
53
	
54
	protected Book(){
55
		super();
56
		this.cacheStrategy = BookDefaultCacheStrategy.NewInstance();
57
	}
58
	
59
	
60
	public String getEdition(){
61
		return this.edition;
62
	}
63
	public void setEdition(String edition){
64
		this.edition = edition;
65
	}
66

    
67
	public String getIsbn(){
68
		return this.isbn;
69
	}
70
	public void setIsbn(String isbn){
71
		this.isbn = isbn;
72
	}
73

    
74

    
75
	/* (non-Javadoc)
76
	 * @see eu.etaxonomy.cdm.model.reference.StrictReferenceBase#getCitation()
77
	 */
78
	@Transient
79
	public String getCitation(){
80
		return nomRefBase.getCitation();
81
	}
82

    
83
	/* (non-Javadoc)
84
	 * @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation(java.lang.String)
85
	 */
86
	@Transient
87
	public String getNomenclaturalCitation(String microReference) {
88
		return nomRefBase.getNomenclaturalCitation(microReference);
89
	}
90

    
91

    
92
	/* (non-Javadoc)
93
	 * @see eu.etaxonomy.cdm.model.reference.ReferenceBase#generateTitle()
94
	 */
95
	@Override
96
	public String generateTitle(){
97
		return nomRefBase.generateTitle();
98
	}
99
	
100
	
101
//*********** CLONE **********************************/	
102
		
103
	/* (non-Javadoc)
104
	 * @see eu.etaxonomy.cdm.model.reference.PrintedUnitBase#clone()
105
	 */
106
	public Book clone(){
107
		Book result = (Book)super.clone();
108
		//no changes to: edition, isbn
109
		return result;
110
	}
111

    
112

    
113
}
(4-4/27)