1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.model.taxon;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
|
15
|
import eu.etaxonomy.cdm.model.common.ITreeNode;
|
16
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
17
|
|
18
|
|
19
|
/**
|
20
|
* @author n.hoffmann
|
21
|
* @created Sep 18, 2009
|
22
|
*/
|
23
|
public interface ITaxonTreeNode extends /*ITreeNode<TaxonNode>, */ IAnnotatableEntity {
|
24
|
|
25
|
/**
|
26
|
* Adds a taxon node as a child of the ITreeNode at the last position.
|
27
|
*
|
28
|
* @param childNode
|
29
|
* @param citation
|
30
|
* @param microCitation
|
31
|
* @param synonymToBeUsed
|
32
|
* @return the child node
|
33
|
*/
|
34
|
public TaxonNode addChildNode(TaxonNode childNode, Reference citation, String microCitation);
|
35
|
|
36
|
/**
|
37
|
* Adds a taxon node as a child of this {@link ITreeNode} at the index position.
|
38
|
* @param childNode
|
39
|
* @param index
|
40
|
* @param citation
|
41
|
* @param microCitation
|
42
|
* @return
|
43
|
*/
|
44
|
public TaxonNode addChildNode(TaxonNode childNode, int index, Reference citation, String microCitation);
|
45
|
|
46
|
|
47
|
/**
|
48
|
* Adds a taxon as a child of the ITreeNode at the last position.
|
49
|
*
|
50
|
* @param taxon
|
51
|
* @param citation
|
52
|
* @param microCitation
|
53
|
* @return the child node
|
54
|
*/
|
55
|
public TaxonNode addChildTaxon(Taxon taxon, Reference citation, String microCitation);
|
56
|
|
57
|
|
58
|
/**
|
59
|
* Adds a taxon as a child of the ITreeNode at the index position.
|
60
|
*
|
61
|
* @param taxon
|
62
|
* @param citation
|
63
|
* @param microCitation
|
64
|
* @return the child node
|
65
|
*/
|
66
|
public TaxonNode addChildTaxon(Taxon taxon, int index, Reference citation, String microCitation);
|
67
|
|
68
|
/**
|
69
|
* Whether this TreeNode has child nodes attached
|
70
|
*
|
71
|
* @return true if this node has children
|
72
|
*/
|
73
|
public boolean hasChildNodes();
|
74
|
|
75
|
/**
|
76
|
* This recursively removes all child nodes from this node and from this taxonomic view.
|
77
|
*
|
78
|
* TODO remove orphan nodes completely
|
79
|
*
|
80
|
* @param node
|
81
|
* @return true on success
|
82
|
*/
|
83
|
public boolean deleteChildNode(TaxonNode node);
|
84
|
|
85
|
/**
|
86
|
* Returns the list of direct child nodes of <code>this</code> ITreeNode.
|
87
|
* @return
|
88
|
*/
|
89
|
// @Override
|
90
|
public List<TaxonNode> getChildNodes();
|
91
|
|
92
|
/**
|
93
|
* @return the citation for the parent child relationship or the tree itself
|
94
|
*/
|
95
|
public Reference getReference();
|
96
|
|
97
|
/**
|
98
|
*
|
99
|
* @return the microCitation for the parent child relationship or the tree itself
|
100
|
*/
|
101
|
public abstract String getMicroReference();
|
102
|
|
103
|
}
|