Revision e133b83b
Added by Andreas Müller over 15 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Generic.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.cdm.model.reference; |
11 | 11 |
|
12 | 12 |
|
13 |
import java.util.ArrayList; |
|
14 |
import java.util.List; |
|
15 |
|
|
13 | 16 |
import javax.persistence.Entity; |
17 |
import javax.persistence.FetchType; |
|
18 |
import javax.persistence.JoinColumn; |
|
19 |
import javax.persistence.OneToMany; |
|
14 | 20 |
import javax.persistence.Transient; |
15 | 21 |
import javax.xml.bind.annotation.XmlAccessType; |
16 | 22 |
import javax.xml.bind.annotation.XmlAccessorType; |
17 | 23 |
import javax.xml.bind.annotation.XmlElement; |
18 | 24 |
import javax.xml.bind.annotation.XmlElementRef; |
25 |
import javax.xml.bind.annotation.XmlElementWrapper; |
|
19 | 26 |
import javax.xml.bind.annotation.XmlRootElement; |
20 | 27 |
import javax.xml.bind.annotation.XmlTransient; |
21 | 28 |
import javax.xml.bind.annotation.XmlType; |
22 | 29 |
|
23 | 30 |
import org.apache.log4j.Logger; |
31 |
import org.hibernate.annotations.Cascade; |
|
32 |
import org.hibernate.annotations.CascadeType; |
|
33 |
import org.hibernate.annotations.IndexColumn; |
|
24 | 34 |
|
25 | 35 |
import eu.etaxonomy.cdm.strategy.cache.reference.GenericDefaultCacheStrategy; |
26 | 36 |
|
... | ... | |
46 | 56 |
*/ |
47 | 57 |
@XmlAccessorType(XmlAccessType.FIELD) |
48 | 58 |
@XmlType(name = "Generic", propOrder = { |
49 |
"publisher", |
|
50 |
"placePublished", |
|
51 | 59 |
"editor", |
52 | 60 |
"volume", |
53 | 61 |
"pages", |
... | ... | |
55 | 63 |
}) |
56 | 64 |
@XmlRootElement(name = "Generic") |
57 | 65 |
@Entity |
58 |
public class Generic extends StrictReferenceBase implements INomenclaturalReference, IVolumeReference, Cloneable { |
|
59 |
|
|
60 |
/** |
|
61 |
* |
|
62 |
*/ |
|
66 |
public class Generic extends PublicationBase implements INomenclaturalReference, IVolumeReference, Cloneable { |
|
63 | 67 |
private static final long serialVersionUID = -2547067957118035042L; |
68 |
private static final Logger logger = Logger.getLogger(Generic.class); |
|
69 |
|
|
70 |
// @XmlElementWrapper(name = "Publishers") |
|
71 |
// @XmlElement(name = "Publisher") |
|
72 |
// @OneToMany (cascade = {javax.persistence.CascadeType.ALL}, fetch= FetchType.LAZY) |
|
73 |
// @IndexColumn(name="sortIndex", base = 0) |
|
74 |
// @JoinColumn (name = "genericReferenceBase_id", insertable=false, updatable=false) |
|
75 |
// @Cascade({CascadeType.SAVE_UPDATE, CascadeType.DELETE_ORPHAN}) |
|
76 |
// private List<Publisher> genericPublishers = new ArrayList<Publisher>(); |
|
64 | 77 |
|
65 |
static Logger logger = Logger.getLogger(Generic.class); |
|
66 |
|
|
67 |
@XmlElement(name = "Publisher") |
|
68 |
private String publisher; |
|
69 |
|
|
70 |
@XmlElement(name = "PlacePublished") |
|
71 |
private String placePublished; |
|
72 |
|
|
73 | 78 |
@XmlElement(name = "Editor") |
74 | 79 |
private String editor; |
75 | 80 |
|
... | ... | |
110 | 115 |
return new Generic(); |
111 | 116 |
} |
112 | 117 |
|
113 |
/** |
|
114 |
* Returns the string representing the name of the publisher of <i>this</i> |
|
115 |
* generic reference. A publisher is mostly an institution or a private |
|
116 |
* company which assumed the global responsibility for the publication |
|
117 |
* process.<BR> |
|
118 |
* If there is a publisher then the generic reference must be some kind of |
|
119 |
* {@link PublicationBase publication}. |
|
120 |
* |
|
121 |
* @return the string identifying the publisher of <i>this</i> |
|
122 |
* generic reference |
|
123 |
* @see #getEditor() |
|
124 |
*/ |
|
125 |
public String getPublisher(){ |
|
126 |
return this.publisher; |
|
127 |
} |
|
128 |
|
|
129 |
/** |
|
130 |
* @see #getPublisher() |
|
131 |
*/ |
|
132 |
public void setPublisher(String publisher){ |
|
133 |
this.publisher = publisher; |
|
134 |
} |
|
135 |
|
|
136 |
/** |
|
137 |
* Returns the string representing the name of the place (mostly the city) |
|
138 |
* where <i>this</i> generic reference has been published.<BR> |
|
139 |
* If there is a published place then the generic reference must be some |
|
140 |
* kind of {@link PublicationBase publication}. |
|
141 |
* |
|
142 |
* @return the string identifying the publication place of <i>this</i> |
|
143 |
* generic reference |
|
144 |
*/ |
|
145 |
public String getPlacePublished(){ |
|
146 |
return this.placePublished; |
|
147 |
} |
|
148 |
|
|
149 |
/** |
|
150 |
* @see #getPlacePublished() |
|
151 |
*/ |
|
152 |
public void setPlacePublished(String placePublished){ |
|
153 |
this.placePublished = placePublished; |
|
154 |
} |
|
155 |
|
|
156 | 118 |
/** |
157 | 119 |
* Returns the string representing the name of the editor of <i>this</i> |
158 | 120 |
* generic reference. An editor is mostly a person (team) who assumed the |
Also available in: Unified diff
model change for references (publishers) and taxon status