/** * * Copyright (c) 2003 University of Mancester. * @author Kevin Garwood (garwood@cs.man.ac.uk) * @version 1.0 * */ package pedro.ontology; /* Code RoadMap: Section Constants Section Properties Section Construction Section Accessors Section Mutators Section Validation Section Errors Section Interfaces Section Overload */ public class OntologyTreeCloner { // ========================================== // Section Constants // ========================================== // ========================================== // Section Properties // ========================================== // ========================================== // Section Construction // ========================================== // ========================================== // Section Accessors // ========================================== // ========================================== // Section Mutators // ========================================== public OntologyTermNode cloneSubTree(OntologyTermNode masterNode) { OntologyTermNode cloneNode = (OntologyTermNode) masterNode.clone(); int numberOfChildren = masterNode.getChildCount(); for ( int i = 0; i < numberOfChildren; i++) { OntologyTermNode childNode = (OntologyTermNode) masterNode.getChildAt(i); OntologyTermNode cloneChild = cloneSubTree(childNode); cloneNode.add(cloneChild); } // end for () return cloneNode; } // ========================================== // Section Validation // ========================================== // ========================================== // Section Errors // ========================================== // ========================================== // Section Interfaces // ========================================== // ========================================== // Section Overload // ========================================== }