2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.model
.name
;
12 import eu
.etaxonomy
.cdm
.model
.common
.RelationshipBase
;
13 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
14 import org
.apache
.log4j
.Logger
;
15 import javax
.persistence
.*;
18 * http://rs.tdwg.org/ontology/voc/TaxonName.rdf#NomenclaturalNote
21 * @created 08-Nov-2007 13:06:26
24 public class HybridRelationship
extends RelationshipBase
<BotanicalName
, BotanicalName
, HybridRelationshipType
> {
25 private static final Logger logger
= Logger
.getLogger(HybridRelationship
.class);
26 //The nomenclatural code rule considered. The article/note/recommendation in the code in question that is commented on in
28 private String ruleConsidered
;
30 //for hibernate, don't use
32 private HybridRelationship(){
38 * creates a relationship between 2 names and adds this relationship object to the respective name relation sets
42 * @param ruleConsidered
44 protected HybridRelationship(BotanicalName hybridName
, BotanicalName parentName
, HybridRelationshipType type
, String ruleConsidered
) {
45 this(parentName
, hybridName
, type
, null, null, ruleConsidered
);
49 * Constructor that adds immediately a relationship instance to both
50 * Creates a relationship between 2 names and adds this relationship object to the respective name relation sets
55 * @param citationMicroReference
56 * @param ruleConsidered
58 protected HybridRelationship(BotanicalName hybridName
, BotanicalName parentName
, HybridRelationshipType type
, ReferenceBase citation
, String citationMicroReference
, String ruleConsidered
) {
59 super(parentName
, hybridName
, type
, citation
, citationMicroReference
);
60 this.setRuleConsidered(ruleConsidered
);
63 public BotanicalName
getParentName(){
64 return super.getRelatedFrom();
66 public void setParentName(BotanicalName parentName
){
67 super.setRelatedFrom(parentName
);
70 public BotanicalName
getHybridName(){
71 return super.getRelatedTo();
73 public void setHybridName(BotanicalName hybridName
){
74 super.setRelatedTo(hybridName
);
77 public String
getRuleConsidered(){
78 return this.ruleConsidered
;
80 public void setRuleConsidered(String ruleConsidered
){
81 this.ruleConsidered
= ruleConsidered
;