Project

General

Profile

Download (3.12 KB) Statistics
| Branch: | Tag: | Revision:
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.description.DescriptionElementSource;
17
import eu.etaxonomy.cdm.model.reference.Reference;
18

    
19

    
20
/**
21
 * @author n.hoffmann
22
 * @since 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
    /**
105
     * @param taxon
106
     * @param source
107
     * @param microCitation
108
     * @return
109
     */
110
    TaxonNode addChildTaxon(Taxon taxon, DescriptionElementSource source);
111

    
112
    /**
113
     * @param taxon
114
     * @param index
115
     * @param source
116
     * @return
117
     */
118
    TaxonNode addChildTaxon(Taxon taxon, int index, DescriptionElementSource source);
119

    
120
    /**
121
     * @param child
122
     * @param index
123
     * @param source
124
     * @param microReference
125
     * @return
126
     */
127
    TaxonNode addChildNode(TaxonNode child, int index, DescriptionElementSource source);
128

    
129
}
(5-5/21)