forked from Archives/Athou_commafeed
cleanup
This commit is contained in:
@@ -3,14 +3,12 @@ package com.commafeed.backend.feeds;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang3.time.DateUtils;
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
import org.apache.commons.math.stat.descriptive.SummaryStatistics;
|
import org.apache.commons.math.stat.descriptive.SummaryStatistics;
|
||||||
@@ -28,7 +26,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.w3c.css.sac.InputSource;
|
import org.w3c.css.sac.InputSource;
|
||||||
import org.w3c.dom.css.CSSStyleDeclaration;
|
import org.w3c.dom.css.CSSStyleDeclaration;
|
||||||
|
|
||||||
import com.commafeed.backend.model.Feed;
|
|
||||||
import com.commafeed.backend.model.FeedEntry;
|
import com.commafeed.backend.model.FeedEntry;
|
||||||
import com.commafeed.backend.model.FeedSubscription;
|
import com.commafeed.backend.model.FeedSubscription;
|
||||||
import com.google.api.client.util.Base64;
|
import com.google.api.client.util.Base64;
|
||||||
@@ -242,30 +239,6 @@ public class FeedUtils {
|
|||||||
return StringUtils.join(rules, "");
|
return StringUtils.join(rules, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FeedEntry findEntry(Collection<FeedEntry> list,
|
|
||||||
FeedEntry entry) {
|
|
||||||
FeedEntry found = null;
|
|
||||||
for (FeedEntry e : list) {
|
|
||||||
if (StringUtils.equals(entry.getGuid(), e.getGuid())
|
|
||||||
&& StringUtils.equals(entry.getUrl(), e.getUrl())) {
|
|
||||||
found = e;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Feed findFeed(Collection<Feed> list, Feed feed) {
|
|
||||||
Feed found = null;
|
|
||||||
for (Feed f : list) {
|
|
||||||
if (ObjectUtils.equals(feed.getId(), f.getId())) {
|
|
||||||
found = f;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isRTL(FeedEntry entry) {
|
public static boolean isRTL(FeedEntry entry) {
|
||||||
String text = entry.getContent().getContent();
|
String text = entry.getContent().getContent();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user