org.tcat.citd.sim.udig.bookmarks
Class BookmarkManager

java.lang.Object
  extended by org.tcat.citd.sim.udig.bookmarks.BookmarkManager

public class BookmarkManager
extends java.lang.Object

This class provides a bookmark repository and associated management functions.

Since:
1.0.0
Author:
cole.markham

Constructor Summary
BookmarkManager()
           
 
Method Summary
 void addBookmark(Bookmark bookmark)
          Add the given bookmark.
 void empty()
          Empties the list of bookmarks
 java.util.Collection<Bookmark> getBookmarks(MapReference map)
          Return the list of bookmarks associated with the specified map
 MapReference getMapReference(IMap map)
           
 java.util.Collection<MapReference> getMaps(URI project)
          Returns the list of maps which are contained in the specified project
 java.lang.String getName()
          Get the name of this bookmark manager for display It's just a static string for now
 java.util.Collection<URI> getProjects()
          Returns the list of projects as an array of objects
 boolean isEmpty()
          Returns whether the list is empty
 void removeBookmark(Bookmark bookmark)
          Remove the given bookmark.
 void removeBookmarks(java.util.Collection elements)
          Remove all of the bookmarks in the given list.
 void removeMap(MapReference map)
          Remove the map and all it's associated bookmarks
 void removeMaps(java.util.Collection elements)
          Remove all of the maps in the given list and their associated bookmarks.
 void removeProject(URI project)
          Remove the project and all it's associated maps and bookmarks
 void removeProjects(java.util.Collection elements)
          Remove all of the projects in the given list and their associated maps and bookmarks.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BookmarkManager

public BookmarkManager()
Method Detail

addBookmark

public void addBookmark(Bookmark bookmark)
Add the given bookmark.

Parameters:
bookmark -

empty

public void empty()
Empties the list of bookmarks


isEmpty

public boolean isEmpty()
Returns whether the list is empty

Returns:
whether this list is empty

getProjects

public java.util.Collection<URI> getProjects()
Returns the list of projects as an array of objects

Returns:
array of IProject objects

getMaps

public java.util.Collection<MapReference> getMaps(URI project)
Returns the list of maps which are contained in the specified project

Parameters:
project - The project for which the maps will be returned
Returns:
array of MapReference objects

getBookmarks

public java.util.Collection<Bookmark> getBookmarks(MapReference map)
Return the list of bookmarks associated with the specified map

Parameters:
map - The map for which the bookmarks will be returned
Returns:
A vector of Bookmark objects

getName

public java.lang.String getName()
Get the name of this bookmark manager for display It's just a static string for now

Returns:
the name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

removeBookmark

public void removeBookmark(Bookmark bookmark)
Remove the given bookmark.

Parameters:
bookmark -

removeBookmarks

public void removeBookmarks(java.util.Collection elements)
Remove all of the bookmarks in the given list.

Parameters:
elements -

removeMap

public void removeMap(MapReference map)
Remove the map and all it's associated bookmarks

Parameters:
map -

removeMaps

public void removeMaps(java.util.Collection elements)
Remove all of the maps in the given list and their associated bookmarks.

Parameters:
elements -

removeProject

public void removeProject(URI project)
Remove the project and all it's associated maps and bookmarks

Parameters:
project -

removeProjects

public void removeProjects(java.util.Collection elements)
Remove all of the projects in the given list and their associated maps and bookmarks.

Parameters:
elements -

getMapReference

public MapReference getMapReference(IMap map)
Parameters:
map -
Returns:
the MapReference singleton for the given IMap