Ignore:
Timestamp:
Apr 20, 2010, 5:21:42 PM (14 years ago)
Author:
tobias
Message:

comments added
all methods of the wsdl file implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/TreeNavigation.java

    r859 r865  
    1212import de.dass_it.www.vanhelsing.VanHelsingStub.*;
    1313
    14 /*
     14/**
    1515 * Helper class to encapsulate all procedures
    1616 * to work with the tree structure.
     17 * @author tgoecke
    1718 */
    1819public class TreeNavigation extends BeanUtil {
    1920        private DefaultTreeModel tree;
    2021        //private Logger logger = Logger.getLogger(this.getClass());
     22        /**
     23         * @param root  root node of the tree to be created
     24         * @param nodes         list of names (resource types) used to create header nodes
     25         * @param title         argument currently not used.
     26         * @return tree         returns a data tree to be used by a view bean
     27         */
    2128        public DefaultTreeModel createTree(DefaultMutableTreeNode root,
    2229                        String[] nodes, String title){
     
    4350                return tree;
    4451        }
    45        
     52        /**
     53         * adds a node to the given parent node, of resource type string and label value title
     54         * @param parent        parent node of the created node
     55         * @param type          resource type of the created node
     56         * @param title         label value of the created type
     57         * @return      node    the created node
     58         */
    4659        public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, String title){
    4760                DefaultMutableTreeNode node = new DefaultMutableTreeNode();
     
    8497                return null;
    8598        }
     99        /**
     100         * adds a node to the given parent node of resourcetype type which contains the values of the ResourceInfo() object
     101         * @param parent        parent node of the created node
     102         * @param type  resource type of the created node
     103         * @param ri    the data object which is used to update the node UserObject
     104         * @return node         the created node
     105         */
    86106        public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, ResourceInfo ri){
    87107                DefaultMutableTreeNode node = new DefaultMutableTreeNode();
     
    142162                return null;
    143163        }
     164        /**
     165         * adds a node to the given parent node of resourcetype type which contains the values of the ResourceAttributeType[]
     166         * @param parent        parent node of the created node
     167         * @param type  resource type of the created node
     168         * @param ra    a list of key value pairs returned by the web service access methods
     169         * @return node         the updated parent node
     170         */
    144171        public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, ResourceAttributeType[] ra){
    145172
     
    193220                                }
    194221                        }
    195                                
    196                        
    197                                
    198                        
    199222                        //Value-Wert aus Key: Value zusammenbauen
    200223                       
     
    217240                return null;
    218241        }
     242        /**
     243         * returns the first node whose UserObject attribute resId matches the given id or null if no node is found
     244         * @param id    resId value of the node
     245         * @param tree  tree object which contains the node
     246         * @return      matching node or null if no mathcing node is found
     247         */
    219248        public DefaultMutableTreeNode getNode(String id, DefaultTreeModel tree){
    220249                DefaultMutableTreeNode root;
     
    234263                return null;
    235264        }
     265        /**
     266         * returns the UserObject of a node whose resId attribute matches id
     267         */
    236268        public UserObjectItem getNodeObject(String id, DefaultTreeModel tree){
    237269                DefaultMutableTreeNode node = getNode(id, tree);
Note: See TracChangeset for help on using the changeset viewer.