final pHtoolsConfig pHConfig = new pHtoolsConfig();
pHConfig.initialize();
final pHtoolsConnection Connection = new pHtoolsConnection(pHConfig);
NameQueryTree nameTree = new NameQueryTree();
String[] R = this.Config.getSplitConfigValue(optimizerconfig,"repository");
String repos = R[0];
//Get a list of all buffers -- no that could be quite long and rediculous. How to get ones we haven't gotten before ?? FIFO??
//Want to crawl....
BufferNameQuery query = Connection.getBufferNameQuery(repos);
query.initialQuery(null,true);//Selects all enabled buffers!!
String bufferNameKey = this.Config.getConfigValue(optimizerconfig,"query");
//System.out.println("The query is "+bufferNameKey);
//Initial query finds matching buffer names with the enabled state specified. Only makes sense
//to optimize enabled buffers. Ignore diabled ones since those will likely be deleted in future and are deprecated....
query.stringToQuery(bufferNameKey);
query.insertNameQueryNodes(repos,nameTree);
DefaultMutableTreeNode traversalTree = nameTree.getTree();
//////////////////////////////////////////////////////////////////////////////////////
//Get an enumeration of search query results... //
//A configuration file might contain query terms to narrow optimization queue... //
//////////////////////////////////////////////////////////////////////////////////////