예제 #1
0
 // process MML
 public void processMML(File f, String pmodel, String mml) throws Exception {
   String id = f.getPath();
   if (pmodel != null) id = id + "#" + pmodel;
   mml = mml.trim() + "\n";
   Integer hmml = new Integer(mml.hashCode());
   String oid = mmlIDs.get(hmml);
   if (oid != null) {
     System.out.println("Ignoring " + id + " matches " + oid);
     return;
   }
   mmlIDs.put(hmml, id);
   int inx = 1000 + ++ninxs;
   String fname = "" + inx + ".mod";
   inxwrt.println("" + fname + "\t" + hmml + "\t" + id);
   File fout = new File(destDir, fname);
   UtilIO.writeText(fout, mml);
 }
예제 #2
0
 // harvest mod file
 public void harvestMod(File f) throws Exception {
   String mml = UtilIO.readText(f);
   processMML(f, null, mml);
 }