eu.etaxonomy.cdm.model.occurrence
Class DerivationEvent

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.VersionableEntity
          extended by eu.etaxonomy.cdm.model.common.AnnotatableEntity
              extended by eu.etaxonomy.cdm.model.common.EventBase
                  extended by eu.etaxonomy.cdm.model.occurrence.DerivationEvent
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IEvent, IVersionableEntity, Serializable, Cloneable

@Entity
@Indexed
public class DerivationEvent
extends EventBase
implements Cloneable

Author:
a.mueller
See Also:
Serialized Form

Field Summary
protected  Set<DerivedUnitBase> derivatives
           
protected  Set<SpecimenOrObservationBase> originals
           
 
Fields inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
annotations, markers
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
protected DerivationEvent()
          Constructor
 
Method Summary
 void addDerivative(DerivedUnitBase derivative)
          Adds a new output specimen or observation for this derviation event.
 void addOriginal(SpecimenOrObservationBase original)
          Adds a new input specimen or observation for this derviation event.
 Object clone()
          Clones this derivation event.
 Set<DerivedUnitBase> getDerivatives()
          The specimen or observations that are the output for this derviation event.
 Set<SpecimenOrObservationBase> getOriginals()
          The specimen or observations that are the input for this derviation event.
 DerivationEventType getType()
          Returns the derivation event type
static DerivationEvent NewInstance()
          Deprecated. Use NewInstance(DerivationEventType) or any other factory method instead to make sure, the derivation event type is always set.
static DerivationEvent NewInstance(DerivationEventType type)
          Factory method
static DerivationEvent NewSimpleInstance(SpecimenOrObservationBase original, DerivedUnitBase derivative, DerivationEventType type)
          Factory method
 void removeDerivative(DerivedUnitBase derivative)
          Removes an output specimen or observation for this derviation event.
 void removeOriginal(SpecimenOrObservationBase original)
          Removes an input specimen or observation for this derviation event.
 void setType(DerivationEventType type)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.common.EventBase
getActor, getDescription, getTimeperiod, setActor, setDescription, setTimeperiod
 
Methods inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
 
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity
equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
 
Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid
 

Field Detail

originals

@IndexedEmbedded(depth=3)
protected Set<SpecimenOrObservationBase> originals

derivatives

protected Set<DerivedUnitBase> derivatives
Constructor Detail

DerivationEvent

protected DerivationEvent()
Constructor

Method Detail

NewInstance

@Deprecated
public static DerivationEvent NewInstance()
Deprecated. Use NewInstance(DerivationEventType) or any other factory method instead to make sure, the derivation event type is always set.

Factory method

Returns:

NewInstance

public static DerivationEvent NewInstance(DerivationEventType type)
Factory method

Returns:

NewSimpleInstance

public static DerivationEvent NewSimpleInstance(SpecimenOrObservationBase original,
                                                DerivedUnitBase derivative,
                                                DerivationEventType type)
Factory method

Returns:

getOriginals

public Set<SpecimenOrObservationBase> getOriginals()
The specimen or observations that are the input for this derviation event.

Returns:

addOriginal

public void addOriginal(SpecimenOrObservationBase original)
Adds a new input specimen or observation for this derviation event.

See Also:
getOriginals()

removeOriginal

public void removeOriginal(SpecimenOrObservationBase original)
Removes an input specimen or observation for this derviation event.

See Also:
getOriginals()

getDerivatives

public Set<DerivedUnitBase> getDerivatives()
The specimen or observations that are the output for this derviation event.

Returns:

addDerivative

public void addDerivative(DerivedUnitBase derivative)
Adds a new output specimen or observation for this derviation event.

See Also:
getDerivatives()

removeDerivative

public void removeDerivative(DerivedUnitBase derivative)
Removes an output specimen or observation for this derviation event.

See Also:
getDerivatives()

getType

public DerivationEventType getType()
Returns the derivation event type

Returns:

setType

public void setType(DerivationEventType type)

clone

public Object clone()
             throws CloneNotSupportedException
Clones this derivation event. This is a shortcut that enables to create a new instance that differs only slightly from this derivation event by modifying only some of the attributes.
This method overrides the clone method from EventBase.

Overrides:
clone in class EventBase
Throws:
CloneNotSupportedException
See Also:
EventBase.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.