Package org.jamesii.core.data.storage.plugintype

Examples of org.jamesii.core.data.storage.plugintype.DataStorageFactory


    init();
  }

  private void init() {
    if (dsFactory != null && dsParameters != null) {
      DataStorageFactory dsf = null;
      try {
        dsf = dsFactory.newInstance();
      } catch (Exception ex) {
        throw new IllegalArgumentException(ex);
      }
      dataStorage = dsf.create(dsParameters, SimSystem.getRegistry().createContext());
    }
  }
View Full Code Here


      if (taskID == null) {
        throw new IllegalArgumentException("UID must not be null.");
      }

      // Instantiate factory
      DataStorageFactory dsFactory =
          SimSystem.getRegistry().instantiateFactory(dataStorageFactoryClass);

      // If data storage factory could be instantiated, use it to create a data
      // storage
      if (dsFactory != null) {
        IDataStorage dataStorage = dsFactory.create(dataStorageParameters, SimSystem.getRegistry().createContext());
        dataStorage.setExperimentID(experimentID);
        dataStorage.setConfigurationID(experimentID, configurationID);
        dataStorage.setComputationTaskID(experimentID, configurationID,
            taskID.getId());
        return dataStorage;
View Full Code Here

  protected void prepopulatePage(IWizard wizard) {
    // TODO Auto-generated method stub
    page.removeAll();

    // read params for data sink and selected factory
    DataStorageFactory oldFactory = wizard.getValue(DATASINK_FACTORY);
    ParameterBlock params = wizard.getValue(DATASINK_PARAMETERS);

    List<DataStorageFactory> choosableFactories = new ArrayList<>();
    try {
      // now get available factories
View Full Code Here

  @Override
  public void finish(IWizard wizard) {
    BaseExperiment exp = wizard.getValue(ExperimentSetup.EXPERIMENT);

    // add data sink setup
    DataStorageFactory dsf = wizard.getValue(DataSinkSetup.DATASINK_FACTORY);
    ParameterBlock block = wizard.getValue(DataSinkSetup.DATASINK_PARAMETERS);
    if (dsf != null) {
      exp.setDataStorageFactory(new ParameterizedFactory<>(
          dsf, block));
    }
View Full Code Here

      return;
    }

    Class<? extends DataStorageFactory> facClass = rI.getDataStorageFactory();

    DataStorageFactory dsf = null;

    try {
      dsf = facClass.newInstance();
    } catch (InstantiationException | IllegalAccessException ex) {
      throw new DatabaseCreationException(ex);
    }

    storage = dsf.create(rI.getDataStorageParams(), SimSystem.getRegistry().createContext());
    storage.setExperimentID(rI.getExpID());
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.data.storage.plugintype.DataStorageFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.