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