isSetName() 공개 메소드

public isSetName ( ) : bool
리턴 bool
예제 #1
0
        private string getProjectName(Model model)
        {
            var name = String.Empty;

            if (model.isSetId())
            {
                name += model.getId() + SBMLConstants.SPACE;
            }
            if (model.isSetName())
            {
                name += model.getName();
            }
            return(name != string.Empty ? name : SBMLConstants.DEFAULT_PROJECT_NAME);
        }
예제 #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
 public void test_Model_setName4()
 {
     Model m = new  Model(1,2);
       int i = m.setName( "11dd");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, m.isSetName() );
 }
예제 #4
0
 public void test_ReadSBML_Model_L2()
 {
     string s = wrapXML("<sbml level='2' version='1'>" +
     "  <model id='testModel'> </model>" +
     "</sbml>");
       D = libsbml.readSBMLFromString(s);
       M = D.getModel();
       assertEquals( true, M.isSetId() );
       assertEquals( false, M.isSetName() );
       assertTrue((  "testModel" == M.getId() ));
 }