Package org.jamesii.core.model

Examples of org.jamesii.core.model.IModel


    modelInterfaces = supportedModelInterfaces;
  }

  @Override
  public boolean appliesTo(ParameterBlock parameters) {
    IModel model = ModelFeatureExtractor.getModelRuntime(parameters);
    for (Class<? extends IModel> supportedInterface : modelInterfaces) {
      if (supportedInterface.isAssignableFrom(model.getClass())) {
        return true;
      }
    }
    return false;
  }
View Full Code Here


  }

  @Override
  protected Features extractFeatures(ParameterBlock parameters) {

    IModel model = ModelFeatureExtractor.getModelRuntime(parameters);
    Features features = new Features();

    // Look up registry for all model feature extractors
    List<FeatureExtractorFactory> featExtractFactories =
        SimSystem.getRegistry().getFactories(FeatureExtractorFactory.class);
View Full Code Here

   * Instantiates a new model loader editor.
   *
   * @param params
   */
  public ParameterExplorationSetup(ParameterBlock params) {
    IModel model = params.getSubBlockValue(ExperimentSetupEditorFactory.MODEL);

    simAlgoSetup = new SimpleSimulationAlgorithmSetup(model);
  }
View Full Code Here

        @Override
        public void actionPerformed(ActionEvent e) {
          Pair<ParameterBlock, ModelReaderFactory> parameters =
              dialog.getFactoryParameter(SwingUtilities.getWindowAncestor(page));
          if (parameters != null) {
            IModel oldModel = model;
            try {
              // try to load model
              ParameterBlock readerParams =
                  new ParameterBlock(parameters.getFirstValue()
                      .getSubBlockValue(IURIHandling.URI), IURIHandling.URI);
View Full Code Here

    // load editor factory from wizard storage and put it on page
    final ExperimentSetupEditorFactory experimentFactory =
        wizard.getValue(ExperimentChooser.EXPERIMENT);

    // load symbolic model
    final IModel model = wizard.getValue(ModelLoader.MODEL);
    experiment = wizard.getValue(EXPERIMENT);
    if (experiment == null) {
      wizard.putValue(EXPERIMENT, experiment = new BaseExperiment());
    }
View Full Code Here

   *
   * @return the recovered model
   */
  @Override
  public IModel recoverModel(IDataResilience storage, String server, long dataid) {
    IModel result = null;

    if (storage == null) {
      SimSystem.report(Level.SEVERE,
          "No storage given. Cannot recover the element identified by "
              + dataid + " from no source.");
View Full Code Here

  @Override
  @SuppressWarnings("unchecked")
  // Should be ensured by factory
  public Features extractFeatures(ParameterBlock params) {
    IModel model = getModel(params);
    return extractModelFeatures((M) model);
  }
View Full Code Here

   *          the params
   *
   * @return the model
   */
  protected static IModel getModel(ParameterBlock params) {
    IModel model;
    Object representation =
        params.getSubBlockValue(FeatureExtractorFactory.PROBLEM_REPRESENTATION);
    if (representation instanceof IApplication) {
      model =
          instantiateModel(((IApplication) representation).getProblemInstance()
View Full Code Here

    ParameterBlock rwParams = rwSimCfgParams == null ? new ParameterBlock()
        : rwSimCfgParams.getCopy();
    rwParams.addSubBlock(IURIHandling.URI, new ParameterBlock(modelLocation));
    ModelReaderFactory modelReaderWriterFactory = SimSystem.getRegistry()
        .getFactory(AbstractModelReaderFactory.class, rwParams);
    IModel model = modelReaderWriterFactory.create(rwParams, SimSystem.getRegistry().createContext()).read(
        modelLocation, modelParameters);
    return model;
  }
View Full Code Here

    }

    Iterator<IModel> mwi = modelSaveMap.keySet().iterator();
    int i = 0;
    while (mwi.hasNext()) {
      IModel key = mwi.next();
      if (modelSaveMap.get(key)) {
        results.add(i, key);
        i++;
      }
    }
View Full Code Here

TOP

Related Classes of org.jamesii.core.model.IModel

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.