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
.description
;
12 import javax
.persistence
.Entity
;
13 import javax
.xml
.bind
.annotation
.XmlAccessType
;
14 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
15 import javax
.xml
.bind
.annotation
.XmlRootElement
;
16 import javax
.xml
.bind
.annotation
.XmlType
;
18 import org
.apache
.log4j
.Logger
;
19 import org
.hibernate
.envers
.Audited
;
20 import org
.hibernate
.search
.annotations
.Indexed
;
21 import org
.springframework
.beans
.factory
.annotation
.Configurable
;
23 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
24 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IIdentifiableEntityCacheStrategy
;
25 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IdentifiableEntityDefaultCacheStrategy
;
28 * This class represents descriptions for {@link SpecimenOrObservationBase specimens or observations}.
30 * This class corresponds to DescriptionsBaseType with an "Object" element
31 * according to the SDD schema.
35 * @created 08-Jul-2008
37 @XmlAccessorType(XmlAccessType
.FIELD
)
38 @XmlType(name
= "SpecimenDescription")
39 @XmlRootElement(name
= "SpecimenDescription")
41 @Indexed(index
= "eu.etaxonomy.cdm.model.description.DescriptionBase")
44 public class SpecimenDescription
extends DescriptionBase
<IIdentifiableEntityCacheStrategy
<SpecimenDescription
>> {
45 private static final long serialVersionUID
= -8506790426682192703L;
46 @SuppressWarnings("unused")
47 private static final Logger logger
= Logger
.getLogger(SpecimenDescription
.class);
51 * Class constructor: creates a new empty specimen description instance.
53 public SpecimenDescription() {
55 this.cacheStrategy
= new IdentifiableEntityDefaultCacheStrategy
<SpecimenDescription
>();
60 * Creates a new empty specimen description instance.
62 public static SpecimenDescription
NewInstance(){
63 return new SpecimenDescription();
67 * Creates a new empty specimen description instance.
69 public static SpecimenDescription
NewInstance(SpecimenOrObservationBase specimen
){
70 SpecimenDescription result
= new SpecimenDescription();
71 result
.addDescribedSpecimenOrObservation(specimen
);