Package org.intermine.client.services
Class ModelService
- java.lang.Object
-
- org.intermine.client.core.Service
-
- org.intermine.client.services.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
-
-
Field Summary
-
Fields inherited from class org.intermine.client.core.Service
resourceUrl, VERSION
-
-
Constructor Summary
Constructors Constructor Description ModelService(java.lang.String rootUrl, java.lang.String applicationName)Please do not instantiate this class yourself directly - instead use theServiceFactory- this will ensure maintainability of your code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache()Clear the cache on this object.org.intermine.metadata.ModelgetModel()Returns the model used by the InterMine instance which the service is connected to.protected java.lang.StringgetModelXml()An method used internally to fetch the XML for the model from the server.-
Methods inherited from class org.intermine.client.core.Service
assureOutputFormatSpecified, createGetRequest, createPostRequest, executeRequest, getAPIVersion, getApplicationName, getFactory, getIntResponse, getRootUrl, getStringResponse, getUrl, getVersion, setAuthentication, setAuthentication, setConnectionTimeout, setFactory
-
-
-
-
Constructor Detail
-
ModelService
public ModelService(java.lang.String rootUrl, java.lang.String applicationName)Please do not instantiate this class yourself directly - instead use theServiceFactory- this will ensure maintainability of your code.- Parameters:
rootUrl- root URLapplicationName- 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:ServiceClear 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:
clearCachein classService
-
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.
-
-