Changeset 25635

Show
Ignore:
Timestamp:
22.05.2012 13:01:04 (7 years ago)
Author:
sjm84
Message:

Fixing Greenstone 3's use (or lack thereof) of generics, this was done automatically so we may want to change it over time. This change will also auto-format any files that have not already been formatted.

Location:
main/trunk/greenstone3/src/java/org/greenstone
Files:
94 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/admin/gui/ConfPane.java

    r25163 r25635  
    8181 
    8282    protected JPanel main_contentPane = null; 
    83     public Hashtable conf_table; 
     83    public Hashtable<Object, Object> conf_table; 
    8484 
    8585    /** The panel that contains a Conf_list */ 
     
    158158 
    159159    //An array to store all the details in the build.properties file 
    160     private ArrayList conf_array; 
     160    private ArrayList<String> conf_array; 
    161161 
    162162    //Site configuration 
     
    172172    public ConfPane() 
    173173    { 
    174         conf_table = new Hashtable(); 
     174        conf_table = new Hashtable<Object, Object>(); 
    175175        // create all the control button panes 
    176176        inner_control_pane = new JPanel(); 
     
    652652    { 
    653653        String new_string; 
    654         Enumeration keys = conf_table.keys(); 
     654        Enumeration<Object> keys = conf_table.keys(); 
    655655        String key; 
    656656        String value; 
     
    662662            for (int j = 0; j < conf_array.size(); j++) 
    663663            { 
    664                 if (((String) conf_array.get(j)).startsWith(key.toLowerCase())) 
     664                if (conf_array.get(j).startsWith(key.toLowerCase())) 
    665665                { 
    666666                    new_string = key + "=" + value; 
     
    719719         * store all the details from the build.properties 
    720720         */ 
    721         conf_array = new ArrayList(); 
     721        conf_array = new ArrayList<String>(); 
    722722        conf_setting = new Object[rowLength][colLength]; 
    723723        try 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/gui/LogPane.java

    r24408 r25635  
    9393    private JPanel control_pane = null; 
    9494 
    95     private ArrayList logFiles = new ArrayList(); 
     95    private ArrayList<File> logFiles = new ArrayList<File>(); 
    9696    private File currentlySelectedFile = null; 
    9797       
     
    387387            //no selection 
    388388        } else if (log_list.getSelectedIndex () == 0 ) { 
    389             File log_file = (File)logFiles.get(0); 
     389            File log_file = logFiles.get(0); 
    390390            currentlySelectedFile = log_file; 
    391391            String filename = log_file.getPath(); 
     
    394394            clear_button.setEnabled(true); 
    395395        } else if (log_list.getSelectedIndex () == 1) { 
    396             File log_file = (File)logFiles.get(1); 
     396            File log_file = logFiles.get(1); 
    397397            currentlySelectedFile = log_file; 
    398398            String filename = log_file.getPath(); 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/gui/SetServerPane.java

    r24408 r25635  
    8484    ServerSettingTableModel server_setting_table_model = null; 
    8585    private boolean setting_confirm = false; 
    86     private ArrayList conf_array; 
     86    private ArrayList<String> conf_array; 
    8787    private boolean success = false; 
    8888    private boolean file_saved = true; 
     
    251251        if (!server_setting_table_model.getValueAt(i,1).toString().matches("^\\s*$")){ 
    252252        for (int j=0; j < conf_array.size(); j++){ 
    253             if (((String)conf_array.get(j)).startsWith(server_setting_table_model.getValueAt(i,0).toString().toLowerCase())){ 
     253            if (conf_array.get(j).startsWith(server_setting_table_model.getValueAt(i,0).toString().toLowerCase())){ 
    254254            //System.err.println("What is the value in conf_array:" + conf_array.get(j)); 
    255255            new_string = server_setting_table_model.getValueAt(i,0).toString()+"="+server_setting_table_model.getValueAt(i,1).toString(); 
     
    265265    String fileLine; 
    266266    /*conf_array[] store all the details from the build.properties*/ 
    267     conf_array = new ArrayList(); 
     267    conf_array = new ArrayList<String>(); 
    268268    try { 
    269269        BufferedReader conf_in = new BufferedReader(new FileReader(filename)); 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/Command.java

    r22185 r25635  
    1515public class Command implements Runnable 
    1616{ 
    17     HashMap _osCommands = new HashMap(); 
     17    HashMap<String, String> _osCommands = new HashMap<String, String>(); 
    1818    CommandStep _parent = null; 
    1919 
     
    133133    String currentos = System.getProperty("os.name"); 
    134134 
    135     String command = (String)_osCommands.get(currentos); 
     135    String command = _osCommands.get(currentos); 
    136136    if(command != null){ 
    137137        return command; 
     
    139139     
    140140    if(currentos.contains("Windows")){ 
    141         command = (String)_osCommands.get("Windows"); 
     141        command = _osCommands.get("Windows"); 
    142142         
    143143        if(command != null){ 
     
    145145        }    
    146146    } 
    147     return (String)_osCommands.get("default"); 
     147    return _osCommands.get("default"); 
    148148    } 
    149149 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/CommandStep.java

    r21919 r25635  
    2727public class CommandStep extends Step 
    2828{ 
    29     protected ArrayList _commandsAndCallbacks = new ArrayList(); 
     29    protected ArrayList<Runnable> _commandsAndCallbacks = new ArrayList<Runnable>(); 
    3030    protected LoggedMessageArea _messageArea = new LoggedMessageArea(this.getClass()); 
    3131    protected int _threadCount = -1; 
     
    8585 
    8686        _threadCount = 0; 
    87         Thread newThread = new Thread((Runnable)_commandsAndCallbacks.get(0)); 
     87        Thread newThread = new Thread(_commandsAndCallbacks.get(0)); 
    8888        newThread.start(); 
    8989    } 
     
    106106 
    107107    if(_threadCount < _commandsAndCallbacks.size()){ 
    108         Thread newThread = new Thread((Runnable)_commandsAndCallbacks.get(_threadCount)); 
     108        Thread newThread = new Thread(_commandsAndCallbacks.get(_threadCount)); 
    109109        newThread.start(); 
    110110    } 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/DownloadStep.java

    r23582 r25635  
    123123        String defaultDownloadLocation = GAI.getGSDL3ExtensionHome() + System.getProperty("file.separator") + fileStem; 
    124124 
    125         ArrayList sourceElements = new ArrayList(); 
     125        ArrayList<Source> sourceElements = new ArrayList<Source>(); 
    126126        sourceElements.add(_mainSource); 
    127127 
     
    134134        for(int i = 0; i < sourceElements.size(); i++){ 
    135135         
    136         Source currentSource = (Source)sourceElements.get(i); 
     136        Source currentSource = sourceElements.get(i); 
    137137        String destinationFolder = null; 
    138138 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/ExtPane.java

    r22085 r25635  
    7979    protected DefaultMutableTreeNode top = new DefaultMutableTreeNode("Extension List"); 
    8080     
    81     protected HashMap extensionInformation = null; 
     81    protected HashMap<String, ArrayList> extensionInformation = null; 
    8282       
    8383    protected JPanel extensionContentHeaderPane = null; 
     
    9797     
    9898    protected Element extFileRootElement = null; 
    99     protected HashMap extensions = null; 
     99    protected HashMap<String, ExtensionInformation> extensions = null; 
    100100    protected HashMap extClasses = null; 
    101101    protected Properties dependencies = new Properties(); 
     
    119119    current_description_pane = new JPanel(); 
    120120    extensionContentHeaderPane = new JPanel(); 
    121     extensionInformation = new HashMap(); 
     121    extensionInformation = new HashMap<String, ArrayList>(); 
    122122 
    123123    // Extension_Pane 
     
    137137    Element[] extensionElements = ExtXMLHelper.getMultipleChildElements(extFileRootElement, ExtXMLHelper.EXTENSION, true); 
    138138    if(extensionElements != null){ 
    139         extensions = new HashMap(); 
     139        extensions = new HashMap<String, ExtensionInformation>(); 
    140140 
    141141        for(int i = 0; i < extensionElements.length; i++){ 
     
    153153             
    154154    load_Admin_UI(); 
    155     HashMap projectNameMap = getProjectList(); 
    156         Set s = projectNameMap.keySet(); 
    157         Iterator it = s.iterator(); 
     155    HashMap<String, ArrayList<String>> projectNameMap = getProjectList(); 
     156        Set<String> s = projectNameMap.keySet(); 
     157        Iterator<String> it = s.iterator(); 
    158158        int i = 0; 
    159159         
    160160    while(it.hasNext()){ 
    161         String projectNameGroup = (String)it.next();  
    162         ArrayList alist = (ArrayList)projectNameMap.get(projectNameGroup); 
     161        String projectNameGroup = it.next();  
     162        ArrayList alist = projectNameMap.get(projectNameGroup); 
    163163        DefaultMutableTreeNode projecti = new DefaultMutableTreeNode (projectNameGroup); 
    164164         
     
    243243    } 
    244244     
    245     protected HashMap getProjectList(){ 
    246          
    247     HashMap projectGroupMap = new HashMap(); 
     245    protected HashMap<String, ArrayList<String>> getProjectList(){ 
     246         
     247    HashMap<String, ArrayList<String>> projectGroupMap = new HashMap<String, ArrayList<String>>(); 
    248248    Element rootNode = extFileRootElement; 
    249249    NodeList projectList =  rootNode.getElementsByTagName(ExtXMLHelper.EXTENSION); 
     
    259259 
    260260        if(projectGroupMap.containsKey(group)){ 
    261         ArrayList alist = (ArrayList)projectGroupMap.get(group); 
     261        ArrayList<String> alist = projectGroupMap.get(group); 
    262262        alist.add(name); 
    263263        projectGroupMap.put(group, alist); 
    264264        } 
    265265        else{ 
    266         ArrayList alist = new ArrayList(); 
     266        ArrayList<String> alist = new ArrayList<String>(); 
    267267        alist.add(name); 
    268268        projectGroupMap.put(group, alist); 
     
    286286        } 
    287287 
    288         ExtensionInformation info = (ExtensionInformation)extensions.get(option); 
     288        ExtensionInformation info = extensions.get(option); 
    289289 
    290290        if(info != null){ 
     
    488488        JPanel buttonPane = new JPanel(); 
    489489 
    490     ExtensionInformation extension = (ExtensionInformation)extensions.get(projectName); 
     490    ExtensionInformation extension = extensions.get(projectName); 
    491491 
    492492    String gsdl3ExtHome = GAI.getGSDL3ExtensionHome(); 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/ExtensionInformation.java

    r21990 r25635  
    7878    //Load the dynamic jar loader 
    7979    URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); 
    80     Class sysclass = URLClassLoader.class; 
     80    Class<URLClassLoader> sysclass = URLClassLoader.class; 
    8181    final Class[] parameters = new Class[]{URL.class}; 
    8282    Method method = null; 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/PropertiesStep.java

    r22185 r25635  
    6060    OptionList[] _modifiedOptionLists = null; 
    6161     
    62     HashMap _optionListTableMap = new HashMap(); 
     62    HashMap<OptionList, PropertyTable> _optionListTableMap = new HashMap<OptionList, PropertyTable>(); 
    6363 
    6464    public PropertiesStep(Element propertiesStepElement, SequenceList parent) 
     
    106106    public JTable getTableFromOptionList(OptionList list) 
    107107    { 
    108     return ((JTable)_optionListTableMap.get(list)); 
     108    return _optionListTableMap.get(list); 
    109109    } 
    110110 
     
    565565 
    566566 
    567         public Class getColumnClass(int c) { 
     567        public Class<? extends Object> getColumnClass(int c) { 
    568568            return getValueAt(0, c).getClass(); 
    569569        } 
  • main/trunk/greenstone3/src/java/org/greenstone/admin/guiext/SequenceList.java

    r22185 r25635  
    1616public class SequenceList 
    1717{ 
    18     protected ArrayList _steps = new ArrayList(); 
     18    protected ArrayList<Step> _steps = new ArrayList<Step>(); 
    1919    protected ExtensionInformation _parent = null; 
    2020    protected Properties _dependencies = null; 
     
    7777    public Step[] getSteps() 
    7878    { 
    79     return (Step[])(_steps.toArray(new Step[0])); 
     79    return (_steps.toArray(new Step[0])); 
    8080    } 
    8181 
     
    8989    JButton[] buttons = new JButton[_steps.size()]; 
    9090    for(int i = 0; i < _steps.size(); i++){ 
    91         buttons[i] = ((Step)_steps.get(i)).getButton(); 
     91        buttons[i] = _steps.get(i).getButton(); 
    9292    } 
    9393     
     
    152152    { 
    153153    Step rollbackStep = null; 
    154     ArrayList dependsSteps = new ArrayList(); 
    155     for(int i = 0; i < _steps.size(); i++){ 
    156         if(((Step)(_steps.get(i))).getId().equals(id)){ 
    157         rollbackStep = (Step)_steps.get(i); 
     154    ArrayList<String> dependsSteps = new ArrayList<String>(); 
     155    for(int i = 0; i < _steps.size(); i++){ 
     156        if((_steps.get(i)).getId().equals(id)){ 
     157        rollbackStep = _steps.get(i); 
    158158        } 
    159159         
    160         String[] depends = ((Step)_steps.get(i)).getDependsOn().split(","); 
     160        String[] depends = _steps.get(i).getDependsOn().split(","); 
    161161 
    162162        for(int j = 0; j < depends.length; j++){ 
    163163        if(depends[j].equals(id)){ 
    164             dependsSteps.add(((Step)_steps.get(i)).getId()); 
     164            dependsSteps.add(_steps.get(i).getId()); 
    165165        } 
    166166        } 
     
    170170 
    171171    for(int i = 0; i < dependsSteps.size(); i++){ 
    172         rollbackToRecursive((String)dependsSteps.get(i)); 
     172        rollbackToRecursive(dependsSteps.get(i)); 
    173173    } 
    174174    } 
     
    177177    { 
    178178    for(int i = 0; i < _steps.size(); i++){ 
    179         Step currentStep = (Step)_steps.get(i); 
     179        Step currentStep = _steps.get(i); 
    180180        if(currentStep instanceof PropertiesStep){ 
    181181        ((PropertiesStep)currentStep).setPropertiesToDefaults(); 
     
    211211     
    212212    for(int i = 0; i < _steps.size(); i++){ 
    213         Step currentStep = (Step)_steps.get(i); 
     213        Step currentStep = _steps.get(i); 
    214214        JButton currentButton = currentStep.getButton(); 
    215215 
  • main/trunk/greenstone3/src/java/org/greenstone/applet/phind/ResultCanvas.java

    r3658 r25635  
    7676    int firstItemDisplayed; 
    7777    int itemSelected; 
    78     Vector items; 
     78    Vector<ResultItem> items; 
    7979     
    8080    // the background image 
     
    9595    lineSpacing = phind.fontSize + 2; 
    9696 
    97     items = new Vector(); 
     97    items = new Vector<ResultItem>(); 
    9898    numberOfItems = 0; 
    9999    firstItemDisplayed = 0; 
     
    132132    int index = 0; 
    133133    while ((index < numberOfItems) && 
    134            ((item.sort < ((ResultItem) items.elementAt(index)).sort) || 
    135         ((item.sort == ((ResultItem) items.elementAt(index)).sort) && 
    136          (item.frequency <= ((ResultItem) items.elementAt(index)).frequency)))) { 
     134           ((item.sort < items.elementAt(index).sort) || 
     135        ((item.sort == items.elementAt(index).sort) && 
     136         (item.frequency <= items.elementAt(index).frequency)))) { 
    137137        index++; 
    138138    } 
     
    160160    int index = 0; 
    161161    while (!found && (index < numberOfItems)) { 
    162         if (((ResultItem) items.elementAt(index)).isMorePhrases()) { 
     162        if (items.elementAt(index).isMorePhrases()) { 
    163163        found = true; 
    164164        } else { 
     
    192192    int index = 0; 
    193193    while (!found && (index < numberOfItems)) { 
    194         if (((ResultItem) items.elementAt(index)).isMoreDocuments()) { 
     194        if (items.elementAt(index).isMoreDocuments()) { 
    195195        found = true; 
    196196        } else { 
     
    225225    int index = 0; 
    226226    while (!found && (index < numberOfItems)) { 
    227         if (((ResultItem) items.elementAt(index)).isMoreLinks()) { 
     227        if (items.elementAt(index).isMoreLinks()) { 
    228228        found = true; 
    229229        } else { 
     
    332332 
    333333        // Get the resultItem to output 
    334         result = (ResultItem) items.elementAt(i); 
     334        result = items.elementAt(i); 
    335335         
    336336        // Graphics settings for drawing this line 
     
    436436         
    437437        // Get the resultItem to output 
    438         result = (ResultItem) items.elementAt(i); 
     438        result = items.elementAt(i); 
    439439        docsText = result.docsText(); 
    440440        freqText = result.freqText(); 
     
    495495    int rowSelected = event.getY() / lineSpacing; 
    496496    itemSelected = rowSelected + firstItemDisplayed; 
    497     ResultItem item = (ResultItem) items.elementAt(itemSelected); 
     497    ResultItem item = items.elementAt(itemSelected); 
    498498 
    499499    if (itemSelected <= numberOfItems) { 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/Library2.java

    r24993 r25635  
    4747    protected Document doc = null; 
    4848 
    49     protected HashMap saved_args = null; 
     49    protected HashMap<String, String> saved_args = null; 
    5050    protected GSParams params = null; 
    5151    protected DefaultReceptionist recept = null; 
     
    5555        this.converter = new XMLConverter(); 
    5656        this.doc = converter.newDOM(); 
    57         this.saved_args = new HashMap(); 
     57        this.saved_args = new HashMap<String, String>(); 
    5858        this.params = new GSParams(); 
    5959        this.recept = new DefaultReceptionist(); 
     
    6363    { 
    6464 
    65         HashMap config_params = new HashMap(); 
     65        HashMap<String, Comparable> config_params = new HashMap<String, Comparable>(); 
    6666        //config_params.put(GSConstants.GSDL3_HOME, gsdl_home); 
    6767        config_params.put(GSConstants.SITE_NAME, site_name); 
     
    140140        String action = "p"; 
    141141        String subaction = "home"; 
    142         String lang = (String) saved_args.get(GSParams.LANGUAGE); 
     142        String lang = saved_args.get(GSParams.LANGUAGE); 
    143143        if (lang == null) 
    144144        { 
     
    193193 
    194194        // put in all the params from the session cache 
    195         Set params = saved_args.keySet(); 
    196         Iterator i = params.iterator(); 
     195        Set<String> params = saved_args.keySet(); 
     196        Iterator<String> i = params.iterator(); 
    197197        while (i.hasNext()) 
    198198        { 
    199             String name = (String) i.next(); 
     199            String name = i.next(); 
    200200            if (name.equals(GSParams.LANGUAGE)) 
    201201                continue; 
    202202            Element param = this.doc.createElement(GSXML.PARAM_ELEM); 
    203203            param.setAttribute(GSXML.NAME_ATT, name); 
    204             param.setAttribute(GSXML.VALUE_ATT, GSXML.xmlSafe((String) saved_args.get(name))); 
     204            param.setAttribute(GSXML.VALUE_ATT, GSXML.xmlSafe(saved_args.get(name))); 
    205205            xml_param_list.appendChild(param); 
    206206        } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r25425 r25635  
    1111import org.w3c.dom.NodeList; 
    1212import java.io.*; 
     13 
    1314import javax.servlet.*; 
    1415import javax.servlet.http.*; 
     
    9091     * form: sid -> (UserSessionCache object) 
    9192     */ 
    92     protected Hashtable session_ids_table = new Hashtable(); 
     93    protected Hashtable<String, UserSessionCache> session_ids_table = new Hashtable<String, UserSessionCache>(); 
    9394 
    9495    /** 
     
    156157        } 
    157158 
    158         HashMap config_params = new HashMap(); 
     159        HashMap<String, Comparable> config_params = new HashMap<String, Comparable>(); 
    159160 
    160161        config_params.put(GSConstants.LIBRARY_NAME, library_name); 
     
    310311         * param_value) 
    311312         */ 
    312         protected Hashtable coll_name_params_table = null; 
    313  
    314         public UserSessionCache(String id, Hashtable table) 
     313        protected Hashtable<String, Hashtable<String, String>> coll_name_params_table = null; 
     314 
     315        public UserSessionCache(String id, Hashtable<String, Hashtable<String, String>> table) 
    315316        { 
    316317            session_id = id; 
     
    326327        } 
    327328 
    328         protected Hashtable getParamsTable() 
     329        protected Hashtable<String, Hashtable<String, String>> getParamsTable() 
    329330        { 
    330331            return coll_name_params_table; 
     
    517518            if (clean_all) 
    518519            { 
    519                 session_ids_table = new Hashtable(); 
     520                session_ids_table = new Hashtable<String, UserSessionCache>(); 
    520521                session.removeAttribute(GSXML.USER_SESSION_CACHE_ATT); 
    521522            } 
     
    523524            { 
    524525                // just clean up info for clean_collection 
    525                 ArrayList cache_list = new ArrayList(session_ids_table.values()); 
     526                ArrayList<UserSessionCache> cache_list = new ArrayList<UserSessionCache>(session_ids_table.values()); 
    526527                for (int i = 0; i < cache_list.size(); i++) 
    527528                { 
    528                     UserSessionCache cache = (UserSessionCache) cache_list.get(i); 
     529                    UserSessionCache cache = cache_list.get(i); 
    529530                    cache.cleanupCache(clean_collection); 
    530531                } 
     
    555556 
    556557        UserSessionCache session_cache = null; 
    557         Hashtable param_table = null; 
    558         Hashtable table = null; 
     558        Hashtable<String, Hashtable<String, String>> param_table = null; 
     559        Hashtable<String, String> table = null; 
    559560        String sid = session.getId(); 
    560561        if (should_cache == true && cache_key != null && !cache_key.equals("")) 
     
    562563            if (session_ids_table.containsKey(sid)) 
    563564            { 
    564                 session_cache = (UserSessionCache) session_ids_table.get(sid); 
     565                session_cache = session_ids_table.get(sid); 
    565566                param_table = session_cache.getParamsTable(); 
    566567                logger.info("collections in table: " + tableToString(param_table)); 
     
    568569                { 
    569570                    //logger.info("existing table: " + collection); 
    570                     table = (Hashtable) param_table.get(cache_key); 
     571                    table = param_table.get(cache_key); 
    571572                } 
    572573                else 
    573574                { 
    574                     table = new Hashtable(); 
     575                    table = new Hashtable<String, String>(); 
    575576                    param_table.put(cache_key, table); 
    576577                    //logger.info("new table: " + collection); 
     
    579580            else 
    580581            { 
    581                 param_table = new Hashtable(); 
    582                 table = new Hashtable(); 
     582                param_table = new Hashtable<String, Hashtable<String, String>>(); 
     583                table = new Hashtable<String, String>(); 
    583584                param_table.put(cache_key, table); 
    584585                session_cache = new UserSessionCache(sid, param_table); 
     
    642643            if (table != null) 
    643644            { 
    644                 Enumeration keys = table.keys(); 
     645                Enumeration<String> keys = table.keys(); 
    645646                while (keys.hasMoreElements()) 
    646647                { 
    647                     String name = (String) keys.nextElement(); 
    648                     session.setAttribute(name, (String) table.get(name)); 
     648                    String name = keys.nextElement(); 
     649                    session.setAttribute(name, table.get(name)); 
    649650                } 
    650651            } 
     
    691692                for (int j = 0; j < httpHeaders.size(); j++) 
    692693                { 
    693                     Map nameValueMap = (Map) httpHeaders.get(j); 
     694                    Map nameValueMap = httpHeaders.get(j); 
    694695                    String name = (String) nameValueMap.get("name"); 
    695696                    String value = (String) nameValueMap.get("value"); 
     
    825826            else 
    826827            { 
    827                 HashMap responseParams = GSXML.extractParams(responseParamList, true); 
     828                HashMap<String, Serializable> responseParams = GSXML.extractParams(responseParamList, true); 
    828829                String groups = (String) responseParams.get(GSXML.GROUPS_ATT); 
    829830 
     
    910911 
    911912    //a debugging method 
    912     private void displaySize(Hashtable table) 
     913    private void displaySize(Hashtable<String, UserSessionCache> table) 
    913914    { 
    914915        if (table == null) 
     
    923924        } 
    924925        int num_cached_coll = 0; 
    925         ArrayList cache_list = new ArrayList(table.values()); 
     926        ArrayList<UserSessionCache> cache_list = new ArrayList<UserSessionCache>(table.values()); 
    926927        for (int i = 0; i < cache_list.size(); i++) 
    927928        { 
    928             num_cached_coll += ((UserSessionCache) cache_list.get(i)).tableSize(); 
     929            num_cached_coll += cache_list.get(i).tableSize(); 
    929930        } 
    930931        logger.info("Number of sessions : total number of cached collection info = " + table.size() + " : " + num_cached_coll); 
     
    932933 
    933934    /** merely a debugging method! */ 
    934     private String tableToString(Hashtable table) 
     935    private String tableToString(Hashtable<String, Hashtable<String, String>> table) 
    935936    { 
    936937        String str = ""; 
    937         Enumeration keys = table.keys(); 
     938        Enumeration<String> keys = table.keys(); 
    938939        while (keys.hasMoreElements()) 
    939940        { 
    940             String name = (String) keys.nextElement(); 
     941            String name = keys.nextElement(); 
    941942            str += name + ", "; 
    942943        } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/OAIServer.java

    r23922 r25635  
    7171   
    7272  /** A HashSet which contains all the legal verbs. */ 
    73   protected HashSet verb_set = null; 
     73  protected HashSet<String> verb_set = null; 
    7474  /** A HashSet which contains all the legal oai keys in the key/value argument pair. */ 
    75   protected HashSet param_set = null; 
     75  protected HashSet<String> param_set = null; 
    7676  /** The name of the site with which we will finally be dealing, whether it is a local site or a remote site through a communicator.*/ 
    7777  protected String site = ""; 
     
    209209  } 
    210210  private void initVerbs() { 
    211     verb_set = new HashSet(); 
     211    verb_set = new HashSet<String>(); 
    212212    verb_set.add(OAIXML.GET_RECORD); 
    213213    verb_set.add(OAIXML.LIST_RECORDS); 
     
    219219   
    220220  private void initParams() { 
    221     param_set = new HashSet(); 
     221    param_set = new HashSet<String>(); 
    222222    param_set.add(OAIXML.METADATA_PREFIX); 
    223223    param_set.add(OAIXML.FROM); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java

    r25302 r25635  
    2323 
    2424    /** the system set up variables */ 
    25     protected HashMap config_params = null; 
     25    protected HashMap<String, Comparable> config_params = null; 
    2626    /** container Document to create XML Nodes */ 
    2727    protected Document doc = null; 
     
    4343 
    4444    /** the config variables must be set before configure is called */ 
    45     public void setConfigParams(HashMap params) 
     45    public void setConfigParams(HashMap<String, Comparable> params) 
    4646    { 
    4747        this.config_params = params; 
     
    9292    } 
    9393 
    94     protected void getRequiredMetadataNames(Element format, HashSet meta_names) 
     94    protected void getRequiredMetadataNames(Element format, HashSet<String> meta_names) 
    9595    { 
    9696        extractMetadataNames(format, meta_names); 
     
    9898    } 
    9999 
    100     protected void extractMetadataNames(Element format, HashSet meta_names) 
     100    protected void extractMetadataNames(Element format, HashSet<String> meta_names) 
    101101    { 
    102102        //NodeList nodes = format.getElementsByTagNameNS("metadata", "http://www.greenstone.org/configformat"); 
     
    133133    } 
    134134 
    135     protected void addLinkMetadataNames(Element format, HashSet meta_names) 
     135    protected void addLinkMetadataNames(Element format, HashSet<String> meta_names) 
    136136    { 
    137137        // The XSL tranform for 
     
    187187    } 
    188188 
    189     protected Element createMetadataParamList(HashSet metadata_names) 
     189    protected Element createMetadataParamList(HashSet<String> metadata_names) 
    190190    { 
    191191        Element param_list = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    192192 
    193193        Element param = null; 
    194         Iterator i = metadata_names.iterator(); 
     194        Iterator<String> i = metadata_names.iterator(); 
    195195        while (i.hasNext()) 
    196196        { 
    197             String name = (String) i.next(); 
     197            String name = i.next(); 
    198198            param = this.doc.createElement(GSXML.PARAM_ELEM); 
    199199            param_list.appendChild(param); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/AppletAction.java

    r24993 r25635  
    1111import java.util.HashMap; 
    1212import java.io.File; 
     13import java.io.Serializable; 
    1314 
    1415import org.apache.log4j.*; 
     
    3233        // get the collection and service params 
    3334        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    34         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     35        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    3536 
    3637        // request_type is display (d) or request (r) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/BrowseAction.java

    r25128 r25635  
    1313import java.util.Vector; 
    1414import java.io.File; 
     15import java.io.Serializable; 
    1516 
    1617import org.apache.log4j.*; 
     
    4748    // extract the params from the cgi-request, and check that we have a coll specified 
    4849    Element cgi_paramList = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 
    49     HashMap params = GSXML.extractParams(cgi_paramList, false); 
     50    HashMap<String, Serializable> params = GSXML.extractParams(cgi_paramList, false); 
    5051 
    5152    String service_name = (String)params.get(GSParams.SERVICE); 
     
    112113    String top_id = OID.getTop(classifier_node); 
    113114     
    114     HashSet metadata_names = new HashSet(); 
     115    HashSet<String> metadata_names = new HashSet<String>(); 
    115116 
    116117    // add the format info into the response 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r25355 r25635  
    3535import java.util.HashSet; 
    3636import java.io.File; 
     37import java.io.Serializable; 
    3738 
    3839import org.apache.log4j.*; 
     
    9091        Element request = (Element) GSXML.getChildByTagName(message, GSXML.REQUEST_ELEM); 
    9192        Element cgi_paramList = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    92         HashMap params = GSXML.extractParams(cgi_paramList, false); 
     93        HashMap<String, Serializable> params = GSXML.extractParams(cgi_paramList, false); 
    9394 
    9495        // just in case there are some that need to get passed to the services 
     
    360361        // Create a parameter list to specify the required metadata information 
    361362 
    362         HashSet meta_names = new HashSet(); 
     363        HashSet<String> meta_names = new HashSet<String>(); 
    363364        meta_names.add("Title"); // the default 
    364365        if (format_elem != null) 
     
    722723        // do the query again to get term info  
    723724        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    724         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     725        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    725726 
    726727        HashMap previous_params = (HashMap) params.get("p"); 
     
    767768        Element metadata_list = (Element) GSXML.getNodeByPath(mr_query_response, metadata_path); 
    768769 
    769         HashSet query_term_variants = new HashSet(); 
     770        HashSet<String> query_term_variants = new HashSet<String>(); 
    770771        NodeList equivalent_terms_nodelist = query_term_list_element.getElementsByTagName("equivTermList"); 
    771772        if (equivalent_terms_nodelist == null || equivalent_terms_nodelist.getLength() == 0) 
     
    809810        } 
    810811 
    811         ArrayList phrase_query_term_variants_hierarchy = new ArrayList(); 
     812        ArrayList<ArrayList<HashSet<String>>> phrase_query_term_variants_hierarchy = new ArrayList<ArrayList<HashSet<String>>>(); 
    812813 
    813814        Element query_element = GSXML.getNamedElement(metadata_list, GSXML.METADATA_ELEM, GSXML.NAME_ATT, "query"); 
    814815        String performed_query = GSXML.getNodeText(query_element) + " "; 
    815816 
    816         ArrayList phrase_query_p_term_variants_list = new ArrayList(); 
     817        ArrayList<HashSet<String>> phrase_query_p_term_variants_list = new ArrayList<HashSet<String>>(); 
    817818        int term_start = 0; 
    818819        boolean in_term = false; 
     
    840841                { 
    841842 
    842                     HashSet phrase_query_p_term_x_variants = new HashSet(); 
     843                    HashSet<String> phrase_query_p_term_x_variants = new HashSet<String>(); 
    843844 
    844845                    NodeList term_equivalent_terms_nodelist = term_element.getElementsByTagName("equivTermList"); 
     
    879880                    { 
    880881                        phrase_query_term_variants_hierarchy.add(phrase_query_p_term_variants_list); 
    881                         phrase_query_p_term_variants_list = new ArrayList(); 
     882                        phrase_query_p_term_variants_list = new ArrayList<HashSet<String>>(); 
    882883                    } 
    883884                } 
     
    898899                } 
    899900 
    900                 phrase_query_p_term_variants_list = new ArrayList(); 
     901                phrase_query_p_term_variants_list = new ArrayList<HashSet<String>>(); 
    901902            } 
    902903        } 
     
    908909     * Highlights query terms in a piece of text. 
    909910     */ 
    910     private Element highlightQueryTermsInternal(String content, HashSet query_term_variants, ArrayList phrase_query_term_variants_hierarchy) 
     911    private Element highlightQueryTermsInternal(String content, HashSet<String> query_term_variants, ArrayList<ArrayList<HashSet<String>>> phrase_query_term_variants_hierarchy) 
    911912    { 
    912913        // Convert the content string to an array of characters for speed 
     
    915916 
    916917        // Now skim through the content, identifying word matches 
    917         ArrayList word_matches = new ArrayList(); 
     918        ArrayList<WordMatch> word_matches = new ArrayList<WordMatch>(); 
    918919        int word_start = 0; 
    919920        boolean in_word = false; 
     
    978979        } 
    979980 
    980         ArrayList highlight_start_positions = new ArrayList(); 
    981         ArrayList highlight_end_positions = new ArrayList(); 
     981        ArrayList<Integer> highlight_start_positions = new ArrayList<Integer>(); 
     982        ArrayList<Integer> highlight_end_positions = new ArrayList<Integer>(); 
    982983 
    983984        // Deal with phrases now 
    984         ArrayList partial_phrase_matches = new ArrayList(); 
     985        ArrayList<PartialPhraseMatch> partial_phrase_matches = new ArrayList<PartialPhraseMatch>(); 
    985986        for (int i = 0; i < word_matches.size(); i++) 
    986987        { 
    987             WordMatch word_match = (WordMatch) word_matches.get(i); 
     988            WordMatch word_match = word_matches.get(i); 
    988989 
    989990            // See if any partial phrase matches are extended by this word 
     
    992993                for (int j = partial_phrase_matches.size() - 1; j >= 0; j--) 
    993994                { 
    994                     PartialPhraseMatch partial_phrase_match = (PartialPhraseMatch) partial_phrase_matches.remove(j); 
    995                     ArrayList phrase_query_p_term_variants_list = (ArrayList) phrase_query_term_variants_hierarchy.get(partial_phrase_match.query_phrase_number); 
     995                    PartialPhraseMatch partial_phrase_match = partial_phrase_matches.remove(j); 
     996                    ArrayList phrase_query_p_term_variants_list = phrase_query_term_variants_hierarchy.get(partial_phrase_match.query_phrase_number); 
    996997                    HashSet phrase_query_p_term_x_variants = (HashSet) phrase_query_p_term_variants_list.get(partial_phrase_match.num_words_matched); 
    997998                    if (phrase_query_p_term_x_variants.contains(word_match.word)) 
     
    10061007                            { 
    10071008                                int last_highlight_index = highlight_end_positions.size() - 1; 
    1008                                 int last_highlight_end = ((Integer) highlight_end_positions.get(last_highlight_index)).intValue(); 
     1009                                int last_highlight_end = highlight_end_positions.get(last_highlight_index).intValue(); 
    10091010                                if (last_highlight_end > partial_phrase_match.start_position) 
    10101011                                { 
    10111012                                    // There is an overlap, so remove the previous phrase match 
    1012                                     int last_highlight_start = ((Integer) highlight_start_positions.remove(last_highlight_index)).intValue(); 
     1013                                    int last_highlight_start = highlight_start_positions.remove(last_highlight_index).intValue(); 
    10131014                                    highlight_end_positions.remove(last_highlight_index); 
    10141015                                    partial_phrase_match.start_position = last_highlight_start; 
     
    10351036            for (int p = 0; p < phrase_query_term_variants_hierarchy.size(); p++) 
    10361037            { 
    1037                 ArrayList phrase_query_p_term_variants_list = (ArrayList) phrase_query_term_variants_hierarchy.get(p); 
     1038                ArrayList phrase_query_p_term_variants_list = phrase_query_term_variants_hierarchy.get(p); 
    10381039                HashSet phrase_query_p_term_1_variants = (HashSet) phrase_query_p_term_variants_list.get(0); 
    10391040                if (phrase_query_p_term_1_variants.contains(word_match.word)) 
     
    10601061        for (int i = 0; i < highlight_start_positions.size(); i++) 
    10611062        { 
    1062             int highlight_start = ((Integer) highlight_start_positions.get(i)).intValue(); 
    1063             int highlight_end = ((Integer) highlight_end_positions.get(i)).intValue(); 
     1063            int highlight_start = highlight_start_positions.get(i).intValue(); 
     1064            int highlight_end = highlight_end_positions.get(i).intValue(); 
    10641065 
    10651066            // Print anything before the highlight range 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java

    r24993 r25635  
    2525 
    2626import java.io.PrintWriter; 
     27import java.io.Serializable; 
    2728import java.io.StringWriter; 
    2829 
     
    4849        // get the param list 
    4950        Element cgi_param_list = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 
    50         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     51        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    5152 
    5253        Element result = this.doc.createElement(GSXML.MESSAGE_ELEM); 
     
    7576        Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM); 
    7677 
    77         Iterator it = params.keySet().iterator(); 
     78        Iterator<String> it = params.keySet().iterator(); 
    7879 
    7980        if(subaction.equals("saveDocument")) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java

    r25128 r25635  
    1313import java.util.Vector; 
    1414import java.io.File; 
     15import java.io.Serializable; 
    1516 
    1617import org.apache.log4j.*; 
     
    4748        // extract the params from the cgi-request, and check that we have a coll specified 
    4849        Element cgi_paramList = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    49         HashMap params = GSXML.extractParams(cgi_paramList, false); 
     50        HashMap<String, Serializable> params = GSXML.extractParams(cgi_paramList, false); 
    5051 
    5152        String service_name = (String) params.get(GSParams.SERVICE); 
     
    107108        // the id of the classifier is the top id of the selected node 
    108109        String top_id = OID.getTop(classifier_node); 
    109         HashSet doc_meta_names = new HashSet(); 
    110         HashSet class_meta_names = new HashSet(); 
     110        HashSet<String> doc_meta_names = new HashSet<String>(); 
     111        HashSet<String> class_meta_names = new HashSet<String>(); 
    111112        // add in the defaults 
    112113        doc_meta_names.add("Title"); 
     
    358359    } 
    359360 
    360     protected void extractMetadataNames(Element new_format, HashSet doc_meta_names, HashSet class_meta_names) 
     361    protected void extractMetadataNames(Element new_format, HashSet<String> doc_meta_names, HashSet<String> class_meta_names) 
    361362    { 
    362363 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GeneralAction.java

    r25260 r25635  
    1010 
    1111import java.io.File; 
     12import java.io.Serializable; 
    1213import java.util.HashMap; 
    1314 
     
    4142        // get the param list 
    4243        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    43         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     44        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    4445 
    4546        if (params.get("configChangeName") != null && params.get("configChangeValue") != null) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/NoCollQueryAction.java

    r24993 r25635  
    1616import java.util.Iterator; 
    1717import java.io.File; 
     18import java.io.Serializable; 
    1819 
    1920import org.apache.log4j.*; 
     
    6263        // extract the params from the cgi-request, and check that we have a coll specified 
    6364        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    64         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     65        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    6566 
    6667        String request_type = (String) params.get(GSParams.REQUEST_TYPE); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/PageAction.java

    r25128 r25635  
    1212import java.util.HashMap; 
    1313import java.io.File; 
     14import java.io.Serializable; 
    1415 
    1516import org.apache.log4j.*; 
     
    130131        // extract the params from the cgi-request,  
    131132        Element cgi_paramList = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    132         HashMap params = GSXML.extractParams(cgi_paramList, false); 
     133        HashMap<String, Serializable> params = GSXML.extractParams(cgi_paramList, false); 
    133134 
    134135        String coll_name = (String) params.get(GSParams.COLLECTION); 
     
    214215        // extract the params from the cgi-request,  
    215216        Element cgi_paramList = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    216         HashMap params = GSXML.extractParams(cgi_paramList, false); 
     217        HashMap<String, Serializable> params = GSXML.extractParams(cgi_paramList, false); 
    217218 
    218219        String coll_name = (String) params.get(GSParams.COLLECTION); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/ProcessAction.java

    r24993 r25635  
    1313import java.util.Iterator; 
    1414import java.io.File; 
     15import java.io.Serializable; 
    1516 
    1617public class ProcessAction extends Action 
     
    3334        // get the param list 
    3435        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    35         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     36        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    3637        String service_name = (String) params.get(GSParams.SERVICE); 
    3738        String cluster_name = (String) params.get(GSParams.CLUSTER); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r25128 r25635  
    1616import java.util.Iterator; 
    1717import java.io.File; 
     18import java.io.Serializable; 
    1819 
    1920import org.apache.log4j.*; 
     
    5657        // extract the params from the cgi-request, and check that we have a coll specified 
    5758        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    58         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     59        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    5960 
    6061        String request_type = (String) params.get(GSParams.REQUEST_TYPE); 
     
    189190 
    190191        // get the metadata elements needed from the format statement if any 
    191         HashSet metadata_names = new HashSet(); 
     192        HashSet<String> metadata_names = new HashSet<String>(); 
    192193        metadata_names.add("Title"); 
    193194        // add in the format info to the stylesheet if there is any 
     
    246247 
    247248    /** this filters out some of the doc results for result paging */ 
    248     protected Element filterDocList(HashMap params, HashMap service_params, Element orig_doc_list) 
     249    protected Element filterDocList(HashMap<String, Serializable> params, HashMap service_params, Element orig_doc_list) 
    249250    { 
    250251 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java

    r25580 r25635  
    2424 
    2525import java.io.PrintWriter; 
     26import java.io.Serializable; 
    2627import java.io.StringWriter; 
    2728 
     
    4849        // get the param list 
    4950        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    50         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     51        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    5152 
    5253        Element result = this.doc.createElement(GSXML.MESSAGE_ELEM); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/XMLDocumentAction.java

    r25490 r25635  
    1717import java.util.Iterator; 
    1818import java.io.File; 
     19import java.io.Serializable; 
    1920 
    2021/** action class for retrieving parts of XML documents */ 
     
    4445        // extract the params from the cgi-request, and check that we have a coll specified 
    4546        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    46         HashMap params = GSXML.extractParams(cgi_param_list, false); 
     47        HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    4748 
    4849        String collection = (String) params.get(GSParams.COLLECTION); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java

    r25609 r25635  
    124124    { 
    125125        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: new collection.")); 
    126         Vector command = new Vector(); 
     126        Vector<String> command = new Vector<String>(); 
    127127        command.add("gs2_mkcol.pl"); 
    128128        command.add("-site"); 
     
    133133        command.add(this.collection_name); 
    134134        String[] command_str = {}; 
    135         command_str = (String[]) command.toArray(command_str); 
     135        command_str = command.toArray(command_str); 
    136136        if (runPerlCommand(command_str)) 
    137137        { 
     
    162162        command.add(this.collection_name); 
    163163        String[] command_str = {}; 
    164         command_str = (String[]) command.toArray(command_str); 
     164        command_str = command.toArray(command_str); 
    165165 
    166166        if (runPerlCommand(command_str)) 
     
    186186 
    187187        String[] command_str = {}; 
    188         command_str = (String[]) command.toArray(command_str); 
     188        command_str = command.toArray(command_str); 
    189189 
    190190        if (runPerlCommand(command_str)) 
     
    231231 
    232232    /** extracts all the args from the xml and returns them in a Vector */ 
    233     protected Vector extractParameters(Element param_list) 
    234     { 
    235  
    236         Vector args = new Vector(); 
     233    protected Vector<String> extractParameters(Element param_list) 
     234    { 
     235 
     236        Vector<String> args = new Vector<String>(); 
    237237        if (param_list == null) 
    238238        { 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java

    r24993 r25635  
    3232 
    3333import java.io.*; 
    34 import java.io.File; 
    35 import java.io.RandomAccessFile; 
    3634import java.util.HashMap; 
    3735import java.util.Iterator; 
     
    7674     *  
    7775     */ 
    78     protected HashMap service_map = null; 
     76    protected HashMap<String, ServiceRack> service_map = null; 
    7977    /** 
    8078     * maps pseudo service names to real service names - needed if we have two 
    8179     * services with the same name for one collection 
    8280     */ 
    83     protected HashMap service_name_map = null; 
     81    protected HashMap<String, String> service_name_map = null; 
    8482 
    8583    /** XML converter for String to DOM and vice versa */ 
     
    113111    public void cleanUp() 
    114112    { 
    115         Iterator i = this.service_map.values().iterator(); 
     113        Iterator<ServiceRack> i = this.service_map.values().iterator(); 
    116114        while (i.hasNext()) 
    117115        { 
    118             ServiceRack s = (ServiceRack) i.next(); 
     116            ServiceRack s = i.next(); 
    119117            s.cleanUp(); 
    120118        } 
     
    134132    public ServiceCluster() 
    135133    { 
    136         this.service_map = new HashMap(); 
    137         this.service_name_map = new HashMap(); 
     134        this.service_map = new HashMap<String, ServiceRack>(); 
     135        this.service_name_map = new HashMap<String, String>(); 
    138136        this.converter = new XMLConverter(); 
    139137        this.doc = this.converter.newDOM(); 
     
    491489                if (this.service_name_map.containsKey(service)) 
    492490                { 
    493                     real_service = (String) this.service_name_map.get(service); 
     491                    real_service = this.service_name_map.get(service); 
    494492                    // need to change the to att in the request - give the real service name 
    495493                    to = request.getAttribute(GSXML.TO_ATT); 
     
    501499                Element single_message = mess_doc.createElement(GSXML.MESSAGE_ELEM); 
    502500                single_message.appendChild(request); 
    503                 Node response_message = ((ModuleInterface) this.service_map.get(service)).process(single_message); 
     501                Node response_message = this.service_map.get(service).process(single_message); 
    504502                if (response_message != null) 
    505503                { 
     
    884882    } 
    885883 
    886     public HashMap getServiceMap() 
     884    public HashMap<String, ServiceRack> getServiceMap() 
    887885    { 
    888886        return service_map; 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/MessageRouter.java

    r25580 r25635  
    8484 
    8585  /** map of names to Module objects */ 
    86   protected HashMap module_map=null; 
     86  protected HashMap<String, ModuleInterface> module_map=null; 
    8787   
    8888  /** container Document to create XML Nodes */ 
     
    193193    } 
    194194     
    195     this.module_map = new HashMap(); 
     195    this.module_map = new HashMap<String, ModuleInterface>(); 
    196196     
    197197    // This stuff may be done at a reconfigure also 
     
    291291          if (this.module_map.containsKey(obj)) { 
    292292            copied_request.setAttribute(GSXML.TO_ATT, this_mod); 
    293             result = ((ModuleInterface)this.module_map.get(obj)).process(mess); 
     293            result = this.module_map.get(obj).process(mess); 
    294294            if (result !=null ) { 
    295295              // append the contents of the message to the mainResult - there will only be one response at this stage 
     
    326326    return private_collection_list; 
    327327  } 
    328   public HashMap getModuleMap() { 
     328  public HashMap<String, ModuleInterface> getModuleMap() { 
    329329    return module_map; 
    330330  } 
     
    337337  protected void cleanUpModuleMapEntire() { 
    338338    if (this.module_map != null) { 
    339       Iterator i = this.module_map.values().iterator(); 
     339      Iterator<ModuleInterface> i = this.module_map.values().iterator(); 
    340340      while (i.hasNext()) { 
    341         ((ModuleInterface)i.next()).cleanUp(); 
     341        i.next().cleanUp(); 
    342342        i.remove(); 
    343343      } 
     
    364364        if (name.equals(potential_site_name)) {// there was no site 
    365365          list.removeChild(item); 
    366           ModuleInterface m = (ModuleInterface)this.module_map.remove(name); 
     366          ModuleInterface m = this.module_map.remove(name); 
    367367          m.cleanUp(); // clean up any open files/connections etc  
    368368          m=null; 
     
    851851       
    852852      logger.info("found the module"); 
    853       ModuleInterface m = (ModuleInterface)this.module_map.remove(name); 
     853      ModuleInterface m = this.module_map.remove(name); 
    854854      // also remove the xml bit from description list 
    855855      if (type.equals(GSXML.COLLECTION_ELEM)) { 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIReceptionist.java

    r24440 r25635  
    321321   *  otherwise true. 
    322322   */ 
    323   private boolean isValidParam(HashMap param_map, HashSet valid_strs) { 
    324     ArrayList param_list = new ArrayList(param_map.keySet()); 
     323  private boolean isValidParam(HashMap<String, String> param_map, HashSet<String> valid_strs) { 
     324    ArrayList<String> param_list = new ArrayList<String>(param_map.keySet()); 
    325325    for(int i=0; i<param_list.size(); i++) { 
    326       if (valid_strs.contains((String)param_list.get(i)) == false) { 
     326      if (valid_strs.contains(param_list.get(i)) == false) { 
    327327        return false; 
    328328      } 
     
    333333    // option: from, until, set, metadataPrefix, resumptionToken 
    334334    // exceptions: badArgument, badResumptionToken, cannotDisseminateFormat, noRecordMatch, and noSetHierarchy 
    335     HashSet valid_strs = new HashSet(); 
     335    HashSet<String> valid_strs = new HashSet<String>(); 
    336336    valid_strs.add(OAIXML.FROM); 
    337337    valid_strs.add(OAIXML.UNTIL); 
     
    347347    String token = ""; 
    348348     
    349     HashMap param_map = OAIXML.getParamMap(params);     
     349    HashMap<String, String> param_map = OAIXML.getParamMap(params);     
    350350    if (!isValidParam(param_map, valid_strs)) { 
    351351    logger.error("One of the params is invalid"); 
     
    353353    }  
    354354    // param keys are valid, but if there are any date params, check they're of the right format 
    355     String from = (String)param_map.get(OAIXML.FROM); 
     355    String from = param_map.get(OAIXML.FROM); 
    356356    if(from != null) {   
    357357    Date from_date = OAIXML.getDate(from); 
     
    361361    } 
    362362    } 
    363     String until = (String)param_map.get(OAIXML.UNTIL); 
     363    String until = param_map.get(OAIXML.UNTIL); 
    364364    if(until != null) {  
    365365    Date until_date = OAIXML.getDate(until); 
     
    389389    if(request_set == true) { 
    390390      boolean set_supported = false; 
    391       String set_spec_str = (String)param_map.get(OAIXML.SET); 
     391      String set_spec_str = param_map.get(OAIXML.SET); 
    392392      // get the collection name 
    393393      //if setSpec is supported by this repository, it must be in the form: site_name:coll_name 
     
    409409    if(param_map.containsKey(OAIXML.RESUMPTION_TOKEN)) { 
    410410        // validate resumptionToken 
    411       token = (String)param_map.get(OAIXML.RESUMPTION_TOKEN); 
     411      token = param_map.get(OAIXML.RESUMPTION_TOKEN); 
    412412      logger.info("has resumptionToken" + token); 
    413413      if(OAIXML.containsToken(token) == false) { 
     
    424424     
    425425    //Now that we got a prefix, check and see if it's supported by this repository 
    426     String prefix_value = (String)param_map.get(OAIXML.METADATA_PREFIX); 
     426    String prefix_value = param_map.get(OAIXML.METADATA_PREFIX); 
    427427    if (containsMetadataPrefix(prefix_value) == false) { 
    428428      logger.error("requested prefix is not found in OAIConfig.xml"); 
     
    434434    String verb = req.getAttribute(OAIXML.TO);  
    435435    NodeList param_list = req.getElementsByTagName(OAIXML.PARAM); 
    436     ArrayList retain_param_list = new ArrayList(); 
     436    ArrayList<Element> retain_param_list = new ArrayList<Element>(); 
    437437    for (int j=0; j<param_list.getLength(); j++) { 
    438438      Element e = OAIXML.duplicateElement(msg.getOwnerDocument(), (Element)param_list.item(j), true); 
     
    449449          msg.appendChild(req); 
    450450          for (int j=0; j<retain_param_list.size(); j++) { 
    451             req.appendChild((Element)retain_param_list.get(j)); 
     451            req.appendChild(retain_param_list.get(j)); 
    452452          } 
    453453        } 
     
    538538    // option: from, until, set, metadataPrefix, and resumptionToken 
    539539    // exceptions: badArgument, badResumptionToken, cannotDisseminateFormat, noRecordMatch, and noSetHierarchy 
    540     HashSet valid_strs = new HashSet(); 
     540    HashSet<String> valid_strs = new HashSet<String>(); 
    541541    valid_strs.add(OAIXML.FROM); 
    542542    valid_strs.add(OAIXML.UNTIL); 
     
    558558    } 
    559559     
    560     HashMap param_map = OAIXML.getParamMap(params);     
     560    HashMap<String, String> param_map = OAIXML.getParamMap(params);     
    561561    if (!isValidParam(param_map, valid_strs)) { 
    562562    logger.error("One of the params is invalid"); 
     
    564564    } 
    565565    // param keys are valid, but if there are any date params, check they're of the right format 
    566     String from = (String)param_map.get(OAIXML.FROM); 
     566    String from = param_map.get(OAIXML.FROM); 
    567567    if(from != null) {   
    568568    Date from_date = OAIXML.getDate(from); 
     
    572572    } 
    573573    } 
    574     String until = (String)param_map.get(OAIXML.UNTIL); 
     574    String until = param_map.get(OAIXML.UNTIL); 
    575575    Date until_date = null; 
    576576    if(until != null) {  
     
    601601    if(request_set == true) { 
    602602      boolean set_supported = false; 
    603       String set_spec_str = (String)param_map.get(OAIXML.SET); 
     603      String set_spec_str = param_map.get(OAIXML.SET); 
    604604      // get the collection name 
    605605      //if setSpec is supported by this repository, it must be in the form: site_name:coll_name 
     
    630630      //    store a new token if necessary. 
    631631        //}       
    632       token = (String)param_map.get(OAIXML.RESUMPTION_TOKEN); 
     632      token = param_map.get(OAIXML.RESUMPTION_TOKEN); 
    633633      logger.info("has resumptionToken: " + token); 
    634634      if(OAIXML.containsToken(token) == false) { 
     
    671671     
    672672    //Now that we got a prefix, check and see if it's supported by this repository 
    673     String prefix_value = (String)param_map.get(OAIXML.METADATA_PREFIX); 
     673    String prefix_value = param_map.get(OAIXML.METADATA_PREFIX); 
    674674    if (containsMetadataPrefix(prefix_value) == false) { 
    675675    logger.error("requested prefix is not found in OAIConfig.xml"); 
     
    682682    String verb = req.getAttribute(OAIXML.TO);  
    683683    NodeList param_list = req.getElementsByTagName(OAIXML.PARAM); 
    684     ArrayList retain_param_list = new ArrayList(); 
     684    ArrayList<Element> retain_param_list = new ArrayList<Element>(); 
    685685    for (int j=0; j<param_list.getLength(); j++) { 
    686686      Element e = OAIXML.duplicateElement(msg.getOwnerDocument(), (Element)param_list.item(j), true); 
     
    698698          msg.appendChild(req); 
    699699          for (int j=0; j<retain_param_list.size(); j++) { 
    700             req.appendChild((Element)retain_param_list.get(j)); 
     700            req.appendChild(retain_param_list.get(j)); 
    701701          } 
    702702        } 
     
    747747      getRecords(list_records, record_list, 0, resume_after); 
    748748      //An incomplete list is sent; append a resumptionToken element 
    749       Element token_elem = createResumptionTokenElement(num_records, 0, resume_after, true, (String)param_map.get(OAIXML.METADATA_PREFIX)); 
     749      Element token_elem = createResumptionTokenElement(num_records, 0, resume_after, true, param_map.get(OAIXML.METADATA_PREFIX)); 
    750750      //store this token 
    751751      OAIXML.addToken(token_elem); 
     
    768768        getRecords(list_records, record_list, cursor, num_records); 
    769769        //An incomplete list is sent; append a resumptionToken element 
    770     token_elem = createResumptionTokenElement(num_records, cursor, -1, false, (String)param_map.get(OAIXML.METADATA_PREFIX)); 
     770    token_elem = createResumptionTokenElement(num_records, cursor, -1, false, param_map.get(OAIXML.METADATA_PREFIX)); 
    771771    list_records.appendChild(token_elem); 
    772772 
     
    775775        //append required records to list_records (list is incomplete) 
    776776        getRecords(list_records, record_list, cursor, cursor + resume_after); 
    777         token_elem = createResumptionTokenElement(num_records, cursor, cursor + resume_after, true, (String)param_map.get(OAIXML.METADATA_PREFIX)); 
     777        token_elem = createResumptionTokenElement(num_records, cursor, cursor + resume_after, true, param_map.get(OAIXML.METADATA_PREFIX)); 
    778778        //store this token 
    779779        OAIXML.addToken(token_elem); 
     
    10131013    Element get_record = OAIXML.createElement(OAIXML.GET_RECORD); 
    10141014 
    1015     HashSet valid_strs = new HashSet(); 
     1015    HashSet<String> valid_strs = new HashSet<String>(); 
    10161016    valid_strs.add(OAIXML.IDENTIFIER); 
    10171017    valid_strs.add(OAIXML.METADATA_PREFIX); 
     
    10191019    Element req = (Element)GSXML.getChildByTagName(msg, GSXML.REQUEST_ELEM); 
    10201020    NodeList params = GSXML.getChildrenByTagName(req, OAIXML.PARAM); 
    1021     HashMap param_map = OAIXML.getParamMap(params);     
     1021    HashMap<String, String> param_map = OAIXML.getParamMap(params);     
    10221022     
    10231023    if(!isValidParam(param_map, valid_strs) || 
     
    10291029    } 
    10301030     
    1031     String prefix = (String)param_map.get(OAIXML.METADATA_PREFIX); 
    1032     String identifier = (String)param_map.get(OAIXML.IDENTIFIER); 
     1031    String prefix = param_map.get(OAIXML.METADATA_PREFIX); 
     1032    String identifier = param_map.get(OAIXML.IDENTIFIER); 
    10331033     
    10341034    // verify the metadata prefix 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/Page.java

    r22085 r25635  
    22 
    33import java.io.File; 
     4import java.io.Serializable; 
    45import java.util.HashMap; 
    56 
     
    127128        Element cgi_param_list = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 
    128129        if (cgi_param_list != null) { 
    129             HashMap params = GSXML.extractParams(cgi_param_list, false); 
     130            HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    130131            collection = (String)params.get(GSParams.COLLECTION); 
    131132            if (collection == null) collection = ""; 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r25301 r25635  
    3131 
    3232    /** the set up variables */ 
    33     protected HashMap config_params = null; 
     33    protected HashMap<String, Comparable> config_params = null; 
    3434    /** container Document to create XML Nodes */ 
    3535    protected Document doc = null; 
     
    4242 
    4343    /** the list of actions */ 
    44     protected HashMap action_map = null; 
     44    protected HashMap<String, Action> action_map = null; 
    4545 
    4646    /** the list of params */ 
     
    4949 
    5050    /** the list of interfaces this is based on */ 
    51     protected ArrayList base_interfaces = null; 
     51    protected ArrayList<String> base_interfaces = null; 
    5252 
    5353    public Receptionist() 
     
    5555        this.converter = new XMLConverter(); 
    5656        this.doc = this.converter.newDOM(); 
    57         this.action_map = new HashMap(); 
     57        this.action_map = new HashMap<String, Action>(); 
    5858    } 
    5959 
     
    6767    } 
    6868 
    69     public void setConfigParams(HashMap params) 
     69    public void setConfigParams(HashMap<String, Comparable> params) 
    7070    { 
    7171        this.config_params = params; 
    7272    } 
    7373 
    74     public HashMap getConfigParams() 
     74    public HashMap<String, Comparable> getConfigParams() 
    7575    { 
    7676        return this.config_params; 
     
    211211 
    212212        // find the  appropriate action  
    213         Action a = (Action) this.action_map.get(action); 
     213        Action a = this.action_map.get(action); 
    214214 
    215215        String action_name = null; 
     
    313313            if (base_interfaces == null) 
    314314            { 
    315                 base_interfaces = new ArrayList(); 
     315                base_interfaces = new ArrayList<String>(); 
    316316            } 
    317317            base_interfaces.add(base_interface); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r25445 r25635  
    1717import java.io.ByteArrayInputStream; 
    1818import java.io.File; 
     19import java.io.Serializable; 
    1920import java.io.StringReader; 
    2021import java.io.StringWriter; 
     
    5354 
    5455    /** the list of xslt to use for actions */ 
    55     protected HashMap xslt_map = null; 
     56    protected HashMap<String, String> xslt_map = null; 
    5657 
    5758    /** a transformer class to transform xml using xslt */ 
     
    6465    { 
    6566        super(); 
    66         this.xslt_map = new HashMap(); 
     67        this.xslt_map = new HashMap<String, String>(); 
    6768        this.transformer = new XMLTransformer(); 
    6869        try 
     
    197198        if (cgi_param_list != null) 
    198199        { 
    199             HashMap params = GSXML.extractParams(cgi_param_list, false); 
     200            HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    200201            if ((excerptID = (String) params.get(GSParams.EXCERPT_ID)) != null) 
    201202            { 
     
    461462        { 
    462463            // Don't waste time getting all the parameters 
    463             HashMap params = GSXML.extractParams(cgi_param_list, false); 
     464            HashMap<String, Serializable> params = GSXML.extractParams(cgi_param_list, false); 
    464465            collection = (String) params.get(GSParams.COLLECTION); 
    465466            if (collection == null) 
     
    883884        { 
    884885            String key = action + ":" + subaction; 
    885             name = (String) this.xslt_map.get(key); 
     886            name = this.xslt_map.get(key); 
    886887        } 
    887888        // try the action by itself 
    888889        if (name == null) 
    889890        { 
    890             name = (String) this.xslt_map.get(action); 
     891            name = this.xslt_map.get(action); 
    891892        } 
    892893        // now find the absolute path 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/selfContained/FilesDocumentStream.java

    r3615 r25635  
    5454  implements DocumentStream { 
    5555  /** the files we've found so far */ 
    56   Vector files = new Vector(); 
     56  Vector<String> files = new Vector<String>(); 
    5757  /** the directories we've found so far */ 
    58   Vector directories = new Vector(); 
     58  Vector<String> directories = new Vector<String>(); 
    5959 
    6060  /** 
     
    111111  protected void expandIfNecessary() { 
    112112    while (directories.size() > 0) { 
    113       String dirname = (String) directories.elementAt(0); 
     113      String dirname = directories.elementAt(0); 
    114114      directories.removeElement(dirname); 
    115115      File dir = new File(dirname); 
     
    144144    if (!hasNextDocument()) throw new Error("Doesn't have another Document"); 
    145145 
    146     String filename = (String) files.elementAt(files.size() - 1); 
     146    String filename = files.elementAt(files.size() - 1); 
    147147    files.removeElementAt(files.size() - 1); 
    148148    File file = new File(filename); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java

    r25303 r25635  
    340340    boolean want_info = false; 
    341341 
    342     ArrayList info_types=new ArrayList(); 
     342    ArrayList<String> info_types=new ArrayList<String>(); 
    343343    // The document structure information desired 
    344344    boolean want_ancestors = false; 
     
    416416         
    417417        for (int j=0; j<info_types.size(); j++) { 
    418             String info_type = (String)info_types.get(j); 
     418            String info_type = info_types.get(j); 
    419419            String info_value = getStructureInfo(node_id, info_type); 
    420420            if (info_value != null) { 
     
    511511 
    512512    // The metadata information required 
    513     ArrayList metadata_names_list = new ArrayList(); 
     513    ArrayList<String> metadata_names_list = new ArrayList<String>(); 
    514514    boolean all_metadata = false; 
    515515    // Process the request parameters 
     
    619619                  boolean recursive) 
    620620    { 
    621     ArrayList child_ids = getChildrenIds(node_id); 
     621    ArrayList<String> child_ids = getChildrenIds(node_id); 
    622622    if (child_ids==null) return; 
    623623    for (int i=0; i< child_ids.size(); i++) { 
    624         String child_id = (String)child_ids.get(i); 
     624        String child_id = child_ids.get(i); 
    625625        Element child_elem; 
    626626        if (isDocumentId(child_id)) { 
     
    675675 
    676676    /** returns the list of sibling ids, including the specified node_id */ 
    677     protected ArrayList getSiblingIds(String node_id) { 
     677    protected ArrayList<String> getSiblingIds(String node_id) { 
    678678    String parent_id = getParentId(node_id); 
    679679    if (parent_id == null) { 
     
    698698    abstract protected String getRootId(String node_id); 
    699699    /** returns a list of the child ids in order, null if no children */ 
    700     abstract protected ArrayList getChildrenIds(String node_id); 
     700    abstract protected ArrayList<String> getChildrenIds(String node_id); 
    701701    /** returns the node id of the parent node, null if no parent */ 
    702702    abstract protected String getParentId(String node_id); 
     
    715715    abstract protected Element getMetadataList(String node_id, 
    716716                           boolean all_metadata, 
    717                            ArrayList metadata_names); 
     717                           ArrayList<String> metadata_names); 
    718718 
    719719    /** get the particular metadata (identified by the metadata name) for the classifier node node_id 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractDocumentRetrieve.java

    r25429 r25635  
    205205 
    206206        // The metadata information required 
    207         ArrayList metadata_names_list = new ArrayList(); 
     207        ArrayList<String> metadata_names_list = new ArrayList<String>(); 
    208208        boolean all_metadata = false; 
    209209        // Process the request parameters 
     
    353353        boolean want_info = false; 
    354354 
    355         ArrayList info_types = new ArrayList(); 
     355        ArrayList<String> info_types = new ArrayList<String>(); 
    356356        // The document structure information desired 
    357357        boolean want_ancestors = false; 
     
    440440                for (int j = 0; j < info_types.size(); j++) 
    441441                { 
    442                     String info_type = (String) info_types.get(j); 
     442                    String info_type = info_types.get(j); 
    443443                    String info_value = getStructureInfo(doc_id, info_type); 
    444444                    if (info_value != null) 
     
    654654    protected void addDescendants(Element doc, String doc_id, boolean recursive) 
    655655    { 
    656         ArrayList child_ids = getChildrenIds(doc_id); 
     656        ArrayList<String> child_ids = getChildrenIds(doc_id); 
    657657        if (child_ids == null) 
    658658            return; 
    659659        for (int i = 0; i < child_ids.size(); i++) 
    660660        { 
    661             String child_id = (String) child_ids.get(i); 
     661            String child_id = child_ids.get(i); 
    662662            Element child_elem = createDocNode(child_id); 
    663663            doc.appendChild(child_elem); 
     
    707707 
    708708    /** returns the list of sibling ids, including the specified node_id */ 
    709     protected ArrayList getSiblingIds(String node_id) 
     709    protected ArrayList<String> getSiblingIds(String node_id) 
    710710    { 
    711711        String parent_id = getParentId(node_id); 
     
    803803     * implementation: return null 
    804804     */ 
    805     protected ArrayList getChildrenIds(String node_id) 
     805    protected ArrayList<String> getChildrenIds(String node_id) 
    806806    { 
    807807        return null; 
     
    821821     * <metadataList><metadata name="xxx">value</metadata></metadataList> 
    822822     */ 
    823     abstract protected Element getMetadataList(String doc_id, boolean all_metadata, ArrayList metadata_names) throws GSException; 
     823    abstract protected Element getMetadataList(String doc_id, boolean all_metadata, ArrayList<String> metadata_names) throws GSException; 
    824824 
    825825    /** 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2DocumentRetrieve.java

    r25427 r25635  
    157157 
    158158    /** returns a list of the child ids in order, null if no children */ 
    159     protected ArrayList getChildrenIds(String node_id) 
     159    protected ArrayList<String> getChildrenIds(String node_id) 
    160160    { 
    161161        DBInfo info = this.coll_db.getInfo(node_id); 
     
    170170            return null; 
    171171        } 
    172         ArrayList children = new ArrayList(); 
     172        ArrayList<String> children = new ArrayList<String>(); 
    173173        StringTokenizer st = new StringTokenizer(contains, ";"); 
    174174        while (st.hasMoreTokens()) 
     
    198198     */ 
    199199    // assumes only one value per metadata 
    200     protected Element getMetadataList(String node_id, boolean all_metadata, ArrayList metadata_names) throws GSException 
     200    protected Element getMetadataList(String node_id, boolean all_metadata, ArrayList<String> metadata_names) throws GSException 
    201201    { 
    202202        Element metadata_list = this.doc.createElement(GSXML.METADATA_ELEM + GSXML.LIST_MODIFIER); 
     
    210210        { 
    211211            // return everything out of the database 
    212             Set keys = info.getKeys(); 
    213             Iterator it = keys.iterator(); 
     212            Set<String> keys = info.getKeys(); 
     213            Iterator<String> it = keys.iterator(); 
    214214            while (it.hasNext()) 
    215215            { 
    216                 String key = (String) it.next(); 
     216                String key = it.next(); 
    217217                //String value = info.getInfo(key); 
    218                 Vector values = info.getMultiInfo(key); 
     218                Vector<String> values = info.getMultiInfo(key); 
    219219                for (int i = 0; i < values.size(); i++) 
    220220                { 
    221                     GSXML.addMetadata(this.doc, metadata_list, key, this.macro_resolver.resolve((String) values.elementAt(i), lang, MacroResolver.SCOPE_META, node_id)); 
     221                    GSXML.addMetadata(this.doc, metadata_list, key, this.macro_resolver.resolve(values.elementAt(i), lang, MacroResolver.SCOPE_META, node_id)); 
    222222                } 
    223223            } 
     
    228228            for (int i = 0; i < metadata_names.size(); i++) 
    229229            { 
    230                 String meta_name = (String) metadata_names.get(i); 
     230                String meta_name = metadata_names.get(i); 
    231231                String value = getMetadata(node_id, info, meta_name, lang); 
    232232                GSXML.addMetadata(this.doc, metadata_list, meta_name, value); 
     
    375375        if (pos == -1) 
    376376        { 
    377             Vector values = info.getMultiInfo(metadata); 
     377            Vector<String> values = info.getMultiInfo(metadata); 
    378378            if (values != null) 
    379379            { 
     
    391391                        result.append(separator); 
    392392                    } 
    393                     result.append(this.macro_resolver.resolve((String) values.elementAt(i), lang, MacroResolver.SCOPE_META, node_id)); 
     393                    result.append(this.macro_resolver.resolve(values.elementAt(i), lang, MacroResolver.SCOPE_META, node_id)); 
    394394                } 
    395395                return result.toString(); 
     
    482482        { 
    483483            // we have multiple meta 
    484             Vector values = relation_info.getMultiInfo(metadata); 
     484            Vector<String> values = relation_info.getMultiInfo(metadata); 
    485485            if (values != null) 
    486486            { 
     
    496496                        result.append(separator); 
    497497                    } 
    498                     result.append(this.macro_resolver.resolve((String) values.elementAt(i), lang, MacroResolver.SCOPE_META, relation_id)); 
     498                    result.append(this.macro_resolver.resolve(values.elementAt(i), lang, MacroResolver.SCOPE_META, relation_id)); 
    499499                } 
    500500            } 
     
    522522            else 
    523523            { 
    524                 Vector values = relation_info.getMultiInfo(metadata); 
     524                Vector<String> values = relation_info.getMultiInfo(metadata); 
    525525                if (values != null) 
    526526                { 
     
    528528                    { 
    529529                        result.insert(0, separator); 
    530                         result.insert(0, this.macro_resolver.resolve((String) values.elementAt(i), lang, MacroResolver.SCOPE_META, relation_id)); 
     530                        result.insert(0, this.macro_resolver.resolve(values.elementAt(i), lang, MacroResolver.SCOPE_META, relation_id)); 
    531531                    } 
    532532                } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2FieldSearch.java

    r25461 r25635  
    3434import java.util.Vector; 
    3535import java.io.File; 
     36import java.io.Serializable; 
    3637 
    3738import org.apache.log4j.*; 
     
    391392        if (name.equals(LEVEL_PARAM)) 
    392393        { 
    393             ArrayList level_ids = new ArrayList(); 
    394             ArrayList level_names = new ArrayList(); 
     394            ArrayList<String> level_ids = new ArrayList<String>(); 
     395            ArrayList<String> level_names = new ArrayList<String>(); 
    395396            getLevelData(level_ids, level_names, lang); 
    396397            if (level_ids.size() > 1) 
     
    429430        else if (name.equals(FIELD_FIELD_PARAM)) 
    430431        { 
    431             ArrayList fields = new ArrayList(); 
    432             ArrayList field_names = new ArrayList(); 
     432            ArrayList<String> fields = new ArrayList<String>(); 
     433            ArrayList<String> field_names = new ArrayList<String>(); 
    433434            getIndexData(fields, field_names, lang); 
    434435            // the field list -  read from config file 
     
    438439            // Changed from: 
    439440            // param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)fields.get(0), fields, field_names ); 
    440             String default_value = (fields.size() > 0) ? (String) fields.get(0) : null; 
     441            String default_value = (fields.size() > 0) ? fields.get(0) : null; 
    441442            // don't want to access element 0 if fields.size()==0, and 
    442443            // GSXML.createParameterDescription2 checks for default_value==null condition 
     
    465466 
    466467    // should cache some of this 
    467     protected void getLevelData(ArrayList level_ids, ArrayList level_names, String lang) 
     468    protected void getLevelData(ArrayList<String> level_ids, ArrayList<String> level_names, String lang) 
    468469    { 
    469470        Element level_list = (Element) GSXML.getChildByTagName(this.config_info, LEVEL_ELEM + GSXML.LIST_MODIFIER); 
     
    565566 
    566567        // Process the request parameters 
    567         HashMap params = GSXML.extractParams(param_list, false); 
     568        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    568569 
    569570        // Make sure a query has been specified 
     
    658659    /** methods to handle actually doing the query */ 
    659660    /** do any initialisation of the query object */ 
    660     abstract protected boolean setUpQueryer(HashMap params); 
     661    abstract protected boolean setUpQueryer(HashMap<String, Serializable> params); 
    661662 
    662663    /** do the query */ 
     
    673674 
    674675    /** add in term info if available */ 
    675     abstract protected boolean addTermInfo(Element term_list, HashMap params, Object query_result); 
     676    abstract protected boolean addTermInfo(Element term_list, HashMap<String, Serializable> params, Object query_result); 
    676677 
    677678    /** 
     
    680681     */ 
    681682    /** We assume the combination (AND/OR) is done by the match param */ 
    682     protected String parseFieldQueryParams(HashMap params) 
     683    protected String parseFieldQueryParams(HashMap<String, Serializable> params) 
    683684    { 
    684685 
     
    707708     * query 
    708709     */ 
    709     protected String parseAdvancedFieldQueryParams(HashMap params) 
     710    protected String parseAdvancedFieldQueryParams(HashMap<String, Serializable> params) 
    710711    { 
    711712 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2TextSearch.java

    r24857 r25635  
    227227    } 
    228228 
    229     protected void getIndexData(ArrayList index_ids, ArrayList index_names, String lang) 
     229    protected void getIndexData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang) 
    230230    { 
    231231        // the index info - 
     
    256256    } 
    257257 
    258     protected void getIndexSubcollectionData(ArrayList index_sub_ids, ArrayList index_sub_names, String lang) 
     258    protected void getIndexSubcollectionData(ArrayList<String> index_sub_ids, ArrayList<String> index_sub_names, String lang) 
    259259    { 
    260260        // the index info - 
     
    285285    } 
    286286 
    287     protected void getIndexLanguageData(ArrayList index_lang_ids, ArrayList index_lang_names, String lang) 
     287    protected void getIndexLanguageData(ArrayList<String> index_lang_ids, ArrayList<String> index_lang_names, String lang) 
    288288    { 
    289289        // the index info - 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractSearch.java

    r24892 r25635  
    288288        { 
    289289            // should we make these class fields? 
    290             ArrayList index_ids = new ArrayList(); 
    291             ArrayList index_names = new ArrayList(); 
     290            ArrayList<String> index_ids = new ArrayList<String>(); 
     291            ArrayList<String> index_names = new ArrayList<String>(); 
    292292            getIndexData(index_ids, index_names, lang); 
    293293            String param_type = GSXML.PARAM_TYPE_ENUM_SINGLE; 
     
    389389     * subclass there must be at least one index 
    390390     */ 
    391     abstract protected void getIndexData(ArrayList index_ids, ArrayList index_names, String lang); 
     391    abstract protected void getIndexData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang); 
    392392 
    393393} 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractTextSearch.java

    r24394 r25635  
    105105        Element index_sub_list = (Element)GSXML.getChildByTagName(this.config_info, INDEX_SUBCOLLECTION_ELEM+GSXML.LIST_MODIFIER); 
    106106        if (index_sub_list == null) return true; // processed, just not a very interesting result 
    107         ArrayList index_sub_ids = new ArrayList(); 
    108         ArrayList index_sub_names = new ArrayList(); 
     107        ArrayList<String> index_sub_ids = new ArrayList<String>(); 
     108        ArrayList<String> index_sub_names = new ArrayList<String>(); 
    109109        getIndexSubcollectionData(index_sub_ids, index_sub_names, lang); 
    110110        String param_type = GSXML.PARAM_TYPE_ENUM_SINGLE; 
     
    122122        Element index_lang_list = (Element)GSXML.getChildByTagName(this.config_info, INDEX_LANGUAGE_ELEM+GSXML.LIST_MODIFIER); 
    123123            if (index_lang_list == null) return true; // processed, just not a very interesting result 
    124         ArrayList index_lang_ids = new ArrayList(); 
    125         ArrayList index_lang_names = new ArrayList(); 
     124        ArrayList<String> index_lang_ids = new ArrayList<String>(); 
     125        ArrayList<String> index_lang_names = new ArrayList<String>(); 
    126126        getIndexLanguageData(index_lang_ids, index_lang_names, lang); 
    127127        String param_type = GSXML.PARAM_TYPE_ENUM_SINGLE; 
     
    150150     * might be implemented by subclass 
    151151     */ 
    152     protected void getIndexSubcollectionData(ArrayList index_ids, ArrayList index_names, String lang){} 
     152    protected void getIndexSubcollectionData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang){} 
    153153     
    154154    /** get the details about the indexes available 
    155155     * might be implemented by subclass 
    156156     */ 
    157     protected void getIndexLanguageData(ArrayList index_ids, ArrayList index_names, String lang){} 
     157    protected void getIndexLanguageData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang){} 
    158158   
    159159 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ArchiveIO.java

    r24993 r25635  
    3636 
    3737import java.io.File; 
     38import java.io.Serializable; 
    3839import java.util.ArrayList; 
    3940import java.util.HashMap; 
     
    118119            return result; 
    119120        } 
    120         HashMap params = GSXML.extractParams(param_list, false); 
     121        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    121122 
    122123        String oid = (String) params.get(GSXML.NODE_ID_ATT); 
     
    148149            return result; 
    149150        } 
    150         HashMap params = GSXML.extractParams(param_list, false); 
     151        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    151152 
    152153        String srcFile = (String) params.get("sourcefile"); //TODO: Replace with a constant 
     
    182183            return result; 
    183184        } 
    184         HashMap params = GSXML.extractParams(param_list, false); 
     185        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    185186 
    186187        String oid = (String) params.get(GSXML.NODE_ID_ATT); 
     
    317318            return result; 
    318319        } 
    319         HashMap params = GSXML.extractParams(param_list, false); 
     320        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    320321 
    321322        String oid = (String) params.get(GSXML.NODE_ID_ATT); 
     
    333334        for (int i = 1; i < assocFiles.size(); i++) 
    334335        { 
    335             metadataList.appendChild(GSXML.createMetadataElement(this.doc, "assocfile", (String) assocFiles.get(i))); 
     336            metadataList.appendChild(GSXML.createMetadataElement(this.doc, "assocfile", assocFiles.get(i))); 
    336337        } 
    337338 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ArchiveRetrieve.java

    r24993 r25635  
    3232 
    3333import java.io.File; 
     34import java.io.Serializable; 
    3435import java.util.HashMap; 
    3536import java.util.Vector; 
     
    115116            return result;   
    116117        } 
    117         HashMap params = GSXML.extractParams(param_list, false); 
     118        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    118119         
    119120        String oid = (String) params.get("oid"); 
     
    152153            return result;   
    153154        } 
    154         HashMap params = GSXML.extractParams(param_list, false); 
     155        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    155156         
    156157        String srcFile = (String) params.get("srcfile"); 
     
    223224            return result;   
    224225        } 
    225         HashMap params = GSXML.extractParams(param_list, false); 
     226        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    226227         
    227228        String oid = (String) params.get("oid"); 
     
    269270         
    270271        String srcFile = info.getInfo("src-file"); 
    271         Vector data = info.getMultiInfo("assoc-file"); 
     272        Vector<String> data = info.getMultiInfo("assoc-file"); 
    272273         
    273274        Element metadataList = this.doc.createElement(GSXML.METADATA_ELEM + GSXML.LIST_MODIFIER); 
     
    276277        for (int i = 0; i < data.size(); i++) 
    277278        { 
    278             metadataList.appendChild(createMetadataElement("assocfile", (String)data.get(i))); 
     279            metadataList.appendChild(createMetadataElement("assocfile", data.get(i))); 
    279280        } 
    280281         
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/Authentication.java

    r25352 r25635  
    1818import java.util.regex.Pattern; 
    1919import java.io.File; 
     20import java.io.Serializable; 
    2021 
    2122import net.tanesha.recaptcha.ReCaptchaImpl; 
     
    230231        } 
    231232 
    232         HashMap params = GSXML.extractParams(paramList, true); 
     233        HashMap<String, Serializable> params = GSXML.extractParams(paramList, true); 
    233234 
    234235        String username = (String) params.get("username"); 
     
    308309            return result; // Return the empty result 
    309310        } 
    310         HashMap paramMap = GSXML.extractParams(param_list, false); 
     311        HashMap<String, Serializable> paramMap = GSXML.extractParams(param_list, false); 
    311312        String op = (String) paramMap.get("authpage"); 
    312313        serviceNode.setAttribute("operation", op); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/BerryBasket.java

    r24993 r25635  
    3535import org.greenstone.gsdl3.util.UserContext; 
    3636 
     37import java.io.Serializable; 
    3738import java.net.InetAddress; 
    3839import java.util.Properties; 
     
    6667    protected static final int delay = 1800000; 
    6768 
    68     protected Hashtable userMap = null; 
    69     protected Hashtable timerMap = null; 
     69    protected Hashtable<String, Hashtable<String, Hashtable<String, Item>>> userMap = null; 
     70    protected Hashtable<String, UserTimer> timerMap = null; 
    7071    protected String username = ""; 
    7172    protected String password = ""; 
     
    7475    public BerryBasket() 
    7576    { 
    76         userMap = new Hashtable(); 
    77         timerMap = new Hashtable(); 
    78     } 
    79  
    80     private Hashtable updateDocMap(Element request) 
     77        userMap = new Hashtable<String, Hashtable<String, Hashtable<String, Item>>>(); 
     78        timerMap = new Hashtable<String, UserTimer>(); 
     79    } 
     80 
     81    private Hashtable<String, Hashtable<String, Item>> updateDocMap(Element request) 
    8182    { 
    8283 
     
    8788            if (timerMap.containsKey(id)) 
    8889            { 
    89                 UserTimer timer = (UserTimer) timerMap.get(id); 
     90                UserTimer timer = timerMap.get(id); 
    9091                timer.restart(); 
    9192            } 
    92             return (Hashtable) userMap.get(id); 
     93            return userMap.get(id); 
    9394        } 
    9495        else 
     
    9798            timerMap.put(id, timer); 
    9899            timer.start(); 
    99             Hashtable newDocs = new Hashtable(); 
     100            Hashtable<String, Hashtable<String, Item>> newDocs = new Hashtable<String, Hashtable<String, Item>>(); 
    100101            userMap.put(id, newDocs); 
    101102            return newDocs; 
     
    210211    protected Element processAddItem(Element request) 
    211212    { 
    212         Hashtable docsMap = updateDocMap(request); 
     213        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    213214 
    214215        // Create a new (empty) result message 
     
    223224        } 
    224225 
    225         HashMap params = GSXML.extractParams(param_list, false); 
     226        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    226227 
    227228        String item = (String) params.get("item"); 
     
    236237        if (docsMap.containsKey(collection)) 
    237238        { 
    238             Hashtable items = (Hashtable) docsMap.get(collection); 
     239            Hashtable<String, Item> items = docsMap.get(collection); 
    239240            if (!items.containsKey(item)) 
    240241            { 
     
    246247        else 
    247248        { 
    248             Hashtable items = new Hashtable(); 
     249            Hashtable<String, Item> items = new Hashtable<String, Item>(); 
    249250            Item newItem = generateItem(collection, item); 
    250251            items.put(item, newItem); 
     
    261262        Item item = new Item(collection, id); 
    262263        String to = GSPath.appendLink(collection, "DocumentMetadataRetrieve"); 
    263         ArrayList tmp = new ArrayList(); 
     264        ArrayList<String> tmp = new ArrayList<String>(); 
    264265        tmp.add(id); 
    265266         
     
    303304    protected Element processDeleteItems(Element request) 
    304305    { 
    305         Hashtable docsMap = updateDocMap(request); 
     306        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    306307 
    307308        // Create a new (empty) result message 
     
    317318        } 
    318319 
    319         HashMap params = GSXML.extractParams(param_list, false); 
     320        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    320321 
    321322        String param = (String) params.get("items"); 
     
    341342            if (docsMap.containsKey(collection)) 
    342343            { 
    343                 Hashtable itemMap = (Hashtable) docsMap.get(collection); 
     344                Hashtable itemMap = docsMap.get(collection); 
    344345                if (itemMap.containsKey(item)) 
    345346                { 
     
    359360    protected Element processDeleteItem(Element request) 
    360361    { 
    361         Hashtable docsMap = updateDocMap(request); 
     362        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    362363 
    363364        // Create a new (empty) result message 
     
    373374        } 
    374375 
    375         HashMap params = GSXML.extractParams(param_list, false); 
     376        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    376377 
    377378        String param = (String) params.get("item"); 
     
    393394        if (docsMap.containsKey(collection)) 
    394395        { 
    395             Hashtable itemMap = (Hashtable) docsMap.get(collection); 
     396            Hashtable itemMap = docsMap.get(collection); 
    396397            if (itemMap.containsKey(item)) 
    397398            { 
     
    409410    protected Element processItemNum(Element request) 
    410411    { 
    411         Hashtable docsMap = updateDocMap(request); 
     412        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    412413 
    413414        // Create a new (empty) result message 
     
    416417        int size = 0; 
    417418        String ids = ""; 
    418         Iterator keys = docsMap.keySet().iterator(); 
     419        Iterator<String> keys = docsMap.keySet().iterator(); 
    419420 
    420421        while (keys.hasNext()) 
    421422        { 
    422             Hashtable items = (Hashtable) docsMap.get((String) keys.next()); 
     423            Hashtable items = docsMap.get(keys.next()); 
    423424            size += items.size(); 
    424425            Iterator values = items.values().iterator(); 
     
    437438    } 
    438439 
    439     private Element getDocumentMetadata(String to, UserContext userContext, Iterator ids) 
     440    private Element getDocumentMetadata(String to, UserContext userContext, Iterator<String> ids) 
    440441    { 
    441442 
     
    446447 
    447448        // Create a parameter list to specify the required metadata information 
    448         HashSet meta_names = new HashSet(); 
     449        HashSet<String> meta_names = new HashSet<String>(); 
    449450        meta_names.add("Title"); // the default 
    450451        meta_names.add("root_Title"); 
     
    454455 
    455456        Element param = null; 
    456         Iterator i = meta_names.iterator(); 
     457        Iterator<String> i = meta_names.iterator(); 
    457458        while (i.hasNext()) 
    458459        { 
    459             String name = (String) i.next(); 
     460            String name = i.next(); 
    460461            param = this.doc.createElement(GSXML.PARAM_ELEM); 
    461462            param_list.appendChild(param); 
     
    476477            Element dm_doc_node = this.doc.createElement(GSXML.DOC_NODE_ELEM); 
    477478            dm_doc_list.appendChild(dm_doc_node); 
    478             dm_doc_node.setAttribute(GSXML.NODE_ID_ATT, (String) ids.next()); 
     479            dm_doc_node.setAttribute(GSXML.NODE_ID_ATT, ids.next()); 
    479480        } 
    480481 
     
    485486    protected Element processDisplayList(Element request) 
    486487    { 
    487         Hashtable docsMap = updateDocMap(request); 
     488        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    488489 
    489490        // Create a new (empty) result message 
    490491        Element result = this.doc.createElement(GSXML.RESPONSE_ELEM); 
    491492 
    492         Iterator keys = docsMap.keySet().iterator(); 
     493        Iterator<String> keys = docsMap.keySet().iterator(); 
    493494 
    494495        while (keys.hasNext()) 
    495496        { 
    496             String collection = (String) keys.next(); 
    497             Hashtable items = (Hashtable) docsMap.get(collection); 
     497            String collection = keys.next(); 
     498            Hashtable items = docsMap.get(collection); 
    498499            Iterator itemItr = items.values().iterator(); 
    499500 
     
    534535        } 
    535536 
    536         HashMap params = GSXML.extractParams(param_list, false); 
     537        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    537538 
    538539        String to = (String) params.get("address"); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/CoverageMetadataRetrieve.java

    r22974 r25635  
    198198    DBInfo collection_info = this.coll_db.getInfo("collection"); 
    199199     
    200     Set keys = collection_info.getKeys(); 
    201  
    202     Vector valid_keys = new Vector(); 
     200    Set<String> keys = collection_info.getKeys(); 
     201 
     202    Vector<String> valid_keys = new Vector<String>(); 
    203203 
    204204    // Iterate over keys and add valid ones to the valid_keys vector 
    205205    String current_key = null; 
    206     Iterator iter = keys.iterator(); 
     206    Iterator<String> iter = keys.iterator(); 
    207207 
    208208    while (iter.hasNext()) { 
    209         current_key = (String) iter.next(); 
     209        current_key = iter.next(); 
    210210        if(current_key.matches("^metadatalist-([a-zA-Z][^-])*$")) 
    211211        { 
     
    232232 
    233233    while (iter.hasNext()) { 
    234         current_key = (String) iter.next(); 
     234        current_key = iter.next(); 
    235235 
    236236        // Create metadataSet using the current key and add to metadataSetList 
     
    244244 
    245245        // Create a metadata element for each value and add to metadataSet 
    246         Vector sub_info = collection_info.getMultiInfo(current_key); 
    247         Iterator iter2 = sub_info.iterator(); 
     246        Vector<String> sub_info = collection_info.getMultiInfo(current_key); 
     247        Iterator<String> iter2 = sub_info.iterator(); 
    248248        while (iter2.hasNext()) { 
    249             value = (String) iter2.next();      
     249            value = iter2.next();      
    250250            metadata = this.doc.createElement("metadata"); 
    251251            metadata.setAttribute(GSXML.NAME_ATT, value); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/CrossCollectionSearch.java

    r24993 r25635  
    292292        logger.debug("metadata response = " + this.converter.getPrettyString(metadata_response)); 
    293293        NodeList coll_responses = metadata_response.getElementsByTagName(GSXML.RESPONSE_ELEM); 
    294         ArrayList valid_colls = new ArrayList(); 
    295         ArrayList valid_coll_names = new ArrayList(); 
     294        ArrayList<String> valid_colls = new ArrayList<String>(); 
     295        ArrayList<String> valid_coll_names = new ArrayList<String>(); 
    296296        for (int i = 0; i < coll_responses.getLength(); i++) 
    297297        { 
     
    317317        // ids no all has the list without 'all' option. 
    318318        this.coll_ids_list_no_all = new String[1]; 
    319         this.coll_ids_list_no_all = (String[]) valid_colls.toArray(coll_ids_list_no_all); 
     319        this.coll_ids_list_no_all = valid_colls.toArray(coll_ids_list_no_all); 
    320320 
    321321        valid_colls.add(0, "all"); 
     
    323323        this.coll_ids_list = new String[1]; 
    324324        this.coll_names_list = new String[1]; 
    325         this.coll_ids_list = (String[]) valid_colls.toArray(coll_ids_list); 
    326         this.coll_names_list = (String[]) valid_coll_names.toArray(coll_names_list); 
     325        this.coll_ids_list = valid_colls.toArray(coll_ids_list); 
     326        this.coll_names_list = valid_coll_names.toArray(coll_names_list); 
    327327        return true; 
    328328    } 
     
    361361 
    362362        // organise the nodes into collection lists 
    363         HashMap coll_map = new HashMap(); 
     363        HashMap<String, Node> coll_map = new HashMap<String, Node>(); 
    364364 
    365365        for (int i = 0; i < query_doc_list.getLength(); i++) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/DocumentBasket.java

    r25091 r25635  
    7272    protected static final String BASKET_BOOK = "documentBasketBook"; 
    7373 
    74     protected Hashtable userMap = null; 
    75     protected Hashtable timerMap = null; 
     74    protected Hashtable<String, Hashtable<String, Hashtable<String, Item>>> userMap = null; 
     75    protected Hashtable<String, UserTimer> timerMap = null; 
    7676    protected String username = ""; 
    7777    protected String password = ""; 
     
    8080    public DocumentBasket() 
    8181    { 
    82         userMap = new Hashtable(); 
    83         timerMap = new Hashtable(); 
    84     } 
    85  
    86     private Hashtable updateDocMap(Element request) 
     82        userMap = new Hashtable<String, Hashtable<String, Hashtable<String, Item>>>(); 
     83        timerMap = new Hashtable<String, UserTimer>(); 
     84    } 
     85 
     86    private Hashtable<String, Hashtable<String, Item>> updateDocMap(Element request) 
    8787    { 
    8888        String id = request.getAttribute("uid"); 
     
    9292            if (timerMap.containsKey(id)) 
    9393            { 
    94                 UserTimer timer = (UserTimer) timerMap.get(id); 
     94                UserTimer timer = timerMap.get(id); 
    9595                timer.restart(); 
    9696            } 
    97             return (Hashtable) userMap.get(id); 
     97            return userMap.get(id); 
    9898        } 
    9999        else 
     
    102102            timerMap.put(id, timer); 
    103103            timer.start(); 
    104             Hashtable newDocs = new Hashtable(); 
     104            Hashtable<String, Hashtable<String, Item>> newDocs = new Hashtable<String, Hashtable<String, Item>>(); 
    105105            userMap.put(id, newDocs); 
    106106            return newDocs; 
     
    226226    { 
    227227        //System.err.println("REQUEST = " + GSXML.xmlNodeToString(request)); 
    228         Hashtable docsMap = updateDocMap(request); 
     228        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    229229        //System.err.println("DOCSMAP = " + docsMap); 
    230230        // Create a new (empty) result message 
     
    239239        } 
    240240 
    241         HashMap params = GSXML.extractParams(param_list, false); 
     241        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    242242        //System.err.println("PARAMS = " + params); 
    243243        String item = (String) params.get("item"); 
     
    256256        if (docsMap.containsKey(collection)) 
    257257        { 
    258             Hashtable items = (Hashtable) docsMap.get(collection); 
     258            Hashtable<String, Item> items = docsMap.get(collection); 
    259259            if (!items.containsKey(item)) 
    260260            { 
     
    266266        else 
    267267        { 
    268             Hashtable items = new Hashtable(); 
     268            Hashtable<String, Item> items = new Hashtable<String, Item>(); 
    269269            Item newItem = generateItem(collection, item); 
    270270            items.put(item, newItem); 
     
    286286        } 
    287287 
    288         HashMap params = GSXML.extractParams(param_list, false); 
     288        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    289289 
    290290        String docString = (String) params.get("docs"); 
     
    379379        Item item = new Item(collection, id); 
    380380        String to = GSPath.appendLink(collection, "DocumentMetadataRetrieve"); 
    381         ArrayList tmp = new ArrayList(); 
     381        ArrayList<String> tmp = new ArrayList<String>(); 
    382382        tmp.add(id); 
    383383         
     
    422422    protected Element processClearDocuments(Element request) 
    423423    { 
    424         Hashtable docsMap = updateDocMap(request); 
     424        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    425425         
    426426        Element result = this.doc.createElement(GSXML.RESPONSE_ELEM); 
     
    435435        } 
    436436 
    437         HashMap params = GSXML.extractParams(param_list, false); 
     437        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    438438        String collection = (String) params.get(GSParams.COLLECTION); 
    439439 
     
    441441            return result; 
    442442         
    443         docsMap.put(collection, new Hashtable()); 
     443        docsMap.put(collection, new Hashtable<String, Item>()); 
    444444         
    445445        return result; 
     
    448448    protected Element processDeleteDocuments(Element request) 
    449449    { 
    450         Hashtable docsMap = updateDocMap(request); 
     450        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    451451 
    452452        // Create a new (empty) result message 
     
    464464        } 
    465465 
    466         HashMap params = GSXML.extractParams(param_list, false); 
     466        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    467467 
    468468        String param = (String) params.get("items"); 
     
    489489            if (docsMap.containsKey(collection)) 
    490490            { 
    491                 Hashtable itemMap = (Hashtable) docsMap.get(collection); 
     491                Hashtable itemMap = docsMap.get(collection); 
    492492                if (itemMap.containsKey(item)) 
    493493                { 
     
    506506    protected Element processDeleteDocument(Element request) 
    507507    { 
    508         Hashtable docsMap = updateDocMap(request); 
     508        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    509509 
    510510        // Create a new (empty) result message 
     
    522522        } 
    523523 
    524         HashMap params = GSXML.extractParams(param_list, false); 
     524        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    525525 
    526526        String item = (String) params.get("item"); 
     
    540540        if (docsMap.containsKey(collection)) 
    541541        { 
    542             Hashtable itemMap = (Hashtable) docsMap.get(collection); 
     542            Hashtable itemMap = docsMap.get(collection); 
    543543            if (itemMap.containsKey(item)) 
    544544            { 
     
    557557    { 
    558558        // GSXML.printXMLNode(request); 
    559         Hashtable docsMap = updateDocMap(request); 
     559        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    560560 
    561561        // Create a new (empty) result message 
     
    564564        int size = 0; 
    565565        String ids = ""; 
    566         Iterator keys = docsMap.keySet().iterator(); 
     566        Iterator<String> keys = docsMap.keySet().iterator(); 
    567567 
    568568        while (keys.hasNext()) 
    569569        { 
    570             Hashtable items = (Hashtable) docsMap.get((String) keys.next()); 
     570            Hashtable items = docsMap.get(keys.next()); 
    571571            size += items.size(); 
    572572            Iterator values = items.values().iterator(); 
     
    585585    } 
    586586 
    587     private Element getDocumentMetadata(String to, UserContext userContext, Iterator ids) 
     587    private Element getDocumentMetadata(String to, UserContext userContext, Iterator<String> ids) 
    588588    { 
    589589 
     
    594594 
    595595        // Create a parameter list to specify the required metadata information 
    596         HashSet meta_names = new HashSet(); 
     596        HashSet<String> meta_names = new HashSet<String>(); 
    597597        meta_names.add("Title"); // the default 
    598598        meta_names.add("root_Title"); 
     
    602602 
    603603        Element param = null; 
    604         Iterator i = meta_names.iterator(); 
     604        Iterator<String> i = meta_names.iterator(); 
    605605        while (i.hasNext()) 
    606606        { 
    607             String name = (String) i.next(); 
     607            String name = i.next(); 
    608608            param = this.doc.createElement(GSXML.PARAM_ELEM); 
    609609            param_list.appendChild(param); 
     
    623623            Element dm_doc_node = this.doc.createElement(GSXML.DOC_NODE_ELEM); 
    624624            dm_doc_list.appendChild(dm_doc_node); 
    625             dm_doc_node.setAttribute(GSXML.NODE_ID_ATT, (String) ids.next()); 
     625            dm_doc_node.setAttribute(GSXML.NODE_ID_ATT, ids.next()); 
    626626        } 
    627627 
     
    631631    protected Element processDisplayDocumentList(Element request) 
    632632    { 
    633         Hashtable docsMap = updateDocMap(request); 
     633        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request); 
    634634 
    635635        // Create a new (empty) result message 
    636636        Element result = this.doc.createElement(GSXML.RESPONSE_ELEM); 
    637637 
    638         Iterator keys = docsMap.keySet().iterator(); 
     638        Iterator<String> keys = docsMap.keySet().iterator(); 
    639639 
    640640        while (keys.hasNext()) 
    641641        { 
    642             String collection = (String) keys.next(); 
    643             Hashtable items = (Hashtable) docsMap.get(collection); 
     642            String collection = keys.next(); 
     643            Hashtable items = docsMap.get(collection); 
    644644            Iterator itemItr = items.values().iterator(); 
    645645 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/DocumentMaker.java

    r25541 r25635  
    2525import java.io.InputStreamReader; 
    2626import java.io.OutputStream; 
     27import java.io.Serializable; 
    2728import java.lang.reflect.Type; 
    2829import java.util.ArrayList; 
     
    370371        } 
    371372 
    372         HashMap params = GSXML.extractParams(param_list, false); 
     373        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    373374        String transactionString = (String) params.get("transactions"); 
    374375        transactionString = transactionString.replace("%26", "&"); 
     
    393394            for (int j = 0; j < transactions.size(); j++) 
    394395            { 
    395                 Map keyValueMap = (Map) transactions.get(j); 
     396                Map keyValueMap = transactions.get(j); 
    396397                String operation = (String) keyValueMap.get("operation"); 
    397398                if (operation.equals("move") || operation.equals("duplicate")) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/FedoraServiceProxy.java

    r22370 r25635  
    8181    this.doc = this.converter.newDOM(); 
    8282    this.short_service_info = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 
    83     this.format_info_map = new HashMap(); 
     83    this.format_info_map = new HashMap<String, Node>(); 
    8484 
    8585    } 
     
    407407    NodeList paramNodes = request.getElementsByTagName(GSXML.PARAM_ELEM); 
    408408    if(paramNodes.getLength() > 0) { 
    409         HashMap params = new HashMap(paramNodes.getLength()); 
     409        HashMap<String, String> params = new HashMap<String, String>(paramNodes.getLength()); 
    410410        for(int i = 0; i < paramNodes.getLength(); i++) { 
    411411        Element param = (Element)paramNodes.item(i); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Browse.java

    r24393 r25635  
    158158    } 
    159159    /** returns a list of the child ids in order, null if no children */ 
    160     protected ArrayList getChildrenIds(String node_id) { 
     160    protected ArrayList<String> getChildrenIds(String node_id) { 
    161161    DBInfo info = this.coll_db.getInfo(node_id); 
    162162    if (info == null) { 
     
    164164    } 
    165165 
    166     ArrayList children = new ArrayList(); 
     166    ArrayList<String> children = new ArrayList<String>(); 
    167167     
    168168    String contains = info.getInfo("contains"); 
     
    190190    } 
    191191 
    192     Set keys = info.getKeys(); 
    193     Iterator it = keys.iterator(); 
     192    Set<String> keys = info.getKeys(); 
     193    Iterator<String> it = keys.iterator(); 
    194194    while(it.hasNext()) { 
    195         String key_in = (String)it.next(); 
     195        String key_in = it.next(); 
    196196        String value = info.getInfo(key); 
    197197        if (key_in.equals(key)){ 
     
    212212    // assumes only one value per metadata 
    213213    protected Element getMetadataList(String node_id, boolean all_metadata,  
    214                       ArrayList metadata_names) { 
     214                      ArrayList<String> metadata_names) { 
    215215    String lang = "en"; 
    216216    Element metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER); 
     
    221221    if (all_metadata) { 
    222222        // return everything out of the database 
    223         Set keys = info.getKeys(); 
    224         Iterator it = keys.iterator(); 
     223        Set<String> keys = info.getKeys(); 
     224        Iterator<String> it = keys.iterator(); 
    225225        while(it.hasNext()) { 
    226         String key = (String)it.next(); 
     226        String key = it.next(); 
    227227        String value = info.getInfo(key); 
    228228        GSXML.addMetadata(this.doc, metadata_list, key, this.macro_resolver.resolve(value, lang, GS2MacroResolver.SCOPE_META, node_id)); 
     
    231231    } else { 
    232232        for (int i=0; i<metadata_names.size(); i++) { 
    233         String meta_name = (String) metadata_names.get(i); 
     233        String meta_name = metadata_names.get(i); 
    234234        String value = (String)info.getInfo(meta_name); 
    235235        GSXML.addMetadata(this.doc, metadata_list, meta_name, value); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java

    r25550 r25635  
    3737import java.io.File; 
    3838import java.io.FileWriter; 
     39import java.io.Serializable; 
    3940import java.lang.Thread.State; 
    4041import java.util.Locale; 
     
    8283 
    8384    // set of listeners for any construction commands 
    84     protected Map listeners = null; 
     85    protected Map<String, GS2PerlListener> listeners = null; 
    8586    protected HashMap<String, Boolean> collectionOperationMap = new HashMap<String, Boolean>();  
    8687 
    8788    public GS2Construct() 
    8889    { 
    89         this.listeners = Collections.synchronizedMap(new HashMap()); 
     90        this.listeners = Collections.synchronizedMap(new HashMap<String, GS2PerlListener>()); 
    9091    } 
    9192 
     
    175176        String id = statusElem.getAttribute("pid"); 
    176177 
    177         GS2PerlListener currentListener = (GS2PerlListener) this.listeners.get(id); 
     178        GS2PerlListener currentListener = this.listeners.get(id); 
    178179        int statusCode = currentListener.getStatus(); 
    179180        while (!GSStatus.isCompleted(statusCode)) 
     
    199200    { 
    200201        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    201         HashMap params = GSXML.extractParams(param_list, false); 
     202        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    202203 
    203204        //If we have been requested to only build certain documents then we need to create a manifest file 
     
    264265        // the MR about it. but we have to wait until the process is finished. 
    265266        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    266         HashMap params = GSXML.extractParams(param_list, false); 
     267        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    267268        String coll_name = (String) params.get(COL_PARAM); 
    268269        String lang = request.getAttribute(GSXML.LANG_ATT); 
     
    288289        } 
    289290        String id = status.getAttribute(GSXML.STATUS_PROCESS_ID_ATT); 
    290         GS2PerlListener listener = (GS2PerlListener) this.listeners.get(id); 
     291        GS2PerlListener listener = this.listeners.get(id); 
    291292        if (listener == null) 
    292293        { 
     
    342343 
    343344        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    344         HashMap params = GSXML.extractParams(param_list, false); 
     345        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    345346 
    346347        boolean get_status_only = false; 
     
    400401 
    401402        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    402         HashMap params = GSXML.extractParams(param_list, false); 
     403        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    403404 
    404405        boolean get_status_only = false; 
     
    551552 
    552553        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    553         HashMap params = GSXML.extractParams(param_list, false); 
     554        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    554555 
    555556        boolean get_status_only = false; 
     
    564565            String id = (String) params.get(PROCESS_ID_PARAM); 
    565566            status.setAttribute(GSXML.STATUS_PROCESS_ID_ATT, id); 
    566             GS2PerlListener listener = (GS2PerlListener) this.listeners.get(id); 
     567            GS2PerlListener listener = this.listeners.get(id); 
    567568            if (listener == null) 
    568569            { 
     
    725726     * element 
    726727     */ 
    727     protected Element extractOtherParams(HashMap params, int type) 
     728    protected Element extractOtherParams(HashMap<String, Serializable> params, int type) 
    728729    { 
    729730 
     
    758759    { 
    759760        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    760         HashMap params = GSXML.extractParams(param_list, false); 
     761        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    761762         
    762763        String collection = (String)params.get(COL_PARAM); 
     
    783784    { 
    784785        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    785         HashMap params = GSXML.extractParams(param_list, false); 
     786        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    786787         
    787788        String collection = (String)params.get(COL_PARAM); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2LuceneSearch.java

    r24738 r25635  
    3030import java.util.HashMap; 
    3131import java.io.File; 
     32import java.io.Serializable; 
    3233import java.util.Iterator; 
    3334import java.util.Set; 
     
    6263 
    6364    /** do any initialisation of the query object */ 
    64     protected boolean setUpQueryer(HashMap params) { 
     65    protected boolean setUpQueryer(HashMap<String, Serializable> params) { 
    6566    String indexdir = GSFile.collectionBaseDir(this.site_home, this.cluster_name) + File.separatorChar + "index"+File.separatorChar; 
    6667     
     
    173174 
    174175    /** add in term info if available */ 
    175     protected boolean addTermInfo(Element term_list, HashMap params, 
     176    protected boolean addTermInfo(Element term_list, HashMap<String, Serializable> params, 
    176177                  Object query_result) { 
    177178    String query_level = (String)params.get(LEVEL_PARAM); // the current query level 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java

    r20239 r25635  
    4242import java.util.Vector; 
    4343import java.io.File; 
     44import java.io.Serializable; 
    4445 
    4546import org.apache.log4j.*; 
     
    9394  } 
    9495   
    95   protected boolean setUpQueryer(HashMap params) { 
     96  protected boolean setUpQueryer(HashMap<String, Serializable> params) { 
    9697     
    9798    // set up the defaults that may be changed by query params 
     
    189190  } 
    190191   
    191   protected boolean addTermInfo(Element term_list, HashMap params, 
     192  protected boolean addTermInfo(Element term_list, HashMap<String, Serializable> params, 
    192193    Object query_result) { 
    193194     
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2MGSearch.java

    r24394 r25635  
    3636import java.util.Iterator; 
    3737import java.io.File; 
     38import java.io.Serializable; 
    3839 
    3940import org.apache.log4j.*; 
     
    9293         
    9394        // Process the request parameters 
    94         HashMap params = GSXML.extractParams (param_list, false); 
     95        HashMap<String, Serializable> params = GSXML.extractParams (param_list, false); 
    9596         
    9697        // Make sure a query has been specified 
     
    213214     
    214215    // should probably use a list rather than map 
    215     protected boolean setStandardQueryParams(HashMap params) 
     216    protected boolean setStandardQueryParams(HashMap<String, Serializable> params) 
    216217    { 
    217218    // set the default settings that gs uses 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GoogleNgramMGPPSearch.java

    r24394 r25635  
    6464      //ArrayList docList_present = new ArrayList(); 
    6565       
    66      ArrayList docList = new ArrayList(); 
     66     ArrayList<DocWrapper> docList = new ArrayList<DocWrapper>(); 
    6767 
    6868      for (int d = 0; d < docs.size(); d++) { 
     
    133133//      interval = 10; 
    134134 
    135           doc_nums[d] = ((DocWrapper)docList.get(d)).num; 
     135          doc_nums[d] = docList.get(d).num; 
    136136         
    137137      } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/IViaProxy.java

    r14224 r25635  
    1515import java.io.InputStreamReader; 
    1616import java.io.IOException; 
     17import java.io.Serializable; 
    1718import java.net.HttpURLConnection; 
    1819import java.net.URLConnection; 
     
    176177 
    177178    // Process the request parameters 
    178     HashMap params = GSXML.extractParams(param_list, false); 
     179    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    179180 
    180181    // Make sure a query has been specified 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/IViaRetrieve.java

    r22085 r25635  
    205205    } 
    206206 
    207     protected ArrayList getChildrenIds(String node_id){ 
     207    protected ArrayList<String> getChildrenIds(String node_id){ 
    208208    return null;  
    209209    } 
     
    215215    protected Element getMetadataList (String doc_id, 
    216216                       boolean all_metadata, 
    217                        ArrayList metadata_names)  
     217                       ArrayList<String> metadata_names)  
    218218    throws GSException { 
    219219     
     
    225225 
    226226    for (int i=0; i<metadata_names.size();i++){ 
    227         if (isAcceptableMetadata((String)metadata_names.get(i))){ 
     227        if (isAcceptableMetadata(metadata_names.get(i))){ 
    228228        metadata_found = true; 
    229         field_list.append((String)metadata_names.get(i)); 
     229        field_list.append(metadata_names.get(i)); 
    230230        field_list.append(","); 
    231231        } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/IViaSearch.java

    r24394 r25635  
    1515import java.io.File; 
    1616import java.io.BufferedReader; 
     17import java.io.Serializable; 
    1718import java.net.Authenticator; 
    1819 
     
    3738 
    3839    protected String ivia_server_url = null; 
    39     protected ArrayList index_ids = null; 
     40    protected ArrayList<String> index_ids = null; 
    4041    public IViaSearch() 
    4142    { 
     
    6263    does_multi_index_search = true; 
    6364    this.default_index = ",kw,au,su,ti,de,fu,"; // all of them 
    64     index_ids = new ArrayList(); 
     65    index_ids = new ArrayList<String>(); 
    6566    index_ids.add("kw"); 
    6667    index_ids.add("au");     
     
    8889 
    8990    // Process the request parameters 
    90     HashMap params = GSXML.extractParams(param_list, false); 
     91    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    9192 
    9293    // Make sure a query has been specified 
     
    195196       An IVia server has a fixed list of fields to search (I think) so we can hard code them here rather than reading them in from a config file 
    196197    */ 
    197     protected void getIndexData(ArrayList index_ids, ArrayList index_names,String lang){ 
     198    protected void getIndexData(ArrayList<String> index_ids, ArrayList<String> index_names,String lang){ 
    198199    index_ids.addAll(this.index_ids); 
    199200    index_names.add(getTextString("param."+INDEX_PARAM+".kw", lang));  
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/LuceneSearch.java

    r24738 r25635  
    2929import org.greenstone.LuceneWrapper3.GS2Analyzer; 
    3030import java.io.File; 
     31import java.io.Serializable; 
    3132 
    3233import org.apache.log4j.*; 
     
    4344    protected static final String INDEX_ELEM = "index"; 
    4445 
    45     protected ArrayList index_ids; 
     46    protected ArrayList<String> index_ids; 
    4647 
    4748    public LuceneSearch() 
    4849    { 
    49     index_ids = new ArrayList(); 
     50    index_ids = new ArrayList<String>(); 
    5051    } 
    5152     
     
    7778    } 
    7879     
    79     protected void getIndexData(ArrayList index_ids, ArrayList index_names, String lang)  
     80    protected void getIndexData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang)  
    8081    { 
    8182    // copying exercise for index_ids,  
     
    133134 
    134135    // Process the request parameters to make sure a query has been specified 
    135     HashMap params = GSXML.extractParams(param_list, false); 
     136    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    136137    String query_string = (String) params.get(QUERY_PARAM); 
    137138 
     
    164165    } 
    165166 
    166     HashMap params = GSXML.extractParams(param_list, false); 
     167    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    167168    String query_string = (String) params.get(QUERY_PARAM); 
    168169 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/MapRetrieve.java

    r14225 r25635  
    1010 
    1111// General Java classes 
    12 import java.io.File; 
    1312import java.io.*; 
    1413import java.util.StringTokenizer; 
     
    3635    protected static final int DOCUMENT=1; 
    3736 
    38     protected ArrayList index_name_list = null; 
    39     protected ArrayList index_display_list = null; 
     37    protected ArrayList<String> index_name_list = null; 
     38    protected ArrayList<String> index_display_list = null; 
    4039    protected String files_home_dir = null;  
    4140    protected String temp_files_dir = null; 
     
    4544    protected String http_image_dir = null; 
    4645    protected String http_temp_image_dir = null; 
    47     private LinkedList namesInList = new LinkedList(); 
     46    private LinkedList<String> namesInList = new LinkedList<String>(); 
    4847 
    4948    private DefaultMutableTreeNode tree; 
     
    9190    this.http_temp_image_dir = this.site_http_address + "/collect/"+this.cluster_name+"/temp/"; 
    9291 
    93     this.index_name_list = new ArrayList(); 
    94     this.index_display_list = new ArrayList(); 
     92    this.index_name_list = new ArrayList<String>(); 
     93    this.index_display_list = new ArrayList<String>(); 
    9594    Element index_list = (Element)GSXML.getChildByTagName(this.config_info, GSXML.INDEX_ELEM+GSXML.LIST_MODIFIER); 
    9695    Element display_index_list = (Element)GSXML.getChildByTagName(extra_info, "search"); 
     
    200199 
    201200    // The metadata information required 
    202     Vector metadata_list = new Vector(); 
     201    Vector<String> metadata_list = new Vector<String>(); 
    203202    boolean all_metadata = false; 
    204203    // Process the request parameters 
     
    292291        // create the navigation thumbnails.  This doesn't seem to work most of the time ??????? 
    293292        for (int m = 0; m < metadata_list.size(); m++) { 
    294             String metadata = (String) metadata_list.get(m); 
     293            String metadata = metadata_list.get(m); 
    295294            thumb = ""; 
    296295            String value = ""; 
     
    448447            //put the names in an array 
    449448            for(int ri=0; namesInList.size()>0; ri++){ 
    450             returnNames[ri]=(String)namesInList.getFirst(); 
     449            returnNames[ri]=namesInList.getFirst(); 
    451450            returnNames[ri] = returnNames[ri].substring(0,returnNames[ri].indexOf('`')); 
    452451            namesInList.removeFirst(); 
     
    825824 
    826825    for (int i=0; i<this.index_name_list.size(); i++) { 
    827         String name = (String)this.index_name_list.get(i); 
     826        String name = this.index_name_list.get(i); 
    828827        dropDownBox.append("<option value=\""); 
    829828        dropDownBox.append(name); 
    830829        dropDownBox.append("\">"); 
    831         String display = (String)this.index_display_list.get(i); 
     830        String display = this.index_display_list.get(i); 
    832831        dropDownBox.append(display); 
    833832        dropDownBox.append("\n"); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/MapSearch.java

    r24394 r25635  
    4141import java.io.ObjectInputStream; 
    4242import java.io.FileInputStream; 
     43import java.io.Serializable; 
    4344import java.lang.ClassNotFoundException; 
    4445 
     
    140141    } 
    141142 
    142     protected void getIndexData(ArrayList index_ids, ArrayList index_names, String lang)  
     143    protected void getIndexData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang)  
    143144    { 
    144145    // for now, we just have one dummy index 
     
    174175 
    175176    // Process the request parameters 
    176     HashMap params = GSXML.extractParams(param_list, false); 
     177    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    177178 
    178179    // Make sure a query has been specified 
     
    241242    String nameData; 
    242243    double xco, yco; 
    243     LinkedList mapList = new LinkedList(); 
     244    LinkedList<Object> mapList = new LinkedList<Object>(); 
    244245    LinkedList placeList = new LinkedList(); 
    245246    String readString = ""; 
     
    304305 
    305306    //for each map, create a list of the query matches on that map 
    306     LinkedList tempList = new LinkedList(); 
     307    LinkedList<Object> tempList = new LinkedList<Object>(); 
    307308    String mapNumber = ""; 
    308309    String currentMap[] = {"",""}; 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/OAIPMH.java

    r23938 r25635  
    227227     */  
    228228    NodeList params = GSXML.getChildrenByTagName(req, OAIXML.PARAM); 
    229     HashMap param_map = OAIXML.getParamMap(params);     
    230      
    231     String prefix = (String)param_map.get(OAIXML.METADATA_PREFIX); 
     229    HashMap<String, String> param_map = OAIXML.getParamMap(params);     
     230     
     231    String prefix = param_map.get(OAIXML.METADATA_PREFIX); 
    232232    if (prefix == null || prefix.equals("")) { 
    233233      //Just a double-check 
     
    242242    } 
    243243     
    244     String oid = (String)param_map.get(OAIXML.OID); 
     244    String oid = param_map.get(OAIXML.OID); 
    245245 
    246246    //get a DBInfo object of the identifier; if this identifier is not present in the database, 
     
    252252    } 
    253253 
    254     ArrayList keys = new ArrayList(info.getKeys()); 
     254    ArrayList<String> keys = new ArrayList<String>(info.getKeys()); 
    255255    String oailastmodified = ""; 
    256256    if(keys.contains(OAIXML.OAI_LASTMODIFIED)) { 
     
    285285    } 
    286286     
    287     HashMap param_map = OAIXML.getParamMap(params);   
     287    HashMap<String, String> param_map = OAIXML.getParamMap(params);   
    288288     
    289289    String prefix = ""; 
     
    296296      return OAIXML.getResponse(OAIXML.createErrorElement(OAIXML.CANNOT_DISSEMINATE_FORMAT, "")); 
    297297    } 
    298     prefix = (String)param_map.get(OAIXML.METADATA_PREFIX); 
     298    prefix = param_map.get(OAIXML.METADATA_PREFIX); 
    299299    if (prefix == null || prefix.equals("")) { 
    300300      //Just a double-check 
     
    304304     
    305305    if(param_map.containsKey(OAIXML.FROM)) { 
    306       String from = (String)param_map.get(OAIXML.FROM); 
     306      String from = param_map.get(OAIXML.FROM); 
    307307      from_date = OAIXML.getDate(from); 
    308308    }     
    309309    if(param_map.containsKey(OAIXML.UNTIL)) { 
    310       String until = (String)param_map.get(OAIXML.UNTIL); 
     310      String until = param_map.get(OAIXML.UNTIL); 
    311311      until_date = OAIXML.getDate(until); 
    312312    }     
     
    317317      return OAIXML.getResponse(OAIXML.createErrorElement(OAIXML.CANNOT_DISSEMINATE_FORMAT, "")); 
    318318    } 
    319     ArrayList oid_list = getChildrenIds(OAIXML.BROWSELIST); 
     319    ArrayList<String> oid_list = getChildrenIds(OAIXML.BROWSELIST); 
    320320    if (oid_list == null) { 
    321321      logger.error("No matched records found in collection: browselist is empty"); 
     
    325325    Element list_identifiers = OAIXML.createElement(OAIXML.LIST_IDENTIFIERS); 
    326326    for(int i=0; i<oid_list.size(); i++) { 
    327       String oid = (String)oid_list.get(i); 
     327      String oid = oid_list.get(i); 
    328328      DBInfo info = this.coll_db.getInfo(oid); 
    329329      if (info == null) { 
     
    331331        continue; 
    332332      } 
    333       ArrayList keys = new ArrayList(info.getKeys()); 
     333      ArrayList<String> keys = new ArrayList<String>(info.getKeys()); 
    334334      String oailastmodified = ""; 
    335335      if(keys.contains(OAIXML.OAI_LASTMODIFIED)) { 
     
    370370    } 
    371371     
    372     HashMap param_map = OAIXML.getParamMap(params);     
     372    HashMap<String, String> param_map = OAIXML.getParamMap(params);     
    373373 
    374374    String prefix = ""; 
     
    381381      return OAIXML.getResponse(OAIXML.createErrorElement(OAIXML.CANNOT_DISSEMINATE_FORMAT, "")); 
    382382    } 
    383     prefix = (String)param_map.get(OAIXML.METADATA_PREFIX); 
     383    prefix = param_map.get(OAIXML.METADATA_PREFIX); 
    384384    if (prefix == null || prefix.equals("")) { 
    385385      //Just a double-check 
     
    389389     
    390390    if(param_map.containsKey(OAIXML.FROM)) { 
    391       String from = (String)param_map.get(OAIXML.FROM); 
     391      String from = param_map.get(OAIXML.FROM); 
    392392      from_date = OAIXML.getDate(from); 
    393393    }     
    394394    if(param_map.containsKey(OAIXML.UNTIL)) { 
    395       String until = (String)param_map.get(OAIXML.UNTIL); 
     395      String until = param_map.get(OAIXML.UNTIL); 
    396396      until_date = OAIXML.getDate(until); 
    397397    }     
     
    403403     
    404404    //get a list of identifiers (it contains a list of strings) 
    405     ArrayList oid_list = getChildrenIds(OAIXML.BROWSELIST); 
     405    ArrayList<String> oid_list = getChildrenIds(OAIXML.BROWSELIST); 
    406406    if (oid_list == null) { 
    407407      logger.error("No matched records found in collection: browselist is empty"); 
     
    411411    Element list_records = OAIXML.createElement(OAIXML.LIST_RECORDS); 
    412412    for(int i=0; i<oid_list.size(); i++) { 
    413       String oid = (String)oid_list.get(i); 
     413      String oid = oid_list.get(i); 
    414414      DBInfo info = this.coll_db.getInfo(oid); 
    415415      if (info == null) { 
     
    417417        continue; 
    418418      } 
    419       ArrayList keys = new ArrayList(info.getKeys()); 
     419      ArrayList<String> keys = new ArrayList<String>(info.getKeys()); 
    420420      String oailastmodified = ""; 
    421421      if(keys.contains(OAIXML.OAI_LASTMODIFIED)) { 
     
    527527      return OAIXML.getResponse(OAIXML.createErrorElement(OAIXML.ID_DOES_NOT_EXIST, "")); 
    528528    } 
    529     ArrayList oid_list = getChildrenIds(OAIXML.BROWSELIST); 
     529    ArrayList<String> oid_list = getChildrenIds(OAIXML.BROWSELIST); 
    530530    if (oid_list == null || oid_list.contains(oid) == false) { 
    531531      logger.error("OID: " + oid + " is not present in the database."); 
     
    591591 
    592592  /** returns a list of the child ids in order, null if no children */ 
    593   protected ArrayList getChildrenIds(String node_id) { 
     593  protected ArrayList<String> getChildrenIds(String node_id) { 
    594594    DBInfo info = this.coll_db.getInfo(node_id); 
    595595    if (info == null) { 
     
    601601      return null; 
    602602    } 
    603     ArrayList children = new ArrayList(); 
     603    ArrayList<String> children = new ArrayList<String>(); 
    604604    StringTokenizer st = new StringTokenizer(contains, ";"); 
    605605    while (st.hasMoreTokens()) { 
     
    663663  public String[] getMetadata(DBInfo info, String names) { 
    664664    String[] name_value = new String[2]; 
    665     ArrayList keys = new ArrayList(info.getKeys()); 
     665    ArrayList<String> keys = new ArrayList<String>(info.getKeys()); 
    666666    for (int i=0; i<keys.size(); i++) { 
    667       String key = (String)keys.get(i); 
     667      String key = keys.get(i); 
    668668      String first_name = ""; 
    669669      String second_name = ""; 
     
    689689      return null; 
    690690    } 
    691     HashMap map = new HashMap(); 
     691    HashMap<String, String> map = new HashMap<String, String>(); 
    692692    boolean empty_map = true; 
    693693     
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java

    r16355 r25635  
    3030import java.util.HashMap; 
    3131import java.io.File; 
     32import java.io.Serializable; 
    3233 
    3334import org.apache.log4j.*; 
     
    133134     
    134135    Element param_elem = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 
    135     HashMap params = GSXML.extractParams(param_elem, false); 
     136    HashMap<String, Serializable> params = GSXML.extractParams(param_elem, false); 
    136137     
    137138    long first_e = Long.parseLong((String)params.get("pfe")); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ServiceRack.java

    r24393 r25635  
    9292     * XML element for stylesheet requests - map of service name to format elem 
    9393     */ 
    94     protected HashMap format_info_map = null; 
     94    protected HashMap<String, Node> format_info_map = null; 
    9595 
    9696    /** 
     
    151151        this.doc = this.converter.newDOM(); 
    152152        this.short_service_info = this.doc.createElement(GSXML.SERVICE_ELEM + GSXML.LIST_MODIFIER); 
    153         this.format_info_map = new HashMap(); 
     153        this.format_info_map = new HashMap<String, Node>(); 
    154154    } 
    155155 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ServiceUtil.java

    r24752 r25635  
    22 
    33import java.io.File; 
     4import java.io.Serializable; 
    45import java.util.ArrayList; 
    56import java.util.HashMap; 
     
    7980        } 
    8081 
    81         HashMap params = GSXML.extractParams(param_list, false); 
     82        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    8283         
    8384        String regex = (String)params.get("extregex"); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/SharedSoleneGS2FieldSearch.java

    r24738 r25635  
    9393        if (name.equals(RANK_PARAM)) { 
    9494            // get the fields 
    95             ArrayList fields = new ArrayList(); 
     95            ArrayList<String> fields = new ArrayList<String>(); 
    9696            fields.add(RANK_PARAM_RANK_VALUE); 
    97             ArrayList field_names = new ArrayList(); 
     97            ArrayList<String> field_names = new ArrayList<String>(); 
    9898            field_names.add(getTextString("param.sortBy.rank", lang));  
    9999            getSortByIndexData(fields, field_names, lang); 
    100100             
    101             param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)fields.get(0), fields, field_names ); 
     101            param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, fields.get(0), fields, field_names ); 
    102102        } 
    103103        if (param != null) { 
     
    108108    } 
    109109     
    110     protected void getSortByIndexData(ArrayList index_ids, ArrayList index_names, String lang) { 
     110    protected void getSortByIndexData(ArrayList<String> index_ids, ArrayList<String> index_names, String lang) { 
    111111        // the index info - 
    112112        Element index_list = (Element)GSXML.getChildByTagName(this.config_info, INDEX_ELEM+GSXML.LIST_MODIFIER); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/XMLRetrieve.java

    r14225 r25635  
    1616// General Java classes 
    1717import java.io.File; 
     18import java.io.Serializable; 
    1819import java.util.Vector; 
    1920import java.util.HashMap; 
     
    4647    // look for the parameters 
    4748    Element param_list = (Element)GSXML.getChildByTagName(info, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 
    48     HashMap params; 
     49    HashMap<String, Serializable> params; 
    4950    String services_to_provide = ""; 
    5051    if (param_list != null) { 
     
    242243    } 
    243244     
    244     Vector meta_name_list = new Vector(); 
     245    Vector<String> meta_name_list = new Vector<String>(); 
    245246    boolean all_metadata = false; 
    246247    // Process the request parameters 
     
    345346    } 
    346347 
    347     protected Element getMetadata(String node_id, boolean all, Vector meta_name_list) { 
     348    protected Element getMetadata(String node_id, boolean all, Vector<String> meta_name_list) { 
    348349 
    349350    // our default strategy here is to only return Title and root:Title 
     
    373374        // have to process metadata one by one 
    374375        for (int i=0; i<meta_name_list.size(); i++) { 
    375         String meta_name = (String) meta_name_list.elementAt(i); 
     376        String meta_name = meta_name_list.elementAt(i); 
    376377        String actual_meta_name = meta_name; 
    377378        if (meta_name.startsWith("root_")) { 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/XSLTServices.java

    r14225 r25635  
    216216 
    217217    // extract the only parameter we care about 
    218     HashMap params = GSXML.extractParams(param_list, false); 
     218    HashMap<String, Serializable> params = GSXML.extractParams(param_list, false); 
    219219    String query = (String)params.get(QUERY_PARAM); 
    220220     
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/sql/DatabaseFactory.java

    r16883 r25635  
    1111 
    1212public class DatabaseFactory{ 
    13     private static HashMap serverMap = new HashMap(); 
     13    private static HashMap<String, SQLServer> serverMap = new HashMap<String, SQLServer>(); 
    1414    private static Logger logger = Logger.getLogger(org.greenstone.gsdl3.sql.DatabaseFactory.class.getName()); 
    1515 
     
    2929    public static final SQLServer getDatabaseServer(String dbname){ 
    3030    dbname = properDBName(dbname); 
    31     if (serverMap.containsKey(dbname)) return (SQLServer) serverMap.get(dbname); 
     31    if (serverMap.containsKey(dbname)) return serverMap.get(dbname); 
    3232    String fullName = "org.greenstone.gsdl3.sql." + dbname.toLowerCase()+ "." + dbname +"SQLServer"; 
    3333    try { 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/sql/MetadataDBWrapper.java

    r16883 r25635  
    22 
    33import java.util.ArrayList; 
     4import java.util.HashMap; 
    45 
    56import java.sql.ResultSet; 
     
    2223 
    2324     //return a list of rows 
    24     public ArrayList executeQuery(String query_statement); 
     25    public ArrayList<HashMap<String, Object>> executeQuery(String query_statement); 
    2526 
    2627    public ResultSet queryResultSet(String query_statement); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/sql/derby/DerbyDBWrapper.java

    r21321 r25635  
    3030    if(sqlState == null) return null; 
    3131        String dbInfoState = sqlState.getDBInfoStatement(id); 
    32         ArrayList result = executeQuery(dbInfoState); 
     32        ArrayList<HashMap<String, Object>> result = executeQuery(dbInfoState); 
    3333    if (result.size() == 0) return null; 
    3434    DBInfo info = new DBInfo(); 
    3535    for(int i=0;  i<result.size();i++){ 
    36         HashMap arow = (HashMap)result.get(i); 
     36        HashMap arow = result.get(i); 
    3737        Iterator ite = arow.keySet().iterator(); 
    3838        while(ite.hasNext()){ 
     
    9090    } 
    9191 
    92     public synchronized ArrayList executeQuery(String query_statement){ 
     92    public synchronized ArrayList<HashMap<String, Object>> executeQuery(String query_statement){ 
    9393    //the database hasn't been correct yet 
    94         ArrayList results = new ArrayList(); 
     94        ArrayList<HashMap<String, Object>> results = new ArrayList<HashMap<String, Object>>(); 
    9595    ResultSet rs = null; 
    9696    try{     
     
    101101        int numOfColumns = rsmd.getColumnCount(); 
    102102        while(rs.next()){ 
    103         HashMap arow = new HashMap(); 
     103        HashMap<String, Object> arow = new HashMap<String, Object>(); 
    104104        for(int i = 1; i <= numOfColumns ; i++){ 
    105105            arow.put(rsmd.getColumnName(i).toLowerCase(), rs.getObject(i)); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DBInfo.java

    r24393 r25635  
    3030public class DBInfo 
    3131{ 
    32     protected HashMap info_map_; 
     32    protected HashMap<String, Vector<String>> info_map_; 
    3333 
    3434    public DBInfo() 
    3535    { 
    36         info_map_ = new HashMap(); 
     36        info_map_ = new HashMap<String, Vector<String>>(); 
    3737    } 
    3838 
     
    4242    public void setInfo(String key, String value) 
    4343    { 
    44         Vector v = new Vector(); 
     44        Vector<String> v = new Vector<String>(); 
    4545        v.add(value); 
    4646        info_map_.put(key, v); 
     
    5353    public String getInfo(String key) 
    5454    { 
    55         Vector items = (Vector) info_map_.get(key); 
     55        Vector items = info_map_.get(key); 
    5656        if (items == null) 
    5757        { 
     
    6666    public void addInfo(String key, String value) 
    6767    { 
    68         Vector v = (Vector) info_map_.get(key); 
     68        Vector<String> v = info_map_.get(key); 
    6969        if (v == null) 
    7070        { 
    71             v = new Vector(); 
     71            v = new Vector<String>(); 
    7272        } 
    7373        v.add(value); 
     
    8080     * @return Vector of Strings 
    8181     */ 
    82     public Vector getMultiInfo(String key) 
     82    public Vector<String> getMultiInfo(String key) 
    8383    { 
    84         return (Vector) info_map_.get(key); 
     84        return info_map_.get(key); 
    8585    } 
    8686 
    8787    /** returns a list of all the keys in the info */ 
    88     public Set getKeys() 
     88    public Set<String> getKeys() 
    8989    { 
    9090        return info_map_.keySet(); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GS2MacroResolver.java

    r23798 r25635  
    2626// Apache Commons 
    2727import org.apache.commons.lang3.*; 
     28import org.greenstone.gsdl3.util.MacroResolver.Macro; 
    2829 
    2930import java.util.Stack; 
     
    6566    }  
    6667 
    67     Stack macros = new Stack();//ArrayList macros; 
     68    Stack<Macro> macros = new Stack<Macro>();//ArrayList macros; 
    6869    if (scope.equals(SCOPE_TEXT)) { 
    6970        macros.addAll(text_macros); 
     
    7475    while(!macros.empty()) { 
    7576        String new_text = null; 
    76         Macro m = (Macro)macros.pop();//.get(i); 
     77        Macro m = macros.pop();//.get(i); 
    7778        switch (m.type) { 
    7879        case TYPE_DICT: 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSDocumentModel.java

    r25551 r25635  
    16811681 
    16821682        String srcFile = info.getInfo("src-file"); 
    1683         Vector data = info.getMultiInfo("assoc-file"); 
     1683        Vector<String> data = info.getMultiInfo("assoc-file"); 
    16841684 
    16851685        ArrayList<String> assocFiles = new ArrayList<String>(); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java

    r24859 r25635  
    243243     * this is not so good because sites may be on a different computer 
    244244     */ 
    245     static public String stylesheetFile(String gsdl3_home, String site_name, String collection, String interface_name, ArrayList base_interfaces, String filename) 
     245    static public String stylesheetFile(String gsdl3_home, String site_name, String collection, String interface_name, ArrayList<String> base_interfaces, String filename) 
    246246    { 
    247247 
     
    281281        for (int i = 0; i < base_interfaces.size(); i++) 
    282282        { 
    283             interface_home = interfaceHome(gsdl3_home, (String) base_interfaces.get(i)); 
     283            interface_home = interfaceHome(gsdl3_home, base_interfaces.get(i)); 
    284284            stylesheet = new File(interface_home + File.separatorChar + "transform" + File.separatorChar + filename); 
    285285            if (stylesheet.exists()) 
     
    293293    } 
    294294 
    295     static public ArrayList<File> getStylesheetFiles(String gsdl3_home, String site_name, String collection, String interface_name, ArrayList base_interfaces, String filename) 
     295    static public ArrayList<File> getStylesheetFiles(String gsdl3_home, String site_name, String collection, String interface_name, ArrayList<String> base_interfaces, String filename) 
    296296    { 
    297297        ArrayList<File> stylesheets = new ArrayList<File>(); 
     
    328328            for (int i = 0; i < base_interfaces.size(); i++) 
    329329            { 
    330                 interface_home = interfaceHome(gsdl3_home, (String) base_interfaces.get(i)); 
     330                interface_home = interfaceHome(gsdl3_home, base_interfaces.get(i)); 
    331331                stylesheet = new File(interface_home + File.separatorChar + "transform" + File.separatorChar + filename); 
    332332                if (stylesheet.exists()) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java

    r25483 r25635  
    7575    public static final String EXTERNAL_LINK_TYPE_FRAMED = "frame"; 
    7676 
    77     protected HashMap param_map = null; 
     77    protected HashMap<String, Param> param_map = null; 
    7878 
    7979    public GSParams() 
    8080    { 
    81         this.param_map = new HashMap(30); 
     81        this.param_map = new HashMap<String, Param>(30); 
    8282 
    8383        // add in all the standard params 
     
    135135    public boolean setParamDefault(String name, String default_value) 
    136136    { 
    137         Param p = (Param) this.param_map.get(name); 
     137        Param p = this.param_map.get(name); 
    138138        if (p == null) 
    139139            return false; 
     
    147147        if (name.startsWith("p.")) 
    148148            return false; 
    149         Param p = (Param) this.param_map.get(name); 
     149        Param p = this.param_map.get(name); 
    150150        if (p == null) 
    151151            return true; // if things are not in here, always save. 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r25571 r25635  
    2828import javax.xml.transform.TransformerFactory; 
    2929import javax.xml.transform.Transformer; 
     30 
     31import java.io.Serializable; 
    3032import java.io.StringWriter; 
    3133import javax.xml.transform.stream.StreamResult; 
     
    299301    } 
    300302 
    301     public static HashMap extractParams(Element xml, boolean deep) 
     303    public static HashMap<String, Serializable> extractParams(Element xml, boolean deep) 
    302304    { 
    303305        return extractParams(xml, deep, null); 
     
    308310     * deep=true, extracts embedded params, otherwise just top level params 
    309311     */ 
    310     public static HashMap extractParams(Element xml, boolean deep, String toFind) 
     312    public static HashMap<String, Serializable> extractParams(Element xml, boolean deep, String toFind) 
    311313    { 
    312314 
     
    326328            params = xml.getChildNodes(); 
    327329        } 
    328         HashMap param_map = new HashMap(); 
     330        HashMap<String, Serializable> param_map = new HashMap<String, Serializable>(); 
    329331        for (int i = 0; i < params.getLength(); i++) 
    330332        { 
     
    354356                    String namespace = name.substring(0, pos); 
    355357                    name = name.substring(pos + 1); 
    356                     HashMap map = (HashMap) param_map.get(namespace); 
     358                    HashMap<String, String> map = (HashMap<String, String>) param_map.get(namespace); 
    357359                    if (map == null) 
    358360                    { 
    359                         map = new HashMap(); 
     361                        map = new HashMap<String, String>(); 
    360362                        param_map.put(namespace, map); 
    361363                    } 
     
    669671    } 
    670672 
    671     public static HashMap getChildrenMap(Node n) 
    672     { 
    673  
    674         HashMap map = new HashMap(); 
     673    public static HashMap<String, Node> getChildrenMap(Node n) 
     674    { 
     675 
     676        HashMap<String, Node> map = new HashMap<String, Node>(); 
    675677        Node child = n.getFirstChild(); 
    676678        while (child != null) 
     
    856858    } 
    857859 
    858     public static Element createParameterDescription2(Document owner, String id, String display_name, String type, String default_value, ArrayList option_ids, ArrayList option_names) 
     860    public static Element createParameterDescription2(Document owner, String id, String display_name, String type, String default_value, ArrayList<String> option_ids, ArrayList<String> option_names) 
    859861    { 
    860862 
     
    872874            { 
    873875                Element e = owner.createElement(PARAM_OPTION_ELEM); 
    874                 e.setAttribute(NAME_ATT, (String) option_ids.get(i)); 
    875                 e.appendChild(createDisplayTextElement(owner, GSXML.DISPLAY_TEXT_NAME, (String) option_names.get(i))); 
     876                e.setAttribute(NAME_ATT, option_ids.get(i)); 
     877                e.appendChild(createDisplayTextElement(owner, GSXML.DISPLAY_TEXT_NAME, option_names.get(i))); 
    876878                p.appendChild(e); 
    877879            } 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXSLT.java

    r25397 r25635  
    124124     * the files 
    125125     */ 
    126     public static void absoluteIncludePaths(Document stylesheet, String gsdl3_home, String site_name, String collection, String interface_name, ArrayList base_interfaces) 
     126    public static void absoluteIncludePaths(Document stylesheet, String gsdl3_home, String site_name, String collection, String interface_name, ArrayList<String> base_interfaces) 
    127127    { 
    128128 
     
    151151     * metadata names into a Vector 
    152152     */ 
    153     public static Vector extractWantedMetadata(Document stylesheet, String template_name) 
     153    public static Vector<String> extractWantedMetadata(Document stylesheet, String template_name) 
    154154    { 
    155155 
    156         Vector metadata = new Vector(); 
     156        Vector<String> metadata = new Vector<String>(); 
    157157        Element base_node = stylesheet.getDocumentElement(); 
    158158        NodeList templates = base_node.getElementsByTagNameNS("*", "template"); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/MacroResolver.java

    r25300 r25635  
    3535    public static final int TYPE_DICT = 2; 
    3636     
    37     protected ArrayList text_macros = null; 
    38     protected ArrayList metadata_macros = null; 
     37    protected ArrayList<Macro> text_macros = null; 
     38    protected ArrayList<Macro> metadata_macros = null; 
    3939 
    4040    String lang = null; 
    4141 
    4242    public MacroResolver() { 
    43         this.text_macros = new ArrayList(); 
    44     this.metadata_macros = new ArrayList(); 
     43        this.text_macros = new ArrayList<Macro>(); 
     44    this.metadata_macros = new ArrayList<Macro>(); 
    4545    } 
    4646 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/MyNodeList.java

    r9874 r25635  
    2727 
    2828public class MyNodeList implements NodeList { 
    29     private ArrayList node_list = null; 
     29    private ArrayList<Node> node_list = null; 
    3030     
    3131    public MyNodeList() { 
    32     node_list = new ArrayList(); 
     32    node_list = new ArrayList<Node>(); 
    3333    } 
    3434    public int getLength() { 
     
    3838    public Node item(int i) { 
    3939    if (i<0 || i >= node_list.size()) return null; 
    40     return (Node)node_list.get(i); 
     40    return node_list.get(i); 
    4141    } 
    4242     
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/OAIXML.java

    r23938 r25635  
    2222 
    2323import org.w3c.dom.*; 
     24 
    2425import java.io.*; 
    2526import java.net.*; 
     
    561562      return oai; 
    562563    } 
    563     public static HashMap getChildrenMapByTagName(Node n, String tag_name) { 
     564    public static HashMap<String, Node> getChildrenMapByTagName(Node n, String tag_name) { 
    564565     
    565     HashMap map= new HashMap(); 
     566    HashMap<String, Node> map= new HashMap<String, Node>(); 
    566567    Node child = n.getFirstChild(); 
    567568    while (child!=null) { 
     
    622623      } 
    623624    } 
    624     public static HashMap getParamMap(NodeList params) { 
    625       HashMap map = new HashMap(); 
     625    public static HashMap<String, String> getParamMap(NodeList params) { 
     626      HashMap<String, String> map = new HashMap<String, String>(); 
    626627      for(int i=0; i<params.getLength(); i++) { 
    627628        Element param = (Element)params.item(i); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/SimpleCollectionDatabase.java

    r24393 r25635  
    154154    { 
    155155        StringBuilder valueToAdd = new StringBuilder(); 
    156         Iterator i = info.getKeys().iterator(); 
     156        Iterator<String> i = info.getKeys().iterator(); 
    157157        while (i.hasNext()) 
    158158        { 
    159             String currentKey = (String)i.next(); 
    160             Vector currentValues = (Vector)info.getMultiInfo(currentKey); 
     159            String currentKey = i.next(); 
     160            Vector<String> currentValues = (Vector<String>)info.getMultiInfo(currentKey); 
    161161             
    162162            if(currentValues.size() == 0) 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/UserQueryResult.java

    r25265 r25635  
    5959        for (int i = 0; i < users.size(); i++) 
    6060        { 
    61             result += ((UserTermInfo) users.elementAt(i)).toString() + ", "; 
     61            result += users.elementAt(i).toString() + ", "; 
    6262        } 
    6363 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XMLTransformer.java

    r25617 r25635  
    216216    } 
    217217 
    218     public Node transform(Document stylesheet, Document source, HashMap parameters) 
     218    public Node transform(Document stylesheet, Document source, HashMap<String, Comparable> parameters) 
    219219    { 
    220220        return transform(stylesheet, source, parameters, null, null); 
    221221    } 
    222222 
    223     public Node transform(Document stylesheet, Document source, HashMap parameters, Document docDocType) 
     223    public Node transform(Document stylesheet, Document source, HashMap<String, Comparable> parameters, Document docDocType) 
    224224    { 
    225225        return transform(stylesheet, source, parameters, docDocType, null); 
    226226    } 
    227227 
    228     protected Node transform(Document stylesheet, Document source, HashMap parameters, Document docDocType, Document resultNode) 
     228    protected Node transform(Document stylesheet, Document source, HashMap<String, Comparable> parameters, Document docDocType, Document resultNode) 
    229229    { 
    230230        try 
  • main/trunk/greenstone3/src/java/org/greenstone/server/BaseServerSettings.java

    r24490 r25635  
    202202    return returnValues; 
    203203    } 
    204     protected void save(ScriptReadWrite scriptReadWrite, ArrayList newFileLines) {} 
     204    protected void save(ScriptReadWrite scriptReadWrite, ArrayList<String> newFileLines) {} 
    205205    protected abstract JPanel createServletPanel(); 
    206206 
     
    278278 
    279279        if (has_changed) { 
    280         ArrayList oldFileLines = null; 
    281         ArrayList newFileLines = null; 
     280        ArrayList<String> oldFileLines = null; 
     281        ArrayList<String> newFileLines = null; 
    282282         
    283283        ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server2.java

    r24911 r25635  
    8383                    config_properties.setProperty(url, URL_PENDING); 
    8484                    ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    85                     ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     85                    ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    8686                    scriptReadWrite.replaceOrAddLine(fileLines, url, URL_PENDING, true); 
    8787                    scriptReadWrite.writeOutFile(config_properties_file, fileLines); 
     
    160160        String hosts = inetAddress.getHostName(); 
    161161        ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    162         ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     162        ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    163163        scriptReadWrite.replaceOrAddLine(fileLines, "hosts", hosts, true); 
    164164        scriptReadWrite.writeOutFile(config_properties_file, fileLines); 
     
    175175        config_properties.setProperty(url, URL_PENDING); 
    176176        ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    177         ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     177        ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    178178        scriptReadWrite.replaceOrAddLine(fileLines, url, URL_PENDING, true); 
    179179        scriptReadWrite.writeOutFile(config_properties_file, fileLines); 
     
    355355            // write this updated port to the config file, since the configure target uses the file to run 
    356356            ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    357             ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     357            ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    358358            scriptReadWrite.replaceOrAddLine(fileLines, "portnumber", port, false); // write the correct port 
    359359            scriptReadWrite.writeOutFile(config_properties_file, fileLines); 
     
    377377    protected void preStop() { 
    378378    ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    379     ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     379    ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    380380 
    381381    // Remove the url=... line, start searching from the end 
    382382    boolean done = false; 
    383383    for (int i = fileLines.size()-1; i >= 0 && !done; i--) { 
    384         String line = ((String) fileLines.get(i)).trim(); 
     384        String line = fileLines.get(i).trim(); 
    385385        if(line.startsWith(property_prefix+"url=")) { 
    386386        fileLines.remove(i); 
     
    437437 
    438438    ScriptReadWrite scriptReadWrite = new ScriptReadWrite(); 
    439     ArrayList fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
     439    ArrayList<String> fileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file); 
    440440    scriptReadWrite.replaceOrAddLine(fileLines, property_prefix+"url", libraryURL, true); 
    441441    scriptReadWrite.replaceOrAddLine(fileLines, "portnumber", port, false); // write the correct port 
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server2Settings.java

    r24207 r25635  
    101101    } 
    102102 
    103     public void save(ScriptReadWrite scriptReadWrite, ArrayList newFileLines)  
     103    public void save(ScriptReadWrite scriptReadWrite, ArrayList<String> newFileLines)  
    104104    { 
    105105    // write only 1 or 0 (and not true or false) for Server2 
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server3Settings.java

    r25388 r25635  
    2222    protected String servletDefault = null; 
    2323    protected JComboBox servlet_combobox; 
    24     protected HashMap url_mappings = null; 
     24    protected HashMap<String, String> url_mappings = null; 
    2525 
    2626    public Server3Settings(BaseServer server)  
     
    4949    NodeList servlet_mappings = web_config.getElementsByTagName("servlet-mapping"); 
    5050    // make a little map class 
    51     url_mappings = new HashMap(); 
     51    url_mappings = new HashMap<String, String>(); 
    5252    for (int i = 0; i < servlet_mappings.getLength(); i++) { 
    5353        Element map = (Element) servlet_mappings.item(i); 
     
    8080    boolean hasChanged = false; 
    8181    boolean requireRestart = false; 
    82     String urlMapping = (String)url_mappings.get(servlet_combobox.getSelectedItem()); 
     82    String urlMapping = url_mappings.get(servlet_combobox.getSelectedItem()); 
    8383    if(urlMapping.endsWith("/*")) { // urlmapping maybe something like "/library/*" 
    8484        urlMapping = urlMapping.substring(0, urlMapping.length()-2); 
     
    9292    } 
    9393 
    94     public void save(ScriptReadWrite scriptReadWrite, ArrayList newFileLines)  
     94    public void save(ScriptReadWrite scriptReadWrite, ArrayList<String> newFileLines)  
    9595    { 
    9696    String newAutoEnter = (new Boolean(autoEnter.isSelected())).toString(); 
     
    101101 
    102102    String newServletDef = (String) servlet_combobox.getSelectedItem(); 
    103     String servletDefName = (String) url_mappings.get(newServletDef); 
     103    String servletDefName = url_mappings.get(newServletDef); 
    104104    if(servletDefName.endsWith("/*")) { // urlmapping maybe something like "/library/*"      
    105105      servletDefName = servletDefName.substring(0, servletDefName.length()-2); 
  • main/trunk/greenstone3/src/java/org/greenstone/testing/ClassFinder.java

    r3290 r25635  
    1919 */ 
    2020public class ClassFinder { 
    21     final private Vector classNameList = new Vector (); 
     21    final private Vector<String> classNameList = new Vector<String> (); 
    2222    final private int startPackageName; 
    2323 
     
    7878     * Return the found classes. 
    7979     */ 
    80     public Iterator getClasses () { 
     80    public Iterator<String> getClasses () { 
    8181        return classNameList.iterator (); 
    8282    } 
  • main/trunk/greenstone3/src/java/org/greenstone/testing/TestCaseLoader.java

    r3290 r25635  
    77 */ 
    88public class TestCaseLoader { 
    9     final private Vector classList = new Vector (); 
     9    final private Vector<Class> classList = new Vector<Class> (); 
    1010    final private String requiredType; 
    1111     
     
    7878     * Obtain an iterator over the collection of test case classes loaded by <code>loadTestCases</code> 
    7979     */ 
    80     public Iterator getClasses () { 
     80    public Iterator<Class> getClasses () { 
    8181        return classList.iterator (); 
    8282    } 
  • main/trunk/greenstone3/src/java/org/greenstone/util/Configuration.java

    r22085 r25635  
    4242public class Configuration { 
    4343     
    44     static private Hashtable hash = null; 
     44    static private Hashtable<String, String> hash = null; 
    4545 
    4646    /** The first of three patterns used during tokenization, this pattern handles a comma separated list. */ 
     
    5353    public Configuration() { 
    5454     
    55     hash = new Hashtable(); 
     55    hash = new Hashtable<String, String>(); 
    5656     
    5757     
     
    7676    /** Retrieve whether the named property is set or not */ 
    7777    static public boolean get(String property) { 
    78     String value = (String)hash.get(property); 
     78    String value = hash.get(property); 
    7979    return (value != null && value.equalsIgnoreCase("true")); 
    8080    } 
     
    8282    /** Retrieve the value of the named property as a String */ 
    8383    static public String getString(String property) { 
    84     return (String)hash.get(property); 
     84    return hash.get(property); 
    8585    } 
    8686 
     
    8989    Locale result = Locale.getDefault(); 
    9090    try { 
    91         String raw = (String) hash.get(property); 
     91        String raw = hash.get(property); 
    9292        if (raw==null) { 
    9393        return result; 
     
    113113    static public Color getColor(String property) { 
    114114    Color result = Color.white; // Default 
    115     String raw = (String)hash.get(property); 
     115    String raw = hash.get(property); 
    116116    if (raw == null || raw.equals("")) { 
    117117        return result; 
  • main/trunk/greenstone3/src/java/org/greenstone/util/ScriptReadWrite.java

    r22085 r25635  
    1515    } 
    1616 
    17     public ArrayList readInFile(File file) { 
     17    public ArrayList<String> readInFile(File file) { 
    1818    try { 
    19         ArrayList fileLines = new ArrayList(); 
     19        ArrayList<String> fileLines = new ArrayList<String>(); 
    2020        String oneLine = null; 
    2121        BufferedReader bufferedReader = new BufferedReader(new FileReader(file)); 
     
    3131    } 
    3232 
    33     public void writeOutFile(File file, ArrayList fileLines_in) { 
     33    public void writeOutFile(File file, ArrayList<String> fileLines_in) { 
    3434    try { 
    3535        PrintWriter printWriter = new PrintWriter(new BufferedWriter(new FileWriter(file))); 
     
    4444    } 
    4545 
    46     public ArrayList queryReplace(ArrayList fileLines_ex, String param, 
     46    public ArrayList<String> queryReplace(ArrayList<String> fileLines_ex, String param, 
    4747                  String newValue) { 
    4848    // only replace existing, don't append if param does not exist 
     
    5252    // if the parameter exists, then a replace is performed, else the parameter-value 
    5353    // is appended 
    54     public ArrayList replaceOrAddLine(ArrayList fileLines_ex, String param, String newValue,  
     54    public ArrayList<String> replaceOrAddLine(ArrayList<String> fileLines_ex, String param, String newValue,  
    5555                      boolean replaceElseAdd)  
    5656    {    
     
    6363 
    6464    for (int i = 0; i < fileLines_ex.size(); i++) { 
    65         oneLine = ((String) fileLines_ex.get(i)).trim(); 
     65        oneLine = fileLines_ex.get(i).trim(); 
    6666        // oneLine_length = oneLine.length(); 
    6767        StringTokenizer st = new StringTokenizer(oneLine, "=");