eu.etaxonomy.cdm.model.name
Class HybridRelationship

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<NonViralName,NonViralName,HybridRelationshipType>
                      extended by eu.etaxonomy.cdm.model.name.HybridRelationship
All Implemented Interfaces:
IAnnotatableEntity, ICdmBase, IReferencedEntity, IVersionableEntity, Serializable, Cloneable, Comparable<HybridRelationship>

public class HybridRelationship
extends RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>
implements Cloneable, Comparable<HybridRelationship>

The class representing a hybrid relationship between one of the parents of a hybrid taxon name and the hybrid taxon name itself. A hybrid taxon name is a botanical taxon name assigned to a hybrid plant following the ICBN (Appendix I). A hybrid taxon name must have one of the hybrid flags set. The hybrid relationship includes a hybrid relationship type (for instance "first parent" or "female parent") and the article of the ICBN on which the hybrid taxon name relies.

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 HybridRelationship(NonViralName hybridName, NonViralName parentName, HybridRelationshipType type, Reference citation, String citationMicroReference, String ruleConsidered)
          Class constructor: creates a new hybrid relationship instance including its reference source and adds it to the respective botanical taxon name relation sets of both involved names.
protected HybridRelationship(NonViralName hybridName, NonViralName parentName, HybridRelationshipType type, String ruleConsidered)
          Class constructor: creates a new hybrid relationship instance with no reference and adds it to the respective botanical taxon name relation sets of both involved names.
 
Method Summary
 Object clone()
          Clones this hybrid relationship.
 int compareTo(HybridRelationship rel2)
           
 NonViralName getHybridName()
          Returns the botanical taxon name that plays the child role (the child is actually the hybrid taxon name) in this hybrid relationship.
 NonViralName getParentName()
          Returns the botanical taxon name that plays the parent role in this hybrid relationship.
protected  NonViralName getRelatedFrom()
           
protected  NonViralName getRelatedTo()
           
 String getRuleConsidered()
          Returns the ICBN rule considered (that is the article/note/recommendation in the nomenclatural code) for building the string representing the (child) hybrid taxon name within this hybrid relationship.
 HybridRelationshipType getType()
           
 void setHybridName(NonViralName hybridName)
           
 void setParentName(NonViralName parentName)
           
protected  void setRelatedFrom(NonViralName relatedFrom)
           
protected  void setRelatedTo(NonViralName relatedTo)
           
 void setRuleConsidered(String ruleConsidered)
           
 void setType(HybridRelationshipType 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

HybridRelationship

protected HybridRelationship(NonViralName hybridName,
                             NonViralName parentName,
                             HybridRelationshipType type,
                             String ruleConsidered)
Class constructor: creates a new hybrid relationship instance with no reference and adds it to the respective botanical taxon name relation sets of both involved names.

Parameters:
toName - the taxon name to be set as target for the new hybrid relationship
fromName - the taxon name to be set as source for the new hybrid relationship
type - the relationship type to be assigned to the new hybrid relationship
ruleConsidered - the string indicating the article of the ICBN for the hybrid taxon name
See Also:
#HybridRelationship(BotanicalName, BotanicalName, HybridRelationshipType, Reference, String, String), NonViralName.addHybridRelationship(HybridRelationship)

HybridRelationship

protected HybridRelationship(NonViralName hybridName,
                             NonViralName parentName,
                             HybridRelationshipType type,
                             Reference citation,
                             String citationMicroReference,
                             String ruleConsidered)
Class constructor: creates a new hybrid relationship instance including its reference source and adds it to the respective botanical taxon name relation sets of both involved names.

Parameters:
toName - the taxon name to be set as target for the new hybrid relationship
fromName - the taxon name to be set as source for the new hybrid relationship
type - the relationship type to be assigned to the new hybrid relationship
citation - the reference source for the new hybrid relationship
citationMicroReference - the string with the details describing the exact localisation within the reference
ruleConsidered - the string indicating the article of the ICBN for the hybrid taxon name
See Also:
#HybridRelationship(BotanicalName, BotanicalName, HybridRelationshipType, String), NonViralName.addHybridRelationship(HybridRelationship)
Method Detail

getParentName

public NonViralName getParentName()
Returns the botanical taxon name that plays the parent role in this hybrid relationship.

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

setParentName

public void setParentName(NonViralName parentName)
See Also:
getParentName()

getHybridName

public NonViralName getHybridName()
Returns the botanical taxon name that plays the child role (the child is actually the hybrid taxon name) in this hybrid relationship.

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

setHybridName

public void setHybridName(NonViralName hybridName)
See Also:
getHybridName()

getRuleConsidered

public String getRuleConsidered()
Returns the ICBN rule considered (that is the article/note/recommendation in the nomenclatural code) for building the string representing the (child) hybrid taxon name within this hybrid relationship.


setRuleConsidered

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

getRelatedFrom

protected NonViralName getRelatedFrom()
Specified by:
getRelatedFrom in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

getRelatedTo

protected NonViralName getRelatedTo()
Specified by:
getRelatedTo in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

getType

public HybridRelationshipType getType()
Specified by:
getType in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

setRelatedFrom

protected void setRelatedFrom(NonViralName relatedFrom)
Specified by:
setRelatedFrom in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

setRelatedTo

protected void setRelatedTo(NonViralName relatedTo)
Specified by:
setRelatedTo in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

setType

public void setType(HybridRelationshipType type)
Specified by:
setType in class RelationshipBase<NonViralName,NonViralName,HybridRelationshipType>

compareTo

public int compareTo(HybridRelationship rel2)
Specified by:
compareTo in interface Comparable<HybridRelationship>

clone

public Object clone()
Clones this hybrid relationship. This is a shortcut that enables to create a new instance that differs only slightly from this hybrid 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<NonViralName,NonViralName,HybridRelationshipType>
See Also:
RelationshipBase.clone(), Object.clone()


Copyright © 2007-2012 EDIT. All Rights Reserved.