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