當前位置: 首頁>>代碼示例>>C#>>正文


C# Model.getNotes方法代碼示例

本文整理匯總了C#中libsbmlcs.Model.getNotes方法的典型用法代碼示例。如果您正苦於以下問題:C# Model.getNotes方法的具體用法?C# Model.getNotes怎麽用?C# Model.getNotes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在libsbmlcs.Model的用法示例。


在下文中一共展示了Model.getNotes方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: test_L3_Model_createWithNS

 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;
 }
開發者ID:0u812,項目名稱:roadrunner-backup,代碼行數:33,代碼來源:TestL3Model.cs

示例2: test_ReadSBML_notes_xmlns

 public void test_ReadSBML_notes_xmlns()
 {
     string s = wrapSBML_L2v3("<notes>" +
     "  <body xmlns=\"http://www.w3.org/1999/xhtml\">Some text.</body>" +
     "</notes>");
       D = libsbml.readSBMLFromString(s);
       M = D.getModel();
       assertTrue( M.getNotes() != null );
       XMLNamespaces ns = M.getNotes().getChild(0).getNamespaces();
       assertTrue( ns.getLength() == 1 );
       assertTrue((  "http://www.w3.org/1999/xhtml" == ns.getURI(0) ));
       string notes = M.getNotes().getChild(0).getChild(0).getCharacters();
       assertTrue( (  "Some text." != notes ) == false );
 }
開發者ID:yarden,項目名稱:roadrunner,代碼行數:14,代碼來源:TestReadSBML.cs

示例3: test_Model_createWithNS

 public void test_Model_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       Model object1 = new  Model(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_MODEL );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 1 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:17,代碼來源:TestModel.cs

示例4: test_SBase_setNotesString_l3_addMarkup

 public void test_SBase_setNotesString_l3_addMarkup()
 {
     SBase c = new Model(3, 1);
       string notes = "This is a test note";
       string taggednotes = "<notes>\n" + "  <p xmlns=\"http://www.w3.org/1999/xhtml\">This is a test note</p>\n" + "</notes>";
       c.setNotes(notes, true);
       assertTrue(c.isSetNotes() == true);
       if ((taggednotes != c.getNotesString()))
     ;
       {
       }
       XMLNode t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       XMLNode t2 = t1.getChild(0);
       assertTrue(t2.getNumChildren() == 1);
       XMLNode t3 = t2.getChild(0);
       assertTrue(("This is a test note" == t3.getCharacters()));
       c.setNotes(c.getNotesString(), true);
       t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       string chars = c.getNotesString();
       assertTrue((taggednotes == chars));
       c.setNotes("", true);
       assertTrue(c.isSetNotes() == false);
       if (c.getNotesString() != null)
     ;
       {
       }
       c.setNotes(taggednotes, true);
       assertTrue(c.isSetNotes() == true);
       if ((taggednotes != c.getNotesString()))
     ;
       {
       }
       t1 = c.getNotes();
       assertTrue(t1.getNumChildren() == 1);
       t2 = t1.getChild(0);
       assertTrue(t2.getNumChildren() == 1);
       t3 = t2.getChild(0);
       assertTrue(("This is a test note" == t3.getCharacters()));
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:41,代碼來源:TestSBase.cs

示例5: test_SBase_setNotesString

 public void test_SBase_setNotesString()
 {
     SBase c = new Model (1, 2);
     string notes = "This is a test note";
     string taggednotes = "<notes>This is a test note</notes>";
     c.setNotes (notes);
     assertTrue (c.isSetNotes () == true);
     if ((taggednotes != c.getNotesString ()))
         ;
     {
     }
     XMLNode t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     XMLNode t2 = t1.getChild (0);
     assertTrue (("This is a test note" == t2.getCharacters ()));
     c.setNotes (c.getNotesString ());
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string chars = c.getNotesString ();
     assertTrue ((taggednotes == chars));
     c.setNotes ("");
     assertTrue (c.isSetNotes () == false);
     if (c.getNotesString () != null)
         ;
     {
     }
     c.setNotes (taggednotes);
     assertTrue (c.isSetNotes () == true);
     if ((taggednotes != c.getNotesString ()))
         ;
     {
     }
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     t2 = t1.getChild (0);
     assertTrue (("This is a test note" == t2.getCharacters ()));
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:37,代碼來源:TestSBase.cs

示例6: test_SBase_setNotes

 public void test_SBase_setNotes()
 {
     SBase c = new Model (1, 2);
     XMLToken token;
     XMLNode node;
     token = new XMLToken ("This is a test note");
     node = new XMLNode (token);
     c.setNotes (node);
     assertTrue (c.isSetNotes () == true);
     if (c.getNotes () == node)
         ;
     {
     }
     XMLNode t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     assertTrue (("This is a test note" == t1.getChild (0).getCharacters ()));
     c.setNotes (c.getNotes ());
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string chars = t1.getChild (0).getCharacters ();
     assertTrue (("This is a test note" == chars));
     c.setNotes ((XMLNode)null);
     assertTrue (c.isSetNotes () == false);
     if (c.getNotes () != null)
         ;
     {
     }
     c.setNotes (node);
     assertTrue (c.isSetNotes () == true);
     token = new XMLToken ("(CR) &#0168; &#x00a8; &#x00A8; (NOT CR) &#; &#x; &#00a8; &#0168 &#x00a8");
     node = new XMLNode (token);
     c.setNotes (node);
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string s = t1.getChild (0).toXMLString ();
     string expected = "(CR) &#0168; &#x00a8; &#x00A8; (NOT CR) &amp;#; &amp;#x; &amp;#00a8; &amp;#0168 &amp;#x00a8";
     assertTrue ((expected == s));
     token = new XMLToken ("& ' > < \" &amp; &apos; &gt; &lt; &quot;");
     node = new XMLNode (token);
     c.setNotes (node);
     t1 = c.getNotes ();
     assertTrue (t1.getNumChildren () == 1);
     string s2 = t1.getChild (0).toXMLString ();
     string expected2 = "&amp; &apos; &gt; &lt; &quot; &amp; &apos; &gt; &lt; &quot;";
     assertTrue ((expected2 == s2));
     token = null;
     node = null;
 }
開發者ID:TotteKarlsson,項目名稱:roadrunner,代碼行數:48,代碼來源:TestSBase.cs


注:本文中的libsbmlcs.Model.getNotes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。