getSubstanceUnits() публичный Метод

public getSubstanceUnits ( ) : string
Результат string
Пример #1
0
        /// <summary>
        ///     Gets the dimension of a species. It is set by it's one substanceUnits attribute
        ///     or by the substanceUnits definition of the Model.
        /// </summary>
        private IDimension GetDimension(Species s, Model model)
        {
            var        substanceUnits  = s.isSetSubstanceUnits() ? s.getSubstanceUnits() : model.getSubstanceUnits();
            IDimension amountDimension = null;

            if (_sbmlInformation.MobiDimension.ContainsKey(substanceUnits))
            {
                amountDimension = _sbmlInformation.MobiDimension[substanceUnits];
            }

            if (amountDimension == null)
            {
                return(null);
            }
            if (_moBiDimensionFactory.Dimensions.All(dim => dim.Name != amountDimension.Name))
            {
                _moBiDimensionFactory.AddDimension(amountDimension);
            }

            return(amountDimension);
        }
Пример #2
0
 public void test_L3_Model_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Model m = new  Model(sbmlns);
       assertTrue( m.getTypeCode() == libsbml.SBML_MODEL );
       assertTrue( m.getMetaId() == "" );
       assertTrue( m.getNotes() == null );
       assertTrue( m.getAnnotation() == null );
       assertTrue( m.getLevel() == 3 );
       assertTrue( m.getVersion() == 1 );
       assertTrue( m.getNamespaces() != null );
       assertTrue( m.getNamespaces().getLength() == 2 );
       assertTrue( m.getId() == "" );
       assertTrue( m.getName() == "" );
       assertTrue( m.getSubstanceUnits() == "" );
       assertTrue( m.getTimeUnits() == "" );
       assertTrue( m.getVolumeUnits() == "" );
       assertTrue( m.getAreaUnits() == "" );
       assertTrue( m.getLengthUnits() == "" );
       assertTrue( m.getConversionFactor() == "" );
       assertEquals( false, m.isSetId() );
       assertEquals( false, m.isSetName() );
       assertEquals( false, m.isSetSubstanceUnits() );
       assertEquals( false, m.isSetTimeUnits() );
       assertEquals( false, m.isSetVolumeUnits() );
       assertEquals( false, m.isSetAreaUnits() );
       assertEquals( false, m.isSetLengthUnits() );
       assertEquals( false, m.isSetConversionFactor() );
       m = null;
 }
Пример #3
0
 private string GetUnit(Species s, Model model)
 {
     return(s.isSetSubstanceUnits() ? s.getSubstanceUnits() : model.getSubstanceUnits());
 }