Cytoscape 2.8.0 API

cytoscape.util
Class BookmarksUtil

java.lang.Object
  extended by cytoscape.util.BookmarksUtil

public abstract class BookmarksUtil
extends Object

Utility methods for getting entries in the bookmark object.

Author:
kono

Field Summary
protected static CyLogger logger
           
 
Constructor Summary
BookmarksUtil()
           
 
Method Summary
static boolean deleteBookmark(Bookmarks pBookmarks, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
static boolean deleteBookmark(String filename, Bookmarks pBookmarks, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
static String getAttribute(DataSource source, String attrName)
          DOCUMENT ME!
static Bookmarks getBookmarks(File pBookmarkFile)
          DOCUMENT ME!
static Bookmarks getBookmarks(URL bookmarkUrl)
          DOCUMENT ME!
static Category getCategory(String categoryName, List<Category> categoryList)
          Select specific category from a list of categories.
static List<DataSource> getDataSourceList(String categoryName, List<Category> categoryList)
          Traverse bookmark tree and get a list of data sources from the specified category.
static boolean isInBookmarks(Bookmarks pBookmarks, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
static boolean isInBookmarks(URL pBookmarkURL, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
static boolean saveBookmark(Bookmarks pBookmarks, File pFile)
          Write the bookmarks object into a file
static boolean saveBookmark(Bookmarks pBookmarks, OutputStream os)
          Write the bookmarks object into an outputstream
static void saveBookmark(Bookmarks pBookmarks, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
static void saveBookmark(Bookmarks pBookmarks, String pCategoryName, DataSource pDataSource, FileOutputStream pFos)
          DOCUMENT ME!
static boolean saveBookmark(URL pBookmarkURL, String pCategoryName, DataSource pDataSource)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static CyLogger logger
Constructor Detail

BookmarksUtil

public BookmarksUtil()
Method Detail

getDataSourceList

public static List<DataSource> getDataSourceList(String categoryName,
                                                 List<Category> categoryList)
Traverse bookmark tree and get a list of data sources from the specified category.

Parameters:
categoryName -
Returns:

getCategory

public static Category getCategory(String categoryName,
                                   List<Category> categoryList)
Select specific category from a list of categories.

Parameters:
categoryName -
categoryList -
Returns:

getAttribute

public static String getAttribute(DataSource source,
                                  String attrName)
DOCUMENT ME!

Parameters:
source - DOCUMENT ME!
attrName - DOCUMENT ME!
Returns:
DOCUMENT ME!

getBookmarks

public static Bookmarks getBookmarks(URL bookmarkUrl)
                              throws JAXBException,
                                     IOException
DOCUMENT ME!

Parameters:
bookmarkUrl - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
JAXBException - DOCUMENT ME!
IOException - DOCUMENT ME!

getBookmarks

public static Bookmarks getBookmarks(File pBookmarkFile)
DOCUMENT ME!

Parameters:
pBookmarkFile - DOCUMENT ME!
Returns:
DOCUMENT ME!

saveBookmark

public static void saveBookmark(Bookmarks pBookmarks,
                                String pCategoryName,
                                DataSource pDataSource,
                                FileOutputStream pFos)
                         throws JAXBException,
                                IOException
DOCUMENT ME!

Parameters:
pBookmarks - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
pFos - DOCUMENT ME!
Throws:
JAXBException - DOCUMENT ME!
IOException - DOCUMENT ME!

saveBookmark

public static boolean saveBookmark(URL pBookmarkURL,
                                   String pCategoryName,
                                   DataSource pDataSource)
DOCUMENT ME!

Parameters:
pBookmarkURL - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

saveBookmark

public static boolean saveBookmark(Bookmarks pBookmarks,
                                   File pFile)
Write the bookmarks object into a file

Parameters:
pBookmarks - DOCUMENT ME!
pFile - DOCUMENT ME!
Returns:
DOCUMENT ME!

saveBookmark

public static boolean saveBookmark(Bookmarks pBookmarks,
                                   OutputStream os)
Write the bookmarks object into an outputstream

Parameters:
pBookmarks - DOCUMENT ME!
os - DOCUMENT ME!
Returns:
DOCUMENT ME!

saveBookmark

public static void saveBookmark(Bookmarks pBookmarks,
                                String pCategoryName,
                                DataSource pDataSource)
DOCUMENT ME!

Parameters:
pBookmarks - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!

deleteBookmark

public static boolean deleteBookmark(String filename,
                                     Bookmarks pBookmarks,
                                     String pCategoryName,
                                     DataSource pDataSource)
DOCUMENT ME!

Parameters:
filename - DOCUMENT ME!
pBookmarks - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

deleteBookmark

public static boolean deleteBookmark(Bookmarks pBookmarks,
                                     String pCategoryName,
                                     DataSource pDataSource)
DOCUMENT ME!

Parameters:
pBookmarks - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

isInBookmarks

public static boolean isInBookmarks(Bookmarks pBookmarks,
                                    String pCategoryName,
                                    DataSource pDataSource)
DOCUMENT ME!

Parameters:
pBookmarks - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

isInBookmarks

public static boolean isInBookmarks(URL pBookmarkURL,
                                    String pCategoryName,
                                    DataSource pDataSource)
DOCUMENT ME!

Parameters:
pBookmarkURL - DOCUMENT ME!
pCategoryName - DOCUMENT ME!
pDataSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.