return;
}
- progresslog("getisland...");
+ progresslog("(async) getisland...");
getIsland();
progresslog("getocean...");
getOcean();
if (latch != null) {
latch.await(2, java.util.concurrent.TimeUnit.SECONDS);
}
+ progresslog("(async) getisland done");
if (islandName == null) {
error("Could not find island name in YPP user interface.");
}
// get commod map
+ progresslog("pctb commodmap...");
HashMap<String,Integer> commodMap = getCommodMap();
if(commodMap == null) {
return;
}
+ progresslog("pctb commodmap done.");
int[] offerCount = getBuySellMaps(data,buys,sells,stallMap,commodMap);
//println(buys.toString());
// if (dtxt!=null) dtxt.println(sells);
/**
* Gets the list of commodities and their associated commodity ids.
- * On the first run, the data is downloaded from the PCTB server.
- * After the first run, the data is cached using <code>Preferences</code>.
- * <p>
- * Potential issues: When more commodities are added to the server, this
- * program will currently break unless the user deletes the preferences
- * file or we give them a new release with a slighly different storage
- * location for the data.
*
* @return a map where the key is the commodity and the value is the commodity id.
*/
return commodMap;
}
HashMap<String,Integer> map = new HashMap<String,Integer>();
- Preferences prefs = Preferences.userNodeForPackage(getClass());
String xml;
try {
URL host = new URL(PCTB_HOST_URL + "commodmap.php");