Package org.jamesii.core.data.experiment

Examples of org.jamesii.core.data.experiment.ExperimentInfo


    return new ExperimentSuiteFileReaderWriter();
  }

  @Override
  public int supportsParameters(ParameterBlock params) {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(params,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    if (expInfo != null && expInfo.getIdent() != null
        && expInfo.getIdent().toString().endsWith(".exp")
        && expInfo.getDataBase() == null) {
      return 5;
    }
    return 0;
  }
View Full Code Here


   *           the exception
   */
  public void testExperimentInfo() throws Exception {
    Serializable expid =
        getDataStorage().setExperimentID(UniqueIDGenerator.createUniqueID());
    ExperimentInfo ei1 = new ExperimentInfo(new URI("uri1"), new URI("uri2"));
    ei1.setDescription("nappinappiger nappinap");
    getDataStorage().writeExperimentInformation(expid, ei1);
    ExperimentInfo ei2 = getDataStorage().getExperimentInformation(expid);
    // go through the attributes of the experiment items:
    assertEquals(ei1.getDataBase(), ei2.getDataBase());
    assertEquals(ei1.getDescription(), ei2.getDescription());
    assertEquals(ei1.getIdent(), ei2.getIdent());
    // now let's have a look on ExperimentItems being null:
    expid =
        getDataStorage().setExperimentID(UniqueIDGenerator.createUniqueID());
    getDataStorage().writeExperimentInformation(expid, null);
    assertNull(getDataStorage().getExperimentInformation(expid));
View Full Code Here

    File file = new File(path);
    if (file != null && (!file.exists() || file.canWrite())) {
      // get an ExperimentWriter from a factory
      ParameterBlock parameter =
          new ParameterBlock(new ExperimentInfo(file.toURI(), null),
              AbstractExperimentReaderFactory.EXPERIMENT_INFO);

      ExperimentWriterFactory erwf =
          SimSystem.getRegistry().getFactory(
              AbstractExperimentWriterFactory.class, parameter);
View Full Code Here

    return false;
  }

  @Override
  public int supportsParameters(ParameterBlock params) {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(params,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    try {
      if (expInfo != null
          && expInfo.getIdent() != null
          && supportsURI(Files.getURIFromFile(new File(expInfo.getIdent()
              .toString()))) && expInfo.getDataBase() == null) {
        return 5;
      }
    } catch (Exception e) {
    }
    return 0;
View Full Code Here

    return false;
  }

  @Override
  public int supportsParameters(ParameterBlock params) {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(params,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    try {
      if (expInfo != null
          && expInfo.getIdent() != null
          && supportsURI(Files.getURIFromFile(new File(expInfo.getIdent()
              .toString()))) && expInfo.getDataBase() == null) {
        return 5;
      }
    } catch (Exception e) {
    }
    return 0;
View Full Code Here

  @Override
  @SuppressWarnings("unchecked")
  public <E extends BaseExperiment> ExperimentSuite<E> readExperimentSuite(
      Class<E> expType, ParameterBlock param) throws IOException {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(param,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    return (ExperimentSuite<E>) Files.load(Files.getFileFromURI(
        expInfo.getIdent()).getAbsolutePath());
  }
View Full Code Here

  @Override
  public <E extends BaseExperiment> void writeExperimentSuite(
      ParameterBlock param, ExperimentSuite<E> experimentSuite)
      throws IOException {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(param,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    Files.save(experimentSuite, Files.getFileFromURI(expInfo.getIdent())
        .getAbsolutePath());
  }
View Full Code Here

    return false;
  }

  @Override
  public int supportsParameters(ParameterBlock params) {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(params,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    try {
      if (expInfo != null
          && expInfo.getIdent() != null
          && supportsURI(Files.getURIFromFile(new File(expInfo.getIdent()
              .toString()))) && expInfo.getDataBase() == null) {
        return 5;
      }
    } catch (Exception e) {
      SimSystem.report(e);
    }
View Full Code Here

   * @throws IOException
   *           will be thrown if opening fails
   */
  public void openExperiment(URI expURI) throws IOException {
    ParameterBlock aerwfp =
        new ParameterBlock(new ExperimentInfo(expURI, null),
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);
    ExperimentReaderFactory erwf =
        SimSystem.getRegistry().getFactory(
            AbstractExperimentReaderFactory.class, aerwfp);
    openExperiment(erwf, aerwfp);
View Full Code Here

    return false;
  }

  @Override
  public int supportsParameters(ParameterBlock params) {
    ExperimentInfo expInfo =
        ParameterBlocks.getSubBlockValue(params,
            AbstractExperimentReaderFactory.EXPERIMENT_INFO);

    try {
      if (expInfo != null
          && expInfo.getIdent() != null
          && supportsURI(Files.getURIFromFile(new File(expInfo.getIdent()
              .toString()))) && expInfo.getDataBase() == null) {
        return 5;
      }
    } catch (URISyntaxException e) {
      SimSystem.report(e);
    }
View Full Code Here

TOP

Related Classes of org.jamesii.core.data.experiment.ExperimentInfo

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.