<commit_before>package org.ieatta.activity;

import org.ieatta.database.query.OnlineDatabaseQuery;
import org.ieatta.server.cache.CacheImageUtil;

import java.io.File;

import bolts.Continuation;
import bolts.Task;

public class LeadImage {
    private String localUrl;
    private String onlineUrl;
    private String photoUUID;
    private boolean isCached;

    public LeadImage(String localUrl) {
        this.localUrl = localUrl;
        this.photoUUID = new File(localUrl).getName().split("_")[1];
        this.isCached = false;
    }

    public LeadImage(String localUrl, String onlineUrl) {
        this.localUrl = localUrl;
        this.onlineUrl = onlineUrl;
    }

    public boolean isCached(){
        return this.isCached;
    }

    public Task<String> getLocalUrlTask() {
        // Already cached in the local.
        File cacheImageFile = CacheImageUtil.sharedInstance.getCacheImageUrl(this.photoUUID);<commit_msg>IEATTA for Android.<commit_after>package org.ieatta.activity;

import android.text.TextUtils;

import org.ieatta.database.query.OnlineDatabaseQuery;
import org.ieatta.server.cache.CacheImageUtil;

import java.io.File;

import bolts.Continuation;
import bolts.Task;

public class LeadImage {
    private String localUrl;
    private String onlineUrl;
    private String photoUUID;
    private boolean isCached;

    public LeadImage(String localUrl) {
        this.localUrl = localUrl;
        if(TextUtils.isEmpty(localUrl) ==false)
            this.photoUUID = new File(localUrl).getName().split("_")[1];
        this.isCached = false;
    }

    public LeadImage(String localUrl, String onlineUrl) {
        this.localUrl = localUrl;
        this.onlineUrl = onlineUrl;
    }

    public boolean isCached(){
        return this.isCached;
    }

    public Task<String> getLocalUrlTask() {
        // Already cached in the local.
        File cacheImageFile = CacheImageUtil.sharedInstance.getCacheImageUrl(this.photoUUID);
{'fraction_non_alphanumeric': 0.09244126659856997, 'fraction_numerical': 0.0010214504596527069, 'mean_word_length': 3.24025974025974, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4664555', 'n_tokens_mistral': 578, 'n_tokens_neox': 567, 'n_words': 129}