2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.reference
;
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
.XmlRootElement
;
17 import javax
.xml
.bind
.annotation
.XmlType
;
19 import org
.apache
.log4j
.Logger
;
20 import org
.hibernate
.envers
.Audited
;
21 import org
.hibernate
.search
.annotations
.Indexed
;
22 import org
.springframework
.beans
.factory
.annotation
.Configurable
;
24 import eu
.etaxonomy
.cdm
.model
.agent
.Institution
;
25 import eu
.etaxonomy
.cdm
.strategy
.cache
.reference
.IReferenceBaseCacheStrategy
;
26 import eu
.etaxonomy
.cdm
.strategy
.cache
.reference
.ReferenceBaseDefaultCacheStrategy
;
29 * This class represents reports. A report is a document characterized by
30 * information reflective of inquiry or investigation. Reports often address
31 * questions posed by individuals in government or science and are generally
32 * elaborated within an {@link eu.etaxonomy.cdm.model.agent.Institution institution}.
34 * This class corresponds, according to the TDWG ontology, to the publication type
35 * term (from PublicationTypeTerm): "Report".
39 * @created 08-Nov-2007 13:06:49
41 @XmlAccessorType(XmlAccessType
.FIELD
)
42 @XmlType(name
= "Report", propOrder
= {
45 @XmlRootElement(name
= "Report")
47 @Indexed(index
= "eu.etaxonomy.cdm.model.reference.ReferenceBase")
51 public class Report
extends PublicationBase
<IReferenceBaseCacheStrategy
<Report
>> implements Cloneable
{
52 private static final long serialVersionUID
= 2224085476416095383L;
53 @SuppressWarnings("unused")
54 private static final Logger logger
= Logger
.getLogger(Report
.class);
56 // @XmlElement(name = "Institution")
58 // @XmlSchemaType(name = "IDREF")
59 // @ManyToOne(fetch = FetchType.LAZY)
61 // @Cascade(CascadeType.SAVE_UPDATE)
62 // private Institution institution;
66 this.type
= ReferenceType
.Report
;
67 this.cacheStrategy
= new ReferenceBaseDefaultCacheStrategy
<Report
>();
71 * Creates a new empty report instance
73 * @see #NewInstance(Institution)
75 public static Report
NewInstance(){
76 Report result
= new Report();
81 * Creates a new report instance with the given {@link eu.etaxonomy.cdm.model.agent.Institution institution}.
83 * @param institution the institution where <i>this</i> report has
87 public static Report
NewInstance(Institution institution
){
88 Report result
= NewInstance();
89 result
.setInstitution(institution
);
95 * Returns the {@link eu.etaxonomy.cdm.model.agent.Institution institution} in which <i>this</i>
96 * report has been elaborated.
98 * @return the institution
99 * @see eu.etaxonomy.cdm.model.agent.Institution
101 public Institution
getInstitution(){
102 return this.institution
;
106 * @see #getInstitution()
108 public void setInstitution(Institution institution
){
109 this.institution
= institution
;
113 * Clones <i>this</i> report instance. This is a shortcut that enables to
114 * create a new instance that differs only slightly from <i>this</i>
115 * report instance by modifying only some of the attributes.<BR>
116 * This method overrides the clone method from {@link PublicationBase PublicationBase}.
118 * @see PublicationBase#clone()
119 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
120 * @see java.lang.Object#clone()
123 public Report
clone(){
124 Report result
= (Report
)super.clone();
125 //no changes to: institution