/**********************************************************************************
Feedzeo!
A free and open source RSS/Atom/RDF feed aggregator
Copyright (C) 2005-2006 Anand Rao (anandrao@users.sourceforge.net)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
************************************************************************************/
/*
* TagName.java
*
* Created on August 13, 2005, 10:39 PM
* This class defines the constant tag names used while generating html files
*/
package ui;
import data.DataElement;
/**
*
* @author Anand Rao
*/
public class TagName {
public static final String PAGE_TAG = "HTML";
public static final String HEAD_TAG = "HEAD";
public static final String PAGE_BODY_TAG = "BODY";
public static final String PAGE_TITLE_TAG = "TITLE";
public static final String CATEGORY_TITLE_TAG = "DIV"; //"H2";
public static final String CHANNEL_TITLE_TAG = "DIV"; //"H3";
public static final String CHANNEL_DESC_TAG = "DIV"; //"H4";
public static final String ITEM_TAG = "DIV"; //= "P";
public static final String ITEM_TITLE_TAG = "DIV"; //= "B";
public static final String ITEM_LINK_TAG = "A";
public static final String IMAGE_TAG = "IMG";
public static final String DATE_TAG = "DIV"; //"H6";
public static final String ANCHOR_TAG = "A";
public static final String BREAK_TAG = "BR";
public static final String LINK_TAG = "LINK";
public static final String DEFAULT_TAG = "P";
public static final String TABLE_CELL_TAG = "TD";
public static final String TABLE_TAG = "TABLE";
public static final String TABLE_ROW_TAG = "TR";
/** Creates a new instance of TagName */
public TagName() {
}
public static String getHTMLTagName(String DataElem) {
if (DataElem.equalsIgnoreCase(DataElement.CATEGORY_TITLE_ELEM))
return CATEGORY_TITLE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.FEED_TITLE_ELEM))
return CHANNEL_TITLE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.FEED_DESC_ELEM))
return CHANNEL_DESC_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.NEWS_TITLE_ELEM))
return ITEM_TITLE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.NEWS_DESC_ELEM))
return ITEM_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.NEWS_LINK_ELEM))
return ITEM_LINK_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.FEED_IMAGE_ELEM))
return IMAGE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.NEWS_IMAGE_ELEM))
return IMAGE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.NEWS_DATE_ELEM))
return DATE_TAG;
else if (DataElem.equalsIgnoreCase(DataElement.FEED_DATE_ELEM))
return DATE_TAG;
return DEFAULT_TAG;
}
}
|