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.FetchType;
|
15
|
import javax.persistence.ManyToOne;
|
16
|
import javax.xml.bind.annotation.XmlAccessType;
|
17
|
import javax.xml.bind.annotation.XmlAccessorType;
|
18
|
import javax.xml.bind.annotation.XmlElement;
|
19
|
import javax.xml.bind.annotation.XmlIDREF;
|
20
|
import javax.xml.bind.annotation.XmlRootElement;
|
21
|
import javax.xml.bind.annotation.XmlSchemaType;
|
22
|
import javax.xml.bind.annotation.XmlType;
|
23
|
|
24
|
import org.apache.log4j.Logger;
|
25
|
import org.hibernate.annotations.Cascade;
|
26
|
import org.hibernate.annotations.CascadeType;
|
27
|
import org.hibernate.envers.Audited;
|
28
|
import org.hibernate.search.annotations.Indexed;
|
29
|
import org.hibernate.search.annotations.IndexedEmbedded;
|
30
|
import org.springframework.beans.factory.annotation.Configurable;
|
31
|
|
32
|
import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
|
33
|
import eu.etaxonomy.cdm.strategy.cache.reference.StrictReferenceBaseDefaultCacheStrategy;
|
34
|
|
35
|
/**
|
36
|
* This class represents isolated parts (usually papers or abstracts) within
|
37
|
* {@link Proceedings conference proceedings}.
|
38
|
* <P>
|
39
|
* This class corresponds, according to the TDWG ontology, partially to the
|
40
|
* publication type term (from PublicationTypeTerm): "SubReference".
|
41
|
*
|
42
|
* @author m.doering
|
43
|
* @version 1.0
|
44
|
* @created 08-Nov-2007 13:06:29
|
45
|
*/
|
46
|
@XmlAccessorType(XmlAccessType.FIELD)
|
47
|
@XmlType(name = "InProceedings", propOrder = {
|
48
|
"inProceedings"
|
49
|
})
|
50
|
@XmlRootElement(name = "InProceedings")
|
51
|
@Entity
|
52
|
@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
|
53
|
@Audited
|
54
|
@Configurable
|
55
|
public class InProceedings extends SectionBase<IReferenceBaseCacheStrategy<InProceedings>> {
|
56
|
|
57
|
/**
|
58
|
*
|
59
|
*/
|
60
|
private static final long serialVersionUID = -286946099144494551L;
|
61
|
|
62
|
private static final Logger logger = Logger.getLogger(InProceedings.class);
|
63
|
|
64
|
@XmlElement(name = "InProceedings")
|
65
|
@XmlIDREF
|
66
|
@XmlSchemaType(name = "InProceedings")
|
67
|
@ManyToOne(fetch = FetchType.LAZY)
|
68
|
@IndexedEmbedded
|
69
|
@Cascade(CascadeType.SAVE_UPDATE)
|
70
|
private Proceedings inProceedings;
|
71
|
|
72
|
protected InProceedings() {
|
73
|
this.cacheStrategy = new StrictReferenceBaseDefaultCacheStrategy<InProceedings>();
|
74
|
}
|
75
|
|
76
|
/**
|
77
|
* Creates a new empty "in proceedings" instance.
|
78
|
*
|
79
|
* @see #NewInstance(Proceedings)
|
80
|
*/
|
81
|
public static InProceedings NewInstance(){
|
82
|
InProceedings result = new InProceedings();
|
83
|
return result;
|
84
|
}
|
85
|
|
86
|
/**
|
87
|
* Creates a new "in proceedings" instance with the given proceedings it belongs to.
|
88
|
*
|
89
|
* @param inProceedings the proceedings <i>this</i> "in proceedings" is part of
|
90
|
* @see #NewInstance()
|
91
|
* @see Proceedings
|
92
|
*/
|
93
|
public static InProceedings NewInstance(Proceedings inProceedings){
|
94
|
InProceedings result = NewInstance();
|
95
|
result.setInProceedings(inProceedings);
|
96
|
return result;
|
97
|
}
|
98
|
|
99
|
|
100
|
/**
|
101
|
* Returns the {@link Proceedings proceedings} <i>this</i> "in proceedings" (usually
|
102
|
* a paper or an abstract) is part of.
|
103
|
*
|
104
|
* @return the proceedings in which <i>this</i> "in proceedings" has been
|
105
|
* published
|
106
|
* @see Proceedings
|
107
|
*/
|
108
|
public Proceedings getInProceedings(){
|
109
|
return this.inProceedings;
|
110
|
}
|
111
|
|
112
|
/**
|
113
|
* @see #getInProceedings()
|
114
|
*/
|
115
|
public void setInProceedings(Proceedings inProceedings){
|
116
|
this.inProceedings = inProceedings;
|
117
|
}
|
118
|
|
119
|
}
|