コード例 #1
0
 protected override void Import(SBMLModel model)
 {
     for (long i = 0; i < model.getNumParameters(); i++)
     {
         _paramList.Add(CreateParameter(model.getParameter(i)));
     }
     AddToProject();
 }
コード例 #2
0
 public void DoImport(Model sbmlModel, IMoBiProject moBiProject, SBMLInformation sbmlInformation, ICommandCollector command)
 {
     _sbmlProject     = moBiProject;
     _sbmlInformation = sbmlInformation;
     _command         = command;
     try
     {
         Import(sbmlModel);
     }
     finally
     {
         _sbmlProject     = null;
         _sbmlInformation = null;
         _command         = null;
     }
 }
コード例 #3
0
ファイル: AssignmentImporter.cs プロジェクト: onwhenrdy/MoBi
        /// <summary>
        ///     Creates a Parameter Start Values Building Block and adds it to the MoBi Project.
        /// </summary>
        protected internal void CreateParameterStartValuesBuildingBlock(Model model)
        {
            var parameterStartValuesCreator = IoC.Resolve <IParameterStartValuesCreator>();
            var ss = GetMainSpatialStructure(model);
            var mb = GetMainMoleculeBuildingBlock();

            if (ss == null || mb == null)
            {
                return;
            }

            var psvBb = parameterStartValuesCreator.CreateFrom(GetMainSpatialStructure(model), GetMainMoleculeBuildingBlock())
                        .WithId(SBMLConstants.SBML_PARAMETERSTARTVALUES_BB)
                        .WithName(SBMLConstants.SBML_PARAMETERSTARTVALUES_BB);

            _command.AddCommand(new AddBuildingBlockCommand <IParameterStartValuesBuildingBlock>(psvBb).Run(_context));
        }
コード例 #4
0
ファイル: AssignmentImporter.cs プロジェクト: onwhenrdy/MoBi
 /// <summary>
 ///     Creates a Rule and an Initial Assignment Importer to import SBML Rules and Initital Assignments.
 /// </summary>
 protected override void Import(Model model)
 {
     CreateParameterStartValuesBuildingBlock(model);
     _initialAssignmentImporter.DoImport(model, _sbmlProject, _sbmlInformation, _command);
     _ruleImporter.DoImport(model, _sbmlProject, _sbmlInformation, _command);
 }
コード例 #5
0
 /// <summary>
 ///     Gets the MoBi Spatial Structure generated for the SBML Import.
 /// </summary>
 public IMoBiSpatialStructure GetMainSpatialStructure(Model model)
 {
     return(_sbmlProject.SpatialStructureCollection.FindByName(SBMLConstants.SBML_MODEL + model.getName()));
 }
コード例 #6
0
 protected abstract void Import(Model model);