コード例 #1
0
 private Map makeRow(CrawlerStatus status, String mimeType, String key) {
   Map row = new HashMap();
   row.put(MIME_TYPE_NAME, mimeType);
   row.put(
       MIME_TYPE_NUM_URLS,
       makeRefIfColl(status.getMimeTypeCtr(mimeType), key, MIMETYPES_URLS_KEY + ":" + mimeType));
   return row;
 }
コード例 #2
0
 // Break the line at commas, return a map of the resulting strings
 // broken at equals sign.  (<i>Ie</i>, name value pairs.)
 Map getRow(String line) {
   Map map = new HashMap();
   for (Iterator iter = StringUtil.breakAt(line, ',').iterator(); iter.hasNext(); ) {
     String item = (String) iter.next();
     List pair = StringUtil.breakAt(item, '=');
     map.put(pair.get(0), pair.get(1));
   }
   return map;
 }