Ignore:
Timestamp:
2004-10-22T14:47:12+13:00 (20 years ago)
Author:
kjdon
Message:

removed some commented out code, added use views option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/greenstone3-extensions/vishnu/src/vishnu/builder/IndexerGUI.java

    r8290 r8411  
    1616    public static void addComponentsToPane(Container pane)
    1717    {
    18         //String[] labels = {"Top directory of Vishnu: ", "Name of Collection: ", "Directory of Collection: ", "Source directory: ", "Indexer (\"mg\" or \"luc\"): ", "Collection Description: "};
    19     String [] labels = {"Collections directory: ", "Collection id (directory name): ", "Collection name: ","Collection description: ", "Indexer (\"mg\" or \"luc\"): "};
     18    String [] labels = {"Collections directory: ", "Collection id (directory name): ", "Collection name: ","Collection description: ", "Indexer (\"mg\" or \"luc\"): ", "Use views (\"yes\" or \"no\"): "};
    2019        int numPairs = labels.length;
    2120        textFields = new JTextField[numPairs];
     
    5655
    5756    butPan.add(new Box.Filler(minSize, prefSize, maxSize));
    58 
    59 //  button = new JButton(" Options ");
    60 //      button.setBorder(BorderFactory.createBevelBorder(0));
    61 //  butPan.add(button);
    6257   
    6358        butPan.add(new Box.Filler(minSize, prefSize, maxSize));
    64 
    65 //  button = new JButton(" Help ");
    66 //        button.setBorder(BorderFactory.createBevelBorder(0));
    67 //        butPan.add(button);
    6859
    6960    pane.add(butPan);
     
    8071    {
    8172    // get data
    82         //String source = textFields[3].getText();
    83     //String dir = textFields[2].getText();
    84     //String name = textFields[1].getText();
    85     //String home = textFields[0].getText();
    8673    String colls_home = textFields[0].getText();
    8774    String coll_id = textFields[1].getText();
     
    8976    String coll_desc = textFields[3].getText();
    9077    String indexer = textFields[4].getText();
     78    String use_views_str = textFields[5].getText();
    9179    String coll_home = colls_home;
    9280    if (!coll_home.endsWith(File.separator)) {
     
    9482    }
    9583    coll_home += coll_id + File.separator;
    96     //String del = "";
    97         //String description = textFields[5].getText();
    98     //String output = "Launching Collection Builder with \n source = " + source + "\n dir = " + dir + "\n name = " + name + "\n home = " + home + "\n indexer = " + indexer + "\n description = " + description;
     84
     85    if (!indexer.equals("mg") || !indexer.equals("luc")) {
     86        indexer = "mg";
     87    }
     88    boolean use_views = false;
     89    if (use_views_str.equals("yes")) {
     90        use_views = true;
     91    }
    9992    String output = "Launching Collection Builder with \n collections home = "+colls_home + "\n collection id = "+coll_name+"\n indexer = "+indexer;
     93    if (use_views) {
     94        output += "\n using views";
     95    } else {
     96        output += "\n not using views";
     97    }
    10098    ja.setText(output);
    10199
    102     //CollectionBuilder builder = new CollectionBuilder(dir,name,home,indexer);
    103     CollectionBuilder builder = new CollectionBuilder(coll_home, coll_id, coll_name, coll_desc, indexer, false); // no views for now - change this
     100    CollectionBuilder builder = new CollectionBuilder(coll_home, coll_id, coll_name, coll_desc, indexer, use_views);
    104101    output += "\n Indexing Finished";
    105102    ja.setText(output);
     
    125122
    126123    public static void main(String[] args) {
    127     //javax.swing.SwingUtilities.invokeLater(new Runnable() {
    128           //  public void run() {
    129                 createAndShowGUI();
    130           //  }
    131         //});
     124    createAndShowGUI();
    132125    }
    133126}
Note: See TracChangeset for help on using the changeset viewer.