| 589 | } |
| 590 | |
| 591 | String key2pStr(String keyword) { |
| 592 | //keyword = keyword.replace('_',' '); // restore the spaces from underscores |
| 593 | StringTokenizer st = new StringTokenizer(keyword,"."); |
| 594 | String result = ""; |
| 595 | while(st.hasMoreTokens()) { |
| 596 | String token = st.nextToken(); |
| 597 | result += token +", "; |
| 598 | } |
| 599 | result = result.substring(0,result.length()-2); // trim away the ending comma-space |
| 600 | result = "["+result+"]"; |
| 601 | result = result.replace('_', ' '); |
| 602 | return result; |
| 603 | } |
| 604 | |
| 605 | |
| 606 | // Thank you, Wayne! |