eu.etaxonomy.cdm.model.common
Class RelationshipBase<FROM extends IRelated,TO extends IRelated,TYPE extends RelationshipTermBase>

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.ReferencedEntityBase
                  extended by eu.etaxonomy.cdm.model.common.RelationshipBase<FROM,TO,TYPE>
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IReferencedEntity, IVersionableEntity, Serializable, Cloneable
Direct Known Subclasses:
HybridRelationship, NameRelationship, SynonymRelationship, TaxonRelationship

public abstract class RelationshipBase<FROM extends IRelated,TO extends IRelated,TYPE extends RelationshipTermBase>
extends ReferencedEntityBase
implements Cloneable

Author:
m.doering
See Also:
Serialized Form

Nested Class Summary
static class RelationshipBase.Direction
          enumeration and String representation of the relatedFrom and relatedTo bean propertys.
 
Field Summary
protected  Set<IRelated> deletedObjects
           
 
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 RelationshipBase()
           
protected RelationshipBase(FROM from, TO to, TYPE type, Reference citation, String citationMicroReference)
          Creates a relationship between 2 objects and adds it to the respective relation sets of both objects.
 
Method Summary
 Object clone()
          Clones this relationship.
 Set getDeletedObjects()
           
protected abstract  FROM getRelatedFrom()
           
protected abstract  TO getRelatedTo()
           
abstract  TYPE getType()
           
 boolean isDoubtful()
          A boolean flag that marks the relationship between two objects as doubtful Please be aware that this flag should not be used to mark any status of the objects themselfs.
 boolean isRemoved()
           
 void setDoubtful(boolean doubtful)
           
protected abstract  void setRelatedFrom(FROM relatedFrom)
           
protected abstract  void setRelatedTo(TO relatedTo)
           
abstract  void setType(TYPE type)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.common.ReferencedEntityBase
getCitation, getCitationMicroReference, getOriginalNameString, setCitation, setCitationMicroReference, setOriginalNameString
 
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, 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

deletedObjects

protected Set<IRelated> deletedObjects
Constructor Detail

RelationshipBase

protected RelationshipBase()

RelationshipBase

protected RelationshipBase(FROM from,
                           TO to,
                           TYPE type,
                           Reference citation,
                           String citationMicroReference)
Creates a relationship between 2 objects and adds it to the respective relation sets of both objects.

Parameters:
from -
to -
type -
citation -
citationMicroReference -
Method Detail

getType

public abstract TYPE getType()

setType

public abstract void setType(TYPE type)

getRelatedFrom

protected abstract FROM getRelatedFrom()

setRelatedFrom

protected abstract void setRelatedFrom(FROM relatedFrom)

getRelatedTo

protected abstract TO getRelatedTo()

setRelatedTo

protected abstract void setRelatedTo(TO relatedTo)

isDoubtful

public boolean isDoubtful()
A boolean flag that marks the relationship between two objects as doubtful Please be aware that this flag should not be used to mark any status of the objects themselfs. E.g. when marking a synonym relationship as doubtful this means that it is doubtful that the synonym is really a synonym to the taxon. It does not mean that the synonym is doubtfully a synonym.

Returns:
true, if the relationship is doubtful, false otherwise

setDoubtful

public void setDoubtful(boolean doubtful)

isRemoved

public boolean isRemoved()

getDeletedObjects

public Set getDeletedObjects()

clone

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

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


Copyright © 2007-2012 EDIT. All Rights Reserved.