Ignore:
Timestamp:
2003-12-17T13:15:07+13:00 (20 years ago)
Author:
cs025
Message:

Various changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/classifier/GS2HierarchyClassifier.java

    r6104 r6288  
    4949    }
    5050   
    51     public GS2HierarchyNode(String name, String id, String descriptor)
    52     { super(name, id, descriptor);
     51    public GS2HierarchyNode(String prefix, String name, String id, String descriptor)
     52    { super(prefix, name, id, descriptor);
    5353    }
    5454   
     
    9797 
    9898      this.rootNode = new GS2HierarchyNode();
     99      String prefix = "CL"+hierarchyName;
    99100
    100101      while (this.hasMoreLines()) {
     
    120121   
    121122    // Initialise the tree
    122     GS2HierarchyNode node = new GS2HierarchyNode(name, "CL"+hierarchyName+"."+id, description);
     123    GS2HierarchyNode node = new GS2HierarchyNode(prefix, name, id, description);
    123124
    124125    this.rootNode.add(node);
     
    224225   */
    225226  public boolean classifyDocument(DocumentID documentID, DocumentInterface document)
    226   { // the observer records the assignment of documents to classifications
     227  { if (this.hierarchy == null) {
     228      return true;
     229    }
     230   
     231    // the observer records the assignment of documents to classifications
    227232    GS2HierarchyClassifierObserver classifyObserver = new GS2HierarchyClassifierObserver(document);
    228233       
     
    241246      }
    242247
     248      System.out.println("Matching " + values.get(0).toString());
     249
     250      if (documentID == null) {
     251    System.out.println("Bad documentID");
     252    continue;
     253      }
     254
    243255      // ...and send them to the classifier
    244256      this.hierarchy.getClassifications(documentID, values, classifyObserver);
Note: See TracChangeset for help on using the changeset viewer.