Package org.intermine.api
Class InterMineAPI
- java.lang.Object
-
- org.intermine.api.InterMineAPI
-
public class InterMineAPI extends java.lang.Object
InterMineAPI provides access to manager objects for the main parts of an InterMine application: the production ObjectStore, the userprofile (via ProfileManager), template queries, bags and tags. There should be one InterMineAPI object per application.- Author:
- Richard Smith
-
-
Field Summary
Fields Modifier and Type Field Description protected BagManager
bagManager
protected BagQueryConfig
bagQueryConfig
protected BagQueryRunner
bagQueryRunner
protected ClassKeys
classKeys
protected FriendlyMineManager
friendlyMineManager
protected LinkRedirectManager
linkRedirector
protected Model
model
protected ObjectStore
objectStore
protected ObjectStoreSummary
oss
protected ProfileManager
profileManager
protected QueryStore
queryStore
protected TemplateManager
templateManager
protected TemplateSummariser
templateSummariser
protected TrackerDelegate
trackerDelegate
-
Constructor Summary
Constructors Modifier Constructor Description protected
InterMineAPI()
Protected no-argument constructor only used for building test implementations of this class.InterMineAPI(ObjectStore objectStore, ObjectStoreWriter userProfileWriter, ClassKeys classKeys, BagQueryConfig bagQueryConfig, ObjectStoreSummary oss, TrackerDelegate trackerDelegate, LinkRedirectManager linkRedirector)
Construct an InterMine API object.
-
Method Summary
-
-
-
Field Detail
-
objectStore
protected ObjectStore objectStore
-
model
protected Model model
-
classKeys
protected ClassKeys classKeys
-
bagQueryConfig
protected BagQueryConfig bagQueryConfig
-
profileManager
protected ProfileManager profileManager
-
templateManager
protected TemplateManager templateManager
-
bagManager
protected BagManager bagManager
-
templateSummariser
protected TemplateSummariser templateSummariser
-
oss
protected ObjectStoreSummary oss
-
bagQueryRunner
protected BagQueryRunner bagQueryRunner
-
trackerDelegate
protected TrackerDelegate trackerDelegate
-
linkRedirector
protected LinkRedirectManager linkRedirector
-
friendlyMineManager
protected FriendlyMineManager friendlyMineManager
-
queryStore
protected QueryStore queryStore
-
-
Constructor Detail
-
InterMineAPI
protected InterMineAPI()
Protected no-argument constructor only used for building test implementations of this class.
-
InterMineAPI
public InterMineAPI(ObjectStore objectStore, ObjectStoreWriter userProfileWriter, ClassKeys classKeys, BagQueryConfig bagQueryConfig, ObjectStoreSummary oss, TrackerDelegate trackerDelegate, LinkRedirectManager linkRedirector)
Construct an InterMine API object.- Parameters:
objectStore
- the production databaseuserProfileWriter
- a writer for the userprofile databaseclassKeys
- the class keysbagQueryConfig
- configured bag queries used by BagQueryRunneross
- summary information for the ObjectStoretrackerDelegate
- the trackers delegatelinkRedirector
- class that builds URLs that replace report links
-
-
Method Detail
-
initUserProfileResources
protected void initUserProfileResources(ObjectStoreWriter userProfileWriter)
Initialise parts of this object that require connection to a user-profile object store.- Parameters:
userProfileWriter
- The object store for the users and their stuff.
-
getObjectStore
public ObjectStore getObjectStore()
- Returns:
- the objectStore
-
getUserProfile
public ObjectStoreWriter getUserProfile()
- Returns:
- The ObjectStore that represents a connection to the userprofile store.
-
getModel
public Model getModel()
- Returns:
- the model
-
getProfileManager
public ProfileManager getProfileManager()
- Returns:
- the profileManager
-
getTemplateManager
public TemplateManager getTemplateManager()
- Returns:
- the templateManager
-
getBagManager
public BagManager getBagManager()
- Returns:
- the bagManager
-
getTagManager
public TagManager getTagManager()
- Returns:
- the TagManager
-
getTemplateSummariser
public TemplateSummariser getTemplateSummariser()
- Returns:
- the templateSummariser
-
getWebResultsExecutor
public WebResultsExecutor getWebResultsExecutor(Profile profile)
- Parameters:
profile
- the user that is executing the query- Returns:
- the webResultsExecutor
-
getPathQueryExecutor
public PathQueryExecutor getPathQueryExecutor()
- Returns:
- the pathQueryExecutor
-
getPathQueryExecutor
public PathQueryExecutor getPathQueryExecutor(Profile profile)
- Parameters:
profile
- the user that is executing the query- Returns:
- the pathQueryExecutor
-
getBagQueryRunner
public BagQueryRunner getBagQueryRunner()
The bag-query runner is the object that performs look-up queries used when constructing bags from lists of identifiers, and in path-queries when LOOKUP constraints are used.- Returns:
- the bagQueryRunner
-
getObjectStoreSummary
public ObjectStoreSummary getObjectStoreSummary()
- Returns:
- the oss
-
getClassKeys
public ClassKeys getClassKeys()
The class keys are the list of fields used to identify objects in the data base, so for Employee it would include "name", and for Gene it would include "symbol".- Returns:
- the classKeys
-
getBagQueryConfig
public BagQueryConfig getBagQueryConfig()
- Returns:
- the bagQueryConfig
-
getTrackerDelegate
public TrackerDelegate getTrackerDelegate()
- Returns:
- the trackers delegate
-
getLinkRedirector
public LinkRedirectManager getLinkRedirector()
- Returns:
- the linkRedirector The Link-Redirector generates links to objects within the database. If an external redirect has been configured, then a non-null string will be generated.
-
getQueryStore
public QueryStore getQueryStore()
- Returns:
- The query store, which associates queries to ids.
-
-