StrictReferenceBase matchable
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / reference / Proceedings.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.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElement;
17 import javax.xml.bind.annotation.XmlRootElement;
18 import javax.xml.bind.annotation.XmlType;
19
20 import org.apache.log4j.Logger;
21 import org.hibernate.envers.Audited;
22 import org.hibernate.search.annotations.Field;
23 import org.hibernate.search.annotations.Index;
24 import org.hibernate.search.annotations.Indexed;
25 import org.springframework.beans.factory.annotation.Configurable;
26
27 import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
28 import eu.etaxonomy.cdm.strategy.cache.reference.StrictReferenceBaseDefaultCacheStrategy;
29
30 /**
31 * This class represents conference proceedings. Proceedings are a
32 * collection of academic papers that are published in the context of an
33 * academic conference. Each paper typically is quite isolated from the other
34 * papers in the proceedings. Proceedings are published in-house, by the
35 * organizing institution of the conference, or via an academic publisher.
36 * <P>
37 * This class corresponds, according to the TDWG ontology, to the publication type
38 * term (from PublicationTypeTerm): "ConferenceProceedings".
39 *
40 * @author m.doering
41 * @version 1.0
42 * @created 08-Nov-2007 13:06:45
43 */
44 @XmlAccessorType(XmlAccessType.FIELD)
45 @XmlType(name = "Proceedings", propOrder = {
46 "organization"
47 })
48 @XmlRootElement(name = "Proceedings")
49 @Entity
50 @Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
51 @Audited
52 @Configurable
53 public class Proceedings extends PrintedUnitBase<IReferenceBaseCacheStrategy<Proceedings>> implements Cloneable {
54 private static final Logger logger = Logger.getLogger(Proceedings.class);
55
56 //The conference sponsor
57 @XmlElement(name = "Organization")
58 @Field(index=Index.TOKENIZED)
59 private String organization;
60
61
62 /**
63 * Creates a new empty proceedings instance.
64 *
65 * @see #NewInstance(String)
66 */
67 public static Proceedings NewInstance(){
68 Proceedings result = new Proceedings();
69 return result;
70 }
71
72 /**
73 * Creates a new proceedings instance with the given organization
74 * responsible for the conference.
75 *
76 * @see #NewInstance(String)
77 */
78 public static Proceedings NewInstance(String organization){
79 Proceedings result = NewInstance();
80 result.setOrganization(organization);
81 return result;
82 }
83
84 protected Proceedings(){
85 super();
86 this.cacheStrategy = new StrictReferenceBaseDefaultCacheStrategy<Proceedings>();
87 }
88
89
90 /**
91 * Returns the string representing the organization responsible for the
92 * conference in the context of which <i>this</i> conference proceedings
93 * has been printed.
94 *
95 * @return the string with the responsible organization
96 */
97 public String getOrganization(){
98 return this.organization;
99 }
100 /**
101 * @see #getOrganization()
102 */
103 public void setOrganization(String organization){
104 this.organization = organization;
105 }
106
107
108 //*********** CLONE **********************************/
109
110 /**
111 * Clones <i>this</i> conference proceedings. This is a shortcut that enables to
112 * create a new instance that differs only slightly from <i>this</i> conference
113 * proceedings by modifying only some of the attributes.<BR>
114 * This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
115 *
116 * @see StrictReferenceBase#clone()
117 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
118 * @see java.lang.Object#clone()
119 */
120 @Override
121 public Proceedings clone(){
122 Proceedings result = (Proceedings)super.clone();
123 //no changes to: organization
124 return result;
125 }
126
127 }