eu.etaxonomy.cdm.model.name
Class NameRelationship

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<TaxonNameBase,TaxonNameBase,NameRelationshipType>
                      extended by eu.etaxonomy.cdm.model.name.NameRelationship
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IReferencedEntity, IVersionableEntity, Serializable, Cloneable

@NamesWithHomotypicRelationshipsMustBelongToSameGroup(groups=Level3.class)
public class NameRelationship
extends RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>
implements Cloneable

The class representing a relationship between two taxon names according to the nomenclatural code which governs both of them. This includes a name relationship type (for instance "later homonym" or "orthographic variant") and the article of the corresponding nomenclatural code on which the assignation of the relationship type is based.

This class corresponds partially 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 NameRelationship(TaxonNameBase toName, TaxonNameBase fromName, NameRelationshipType type, Reference citation, String citationMicroReference, String ruleConsidered)
          Class constructor: creates a new name relationship instance including its reference source and adds it to the respective taxon name relation sets of both involved names.
protected NameRelationship(TaxonNameBase toName, TaxonNameBase fromName, NameRelationshipType type, String ruleConsidered)
          Class constructor: creates a new name relationship instance with no reference and adds it to the respective taxon name relation sets of both involved names.
 
Method Summary
 Object clone()
          Clones this name relationship.
 TaxonNameBase getFromName()
          Returns the taxon name that plays the source role in this taxon name relationship.
 TaxonNameBase getRelatedFrom()
           
 TaxonNameBase getRelatedTo()
           
 String getRuleConsidered()
          Returns the nomenclatural code rule considered (that is the article/note/recommendation in the nomenclatural code ruling the taxon name(s) of this nomenclatural status).
 TaxonNameBase getToName()
          Returns the taxon name that plays the target role in this taxon name relationship.
 NameRelationshipType getType()
           
protected  void setRelatedFrom(TaxonNameBase relatedFrom)
           
protected  void setRelatedTo(TaxonNameBase relatedTo)
           
 void setRuleConsidered(String ruleConsidered)
           
 void setType(NameRelationshipType 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, 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

NameRelationship

protected NameRelationship(TaxonNameBase toName,
                           TaxonNameBase fromName,
                           NameRelationshipType type,
                           String ruleConsidered)
Class constructor: creates a new name relationship instance with no reference and adds it to the respective taxon name relation sets of both involved names.

Parameters:
toName - the taxon name to be set as target for the new name relationship
fromName - the taxon name to be set as source for the new name relationship
type - the relationship type to be assigned to the new name relationship
ruleConsidered - the string indicating the article of the nomenclatural code for the new name relationship
See Also:
NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, Reference, String, String), TaxonNameBase.addNameRelationship(NameRelationship), TaxonNameBase.addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), TaxonNameBase.addRelationshipToName(TaxonNameBase, NameRelationshipType, String)

NameRelationship

protected NameRelationship(TaxonNameBase toName,
                           TaxonNameBase fromName,
                           NameRelationshipType type,
                           Reference citation,
                           String citationMicroReference,
                           String ruleConsidered)
Class constructor: creates a new name relationship instance including its reference source and adds it to the respective taxon name relation sets of both involved names.

Parameters:
toName - the taxon name to be set as target for the new name relationship
fromName - the taxon name to be set as source for the new name relationship
type - the relationship type to be assigned to the new name relationship
citation - the reference source for the new name relationship
citationMicroReference - the string with the details describing the exact localisation within the reference
ruleConsidered - the string indicating the article of the nomenclatural code justifying the new name relationship
See Also:
NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, String), TaxonNameBase.addNameRelationship(NameRelationship), TaxonNameBase.addRelationshipFromName(TaxonNameBase, NameRelationshipType, String), TaxonNameBase.addRelationshipToName(TaxonNameBase, NameRelationshipType, String)
Method Detail

getFromName

public TaxonNameBase getFromName()
Returns the taxon name that plays the source role in this taxon name relationship.

See Also:
getToName(), RelationshipBase.getRelatedFrom()

getToName

public TaxonNameBase getToName()
Returns the taxon name that plays the target role in this taxon name relationship.

See Also:
getFromName(), RelationshipBase.getRelatedTo()

getRuleConsidered

public String getRuleConsidered()
Returns the nomenclatural code rule considered (that is the article/note/recommendation in the nomenclatural code ruling the taxon name(s) of this nomenclatural status). The considered rule gives the reason why the nomenclatural status type has been assigned to the taxon name(s).


setRuleConsidered

public void setRuleConsidered(String ruleConsidered)
See Also:
getRuleConsidered()

getRelatedFrom

public TaxonNameBase getRelatedFrom()
Specified by:
getRelatedFrom in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

getRelatedTo

public TaxonNameBase getRelatedTo()
Specified by:
getRelatedTo in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

getType

public NameRelationshipType getType()
Specified by:
getType in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

setRelatedFrom

protected void setRelatedFrom(TaxonNameBase relatedFrom)
Specified by:
setRelatedFrom in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

setRelatedTo

protected void setRelatedTo(TaxonNameBase relatedTo)
Specified by:
setRelatedTo in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

setType

public void setType(NameRelationshipType type)
Specified by:
setType in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>

clone

public Object clone()
Clones this name relationship. This is a shortcut that enables to create a new instance that differs only slightly from this name relationship by modifying only some of the attributes.
CAUTION: Cloning a relationship will not add the relationship to the according relatedFrom and relatedTo objects. The method is meant to be used mainly for internal purposes (e.g. used within TaxonNameBase.clone()

Overrides:
clone in class RelationshipBase<TaxonNameBase,TaxonNameBase,NameRelationshipType>
See Also:
RelationshipBase.clone(), Object.clone()


Copyright © 2007-2012 EDIT. All Rights Reserved.