- Timestamp:
- 2004-05-11T14:01:08+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/classifier/AZListClassifier.java
r7188 r7303 29 29 MultiMap alphaMap; 30 30 List fields; 31 31 String name; 32 32 class AZDocumentItem 33 33 { public DocumentID documentId; … … 80 80 } 81 81 82 public AZListClassifier(List fields) 83 { this.fields = fields; 82 public AZListClassifier(String name, List fields) 83 { this.name = name; 84 this.fields = fields; 84 85 this.alphaMap = new MultiMap(); 85 86 // System.out.println("AZList :"+fields.size()); … … 199 200 insert = new GS3SQLInsert("classifiers"); 200 201 201 if (parentId.length() > 0) { 202 insert.addValue("ParentID", parentId); 203 } 204 else { 205 insert.addValue("ParentID", label); 206 } 202 insert.addValue("ParentID", parentId); 207 203 208 204 action = insert; … … 251 247 Iterator keys; 252 248 253 String prefix = "CLAZ"+this.fields.get(0).toString(); 254 249 String prefix = this.name; 250 if (prefix==null || prefix.equals("")) { 251 prefix = "CLAZ"+this.fields.get(0).toString(); 252 // TODO: write this name back to collectionConfig.xml 253 } 255 254 int leafCount = 0; 256 255 keys = this.alphaMap.keySet().iterator(); … … 264 263 } 265 264 266 int parentClassify = this.writeSQLClassifyNode(connection, "", 0, prefix, "", " ", leafCount);265 int parentClassify = this.writeSQLClassifyNode(connection, "", 0, prefix, "", "Classifier", leafCount); 267 266 268 267 if (parentClassify < 0) … … 283 282 String className = prefix + "." + key.toString(); 284 283 285 int classifyRef = this.writeSQLClassifyNode(connection, prefix, nodeOrder, className, "", "", childDocs.size());284 int classifyRef = this.writeSQLClassifyNode(connection, prefix, nodeOrder, className, key.toString(), key.toString(), childDocs.size()); 286 285 287 286 // note the child documents...
Note:
See TracChangeset
for help on using the changeset viewer.