Class 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
    • 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 database
        userProfileWriter - a writer for the userprofile database
        classKeys - the class keys
        bagQueryConfig - configured bag queries used by BagQueryRunner
        oss - summary information for the ObjectStore
        trackerDelegate - the trackers delegate
        linkRedirector - 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.