X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/33fe95bfffee62892c25189b21d49c977992cb4c..57606ee3dcf9db7efd1b7a5220ad8d53f4200d97:/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Report.java diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Report.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Report.java index d4f2a2bfda..c977e5efd1 100644 --- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Report.java +++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Report.java @@ -11,19 +11,33 @@ package eu.etaxonomy.cdm.model.reference; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlIDREF; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; import org.apache.log4j.Logger; import org.hibernate.annotations.Cascade; import org.hibernate.annotations.CascadeType; +import org.hibernate.envers.Audited; +import org.hibernate.search.annotations.Indexed; +import org.hibernate.search.annotations.IndexedEmbedded; +import org.springframework.beans.factory.annotation.Configurable; import eu.etaxonomy.cdm.model.agent.Institution; +import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy; +import eu.etaxonomy.cdm.strategy.cache.reference.ReferenceBaseDefaultCacheStrategy; /** * This class represents reports. A report is a document characterized by * information reflective of inquiry or investigation. Reports often address * questions posed by individuals in government or science and are generally - * elaborated within an {@link agent.Institution institution}. + * elaborated within an {@link eu.etaxonomy.cdm.model.agent.Institution institution}. *
* This class corresponds, according to the TDWG ontology, to the publication type
* term (from PublicationTypeTerm): "Report".
@@ -32,11 +46,34 @@ import eu.etaxonomy.cdm.model.agent.Institution;
* @version 1.0
* @created 08-Nov-2007 13:06:49
*/
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Report", propOrder = {
+// "institution"
+})
+@XmlRootElement(name = "Report")
@Entity
-public class Report extends PublicationBase {
- static Logger logger = Logger.getLogger(Report.class);
- private Institution institution;
+@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
+@Audited
+@Configurable
+public class Report extends PublicationBase
- * This method overrides the generic and inherited
- * ReferenceBase#generateTitle() method.
- *
- * @return the string identifying this report
- * @see ReferenceBase#generateTitle()
- * @see common.IdentifiableEntity#getTitleCache()
- * @see common.IdentifiableEntity#generateTitle()
- * @see strategy.cache.common.IIdentifiableEntityCacheStrategy#getTitleCache()
+
+ /**
+ * Clones this report instance. This is a shortcut that enables to
+ * create a new instance that differs only slightly from this
+ * report instance by modifying only some of the attributes.
+ * This method overrides the clone method from {@link PublicationBase PublicationBase}.
+ *
+ * @see PublicationBase#clone()
+ * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
+ * @see java.lang.Object#clone()
*/
@Override
- public String generateTitle(){
- //TODO is this method really needed or is ReferenceBase#generateTitle() enough?
- return "";
+ public Report clone(){
+ Report result = (Report)super.clone();
+ //no changes to: institution
+ return result;
}
+
}
\ No newline at end of file