1 |
9479da48
|
Andreas Müller
|
/**
|
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 |
f793f35d
|
Andreas Müller
|
import javax.persistence.Entity;
|
14 |
ee91bcd9
|
ben.clark
|
import javax.persistence.FetchType;
|
15 |
f793f35d
|
Andreas Müller
|
import javax.persistence.ManyToOne;
|
16 |
d3c778f3
|
a.babadshanjan
|
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 |
f793f35d
|
Andreas Müller
|
|
24 |
9479da48
|
Andreas Müller
|
import org.apache.log4j.Logger;
|
25 |
|
|
import org.hibernate.annotations.Cascade;
|
26 |
|
|
import org.hibernate.annotations.CascadeType;
|
27 |
ee91bcd9
|
ben.clark
|
import org.hibernate.envers.Audited;
|
28 |
5d49833e
|
ben.clark
|
import org.hibernate.search.annotations.Indexed;
|
29 |
|
|
import org.hibernate.search.annotations.IndexedEmbedded;
|
30 |
4208745a
|
ben.clark
|
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 |
9479da48
|
Andreas Müller
|
|
35 |
|
|
/**
|
36 |
c1093e8b
|
m.geoffroy
|
* 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 |
9479da48
|
Andreas Müller
|
* @author m.doering
|
43 |
|
|
* @version 1.0
|
44 |
|
|
* @created 08-Nov-2007 13:06:29
|
45 |
|
|
*/
|
46 |
d3c778f3
|
a.babadshanjan
|
@XmlAccessorType(XmlAccessType.FIELD)
|
47 |
|
|
@XmlType(name = "InProceedings", propOrder = {
|
48 |
|
|
"inProceedings"
|
49 |
|
|
})
|
50 |
|
|
@XmlRootElement(name = "InProceedings")
|
51 |
9479da48
|
Andreas Müller
|
@Entity
|
52 |
5d49833e
|
ben.clark
|
@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
|
53 |
ee91bcd9
|
ben.clark
|
@Audited
|
54 |
4208745a
|
ben.clark
|
@Configurable
|
55 |
|
|
public class InProceedings extends SectionBase<IReferenceBaseCacheStrategy<InProceedings>> {
|
56 |
f6765014
|
ben.clark
|
|
57 |
|
|
/**
|
58 |
|
|
*
|
59 |
|
|
*/
|
60 |
|
|
private static final long serialVersionUID = -286946099144494551L;
|
61 |
|
|
|
62 |
f793f35d
|
Andreas Müller
|
private static final Logger logger = Logger.getLogger(InProceedings.class);
|
63 |
d3c778f3
|
a.babadshanjan
|
|
64 |
|
|
@XmlElement(name = "InProceedings")
|
65 |
|
|
@XmlIDREF
|
66 |
|
|
@XmlSchemaType(name = "InProceedings")
|
67 |
ee91bcd9
|
ben.clark
|
@ManyToOne(fetch = FetchType.LAZY)
|
68 |
5d49833e
|
ben.clark
|
@IndexedEmbedded
|
69 |
ee91bcd9
|
ben.clark
|
@Cascade(CascadeType.SAVE_UPDATE)
|
70 |
9479da48
|
Andreas Müller
|
private Proceedings inProceedings;
|
71 |
|
|
|
72 |
4208745a
|
ben.clark
|
protected InProceedings() {
|
73 |
|
|
this.cacheStrategy = new StrictReferenceBaseDefaultCacheStrategy<InProceedings>();
|
74 |
|
|
}
|
75 |
|
|
|
76 |
c1093e8b
|
m.geoffroy
|
/**
|
77 |
|
|
* Creates a new empty "in proceedings" instance.
|
78 |
|
|
*
|
79 |
|
|
* @see #NewInstance(Proceedings)
|
80 |
|
|
*/
|
81 |
f793f35d
|
Andreas Müller
|
public static InProceedings NewInstance(){
|
82 |
|
|
InProceedings result = new InProceedings();
|
83 |
|
|
return result;
|
84 |
|
|
}
|
85 |
|
|
|
86 |
c1093e8b
|
m.geoffroy
|
/**
|
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 |
f793f35d
|
Andreas Müller
|
public static InProceedings NewInstance(Proceedings inProceedings){
|
94 |
|
|
InProceedings result = NewInstance();
|
95 |
|
|
result.setInProceedings(inProceedings);
|
96 |
|
|
return result;
|
97 |
|
|
}
|
98 |
|
|
|
99 |
|
|
|
100 |
c1093e8b
|
m.geoffroy
|
/**
|
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 |
9479da48
|
Andreas Müller
|
public Proceedings getInProceedings(){
|
109 |
|
|
return this.inProceedings;
|
110 |
|
|
}
|
111 |
|
|
|
112 |
|
|
/**
|
113 |
c1093e8b
|
m.geoffroy
|
* @see #getInProceedings()
|
114 |
9479da48
|
Andreas Müller
|
*/
|
115 |
|
|
public void setInProceedings(Proceedings inProceedings){
|
116 |
|
|
this.inProceedings = inProceedings;
|
117 |
|
|
}
|
118 |
|
|
|
119 |
|
|
}
|