Class ModelService


  • public class ModelService
    extends Service
    This class represents a connection to the RESTful resource on an InterMine server which provides information about the service's data model. This is a structure which is serialised and transmitted in XML, and contains information about the tables within the database in a highly abstract manner. The data model is required for constructing queries with, in order to validate them appropriately.
    See Also:
    Model, PathQuery, QueryService
    • Constructor Detail

      • ModelService

        public ModelService​(java.lang.String rootUrl,
                            java.lang.String applicationName)
        Please do not instantiate this class yourself directly - instead use the ServiceFactory - this will ensure maintainability of your code.
        Parameters:
        rootUrl - root URL
        applicationName - application name
    • Method Detail

      • getModel

        public org.intermine.metadata.Model getModel()
        Returns the model used by the InterMine instance which the service is connected to.
        Returns:
        model
      • clearCache

        public void clearCache()
        Description copied from class: Service
        Clear the cache on this object. You might find this useful if you have a persistent application with long-lived instances of this class (more than 24 hours or so). You may wish in such circumstances to periodically clear the cache to avoid stale data.
        Overrides:
        clearCache in class Service
      • getModelXml

        protected java.lang.String getModelXml()
        An method used internally to fetch the XML for the model from the server.
        Returns:
        the serialised representation of the data model.