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
.*;
16 import javax
.xml
.bind
.annotation
.XmlAccessType
;
17 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
18 import javax
.xml
.bind
.annotation
.XmlElement
;
19 import javax
.xml
.bind
.annotation
.XmlType
;
22 * http://rs.tdwg.org/ontology/voc/TaxonName.rdf#NomenclaturalNote
25 * @created 08-Nov-2007 13:06:26
27 @XmlAccessorType(XmlAccessType
.FIELD
)
28 @XmlType(name
= "HybridRelationship", propOrder
= {
32 public class HybridRelationship
extends RelationshipBase
<BotanicalName
, BotanicalName
, HybridRelationshipType
> {
34 private static final Logger logger
= Logger
.getLogger(HybridRelationship
.class);
36 //The nomenclatural code rule considered. The article/note/recommendation in the code in question that is commented on in
38 @XmlElement(name
= "RuleConsidered")
39 private String ruleConsidered
;
41 //for hibernate, don't use
43 private HybridRelationship(){
49 * creates a relationship between 2 names and adds this relationship object to the respective name relation sets
53 * @param ruleConsidered
55 protected HybridRelationship(BotanicalName hybridName
, BotanicalName parentName
, HybridRelationshipType type
, String ruleConsidered
) {
56 this(parentName
, hybridName
, type
, null, null, ruleConsidered
);
60 * Constructor that adds immediately a relationship instance to both
61 * Creates a relationship between 2 names and adds this relationship object to the respective name relation sets
66 * @param citationMicroReference
67 * @param ruleConsidered
69 protected HybridRelationship(BotanicalName hybridName
, BotanicalName parentName
, HybridRelationshipType type
, ReferenceBase citation
, String citationMicroReference
, String ruleConsidered
) {
70 super(parentName
, hybridName
, type
, citation
, citationMicroReference
);
71 this.setRuleConsidered(ruleConsidered
);
74 public BotanicalName
getParentName(){
75 return super.getRelatedFrom();
77 public void setParentName(BotanicalName parentName
){
78 super.setRelatedFrom(parentName
);
81 public BotanicalName
getHybridName(){
82 return super.getRelatedTo();
84 public void setHybridName(BotanicalName hybridName
){
85 super.setRelatedTo(hybridName
);
88 public String
getRuleConsidered(){
89 return this.ruleConsidered
;
91 public void setRuleConsidered(String ruleConsidered
){
92 this.ruleConsidered
= ruleConsidered
;