eu.etaxonomy.cdm.model.taxon
Class SynonymRelationship

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<Synonym,Taxon,SynonymRelationshipType>
                      extended by eu.etaxonomy.cdm.model.taxon.SynonymRelationship
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IReferencedEntity, IVersionableEntity, Serializable, Cloneable

@Entity
@HomotypicSynonymsShouldBelongToGroup(groups=Level3.class)
public class SynonymRelationship
extends RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

The class representing the assignation of a synonym to an ("accepted/correct") taxon. This includes a synonym relationship type (for instance "heterotypic synonym of"). Within a synonym relationship the synonym plays the source role and the taxon the target role. Between a synonym and an ("accepted/correct") taxon there should exist at most one synonym relationship.
Both, synonym and ("accepted/correct") taxon, must have the same concept reference.

This class corresponds in part to:

Version:
1.0
Author:
m.doering
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class eu.etaxonomy.cdm.model.common.RelationshipBase
RelationshipBase.Direction
 
Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.model.common.RelationshipBase
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 SynonymRelationship(Synonym synonym, Taxon taxon, SynonymRelationshipType type, Reference citation, String citationMicroReference)
          Class constructor: creates a new synonym relationship instance (with the given synonym, the given "accepted/correct" taxon, the given synonym relationship type and with the reference source on which the relationship assertion is based).
 
Method Summary
 Object clone()
          Clones this SynonymRelationship.
 Taxon getAcceptedTaxon()
          Returns the ("accepted/correct") taxon involved in this synonym relationship.
protected  Synonym getRelatedFrom()
           
protected  Taxon getRelatedTo()
           
 Synonym getSynonym()
          Returns the synonym involved in this synonym relationship.
 SynonymRelationshipType getType()
           
 boolean isPartial()
          Returns "true" if the ProParte flag is set.
 boolean isProParte()
          Returns "true" if the ProParte flag is set.
 void setAcceptedTaxon(Taxon acceptedTaxon)
          Sets the given ("accepted/valid") taxon to this synonym relationship.
 void setPartial(boolean partial)
           
 void setProParte(boolean proParte)
           
protected  void setRelatedFrom(Synonym relatedFrom)
           
protected  void setRelatedTo(Taxon relatedTo)
           
 void setSynonym(Synonym synonym)
          Sets the given synonym to this synonym relationship.
 void setType(SynonymRelationshipType type)
           
 
Methods inherited from class eu.etaxonomy.cdm.model.common.RelationshipBase
getDeletedObjects, isDoubtful, isRemoved, setDoubtful
 
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, 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
 

Constructor Detail

SynonymRelationship

protected SynonymRelationship(Synonym synonym,
                              Taxon taxon,
                              SynonymRelationshipType type,
                              Reference citation,
                              String citationMicroReference)
Class constructor: creates a new synonym relationship instance (with the given synonym, the given "accepted/correct" taxon, the given synonym relationship type and with the reference source on which the relationship assertion is based). Moreover the new synonym relationship will be added to the respective sets of synonym relationships assigned to the synonym and to the "accepted/correct" taxon.

Parameters:
synonym - the synonym instance involved in the new synonym relationship
taxon - the taxon instance involved in the new synonym relationship
type - the synonym relationship type of the new synonym relationship
citation - the reference source for the new synonym relationship
citationMicroReference - the string with the details describing the exact localisation within the reference
See Also:
RelationshipBase.RelationshipBase(IRelated, IRelated, RelationshipTermBase, Reference, String)
Method Detail

isProParte

public boolean isProParte()
Returns "true" if the ProParte flag is set. This indicates that, within this synonym relationship, the taxon name used as a synonym designated originally a real taxon which later has been split. In this case the synonym is therefore the synonym of at least two different ("accepted/correct") taxa and at least one more synonym relationship with the same synonym should exist.


setProParte

public void setProParte(boolean proParte)
See Also:
isProParte()

isPartial

public boolean isPartial()
Returns "true" if the ProParte flag is set. This indicates that, within this synonym relationship, the taxon name used as a synonym designated originally a real taxon which later has been lumped together with another one. In this case the ("accepted/correct") taxon has therefore at least two different synonyms (for the two lumped real taxa) and at least one more synonym relationship with the same ("accepted/correct") taxon should exist.


setPartial

public void setPartial(boolean partial)
See Also:
isPartial()

getAcceptedTaxon

public Taxon getAcceptedTaxon()
Returns the ("accepted/correct") taxon involved in this synonym relationship. The taxon plays the target role in the relationship.

See Also:
getSynonym(), Synonym.getAcceptedTaxa(), RelationshipBase.getRelatedTo(), RelationshipBase.getType()

setAcceptedTaxon

public void setAcceptedTaxon(Taxon acceptedTaxon)
Sets the given ("accepted/valid") taxon to this synonym relationship. Therefore this synonym relationship will be added to the corresponding set of synonym relationships assigned to the given taxon.

Parameters:
acceptedTaxon - the taxon instance to be set in this synonym relationship
See Also:
getAcceptedTaxon(), Taxon.getSynonymRelations()

getSynonym

public Synonym getSynonym()
Returns the synonym involved in this synonym relationship. The synonym plays the source role in the relationship.

See Also:
getAcceptedTaxon(), Taxon.getSynonyms(), RelationshipBase.getRelatedFrom(), RelationshipBase.getType()

setSynonym

public void setSynonym(Synonym synonym)
Sets the given synonym to this synonym relationship. Therefore this synonym relationship will be added to the corresponding set of synonym relationships assigned to the given synonym. Furthermore if the given synonym replaces an "old" one this synonym relationship will be removed from the set of synonym relationships assigned to the "old" synonym.

Parameters:
synonym - the synonym instance to be set in this synonym relationship
See Also:
getSynonym(), Synonym.getSynonymRelations()

getRelatedFrom

protected Synonym getRelatedFrom()
Specified by:
getRelatedFrom in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

getRelatedTo

protected Taxon getRelatedTo()
Specified by:
getRelatedTo in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

getType

public SynonymRelationshipType getType()
Specified by:
getType in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

setRelatedFrom

protected void setRelatedFrom(Synonym relatedFrom)
Specified by:
setRelatedFrom in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

setRelatedTo

protected void setRelatedTo(Taxon relatedTo)
Specified by:
setRelatedTo in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

setType

public void setType(SynonymRelationshipType type)
Specified by:
setType in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>

clone

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

Overrides:
clone in class RelationshipBase<Synonym,Taxon,SynonymRelationshipType>
See Also:
RelationshipBase.clone(), Object.clone()


Copyright © 2007-2013 EDIT. All Rights Reserved.