Package org.cytoscape.property.bookmark
Interface BookmarksUtil
public interface BookmarksUtil
A set of utility methods to manipulate the bookmarks.
Module: property-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>property-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsBookmarks(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)
Check if a bookmark is in the bookmarks.boolean
deleteBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)
Delete a bookmark (pDataSource) from the category (pCategoryName) in the bookmarks object (pBookmarks)getAttribute(org.cytoscape.property.bookmark.DataSource source, String attrName)
Given the attribute name, return the value in a bookmarkorg.cytoscape.property.bookmark.Category
getCategory(String categoryName, List<org.cytoscape.property.bookmark.Category> categoryList)
Select specific category from a list of categories.List<org.cytoscape.property.bookmark.DataSource>
getDataSourceList(String categoryName, List<org.cytoscape.property.bookmark.Category> categoryList)
Traverse bookmark tree and get a list of data sources from the specified category.getProvider(org.cytoscape.property.bookmark.DataSource pDataSource)
Get the provider name from DataSource objectvoid
saveBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)
Store a bookmark object in bookmarks objectvoid
saveBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource, String pProvider)
Store a bookmark object in bookmarks object
-
Method Details
-
getDataSourceList
List<org.cytoscape.property.bookmark.DataSource> getDataSourceList(String categoryName, List<org.cytoscape.property.bookmark.Category> categoryList)Traverse bookmark tree and get a list of data sources from the specified category.- Parameters:
categoryName
- the specified category to get a list of data sources from.categoryList
- the list of categories to traverse for the specified category.- Returns:
- a list of data sources from the specified category.
-
getCategory
org.cytoscape.property.bookmark.Category getCategory(String categoryName, List<org.cytoscape.property.bookmark.Category> categoryList)Select specific category from a list of categories.- Parameters:
categoryName
- the category to select.categoryList
- the list of categories to select from.- Returns:
- the
Category
that was selected.
-
getAttribute
Given the attribute name, return the value in a bookmark- Parameters:
source
- a bookmark objectattrName
- an attribute name- Returns:
- The value related to the attribute name
-
saveBookmark
void saveBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)Store a bookmark object in bookmarks object- Parameters:
pBookmarks
- bookmarks objectpCategoryName
- category namepDataSource
- a single bookmark
-
saveBookmark
void saveBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource, String pProvider)Store a bookmark object in bookmarks object- Parameters:
pBookmarks
- bookmarks objectpCategoryName
- category namepDataSource
- a single bookmarkpProvider
- the name of provider
-
deleteBookmark
boolean deleteBookmark(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)Delete a bookmark (pDataSource) from the category (pCategoryName) in the bookmarks object (pBookmarks)- Parameters:
pBookmarks
- Bookmark object, which hold a set of bookmarkpCategoryName
- category namepDataSource
- a single bookmark object- Returns:
- True if the bookmark is deleted successfully, False otherwise.
-
containsBookmarks
boolean containsBookmarks(org.cytoscape.property.bookmark.Bookmarks pBookmarks, String pCategoryName, org.cytoscape.property.bookmark.DataSource pDataSource)Check if a bookmark is in the bookmarks.- Parameters:
pBookmarks
- bookmarks objectpCategoryName
- category namepDataSource
- a bookmark- Returns:
- True if the bookmark is in bookmarks, False otherwise
-
getProvider
Get the provider name from DataSource object- Parameters:
pDataSource
- a single bookmark
-