01: /**********************************************************************************
02:
03: Feedzeo!
04: A free and open source RSS/Atom/RDF feed aggregator
05:
06: Copyright (C) 2005-2006 Anand Rao (anandrao@users.sourceforge.net)
07:
08: This library is free software; you can redistribute it and/or
09: modify it under the terms of the GNU Lesser General Public
10: License as published by the Free Software Foundation; either
11: version 2.1 of the License, or (at your option) any later version.
12:
13: This library is distributed in the hope that it will be useful,
14: but WITHOUT ANY WARRANTY; without even the implied warranty of
15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: Lesser General Public License for more details.
17:
18: You should have received a copy of the GNU Lesser General Public
19: License along with this library; if not, write to the Free Software
20: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21:
22: ************************************************************************************/package data;
23:
24: /**
25: *
26: * @author Anand Rao
27: */
28: public class DataElement {
29:
30: public static final String CATEGORY_TITLE_ELEM = "CategoryTitle";
31: //static final String CATEGORY_DESC_ELEM = "CategoryDesc";
32: public static final String FEED_TITLE_ELEM = "FeedTitle";
33: public static final String FEED_DESC_ELEM = "FeedDesc";
34: public static final String FEED_IMAGE_ELEM = "FeedImage";
35: public static final String FEED_DATE_ELEM = "FeedDate";
36: public static final String NEWS_TITLE_ELEM = "NewsTitle";
37: public static final String NEWS_DESC_ELEM = "NewsDesc";
38: public static final String NEWS_LINK_ELEM = "NewsLink";
39: public static final String NEWS_IMAGE_ELEM = "NewsImage";
40: public static final String NEWS_DATE_ELEM = "NewsDate";
41:
42: /** Creates a new instance of StyleElement */
43: public DataElement() {
44: }
45:
46: public static boolean IsCategoryData(String Elemtype) {
47: return (Elemtype.equalsIgnoreCase(CATEGORY_TITLE_ELEM));
48: }
49:
50: public static boolean IsChannelData(String Elemtype) {
51: if (Elemtype.equalsIgnoreCase(FEED_TITLE_ELEM))
52: return true;
53: if (Elemtype.equalsIgnoreCase(FEED_DESC_ELEM))
54: return true;
55: if (Elemtype.equalsIgnoreCase(FEED_IMAGE_ELEM))
56: return true;
57: if (Elemtype.equalsIgnoreCase(FEED_DATE_ELEM))
58: return true;
59:
60: return false;
61: }
62:
63: public static boolean IsItemData(String Elemtype) {
64: if (Elemtype.equalsIgnoreCase(NEWS_TITLE_ELEM))
65: return true;
66: if (Elemtype.equalsIgnoreCase(NEWS_DESC_ELEM))
67: return true;
68: if (Elemtype.equalsIgnoreCase(NEWS_LINK_ELEM))
69: return true;
70: if (Elemtype.equalsIgnoreCase(NEWS_IMAGE_ELEM))
71: return true;
72: if (Elemtype.equalsIgnoreCase(NEWS_DATE_ELEM))
73: return true;
74:
75: return false;
76: }
77: }
|