protected override void Import(SBMLModel model) { for (long i = 0; i < model.getNumParameters(); i++) { _paramList.Add(CreateParameter(model.getParameter(i))); } AddToProject(); }
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; } }
/// <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)); }
/// <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); }
/// <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())); }
protected abstract void Import(Model model);