Package org.intermine.api.search
Class GlobalRepository
- java.lang.Object
-
- org.intermine.api.search.SearchRepository
-
- org.intermine.api.search.UserRepository
-
- org.intermine.api.search.GlobalRepository
-
- All Implemented Interfaces:
WebSearchWatcher
public class GlobalRepository extends UserRepository
A representation of an object that knows how to index global objects, and also how to respond to changes to those objects.- Author:
- Alex Kalderimis
-
-
Field Summary
-
Fields inherited from class org.intermine.api.search.SearchRepository
GLOBALS, indexes, profile, searchItems, tagManager
-
-
Constructor Summary
Constructors Constructor Description GlobalRepository(Profile profile)
Build a new global search repository and register it with the list of global repositories available.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteGlobalRepository(Profile userprofile)
java.util.Map<java.lang.String,WebSearchable>
getWebSearchableMap(java.lang.String type)
Get a map from name -> object for all the websearchables of the given type.protected void
handleCreation(CreationEvent e)
Respond in some way to the creation of a web searchable object.protected void
handleMassTagging()
Respond to the fact that multiple tags have been added and that we do not know what they are.protected void
handleTagAddition(TaggingEvent e)
Respond in some way to the addition of a tag to a web searchable object.protected void
handleTagRemoval(TaggingEvent e)
Respond in some way to the removal of a tag from a web searchable object.protected void
populateSearchItems()
Collect the search items we are interested in initially.-
Methods inherited from class org.intermine.api.search.UserRepository
handleDeletion, handlePropertyChange, updateUserRepositoryWithSharedBags
-
Methods inherited from class org.intermine.api.search.SearchRepository
addGlobalRepository, dropIndex, getGlobalSearchRepositories, getGlobalSearchRepository, getProfile, getSearchIndex, getSearchItems, receiveEvent, startListening, stopListening
-
-
-
-
Constructor Detail
-
GlobalRepository
public GlobalRepository(Profile profile)
Build a new global search repository and register it with the list of global repositories available.- Parameters:
profile
- The profile of the user whose items we are to index.
-
-
Method Detail
-
handleCreation
protected void handleCreation(CreationEvent e)
Description copied from class:SearchRepository
Respond in some way to the creation of a web searchable object.- Overrides:
handleCreation
in classUserRepository
- Parameters:
e
- The notification of the change event.
-
handleTagAddition
protected void handleTagAddition(TaggingEvent e)
Description copied from class:SearchRepository
Respond in some way to the addition of a tag to a web searchable object.- Overrides:
handleTagAddition
in classUserRepository
- Parameters:
e
- The notification of the change event.
-
handleTagRemoval
protected void handleTagRemoval(TaggingEvent e)
Description copied from class:SearchRepository
Respond in some way to the removal of a tag from a web searchable object.- Overrides:
handleTagRemoval
in classUserRepository
- Parameters:
e
- The notification of the change event.
-
populateSearchItems
protected void populateSearchItems()
Description copied from class:SearchRepository
Collect the search items we are interested in initially. The profile associated with this repository is a good place to start looking, but each implementation may decide it is interested in a different subset of the available objects.- Overrides:
populateSearchItems
in classUserRepository
-
handleMassTagging
protected void handleMassTagging()
Description copied from class:SearchRepository
Respond to the fact that multiple tags have been added and that we do not know what they are.- Overrides:
handleMassTagging
in classUserRepository
-
getWebSearchableMap
public java.util.Map<java.lang.String,WebSearchable> getWebSearchableMap(java.lang.String type)
Get a map from name -> object for all the websearchables of the given type.- Overrides:
getWebSearchableMap
in classSearchRepository
- Parameters:
type
- A valid TagType.- Returns:
- A new unmodifiable map containing the requested information.
-
deleteGlobalRepository
public void deleteGlobalRepository(Profile userprofile)
- Parameters:
userprofile
- user profile
-
-