org.intermine.api.bag
Class BagQueryRunner
java.lang.Object
org.intermine.api.bag.BagQueryRunner
public class BagQueryRunner
- extends java.lang.Object
For a given list of input strings search for objects using default and configured queries for a
particular type.
|
Method Summary |
BagQueryResult |
searchForBag(java.lang.String type,
java.util.List<java.lang.String> input,
java.lang.String extraFieldValue,
boolean doWildcards)
Given an input list of string identifiers search for corresponding objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BagQueryRunner
public BagQueryRunner(ObjectStore os,
java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys,
BagQueryConfig bagQueryConfig,
java.util.List<TemplateQuery> conversionTemplates)
- Construct with configured bag queries and a map of type -> key fields.
- Parameters:
os - the ObjectStore to run queries onclassKeys - the class keys MapbagQueryConfig - the configuration for running queriesconversionTemplates - a list of template queries to be used when type converting results
searchForBag
public BagQueryResult searchForBag(java.lang.String type,
java.util.List<java.lang.String> input,
java.lang.String extraFieldValue,
boolean doWildcards)
throws java.lang.ClassNotFoundException,
InterMineException
- Given an input list of string identifiers search for corresponding objects. First run a
default query then any queries configured for the specified type.
- Parameters:
type - an unqualified class name to search for objectsinput - a list of strings to queryextraFieldValue - the value used when adding an extra constraint to the bag query,
configured in BagQueryConfig (e.g. if connectField is "organism", the extraClassName is
"Organism" and the constrainField is "name", the extraFieldValue might be "Drosophila
melanogaster")doWildcards - true if the strings should be evaluated as wildcards
- Returns:
- the matches, issues and unresolved input
- Throws:
java.lang.ClassNotFoundException - if the type isn't in the model
InterMineException - if there is any other exception