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