eu.etaxonomy.cdm.model.taxon
Class TaxonRelationship
java.lang.Object
eu.etaxonomy.cdm.model.common.CdmBase
eu.etaxonomy.cdm.model.common.VersionableEntity
eu.etaxonomy.cdm.model.common.AnnotatableEntity
eu.etaxonomy.cdm.model.common.ReferencedEntityBase
eu.etaxonomy.cdm.model.common.RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
eu.etaxonomy.cdm.model.taxon.TaxonRelationship
- All Implemented Interfaces:
- IAnnotatableEntity, ICdmBase, IReferencedEntity, IVersionableEntity, Serializable, Cloneable
@ChildTaxaMustBeLowerRankThanParent(groups=Level3.class)
@ChildTaxaMustNotSkipRanks(groups=Level3.class)
@ChildTaxaMustDeriveNameFromParent(groups=Level3.class)
public class TaxonRelationship
- extends RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
The class representing a relationship between two ("accepted/correct") taxa.
This includes a taxon relationship type (for instance "congruent to" or
"misapplied name for").
This class corresponds in part to:
- Relationship according to the TDWG ontology
- TaxonRelationship according to the TCS
- Version:
- 1.0
- Author:
- m.doering
- See Also:
- Serialized Form
| Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
uuid |
| 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 |
TaxonRelationship
protected TaxonRelationship(Taxon from,
Taxon to,
TaxonRelationshipType type,
Reference citation,
String citationMicroReference)
- Class constructor: creates a new taxon relationship instance (with the
given "accepted/correct"
taxa, the given synonym relationship type
and with the reference source on which the relationship
assertion is based). Moreover the new taxon relationship will be added to
the respective sets of taxon relationships assigned to both taxa.
- Parameters:
from - the taxon instance to be involved as a source in the new taxon relationshipto - the taxon instance to be involved as a target in the new taxon relationshiptype - the taxon relationship type of the new taxon relationshipcitation - the reference source for the new taxon relationshipcitationMicroReference - the string with the details describing the exact localisation within the reference- See Also:
RelationshipBase
getFromTaxon
public Taxon getFromTaxon()
- Returns the
taxon involved as a source in this
taxon relationship.
- See Also:
getToTaxon(),
Taxon.getRelationsFromThisTaxon(),
RelationshipBase.getRelatedFrom(),
RelationshipBase.getType()
setFromTaxon
public void setFromTaxon(Taxon fromTaxon)
- Sets the given
taxon as a source in this taxon relationship.
Therefore this taxon relationship will be added to the corresponding
set of taxon relationships assigned to the given taxon. Furthermore if
the given taxon replaces an "old" one this taxon relationship will
be removed from the set of taxon relationships assigned to the "old"
source taxon.
- Parameters:
fromTaxon - the taxon instance to be set as a source in this synonym relationship- See Also:
getFromTaxon()
getToTaxon
public Taxon getToTaxon()
- Returns the
taxon involved as a target in this
taxon relationship.
- See Also:
getFromTaxon(),
Taxon.getRelationsToThisTaxon(),
RelationshipBase.getRelatedTo(),
RelationshipBase.getType()
setToTaxon
public void setToTaxon(Taxon toTaxon)
- Sets the given
taxon as a target in this taxon relationship.
Therefore this taxon relationship will be added to the corresponding
set of taxon relationships assigned to the given taxon. Furthermore if
the given taxon replaces an "old" one this taxon relationship will
be removed from the set of taxon relationships assigned to the "old"
target taxon.
- Parameters:
toTaxon - the taxon instance to be set as a target in this synonym relationship- See Also:
getToTaxon()
getRelatedFrom
protected Taxon getRelatedFrom()
- Specified by:
getRelatedFrom in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
getRelatedTo
protected Taxon getRelatedTo()
- Specified by:
getRelatedTo in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
getType
public TaxonRelationshipType getType()
- Specified by:
getType in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
setRelatedFrom
protected void setRelatedFrom(Taxon relatedFrom)
- Specified by:
setRelatedFrom in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
setRelatedTo
protected void setRelatedTo(Taxon relatedTo)
- Specified by:
setRelatedTo in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
setType
public void setType(TaxonRelationshipType type)
- Specified by:
setType in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
clone
public Object clone()
- Clones this TaxonRelationship. This is a shortcut that enables to create
a new instance that differs only slightly from this TaxonRelationship by
modifying only some of the attributes.
- Overrides:
clone in class RelationshipBase<Taxon,Taxon,TaxonRelationshipType>
- See Also:
RelationshipBase.clone(),
Object.clone()
Copyright © 2007-2012 EDIT. All Rights Reserved.