Project

General

Profile

« Previous | Next » 

Revision 9bcce793

Added by Marc Geoffroy about 16 years ago

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/SynonymRelationship.java
79 79
	 * synonym relationship. The taxon plays the target role in the relationship.
80 80
	 *  
81 81
	 * @see    #getSynonym()
82
	 * @see    Synonym#getAcceptedTaxa()
82 83
	 * @see    common.RelationshipBase#getRelatedTo()
83 84
	 * @see    common.RelationshipBase#getType()
84 85
	 */
......
97 98
	 *  
98 99
	 * @param acceptedTaxon	the taxon instance to be set in <i>this</i> synonym relationship
99 100
	 * @see   				#getAcceptedTaxon()
101
	 * @see   				Taxon#getSynonymRelations()
100 102
	 */
101 103
	protected void setAcceptedTaxon(Taxon acceptedTaxon){
102 104
		super.setRelatedTo(acceptedTaxon);
......
107 109
	 * relationship. The synonym plays the source role in the relationship.
108 110
	 *  
109 111
	 * @see    #getAcceptedTaxon()
112
	 * @see    Taxon#getSynonyms()
110 113
	 * @see    common.RelationshipBase#getRelatedFrom()
111 114
	 * @see    common.RelationshipBase#getType()
112 115
	 */
......
124 127
	 *  
125 128
	 * @param synoynm	the synonym instance to be set in <i>this</i> synonym relationship
126 129
	 * @see    			#getSynonym()
130
	 * @see   			Synonym#getSynonymRelations()
127 131
	 */
128 132
	protected void setSynonym(Synonym synoynm){
129 133
		super.setRelatedFrom(synoynm);
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/TaxonRelationship.java
29 29
 * The class representing a relationship between two {@link Taxon ("accepted/correct") taxa}. 
30 30
 * This includes a {@link TaxonRelationshipType taxon relationship type} (for instance "congruent to" or
31 31
 * "misapplied name for").
32
 * <P>
33
 * This class corresponds in part to: <ul>
34
 * <li> Relationship according to the TDWG ontology
35
 * <li> TaxonRelationship according to the TCS
36
 * </ul>
32 37
 * 
33 38
 * @author m.doering
34 39
 * @version 1.0
......
55 60
	}
56 61
	
57 62
	/**
58
	 * Constructor, creates a new TaxonRelationship and adds it to the "to"-Taxon and the "from"-Taxon. 
59
	 * @param from Taxon this relationship starts at.
60
	 * @param to Taxon this relationship points to.
61
	 * @param type The TaxonRelationshipType this relationship represents.
62
	 * @param citation This relationship is referenced in this citation
63
	 * @param citationMicroReference The microreference (page, figur, ...) of the citation 
63
	 * Class constructor: creates a new taxon relationship instance (with the
64
	 * given "accepted/correct" {@link Taxon taxa}, the given {@link SynonymRelationshipType synonym relationship type}
65
	 * and with the {@link reference.ReferenceBase reference source} on which the relationship
66
	 * assertion is based). Moreover the new taxon relationship will be added to
67
	 * the respective sets of taxon relationships assigned to both taxa.
68
	 * 
69
	 * @param from 						the taxon instance to be involved as a source in the new taxon relationship
70
	 * @param to						the taxon instance to be involved as a target in the new taxon relationship
71
	 * @param type						the taxon relationship type of the new taxon relationship
72
	 * @param citation					the reference source for the new taxon relationship
73
	 * @param citationMicroReference	the string with the details describing the exact localisation within the reference
74
	 * @see 							common.RelationshipBase#RelationshipBase(IRelated, IRelated, RelationshipTermBase, ReferenceBase, String)
64 75
	 */
65 76
	protected TaxonRelationship(Taxon from, Taxon to, TaxonRelationshipType type, ReferenceBase citation, String citationMicroReference) {
66 77
		super(from, to, type, citation, citationMicroReference);
67 78
	}
68 79
	
69 80
	
81
	/** 
82
	 * Returns the {@link Taxon taxon} involved as a source in <i>this</i>
83
	 * taxon relationship.
84
	 *  
85
	 * @see    #getToTaxon()
86
	 * @see    Taxon#getRelationsFromThisTaxon()
87
	 * @see    common.RelationshipBase#getRelatedFrom()
88
	 * @see    common.RelationshipBase#getType()
89
	 */
70 90
	@Transient
71 91
	public Taxon getFromTaxon(){
72 92
		return getRelatedFrom();
73 93
	}
94
	/** 
95
	 * Sets the given {@link Taxon taxon} as a source in <i>this</i> taxon relationship.
96
	 * Therefore <i>this</i> taxon relationship will be added to the corresponding
97
	 * set of taxon relationships assigned to the given taxon. Furthermore if
98
	 * the given taxon replaces an "old" one <i>this</i> taxon relationship will
99
	 * be removed from the set of taxon relationships assigned to the "old"
100
	 * source taxon.
101
	 *  
102
	 * @param fromTaxon	the taxon instance to be set as a source in <i>this</i> synonym relationship
103
	 * @see    			#getFromTaxon()
104
	 */
74 105
	public void setFromTaxon(Taxon fromTaxon){
75 106
		setRelatedFrom(fromTaxon);
76 107
	}
77 108

  
109
	/** 
110
	 * Returns the {@link Taxon taxon} involved as a target in <i>this</i>
111
	 * taxon relationship.
112
	 *  
113
	 * @see    #getFromTaxon()
114
	 * @see    Taxon#getRelationsToThisTaxon()
115
	 * @see    common.RelationshipBase#getRelatedTo()
116
	 * @see    common.RelationshipBase#getType()
117
	 */
78 118
	@Transient
79 119
	public Taxon getToTaxon(){
80 120
		return getRelatedTo();
81 121
	}
82 122

  
123
	/** 
124
	 * Sets the given {@link Taxon taxon} as a target in <i>this</i> taxon relationship.
125
	 * Therefore <i>this</i> taxon relationship will be added to the corresponding
126
	 * set of taxon relationships assigned to the given taxon. Furthermore if
127
	 * the given taxon replaces an "old" one <i>this</i> taxon relationship will
128
	 * be removed from the set of taxon relationships assigned to the "old"
129
	 * target taxon.
130
	 *  
131
	 * @param toTaxon	the taxon instance to be set as a target in <i>this</i> synonym relationship
132
	 * @see    			#getToTaxon()
133
	 */
83 134
	public void setToTaxon(Taxon toTaxon){
84 135
		setRelatedTo(toTaxon);
85 136
	}

Also available in: Unified diff