public void execute() { if (log.isDebugEnabled()) log.debug("execute(): fetching billboard artist profile=" + artistProfile); try { billboardProfile = (BillboardArtistProfile) MiningAPIFactory.getBillboardAPI().getArtistProfile(artistProfile); if ((billboardProfile != null) && billboardProfile.isValid()) { artistProfile.addMinedProfile(billboardProfile); artistProfile.save(); } else { artistProfile.addMinedProfileHeader( new MinedProfileHeader(DATA_TYPE_ARTISTS, DATA_SOURCE_BILLBOARD), System.currentTimeMillis() - getMinimumTimeBetweenQueries() + RE3Properties.getInt("data_mining_error_delay_minutes") * 1000 * 60); } } catch (MiningLimitReachedException mlre) { log.warn("execute(): mining limit reached for billboard"); } }
public Object getResult() { if ((billboardProfile != null) && (billboardProfile.isValid())) return billboardProfile; return null; }