Committing large number of changes relating to versioning implementation (#108)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / reference / PrintSeries.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
23 /**
24 * This class represents collections of {@link PrintedUnitBase printed published references} which
25 * are grouped according to topic or any other feature.
26 * <P>
27 * This class corresponds, according to the TDWG ontology, to the publication type
28 * term (from PublicationTypeTerm): "BookSeries".
29 *
30 * @author m.doering
31 * @version 1.0
32 * @created 08-Nov-2007 13:06:45
33 */
34 @XmlAccessorType(XmlAccessType.FIELD)
35 @XmlType(name = "PrintSeries", propOrder = {
36 "series"
37 })
38 @XmlRootElement(name = "PrintSeries")
39 @Entity
40 @Audited
41 public class PrintSeries extends PublicationBase implements Cloneable {
42 private static final Logger logger = Logger.getLogger(PrintSeries.class);
43
44 @XmlElement(name = "Series")
45 private String series;
46
47 /**
48 * Creates a new empty print series instance.
49 */
50 public static PrintSeries NewInstance(){
51 PrintSeries result = new PrintSeries();
52 return result;
53 }
54
55 /**
56 * Creates a new print series instance with a given title string.
57 */
58 public static PrintSeries NewInstance(String series){
59 PrintSeries result = NewInstance();
60 result.setSeries(series);
61 return result;
62 }
63
64 /**
65 * Returns the string representing the title of <i>this</i> print series.
66 *
67 * @return the string representing the print series
68 */
69 public String getSeries(){
70 return this.series;
71 }
72
73 /**
74 * @see #getSeries()
75 */
76 public void setSeries(String series){
77 this.series = series;
78 }
79
80 //*********** CLONE **********************************/
81
82 /**
83 * Clones <i>this</i> print series instance. This is a shortcut that enables to
84 * create a new instance that differs only slightly from <i>this</i>
85 * print series instance by modifying only some of the attributes.<BR>
86 * This method overrides the clone method from {@link PublicationBase PublicationBase}.
87 *
88 * @see PublicationBase#clone()
89 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
90 * @see java.lang.Object#clone()
91 */
92 @Override
93 public PrintSeries clone(){
94 PrintSeries result = (PrintSeries)super.clone();
95 //no changes to: series
96 return result;
97 }
98 }