// Path: app/src/main/java/me/ccrama/rssslide/Util/LogUtil.java
// public class LogUtil {
//     private static final int CALLING_METHOD_INDEX;
// 
//     /**
//      * Get the stacktrace index of the method that called this class
//      *
//      * Variation of http://stackoverflow.com/a/8592871/4026792
//      */
//     static {
//         int i = 1;
//         for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
//             i++;
//             if (ste.getClassName().equals(LogUtil.class.getName())) {
//                 break;
//             }
//         }
//         CALLING_METHOD_INDEX = i;
//     }
// 
//     /**
//      * Source: http://stackoverflow.com/a/24586896/4026792
//      *
//      * @return Log tag in format (CLASSNAME.java:LINENUMBER); which makes it clickable in logcat
//      */
//     public static String getTag() {
//         try {
//             final StackTraceElement ste = Thread.currentThread().getStackTrace()[CALLING_METHOD_INDEX];
//             return "(" + ste.getFileName() + ":" + ste.getLineNumber() + ")";
// 
//         } catch (Exception e){
//             return "Slide";
//         }
//     }
// 
//     public static void v(String message) {
//         Log.v(getTag(), message);
//     }
// 
//     public static void d(String message) {
//         Log.d(getTag(), message);
//     }
// 
//     public static void i(String message) {
//         Log.i(getTag(), message);
//     }
// 
//     public static void w(String message) {
//         Log.w(getTag(), message);
//     }
// 
//     public static void e(String message) {
//         Log.e(getTag(), message);
//     }
// 
//     public static void e(Throwable tr, String message) {
//         Log.e(getTag(), message, tr);
//     }
// }


import com.rometools.rome.feed.synd.SyndContent;
import com.rometools.rome.feed.synd.SyndEnclosure;
import com.rometools.rome.feed.synd.SyndEntry;
import org.jdom2.Element;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import me.ccrama.rssslide.Util.LogUtil;
    public void setRead(boolean read) {
        this.read = read;
    }

    public boolean isStarred() {
        return starred;
    }

    public void setStarred(boolean starred) {
        this.starred = starred;
    }

    public void setSeen() {
        seen = true;
    }

    public void setAll(SyndEntry article, Feed feed) {
        this.feed = feed.getTitle();
        this.link = article.getLink();
        this.created = System.currentTimeMillis();
        if (article.getUri() == null || article.getUri().isEmpty()) {
            this.id = article.getTitle().replace(" ", "");
        } else {
            this.id = article.getUri();
        }
        if (article.getPublishedDate() != null)
            this.published = article.getPublishedDate().getTime();
        else
            this.published = System.currentTimeMillis();
        this.title = article.getTitle();
// Path: app/src/main/java/me/ccrama/rssslide/Util/LogUtil.java
// public class LogUtil {
//     private static final int CALLING_METHOD_INDEX;
// 
//     /**
//      * Get the stacktrace index of the method that called this class
//      *
//      * Variation of http://stackoverflow.com/a/8592871/4026792
//      */
//     static {
//         int i = 1;
//         for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
//             i++;
//             if (ste.getClassName().equals(LogUtil.class.getName())) {
//                 break;
//             }
//         }
//         CALLING_METHOD_INDEX = i;
//     }
// 
//     /**
//      * Source: http://stackoverflow.com/a/24586896/4026792
//      *
//      * @return Log tag in format (CLASSNAME.java:LINENUMBER); which makes it clickable in logcat
//      */
//     public static String getTag() {
//         try {
//             final StackTraceElement ste = Thread.currentThread().getStackTrace()[CALLING_METHOD_INDEX];
//             return "(" + ste.getFileName() + ":" + ste.getLineNumber() + ")";
// 
//         } catch (Exception e){
//             return "Slide";
//         }
//     }
// 
//     public static void v(String message) {
//         Log.v(getTag(), message);
//     }
// 
//     public static void d(String message) {
//         Log.d(getTag(), message);
//     }
// 
//     public static void i(String message) {
//         Log.i(getTag(), message);
//     }
// 
//     public static void w(String message) {
//         Log.w(getTag(), message);
//     }
// 
//     public static void e(String message) {
//         Log.e(getTag(), message);
//     }
// 
//     public static void e(Throwable tr, String message) {
//         Log.e(getTag(), message, tr);
//     }
// }


// Path: app/src/main/java/me/ccrama/rssslide/Realm/Article.java
import com.rometools.rome.feed.synd.SyndContent;
import com.rometools.rome.feed.synd.SyndEnclosure;
import com.rometools.rome.feed.synd.SyndEntry;
import org.jdom2.Element;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import me.ccrama.rssslide.Util.LogUtil;

    public void setRead(boolean read) {
        this.read = read;
    }

    public boolean isStarred() {
        return starred;
    }

    public void setStarred(boolean starred) {
        this.starred = starred;
    }

    public void setSeen() {
        seen = true;
    }

    public void setAll(SyndEntry article, Feed feed) {
        this.feed = feed.getTitle();
        this.link = article.getLink();
        this.created = System.currentTimeMillis();
        if (article.getUri() == null || article.getUri().isEmpty()) {
            this.id = article.getTitle().replace(" ", "");
        } else {
            this.id = article.getUri();
        }
        if (article.getPublishedDate() != null)
            this.published = article.getPublishedDate().getTime();
        else
            this.published = System.currentTimeMillis();
        this.title = article.getTitle();
        if (article.getDescription() != null) {