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

Method createDataStore

src/main/java/gate/Factory.java:834–845  ·  view source on GitHub ↗

Create a new DataStore and open it. NOTE: for some data stores creation is an system administrator task; in such cases this method will throw an UnsupportedOperationException.

(String dataStoreClassName,
          String storageUrl)

Source from the content-addressed store, hash-verified

832 * method will throw an UnsupportedOperationException.
833 */
834 public static DataStore createDataStore(String dataStoreClassName,
835 String storageUrl) throws PersistenceException,
836 UnsupportedOperationException {
837 DataStore ds = instantiateDataStore(dataStoreClassName, storageUrl);
838 ds.create();
839 ds.open();
840 if(Gate.getDataStoreRegister().add(ds))
841 creoleProxy.fireDatastoreCreated(new CreoleEvent(ds,
842 CreoleEvent.DATASTORE_CREATED));
843
844 return ds;
845 } // createDataStore()
846
847 /** Instantiate a DataStore (not open or created). */
848 protected static DataStore instantiateDataStore(String dataStoreClassName,

Callers 4

testSimpleMethod · 0.95
testDSRMethod · 0.95
createSerialDataStoreMethod · 0.95

Calls 6

instantiateDataStoreMethod · 0.95
createMethod · 0.95
openMethod · 0.95
getDataStoreRegisterMethod · 0.95
addMethod · 0.65
fireDatastoreCreatedMethod · 0.45

Tested by 2

testSimpleMethod · 0.76
testDSRMethod · 0.76