(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / reference / Generic.java
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
16 import org.apache.log4j.Logger;
17
18 import eu.etaxonomy.cdm.strategy.cache.reference.GenericDefaultCacheStrategy;
19
20 /**
21 * This class is to represent all references which cannot be clearly assigned to a
22 * specific reference type. Therefore attributes which are only used by a unique
23 * reference type are not necessary here.
24 * @author m.doering
25 * @version 1.0
26 * @created 08-Nov-2007 13:06:26
27 */
28 @Entity
29 public class Generic extends StrictReferenceBase implements INomenclaturalReference, Cloneable {
30 static Logger logger = Logger.getLogger(Generic.class);
31 private String publisher;
32 private String placePublished;
33 private String editor;
34 private String series;
35 private String volume;
36 private String pages;
37 private NomenclaturalReferenceHelper nomRefBase = NomenclaturalReferenceHelper.NewInstance(this);
38
39
40 public static Generic NewInstance(){
41 return new Generic();
42 }
43
44 public Generic(){
45 super();
46 this.cacheStrategy = GenericDefaultCacheStrategy.NewInstance();
47 }
48
49
50 public String getPublisher(){
51 return this.publisher;
52 }
53
54 /**
55 *
56 * @param publisher publisher
57 */
58 public void setPublisher(String publisher){
59 this.publisher = publisher;
60 }
61
62 public String getPlacePublished(){
63 return this.placePublished;
64 }
65
66 /**
67 *
68 * @param placePublished placePublished
69 */
70 public void setPlacePublished(String placePublished){
71 this.placePublished = placePublished;
72 }
73
74 public String getEditor(){
75 return this.editor;
76 }
77
78 /**
79 *
80 * @param editor editor
81 */
82 public void setEditor(String editor){
83 this.editor = editor;
84 }
85
86 public String getSeries(){
87 return this.series;
88 }
89
90 /**
91 *
92 * @param series series
93 */
94 public void setSeries(String series){
95 this.series = series;
96 }
97
98 public String getVolume(){
99 return this.volume;
100 }
101
102 /**
103 *
104 * @param volume volume
105 */
106 public void setVolume(String volume){
107 this.volume = volume;
108 }
109
110 public String getPages(){
111 return this.pages;
112 }
113
114 /**
115 *
116 * @param pages pages
117 */
118 public void setPages(String pages){
119 this.pages = pages;
120 }
121
122 /* (non-Javadoc)
123 * @see eu.etaxonomy.cdm.model.reference.StrictReferenceBase#getCitation()
124 */
125 @Transient
126 public String getCitation(){
127 return nomRefBase.getCitation();
128 }
129
130 /* (non-Javadoc)
131 * @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation(java.lang.String)
132 */
133 @Transient
134 public String getNomenclaturalCitation(String microReference) {
135 return nomRefBase.getNomenclaturalCitation(microReference);
136 }
137
138
139 /* (non-Javadoc)
140 * @see eu.etaxonomy.cdm.model.reference.ReferenceBase#generateTitle()
141 */
142 @Override
143 public String generateTitle(){
144 return nomRefBase.generateTitle();
145 }
146
147 //*********** CLONE **********************************/
148
149
150 /* (non-Javadoc)
151 * @see eu.etaxonomy.cdm.model.reference.StrictReferenceBase#clone()
152 */
153 public Generic clone(){
154 Generic result = (Generic)super.clone();
155 //no changes to: editor, pages, placePublished,publisher, series, volume
156 return result;
157 }
158
159 }