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
.persistence
.ManyToOne
;
15 import javax
.xml
.bind
.annotation
.XmlAccessType
;
16 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
17 import javax
.xml
.bind
.annotation
.XmlElement
;
18 import javax
.xml
.bind
.annotation
.XmlIDREF
;
19 import javax
.xml
.bind
.annotation
.XmlRootElement
;
20 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
21 import javax
.xml
.bind
.annotation
.XmlType
;
23 import org
.apache
.log4j
.Logger
;
24 import org
.hibernate
.annotations
.Cascade
;
25 import org
.hibernate
.annotations
.CascadeType
;
27 import eu
.etaxonomy
.cdm
.model
.agent
.Institution
;
30 * This class represents reports. A report is a document characterized by
31 * information reflective of inquiry or investigation. Reports often address
32 * questions posed by individuals in government or science and are generally
33 * elaborated within an {@link eu.etaxonomy.cdm.model.agent.Institution institution}.
35 * This class corresponds, according to the TDWG ontology, to the publication type
36 * term (from PublicationTypeTerm): "Report".
40 * @created 08-Nov-2007 13:06:49
42 @XmlAccessorType(XmlAccessType
.FIELD
)
43 @XmlType(name
= "Report", propOrder
= {
46 @XmlRootElement(name
= "Report")
48 public class Report
extends PublicationBase
implements Cloneable
{
49 static Logger logger
= Logger
.getLogger(Report
.class);
51 @XmlElement(name
= "Institution")
53 @XmlSchemaType(name
= "IDREF")
54 private Institution institution
;
57 * Creates a new empty report instance
59 * @see #NewInstance(Institution)
61 public static Report
NewInstance(){
62 Report result
= new Report();
67 * Creates a new report instance with the given {@link eu.etaxonomy.cdm.model.agent.Institution institution}.
69 * @param institution the institution where <i>this</i> report has
73 public static Report
NewInstance(Institution institution
){
74 Report result
= NewInstance();
75 result
.setInstitution(institution
);
81 * Returns the {@link eu.etaxonomy.cdm.model.agent.Institution institution} in which <i>this</i>
82 * report has been elaborated.
84 * @return the institution
85 * @see eu.etaxonomy.cdm.model.agent.Institution
88 @Cascade({CascadeType
.SAVE_UPDATE
})
89 public Institution
getInstitution(){
90 return this.institution
;
93 * @see #getInstitution()
95 public void setInstitution(Institution institution
){
96 this.institution
= institution
;
102 * Clones <i>this</i> report instance. This is a shortcut that enables to
103 * create a new instance that differs only slightly from <i>this</i>
104 * report instance by modifying only some of the attributes.<BR>
105 * This method overrides the clone method from {@link PublicationBase PublicationBase}.
107 * @see PublicationBase#clone()
108 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
109 * @see java.lang.Object#clone()
112 public Report
clone(){
113 Report result
= (Report
)super.clone();
114 //no changes to: institution