/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.apache.log4j.Logger;
import org.hibernate.envers.Audited;
-import org.hibernate.search.annotations.Indexed;
import org.springframework.beans.factory.annotation.Configurable;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
-import eu.etaxonomy.cdm.strategy.cache.common.IdentifiableEntityDefaultCacheStrategy;
import eu.etaxonomy.cdm.strategy.cache.description.SpecimenDescriptionDefaultCacheStrategy;
/**
* <P>
* This class corresponds to DescriptionsBaseType with an "Object" element
* according to the SDD schema.
- *
+ *
* @author a.mueller
* @version 1.0
* @created 08-Jul-2008
@XmlType(name = "SpecimenDescription")
@XmlRootElement(name = "SpecimenDescription")
@Entity
-@Indexed(index = "eu.etaxonomy.cdm.model.description.DescriptionBase")
+//@Indexed disabled to reduce clutter in indexes, since this type is not used by any search
+//@Indexed(index = "eu.etaxonomy.cdm.model.description.DescriptionBase")
@Audited
@Configurable
public class SpecimenDescription extends DescriptionBase<IIdentifiableEntityCacheStrategy<SpecimenDescription>> implements Cloneable {
private static final long serialVersionUID = -8506790426682192703L;
@SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(SpecimenDescription.class);
-
+
/**
* Class constructor: creates a new empty specimen description instance.
super();
this.cacheStrategy = new SpecimenDescriptionDefaultCacheStrategy();
}
-
+
/**
* Creates a new empty specimen description instance.
* Creates a new empty specimen description instance.
*/
public static SpecimenDescription NewInstance(SpecimenOrObservationBase specimen){
- SpecimenDescription result = new SpecimenDescription();
- result.addDescribedSpecimenOrObservation(specimen);
- return result;
+ SpecimenDescription description = new SpecimenDescription();
+ description.setDescribedSpecimenOrObservation(specimen);
+ return description;
}
-
+
//*********************** CLONE ********************************************************/
-
- /**
+
+ /**
* Clones <i>this</i> specimen description. This is a shortcut that enables to create
* a new instance that differs only slightly from <i>this</i> specimen description by
* modifying only some of the attributes.
- *
+ *
* @see eu.etaxonomy.cdm.model.description.DescriptionBase#clone()
* @see java.lang.Object#clone()
*/
result = (SpecimenDescription)super.clone();
//no changes to: taxonName
return result;
- }
-
+ }
+
}