예제 #1
0
 public RenameEntityCommand(SBase entity, String oldID, String newID, Model.SBML.Model model)
 {
     this.entity = entity;
     this.oldID = oldID;
     this.newID = newID;
     this.model = model;
 }
예제 #2
0
 /// <summary>
 /// Add data to the ReferenceLeafNode
 /// </summary>
 /// <param name="text">
 /// A <see cref="System.String"/>
 /// </param>
 /// <param name="model">
 /// A <see cref="Model"/>
 /// </param>
 public void AddData(string text, Model model)
 {
     // Retrieve the object from the model
     SBase reference = (SBase)model.findObject(text);
     if (reference != null)
     {
         this.idReference = text;
         this.data = reference;
     }
 }
예제 #3
0
 public AssignmentRule(SBase variable)
 {
     this.variable = variable;
 }
예제 #4
0
 public EventAssignment(SBase variable)
 {
     this.variable = variable;
 }
예제 #5
0
파일: SBase.cs 프로젝트: dorchard/mucell
 /// <summary>
 /// Sets an object as having a duplicate ID to an object already in the model
 /// </summary>
 /// <param name="original">
 /// A <see cref="SBase"/>
 /// </param>
 public void setHasADuplicateId(SBase original)
 {
     this.duplicate = true;
         this.original = original;
 }
예제 #6
0
 /// <summary>
 /// Checks all ReferenceLeafNodes so that they point to their SBase object.
 /// Used to complete a MathTree generated from MathML after it has been parsed and
 /// more about the model is known (such as paramters).
 /// </summary>
 /// <param name="model">
 /// A <see cref="Model"/>
 /// </param>
 public override void SetSBaseReferences(Model model)
 {
     if (this.idReference != null)
     {
         SBase reference = (SBase)model.findObject(this.idReference);
             if (reference != null)
             {
                 this.data = reference;
             }
     }
 }
예제 #7
0
파일: RateRule.cs 프로젝트: dorchard/mucell
 public RateRule(SBase variable)
 {
     this.variable = variable;
 }
예제 #8
0
파일: Model.cs 프로젝트: dorchard/mucell
 /// <summary>
 /// Updates the ID of an SBML object in the model, for renaming of SBML objects
 /// </summary>
 /// <param name="entity">
 /// A <see cref="SBase"/>
 /// </param>
 public void updateID(SBase entity)
 {
     // If we have an old ID implies it has actully been renamed
     // If the model already contains that ID
     // and if the new ID is different to the old one
     if (entity.getOldID()!=null && this.IdTable.ContainsKey(entity.getOldID()) && entity.ID!=entity.getOldID())
     {
         if (this.IdTable.ContainsKey(entity.ID))
         {
             throw new DuplicateSBMLObjectIdException(entity.ID);
         }
         else
         {
             this.IdTable.Remove(entity.getOldID());
             this.IdTable.Add(entity.ID, entity);
         }
     }
 }
예제 #9
0
파일: Model.cs 프로젝트: dorchard/mucell
        /// <summary>
        /// Used when a new ID is found in the SBML document to add it
        /// and its object reference to the global IdTable 
        /// </summary>
        /// <param name="id">The id of the object</param>
        /// <param name="reference">
        /// The SBase <see cref="SBase"/> object with the corresponding id.
        /// </param>        
        public void AddId(string id, SBase reference)
        {
            // Need to make sure that we don't add a duplicate refernce but add with a slightly different id
                // and flag as a possible duplicate for pass at the end
                if (this.IdTable.ContainsKey(id))
                {
                    // Duplicate found
                    // Get the original
                    SBase original = this.IdTable[id];
                    original.duplicateCount++;
                    // Modify duplicates id
                    reference.ID = reference.ID+"_"+original.duplicateCount;
                    // Set the original
                    reference.setHasADuplicateId(original);
                    // Add to the idtable
                    this.IdTable.Add(reference.ID, reference);

                } else {
                this.IdTable.Add(id, reference);
            }
        }
예제 #10
0
 public InitialAssignment(SBase variable, Hashtable attrs)
 {
     this.variable = variable;
     this.setId(attrs);
 }
예제 #11
0
 public InitialAssignment(SBase variable)
 {
     this.variable = variable;
 }