MCPcopy Create free account
hub / github.com/GateNLP/gate-core / instantiateDataStore

Method instantiateDataStore

src/main/java/gate/Factory.java:848–862  ·  view source on GitHub ↗

Instantiate a DataStore (not open or created).

(String dataStoreClassName,
          String storageUrl)

Source from the content-addressed store, hash-verified

846
847 /** Instantiate a DataStore (not open or created). */
848 protected static DataStore instantiateDataStore(String dataStoreClassName,
849 String storageUrl) throws PersistenceException {
850 DataStore godfreyTheDataStore = null;
851 try {
852 godfreyTheDataStore =
853 (DataStore)Gate.getClassLoader().loadClass(dataStoreClassName)
854 .newInstance();
855 } catch(Exception e) {
856 throw new PersistenceException("Couldn't create DS class: " + e);
857 }
858
859 godfreyTheDataStore.setStorageUrl(storageUrl);
860
861 return godfreyTheDataStore;
862 } // instantiateDS(dataStoreClassName, storageURL)
863
864 /** Add a listener */
865 public static synchronized void addCreoleListener(CreoleListener l) {

Callers 2

openDataStoreMethod · 0.95
createDataStoreMethod · 0.95

Calls 3

getClassLoaderMethod · 0.95
setStorageUrlMethod · 0.95
loadClassMethod · 0.80

Tested by

no test coverage detected