|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.rssowl.model.Category
The URL Tree builds itself from the Root-Object of this class. The root object holds categorys with its favorites. Each category may hold other sub-categorys and favorites. Some static methods provide access to the url / title of the favorites.
Field Summary | |
private static Vector |
blogrolls
Vector holding all blogrolls |
private static Vector |
favLinks
Vector holding all favorite-urls |
private Hashtable |
favorites
Hashtable holding the favorites of this category |
private static Hashtable |
favPool
Hashtable holding all favorites |
private static Vector |
favTitles
Vector holding all favorite-titles |
private boolean |
isBlogroll
TRUE if this category is a blogroll |
private boolean |
isExpanded
TRUE if this category is expanded in the favorite tree |
private boolean |
isRoot
TRUE if this category is the root element of the favorite tree |
private boolean |
isUnSynchronized
Flag indicating an unsynchronized blogroll |
private static Hashtable |
mapLinkToTitle
Hashtable holding all favorites mapping Link => Title |
private static Hashtable |
mapTitleToLink
Hashtable holding all favorites mapping Title => Link |
private String |
name
Name of the Category |
private Category |
parent
Parent category of this category |
private String |
pathToBlogroll
Path to the blogroll XML |
private static Category |
rootCategory
The root category of all categories in RSSOwl |
private TreeSet |
sortedLinkTitles
TreeSet holding the sorted titles of the favorites in this category |
private TreeSet |
sortedSubCatTitles
TreeSet holding the sorted titles of the subcategories in this category |
private Hashtable |
subCategories
Hashtable holding the subcategories of this category |
private org.eclipse.swt.widgets.TreeItem |
treeItem
TreeItem this Category is shown |
private boolean |
useProxy
TRUE if a proxy should be used |
Constructor Summary | |
Category(String name,
Category parent,
boolean isBlogroll)
Instantiate a new Category |
Method Summary | |
void |
addCategory(Category rssOwlCategory)
Add a subcategory to this category |
void |
addCategory(Category rssOwlCategory,
boolean makeUniqueTitle)
Add a subcategory to this category |
void |
addFavorite(Favorite rssOwlFavorite)
Add a favorit to the category |
static boolean |
blogrollExists(String url)
Check if the blogroll already exists |
void |
checkUseProxy(Category rssOwlCategory)
Check recursivly what state the use proxy setting has |
static void |
createRootCategory()
Create a new root category |
static String |
createUniqueLink(String link)
Create a unique link |
static String |
createUniqueTitle(String title)
Create a unique title |
boolean |
editCategory(String title,
String newTitle)
Edit a subcategory |
void |
editFavorite(Favorite oldFavorite,
Favorite newFavorite)
Edit a favorite |
void |
getAllFavoriteTitles(TreeSet allFavoriteTitles,
Category rssOwlCategory)
Recursivly get all favorite titles also from the subcategorys |
static Vector |
getBlogrolls()
|
Hashtable |
getFavorites()
Get all favorites of this Category |
static Hashtable |
getFavPool()
Get the Hashtable that stores all favorites |
static String |
getLinkForTitle(String title)
Return the Link for the given Title |
void |
getLoadOnStartupFavorites(TreeSet loadOnStartupFavorites,
Category rssOwlCategory)
Recursivly get all favorites also from the subcategorys that should autoload on startup of RSSOwl |
String |
getName()
|
Category |
getParent()
|
String |
getPathToBlogroll()
|
static Category |
getRootCategory()
Get the root category of all categories used in RSSOwl to store favorites or other cats. |
TreeSet |
getSortedLinkTitles()
|
TreeSet |
getSortedSubCatTitles()
|
Hashtable |
getSubCategories()
|
static String |
getTitleForLink(String link)
Return the Title of the given Link |
org.eclipse.swt.widgets.TreeItem |
getTreeItem()
|
boolean |
isBlogroll()
|
boolean |
isExpanded()
|
boolean |
isRoot()
|
boolean |
isUnSynchronized()
|
boolean |
isUseProxy()
|
static boolean |
linkExists(String link)
Check if the link already exists |
void |
removeAll()
Remove all Favorites and Sub-Categories from the Category |
void |
removeCategory(String name,
Category rssOwlCategory)
Remove a subcategory from this category. |
void |
removeFavorite(String title,
boolean disposeTreeItem)
Remove a favorite from the category |
void |
reset()
Reset this category. |
void |
setBlogroll(boolean isBlogroll)
Set TRUE if this category is from a blogroll |
void |
setExpanded(boolean isExpanded)
Set TRUE if category is expanded in the url tree |
void |
setName(String name)
Set the Name of this category |
void |
setParent(Category parent)
If the category is moved it is usefull to set the parent explicitly without calling the constructor. |
void |
setPathToBlogroll(String pathToBlogroll)
Set the URL / Path to the blogroll |
void |
setTreeItem(org.eclipse.swt.widgets.TreeItem treeItem)
|
void |
setUnSynchronized(boolean isUnSynchronized)
Set the Blogroll's synchronization state |
void |
setUseProxy(boolean useProxy)
Set TRUE if proxy should be used in this category's favorites and subcategories favorites |
private void |
setUseProxy(Category rssOwlCategory,
boolean enabled)
Recursivly update state of use proxy |
static boolean |
titleExists(String title)
Check if the title already exists |
String |
toCatPath()
Crate the category path from the category |
String |
toCatPath(boolean humanReadable)
Crate the category path from the category |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Vector blogrolls
private static Vector favLinks
private static Hashtable favPool
private static Vector favTitles
private static Hashtable mapLinkToTitle
private static Hashtable mapTitleToLink
private static Category rootCategory
private Hashtable favorites
private boolean isBlogroll
private boolean isExpanded
private boolean isRoot
private boolean isUnSynchronized
private String name
private Category parent
private String pathToBlogroll
private TreeSet sortedLinkTitles
private TreeSet sortedSubCatTitles
private Hashtable subCategories
private org.eclipse.swt.widgets.TreeItem treeItem
private boolean useProxy
Constructor Detail |
public Category(String name, Category parent, boolean isBlogroll)
name
- Name of the categoryparent
- Parent category of this subcategoryisBlogroll
- TRUE if category is from a blogrollMethod Detail |
public static boolean blogrollExists(String url)
url
- URL to the blogroll
public static void createRootCategory()
public static String createUniqueLink(String link)
link
- The link to make unique
public static String createUniqueTitle(String title)
title
- The title to make unique
public static Vector getBlogrolls()
public static Hashtable getFavPool()
public static String getLinkForTitle(String title)
title
- Title of the favorit
public static Category getRootCategory()
public static String getTitleForLink(String link)
link
- Link of the favorit
public static boolean linkExists(String link)
link
- URL of the link
public static boolean titleExists(String title)
title
- Title of the link
public void addCategory(Category rssOwlCategory)
rssOwlCategory
- The subcategorypublic void addCategory(Category rssOwlCategory, boolean makeUniqueTitle)
rssOwlCategory
- The subcategorymakeUniqueTitle
- TRUE if the new category has to get a unique title
to avoid duplicates in the subcategories of this categorypublic void addFavorite(Favorite rssOwlFavorite)
rssOwlFavorite
- A RSSOwl favoritepublic void checkUseProxy(Category rssOwlCategory)
rssOwlCategory
- Current Categorypublic boolean editCategory(String title, String newTitle)
title
- Title of the SubcategorynewTitle
- New Title of the Subcategory
public void editFavorite(Favorite oldFavorite, Favorite newFavorite)
oldFavorite
- The edited favoritenewFavorite
- The updated favoritepublic void getAllFavoriteTitles(TreeSet allFavoriteTitles, Category rssOwlCategory)
allFavoriteTitles
- TreeSet holding titles of all favoritesrssOwlCategory
- Current Categorypublic Hashtable getFavorites()
public void getLoadOnStartupFavorites(TreeSet loadOnStartupFavorites, Category rssOwlCategory)
loadOnStartupFavorites
- TreeSet holding titles of all favoritesrssOwlCategory
- Current Categorypublic String getName()
public Category getParent()
public String getPathToBlogroll()
public TreeSet getSortedLinkTitles()
public TreeSet getSortedSubCatTitles()
public Hashtable getSubCategories()
public org.eclipse.swt.widgets.TreeItem getTreeItem()
public boolean isBlogroll()
public boolean isExpanded()
public boolean isRoot()
public boolean isUnSynchronized()
public boolean isUseProxy()
public void removeAll()
public void removeCategory(String name, Category rssOwlCategory)
name
- Name of the subcategoryrssOwlCategory
- Current Categorypublic void removeFavorite(String title, boolean disposeTreeItem)
disposeTreeItem
- If TRUE, dispose the favorite's TreeItemtitle
- Title of the favoritepublic void reset()
public void setBlogroll(boolean isBlogroll)
isBlogroll
- public void setExpanded(boolean isExpanded)
isExpanded
- public void setName(String name)
name
- public void setParent(Category parent)
parent
- The new parent categorypublic void setPathToBlogroll(String pathToBlogroll)
pathToBlogroll
- public void setTreeItem(org.eclipse.swt.widgets.TreeItem treeItem)
treeItem
- The treeItem to set.public void setUnSynchronized(boolean isUnSynchronized)
isUnSynchronized
- TRUE indicates that this Blogroll has not yet been
synchronized with the blogroll.public void setUseProxy(boolean useProxy)
useProxy
- public String toCatPath()
public String toCatPath(boolean humanReadable)
humanReadable
- If TRUE, use '>' as separator
private void setUseProxy(Category rssOwlCategory, boolean enabled)
rssOwlCategory
- Current Categoryenabled
- TRUE if proxy should be used
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |