- Timestamp:
- 2014-08-20T22:03:28+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r26573 r29222 79 79 import org.w3c.dom.*; 80 80 81 import org.greenstone.gatherer.util.GS3ServerThread; 82 81 83 /** This class manages many aspects of the collection, from its creation via scripts, data access via methods and its importing and building into the final collection. It is also responsible for firing appropriate event when significant changes have occured within the collection, and for creating a new metadata set manager as necessary. 82 84 * @author John Thompson … … 215 217 command_parts_list.add("-language"); 216 218 command_parts_list.add(Configuration.getLanguage()); 219 220 // For now, for solr collections, we pass in -activate 221 // but GLI won't do moving building to index 222 223 if(CollectionManager.isSolrCollection()) { 224 command_parts_list.add("-activate"); 225 } 217 226 218 227 if(Gatherer.GS3) { … … 1734 1743 1735 1744 if ( CollectionDesignManager.buildcolWasFull() ) { 1736 if(installCollection()) { 1745 1746 // No installCollection() for GS3 solr collection: activate will take care of that 1747 // and no call to configGS3Server for solr collection 1748 if(CollectionManager.isSolrCollection()) { 1749 1750 DebugStream.println("Solr collection build complete: building already moved to index by activate.pl."); 1751 1752 // Finished building, 1753 // For now, for a GS3 solr collection, we'd have stopped the GS3 server before building 1754 // and will now need to restart it. 1755 GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart"); 1756 thread.start(); 1757 1758 // sleep before returning and doing the configGS3Server: give the GS3 server time to restart 1759 try { 1760 Thread.sleep(5000); 1761 } catch(Exception e) { 1762 e.printStackTrace(); 1763 } 1764 1765 } 1766 1767 else if(installCollection()) { 1737 1768 // If we have a local library running then ask it to add our newly create collection 1738 1769 if (LocalLibraryServer.isRunning() == true) { … … 1987 2018 } 1988 2019 2020 public static String getBuildType() { 2021 String buildType = (new CollectionMeta( CollectionDesignManager.collect_config.getBuildType() )).getValue(CollectionMeta.TEXT); 2022 return buildType; 2023 } 2024 2025 public static boolean isSolrCollection() { 2026 return (Gatherer.GS3 && CollectionManager.getBuildType().equals("solr")); 2027 } 2028 1989 2029 1990 2030 /** Install collection by moving its files from building to index after a successful build. … … 1999 2039 } 2000 2040 2001 2041 if(CollectionManager.isSolrCollection()) { 2042 // No installCollection() for GS3 solr collection: activate will take care of that 2043 DebugStream.println("Solr collection build complete: building already moved to index by activate.pl."); 2044 2045 // Finished building, 2046 // For now, for a GS3 solr collection, we'd have stopped the GS3 server before building 2047 // and will now need to restart it. 2048 GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart"); 2049 thread.start(); 2050 2051 return true; 2052 } 2053 2054 2002 2055 DebugStream.println("Build complete. Moving files."); 2003 2056
Note:
See TracChangeset
for help on using the changeset viewer.