Changeset 6288 for trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/classifier/GS2HierarchyClassifier.java
- Timestamp:
- 2003-12-17T13:15:07+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/classifier/GS2HierarchyClassifier.java
r6104 r6288 49 49 } 50 50 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); 53 53 } 54 54 … … 97 97 98 98 this.rootNode = new GS2HierarchyNode(); 99 String prefix = "CL"+hierarchyName; 99 100 100 101 while (this.hasMoreLines()) { … … 120 121 121 122 // Initialise the tree 122 GS2HierarchyNode node = new GS2HierarchyNode( name, "CL"+hierarchyName+"."+id, description);123 GS2HierarchyNode node = new GS2HierarchyNode(prefix, name, id, description); 123 124 124 125 this.rootNode.add(node); … … 224 225 */ 225 226 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 227 232 GS2HierarchyClassifierObserver classifyObserver = new GS2HierarchyClassifierObserver(document); 228 233 … … 241 246 } 242 247 248 System.out.println("Matching " + values.get(0).toString()); 249 250 if (documentID == null) { 251 System.out.println("Bad documentID"); 252 continue; 253 } 254 243 255 // ...and send them to the classifier 244 256 this.hierarchy.getClassifications(documentID, values, classifyObserver);
Note:
See TracChangeset
for help on using the changeset viewer.