Delete not used anymore classes and code

This commit is contained in:
Shinokuni 2020-01-04 17:09:44 +01:00
parent 03b6c9b986
commit bf60d2efe1
8 changed files with 2 additions and 304 deletions

View File

@ -6,7 +6,6 @@ import com.readrops.readropslibrary.localfeed.atom.ATOMFeed;
import com.readrops.readropslibrary.localfeed.json.JSONFeed;
import com.readrops.readropslibrary.localfeed.rss.RSSChannel;
import com.readrops.readropslibrary.localfeed.rss.RSSFeed;
import com.readrops.readropslibrary.services.freshrss.json.FreshRSSFeed;
import com.readrops.readropslibrary.services.nextcloudnews.json.NextNewsFeed;
import org.jsoup.Jsoup;
@ -32,22 +31,6 @@ public final class FeedMatcher {
return newFeed;
}
public static Feed freshRSSFeedToFeed(FreshRSSFeed feed, Account account) {
Feed newFeed = new Feed();
newFeed.setName(feed.getTitle());
newFeed.setUrl(feed.getUrl());
newFeed.setSiteUrl(feed.getHtmlUrl());
newFeed.setIconUrl(feed.getIconUrl());
newFeed.setRemoteFolderId(feed.getCategories().get(0).getId());
newFeed.setAccountId(account.getId());
newFeed.setRemoteId(feed.getId());
return newFeed;
}
public static Feed feedFromRSS(RSSFeed rssFeed) {
Feed feed = new Feed();
RSSChannel channel = rssFeed.getChannel();

View File

@ -1,15 +1,14 @@
package com.readrops.app.utils.matchers;
import com.readrops.readropsdb.entities.Feed;
import com.readrops.readropsdb.entities.Item;
import com.readrops.app.utils.DateUtils;
import com.readrops.app.utils.Utils;
import com.readrops.readropsdb.entities.Feed;
import com.readrops.readropsdb.entities.Item;
import com.readrops.readropslibrary.localfeed.atom.ATOMEntry;
import com.readrops.readropslibrary.localfeed.json.JSONItem;
import com.readrops.readropslibrary.localfeed.rss.RSSEnclosure;
import com.readrops.readropslibrary.localfeed.rss.RSSItem;
import com.readrops.readropslibrary.localfeed.rss.RSSMediaContent;
import com.readrops.readropslibrary.services.freshrss.json.FreshRSSItem;
import com.readrops.readropslibrary.services.nextcloudnews.json.NextNewsItem;
import com.readrops.readropslibrary.utils.ParseException;
@ -46,24 +45,6 @@ public final class ItemMatcher {
return item;
}
public static Item freshRSSItemtoItem(FreshRSSItem item, int feedId) {
Item newItem = new Item();
newItem.setTitle(item.getTitle());
newItem.setAuthor(item.getAuthor());
newItem.setPubDate(new LocalDateTime(item.getPublished() * 1000L,
DateTimeZone.getDefault()));
newItem.setContent(item.getSummary().getContent());
newItem.setLink(item.getAlternate().get(0).getHref());
newItem.setFeedId(feedId);
newItem.setRemoteId(item.getId());
newItem.setRead(item.isRead());
return newItem;
}
public static List<Item> itemsFromRSS(List<RSSItem> items, Feed feed) throws ParseException {
List<Item> dbItems = new ArrayList<>();

View File

@ -1,16 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
public class FreshRSSAlternate {
private String href;
public String getHref() {
return href;
}
public void setHref(String href) {
this.href = href;
}
}

View File

@ -1,26 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
public class FreshRSSCategory {
private String id;
private String label;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@ -1,68 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
import java.util.List;
public class FreshRSSFeed {
private List<FreshRSSCategory> categories;
private String htmlUrl;
private String iconUrl;
private String id;
private String title;
private String url;
public List<FreshRSSCategory> getCategories() {
return categories;
}
public void setCategories(List<FreshRSSCategory> categories) {
this.categories = categories;
}
public String getHtmlUrl() {
return htmlUrl;
}
public void setHtmlUrl(String htmlUrl) {
this.htmlUrl = htmlUrl;
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}

View File

@ -1,114 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
import com.readrops.readropslibrary.services.freshrss.FreshRSSAPI;
import java.util.List;
public class FreshRSSItem {
private List<FreshRSSAlternate> alternate;
private String author;
private List<String> categories;
private String crawlTimeMsec;
private String id;
private FreshRSSOrigin origin;
private Long published;
private FreshRSSSummary summary;
private String timestampUsec;
private String title;
public List<FreshRSSAlternate> getAlternate() {
return alternate;
}
public void setAlternate(List<FreshRSSAlternate> alternate) {
this.alternate = alternate;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public List<String> getCategories() {
return categories;
}
public void setCategories(List<String> categories) {
this.categories = categories;
}
public String getCrawlTimeMsec() {
return crawlTimeMsec;
}
public void setCrawlTimeMsec(String crawlTimeMsec) {
this.crawlTimeMsec = crawlTimeMsec;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public FreshRSSOrigin getOrigin() {
return origin;
}
public void setOrigin(FreshRSSOrigin origin) {
this.origin = origin;
}
public Long getPublished() {
return published;
}
public void setPublished(Long published) {
this.published = published;
}
public FreshRSSSummary getSummary() {
return summary;
}
public void setSummary(FreshRSSSummary summary) {
this.summary = summary;
}
public String getTimestampUsec() {
return timestampUsec;
}
public void setTimestampUsec(String timestampUsec) {
this.timestampUsec = timestampUsec;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public boolean isRead() {
return categories.contains(FreshRSSAPI.GOOGLE_READ);
}
}

View File

@ -1,26 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
public class FreshRSSOrigin {
private String streamId;
private String title;
public String getStreamId() {
return streamId;
}
public void setStreamId(String streamId) {
this.streamId = streamId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}

View File

@ -1,16 +0,0 @@
package com.readrops.readropslibrary.services.freshrss.json;
public class FreshRSSSummary {
private String content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}