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
.taxon
;
12 import java
.util
.List
;
14 import eu
.etaxonomy
.cdm
.model
.common
.IAnnotatableEntity
;
15 import eu
.etaxonomy
.cdm
.model
.common
.ITreeNode
;
16 import eu
.etaxonomy
.cdm
.model
.reference
.NamedSource
;
17 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
24 public interface ITaxonTreeNode
extends /*ITreeNode<TaxonNode>, */ IAnnotatableEntity
{
27 * Adds a taxon node as a child of the ITreeNode at the last position.
31 * @param microCitation
32 * @param synonymToBeUsed
33 * @return the child node
35 public TaxonNode
addChildNode(TaxonNode childNode
, Reference citation
, String microCitation
);
38 * Adds a taxon node as a child of this {@link ITreeNode} at the index position.
42 * @param microCitation
45 public TaxonNode
addChildNode(TaxonNode childNode
, int index
, Reference citation
, String microCitation
);
49 * Adds a taxon as a child of the ITreeNode at the last position.
53 * @param microCitation
54 * @return the child node
56 public TaxonNode
addChildTaxon(Taxon taxon
, Reference citation
, String microCitation
);
60 * Adds a taxon as a child of the ITreeNode at the index position.
64 * @param microCitation
65 * @return the child node
67 public TaxonNode
addChildTaxon(Taxon taxon
, int index
, Reference citation
, String microCitation
);
70 * Whether this TreeNode has child nodes attached
72 * @return true if this node has children
74 public boolean hasChildNodes();
77 * This recursively removes all child nodes from this node and from this taxonomic view.
79 * TODO remove orphan nodes completely
82 * @return true on success
84 public boolean deleteChildNode(TaxonNode node
);
87 * Returns the list of direct child nodes of <code>this</code> ITreeNode.
91 public List
<TaxonNode
> getChildNodes();
94 * @return the citation for the parent child relationship or the tree itself
96 public Reference
getReference();
100 * @return the microCitation for the parent child relationship or the tree itself
102 public abstract String
getMicroReference();
107 * @param microCitation
110 TaxonNode
addChildTaxon(Taxon taxon
, NamedSource source
);
118 TaxonNode
addChildTaxon(Taxon taxon
, int index
, NamedSource source
);
124 * @param microReference
127 TaxonNode
addChildNode(TaxonNode child
, int index
, NamedSource source
);