Changeset 5112
- Timestamp:
- 2003-08-07T16:55:18+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java
r4859 r5112 194 194 public Element process(Element message) { 195 195 196 ///ystem.out.println("MR received request");197 ///ystem.out.println(this.converter.getString(message));196 System.out.println("MR received request"); 197 System.out.println(this.converter.getString(message)); 198 198 199 199 // check that its a correct message tag … … 247 247 } // for each request 248 248 249 ///ystem.out.println("MR returned response");250 ///ystem.out.println(this.converter.getString(mainResult));249 System.out.println("MR returned response"); 250 System.out.println(this.converter.getString(mainResult)); 251 251 252 252 return mainResult; … … 674 674 675 675 System.out.println("MessageRouter:Activating collection: "+col_name+"."); 676 677 Collection c = new Collection(); 676 677 // now we need to look for the etc/collectionInit.xml file, and see what sort of Collection to load 678 Collection c = null; 679 File init_file = new File(GSFile.collectionInitFile(this.site_home, col_name)); 680 if (init_file.exists()) { 681 Element init_elem = this.converter.getDOM(init_file).getDocumentElement(); 682 String coll_class_name = init_elem.getAttribute("class"); 683 if (coll_class_name.equals("")) { 684 c = new Collection(); 685 } else { 686 try { 687 c = (Collection)Class.forName("org.greenstone.gsdl3.collection."+coll_class_name).newInstance(); 688 } catch (Exception e) { 689 System.out.println("couldn't create a new collection, type "+coll_class_name+", defaulting to class Collection"); 690 c = new Collection(); 691 } 692 } 693 } else { 694 // use the defualt collection 695 c = new Collection(); 696 } 678 697 c.setCollectionName(col_name); 679 698 c.setSiteHome(this.site_home);
Note:
See TracChangeset
for help on using the changeset viewer.