Package org.intermine.api.search
Class SearchFilterEngine
- java.lang.Object
-
- org.intermine.api.search.SearchFilterEngine
-
public class SearchFilterEngine extends java.lang.Object
Class filtering web searchables according to the associated tags.- Author:
- Jakub Kulaviak
-
-
Constructor Summary
Constructors Constructor Description SearchFilterEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <W extends WebSearchable>
java.util.Map<java.lang.String,W>filterByTags(java.util.Map<java.lang.String,W> webSearchables, java.util.List<java.lang.String> tagNames, java.lang.String tagType, java.lang.String userName, TagManager tagManager)
Given a Map from name to WebSearchable, return a Map that contains only those name, WebSearchable pairs where the name is tagged with all of the tags listed.<W extends WebSearchable>
java.util.Map<java.lang.String,W>filterByTags(java.util.Map<java.lang.String,W> webSearchables, java.util.List<java.lang.String> tagNames, java.lang.String tagType, java.lang.String userName, TagManager tagManager, boolean showHidden)
Given a Map from name to WebSearchable, return a Map that contains only those name, WebSearchable pairs where the name is tagged with all of the tags listed.
-
-
-
Method Detail
-
filterByTags
public <W extends WebSearchable> java.util.Map<java.lang.String,W> filterByTags(java.util.Map<java.lang.String,W> webSearchables, java.util.List<java.lang.String> tagNames, java.lang.String tagType, java.lang.String userName, TagManager tagManager)
Given a Map from name to WebSearchable, return a Map that contains only those name, WebSearchable pairs where the name is tagged with all of the tags listed.- Type Parameters:
W
- the type of WebSearchable- Parameters:
webSearchables
- the Map to filtertagNames
- the tag names to use for filteringtagType
- the tag type (from TagTypes)userName
- the user name to pass to getTags()tagManager
- tag manager used for obtaining tags- Returns:
- the filtered Map
-
filterByTags
public <W extends WebSearchable> java.util.Map<java.lang.String,W> filterByTags(java.util.Map<java.lang.String,W> webSearchables, java.util.List<java.lang.String> tagNames, java.lang.String tagType, java.lang.String userName, TagManager tagManager, boolean showHidden)
Given a Map from name to WebSearchable, return a Map that contains only those name, WebSearchable pairs where the name is tagged with all of the tags listed.- Type Parameters:
W
- the type of WebSearchable- Parameters:
webSearchables
- the Map to filtertagNames
- the tag names to use for filteringtagType
- the tag type (from TagTypes)userName
- the user name to pass to getTags()tagManager
- tag manager used for obtaining tagsshowHidden
- whether or not to filter out objects tagged with hidden tag- Returns:
- the filtered Map
-
-