Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


      setFactories(factories, factories.get(0), null);
    }
  }

  protected final List<ComputationTaskStopPolicyFactory<?>> getFactories() {
    ParameterBlock block = new ParameterBlock();
    try {
      return SimSystem.getRegistry().getFactoryList(
          AbstractComputationTaskStopPolicyFactory.class, block);
    } catch (Exception e) {
      SimSystem.report(e);
View Full Code Here


      setFactories(factories, factories.get(0), null);
    }
  }

  protected List<RepCriterionFactory> getFactories() {
    ParameterBlock block = new ParameterBlock();
    List<RepCriterionFactory> factoryList = null;
    try {
      factoryList =
          SimSystem.getRegistry().getFactoryList(
              AbstractRepCriterionFactory.class, block);
View Full Code Here

    experiment = wizard.getValue(EXPERIMENT);
    if (experiment == null) {
      wizard.putValue(EXPERIMENT, experiment = new BaseExperiment());
    }

    ParameterBlock params =
        new ParameterBlock(model, ExperimentSetupEditorFactory.MODEL);

    page.removeAll();
    editor = experimentFactory.create(params, SimSystem.getRegistry().createContext());
    editor.setupFromExperiment(experiment);
    for (int i = 0; i < editor.getPageCount(); i++) {
View Full Code Here

    // read already selected factory
    ModelInstrumenterFactory mf = wizard.getValue(MODEL_INSTRUMENTER_FACTORY);
    ComputationInstrumenterFactory sf =
        wizard.getValue(SIMULATION_INSTRUMENTER_FACTORY);
    // read already selected parameters
    ParameterBlock mBlock = wizard.getValue(MODEL_INSTRUMENTER_PARAMETERS);
    ParameterBlock sBlock = wizard.getValue(SIMULATION_INSTRUMENTER_PARAMETERS);

    List<ModelInstrumenterFactory> mFactories = new ArrayList<>();
    List<ComputationInstrumenterFactory> sFactories = new ArrayList<>();
    try {
      ParameterBlock block =
          new ParameterBlock(wizard.getValue(ModelLoader.MODEL_URI),
              AbstractModelInstrumenterFactory.MODELURI);

      mFactories =
          SimSystem.getRegistry().getFactoryOrEmptyList(
              AbstractModelInstrumenterFactory.class, block);

      block =
          new ParameterBlock(wizard.getValue(ModelLoader.MODEL_URI),
              AbstractComputationInstrumenterFactory.MODELURI);
      sFactories =
          SimSystem.getRegistry().getFactoryOrEmptyList(
              AbstractComputationInstrumenterFactory.class, block);
    } catch (Exception e) {
View Full Code Here

      try {
        DataResilienceFactory factory =
            SimSystem.getRegistry().getFactory(
                AbstractDataResilienceFactory.class, null);

        ParameterBlock parameter = new ParameterBlock();
        parameter.addSubBlock(DataResilienceFactory.USER, "root");
        parameter.addSubBlock(DataResilienceFactory.PASSWORD, "");
        parameter.addSubBlock(DataResilienceFactory.DRIVER, "com.mysql.jdbc.Driver");
        parameter.addSubBlock(DataResilienceFactory.DATABASEURL,
            "jdbc:mysql://localhost/test");
        setDataStorage(factory.create(parameter, SimSystem.getRegistry().createContext()));
      } catch (Exception ex) {
        SimSystem.report(Level.SEVERE,
            "It was not possible to establish the Resilience data connection! "
View Full Code Here

    List<Factory> concrfFClasses = new ArrayList<>();
    concrfFClasses.add(concreteFactory);
    return (FactoryParameterDialogFactory<F, CF, AF>) SimSystem.getRegistry()
        .getFactory(
            AbstractFactoryParameterDialogFactory.class,
            (new ParameterBlock()).addSubBl(
                AbstractFactoryParameterDialogFactory.ABSTRACT_FACTORY_CLASS,
                SimSystem.getRegistry().getAbstractFactoryForBaseFactory(
                    factoryClass)).addSubBl(
                AbstractFactoryParameterDialogFactory.CONCRETE_FACTORIES,
                concrfFClasses));
View Full Code Here

    if (taskFactories == null) {
      taskFactories = new ArrayList<>();
    }

    ParameterBlock params = new ParameterBlock();

    for (AutoTaskFactory f : taskFactories) {
      try {
        IAutoTask autoTask = f.create(params, SimSystem.getRegistry().createContext());
        if (autoTask != null) {
View Full Code Here

    }

    // Get filtered algorithms for each task at first
    try {

      ParameterBlock maParameters =
          ParameterBlocks.getSBOrEmpty(parameters,
              ModelAnalyzerFactory.class.getName()).addSubBl(
              AbstractModelAnalyzerFactory.MODEL, model);
      modelAnalyzerFactories =
          SimSystem.getRegistry().getFactoryList(
              AbstractModelAnalyzerFactory.class, maParameters);

      ParameterBlock iaParameters =
          ParameterBlocks.getSBOrEmpty(parameters,
              InfrastructureAnalyzerFactory.class.getName());
      infrastructAnalysisFactories =
          SimSystem.getRegistry().getFactoryList(
              AbstractInfrastructureAnalyzerFactory.class, iaParameters);

      ParameterBlock partParameters =
          ParameterBlocks.getSBOrEmpty(parameters,
              PartitioningFactory.class.getName()).addSubBl(
              AbstractPartitioningFactory.MODEL, model);
      partitioningFactories =
          SimSystem.getRegistry().getFactoryList(
View Full Code Here

          SimSystem.getRegistry()
              .getFactory(AbstractCoarsenFactory.class, null);
      coarseningAlgo =
          crFactory.getCoarsenAlgorithm(modelGraph, abortCriterion);

      ParameterBlock pb = new ParameterBlock();
      pb.addSubBlock("partitionerType", new ParameterBlock(
          PartitionerType.SINGLE_LEVEL_ONLY));

      // Choose single-level partitioner
      // The model is not given as it won't help the partitioner, he gets the
      // coarsened graph!
View Full Code Here

  }

  /** Updates the parameter panel if another factory was selected. */
  private void updateParameterPanel() {
    String factory = getSelectedFactory();
    ParameterBlock parameters = getParameters();

    if (factory == null || parameters == null) {
      parameterPanelWrapper.removeAll();
      parameterPanelWrapper.add(new JLabel("No factory selected.",
          SwingConstants.CENTER));
View Full Code Here

TOP

Related Classes of org.jamesii.core.parameters.ParameterBlock

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.