Changeset 8493


Ignore:
Timestamp:
2004-11-09T11:29:14+13:00 (19 years ago)
Author:
kjdon
Message:

This must now set the listrepository documentList in each recogniser, as its no longer passed in to the constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/RecogniserManager.java

    r7479 r8493  
    1313  int                 used;
    1414  int                 size;
    15 
    16   public RecogniserManager()
     15    DocumentList docList;
     16  public RecogniserManager(DocumentList documentList)
    1717  { this.list = new RecogniserInterface[10];
    1818    this.used = 0;
    1919    this.size = 10;
     20    this.docList = documentList;
    2021  }
    2122
     
    3031    }
    3132    catch (ClassNotFoundException ex) {
     33    System.err.println(ex);
    3234    }
    3335
     
    3739    }
    3840    catch (InstantiationException instEx) {
     41    System.err.println(instEx);
    3942    }
    4043    catch (IllegalAccessException accEx) {
     44    System.err.println(accEx);
    4145    }
    4246  }
     
    4549   *
    4650   */
    47   public void addRecogniser(RecogniserInterface recogniser)
    48   { this.ensureCapacity(this.used + 1);
    49 
    50     this.list[this.used] = recogniser;
    51     this.used ++;
    52   }
     51    public void addRecogniser(RecogniserInterface recogniser)
     52    { 
     53    recogniser.setListRepository(this.docList);
     54    this.ensureCapacity(this.used + 1);
     55 
     56    this.list[this.used] = recogniser;
     57    this.used ++;
     58    }
    5359
    5460  public void processFile(URL url)
     
    6369 
    6470  public void processFile(File file)
    65   { URL url = URLTools.getFileURL(file);
     71  {
     72      System.err.println("processing file "+file.getPath());
     73      URL url = URLTools.getFileURL(file);
    6674   
    6775    if (url != null)
Note: See TracChangeset for help on using the changeset viewer.