RSSItem.java (1840B)
1 /* 2 * Copyright (C) 2010 A. Horn 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.mcsoxford.rss; 18 19 /** 20 * Data about an RSS item. 21 * 22 * @author Mr Horn 23 */ 24 public class RSSItem extends RSSBase { 25 private final java.util.List<MediaThumbnail> thumbnails; 26 private String content; 27 28 @Override 29 public boolean isUnread() 30 { 31 return false; 32 } 33 34 /* Internal constructor for RSSHandler */ 35 RSSItem(byte categoryCapacity, byte thumbnailCapacity) { 36 super(categoryCapacity); 37 thumbnails = new java.util.ArrayList<MediaThumbnail>(thumbnailCapacity); 38 } 39 40 /* Internal method for RSSHandler */ 41 void addThumbnail(MediaThumbnail thumbnail) { 42 thumbnails.add(thumbnail); 43 } 44 45 /** 46 * Returns an unmodifiable list of thumbnails. The return value is never 47 * {@code null}. Images are in order of importance. 48 */ 49 public java.util.List<MediaThumbnail> getThumbnails() { 50 return java.util.Collections.unmodifiableList(thumbnails); 51 } 52 53 /** 54 * Returns the value of the optional <content:encoded> tag 55 * @return string value of the element data 56 */ 57 public String getFullContent() { 58 return content; 59 } 60 61 /* Internal method for RSSHandler */ 62 void setFullContent(String content) { 63 this.content = content; 64 } 65 } 66