当前位置: 首页>>代码示例>>C#>>正文


C# libsbml.XMLNamespaces类代码示例

本文整理汇总了C#中libsbml.XMLNamespaces的典型用法代码示例。如果您正苦于以下问题:C# XMLNamespaces类的具体用法?C# XMLNamespaces怎么用?C# XMLNamespaces使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XMLNamespaces类属于libsbml命名空间,在下文中一共展示了XMLNamespaces类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: setUp

 public void setUp()
 {
     NS = new  XMLNamespaces();
       if (NS == null);
       {
       }
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:7,代码来源:TestXMLNamespaces.cs

示例2: test_SpeciesReference_createWithNS

 public void test_SpeciesReference_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       SpeciesReference object1 = new  SpeciesReference(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_SPECIES_REFERENCE );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestSpeciesReference.cs

示例3: test_StoichiometryMath_createWithNS

 public void test_StoichiometryMath_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       StoichiometryMath object1 = new  StoichiometryMath(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_STOICHIOMETRY_MATH );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestStoichiometryMath.cs

示例4: test_EventAssignment_createWithNS

 public void test_EventAssignment_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       EventAssignment object1 = new  EventAssignment(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_EVENT_ASSIGNMENT );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestEventAssignment.cs

示例5: test_RateRule_createWithNS

 public void test_RateRule_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       Rule object1 = new  RateRule(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_RATE_RULE );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestRateRule.cs

示例6: test_CompartmentType_createWithNS

 public void test_CompartmentType_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,2);
       sbmlns.addNamespaces(xmlns);
       CompartmentType object1 = new  CompartmentType(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_COMPARTMENT_TYPE );
       assertTrue( object1.getMetaId() == "" );
       assertTrue( object1.getNotes() == null );
       assertTrue( object1.getAnnotation() == null );
       assertTrue( object1.getLevel() == 2 );
       assertTrue( object1.getVersion() == 2 );
       assertTrue( object1.getNamespaces() != null );
       assertTrue( object1.getNamespaces().getLength() == 2 );
       object1 = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestCompartmentType.cs

示例7: test_Parameter_createWithNS

 public void test_Parameter_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       Parameter object1 = new  Parameter(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_PARAMETER );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestParameter.cs

示例8: test_SyntaxChecker_validXHTML

 public void test_SyntaxChecker_validXHTML()
 {
     XMLToken token;
       XMLNode node;
       XMLTriple triple = new  XMLTriple("p", "", "");
       XMLAttributes att = new  XMLAttributes();
       XMLNamespaces ns = new  XMLNamespaces();
       ns.add( "http://www.w3.org/1999/xhtml", "");
       XMLToken tt = new  XMLToken("This is my text");
       XMLNode n1 = new XMLNode(tt);
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(node,null) == false );
       triple = new  XMLTriple("html", "", "");
       ns.clear();
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(node,null) == false );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:21,代码来源:TestSyntaxChecker.cs

示例9: test_L3_Event_createWithNS

 public void test_L3_Event_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Event e = new  Event(sbmlns);
       assertTrue( e.getTypeCode() == libsbml.SBML_EVENT );
       assertTrue( e.getMetaId() == "" );
       assertTrue( e.getNotes() == null );
       assertTrue( e.getAnnotation() == null );
       assertTrue( e.getLevel() == 3 );
       assertTrue( e.getVersion() == 1 );
       assertTrue( e.getNamespaces() != null );
       assertTrue( e.getNamespaces().getLength() == 2 );
       assertTrue( e.getId() == "" );
       assertTrue( e.getName() == "" );
       assertTrue( e.getUseValuesFromTriggerTime() == true );
       assertEquals( false, e.isSetId() );
       assertEquals( false, e.isSetName() );
       assertEquals( false, e.isSetUseValuesFromTriggerTime() );
       e = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:23,代码来源:TestL3Event.cs

示例10: test_NS_copyConstructor

 public void test_NS_copyConstructor()
 {
     XMLNamespaces ns = new XMLNamespaces();
       ns.add("http://test1.org/", "test1");
       assertTrue( ns.getLength() == 1 );
       assertTrue( ns.isEmpty() == false );
       assertTrue( ns.getPrefix(0) ==  "test1" );
       assertTrue( ns.getURI("test1") ==  "http://test1.org/" );
       XMLNamespaces ns2 = new XMLNamespaces(ns);
       assertTrue( ns2.getLength() == 1 );
       assertTrue( ns2.isEmpty() == false );
       assertTrue( ns2.getPrefix(0) ==  "test1" );
       assertTrue( ns2.getURI("test1") ==  "http://test1.org/" );
       ns2 = null;
       ns = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:16,代码来源:TestCopyAndClone.cs

示例11: test_FunctionDefinition_createWithNS

 public void test_FunctionDefinition_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       FunctionDefinition object1 = new  FunctionDefinition(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_FUNCTION_DEFINITION );
       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:mgaldzic,项目名称:copasi_api,代码行数:17,代码来源:TestFunctionDefinition.cs

示例12: test_L3_Unit_createWithNS

 public void test_L3_Unit_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Unit u = new  Unit(sbmlns);
       assertTrue( u.getTypeCode() == libsbml.SBML_UNIT );
       assertTrue( u.getMetaId() == "" );
       assertTrue( u.getNotes() == null );
       assertTrue( u.getAnnotation() == null );
       assertTrue( u.getLevel() == 3 );
       assertTrue( u.getVersion() == 1 );
       assertTrue( u.getNamespaces() != null );
       assertTrue( u.getNamespaces().getLength() == 2 );
       assertTrue( u.getKind() == libsbml.UNIT_KIND_INVALID );
       assertEquals( true, isnan(u.getExponentAsDouble()) );
       assertEquals( true, isnan(u.getMultiplier()) );
       assertEquals( false, u.isSetKind() );
       assertEquals( false, u.isSetExponent() );
       assertEquals( false, u.isSetMultiplier() );
       assertEquals( false, u.isSetScale() );
       u = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:24,代码来源:TestL3Unit.cs

示例13: XMLNamespaces

 /**
    * Copy constructor; creates a copy of this XMLNamespaces list.
    *
    * @param orig the XMLNamespaces object to copy
    */
 public XMLNamespaces(XMLNamespaces orig)
     : this(libsbmlPINVOKE.new_XMLNamespaces__SWIG_1(XMLNamespaces.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:10,代码来源:XMLNamespaces.cs

示例14: test_SBase_appendNotes

 public void test_SBase_appendNotes()
 {
     XMLToken token;
       XMLNode node;
       XMLToken token1;
       XMLNode node1;
       XMLNode node2;
       XMLTriple triple = new  XMLTriple("p", "", "");
       XMLAttributes att = new  XMLAttributes();
       XMLNamespaces ns = new  XMLNamespaces();
       ns.add( "http://www.w3.org/1999/xhtml", "");
       XMLToken token4 = new  XMLToken("This is my text");
       XMLNode node4 = new XMLNode(token4);
       XMLToken token5 = new  XMLToken("This is additional text");
       XMLNode node5 = new XMLNode(token5);
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(node4);
       S.setNotes(node);
       assertTrue( S.isSetNotes() == true );
       token1 = new  XMLToken(triple,att,ns);
       node1 = new XMLNode(token1);
       node1.addChild(node5);
       S.appendNotes(node1);
       assertTrue( S.isSetNotes() == true );
       node2 = S.getNotes();
       assertTrue( node2.getNumChildren() == 2 );
       assertTrue((  "p" == node2.getChild(0).getName() ));
       assertTrue( node2.getChild(0).getNumChildren() == 1 );
       assertTrue((  "p" == node2.getChild(1).getName() ));
       assertTrue( node2.getChild(1).getNumChildren() == 1 );
       string chars1 = node2.getChild(0).getChild(0).getCharacters();
       string chars2 = node2.getChild(1).getChild(0).getCharacters();
       assertTrue((  "This is my text" == chars1 ));
       assertTrue((  "This is additional text" == chars2 ));
       node = null;
       node1 = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:38,代码来源:TestSBase.cs

示例15: addL2Namespaces

 /**
    * Adds the package's Level 2 namespace(s).
    *
    * @ifnot clike @internal @endif
    *
    *
  *
  * This method is related to special facilities designed to support
  * legacy behaviors surrounding SBML Level 2 models.  Due to the
  * historical background of the SBML %Layout package, libSBML implements
  * special behavior for that package: it @em always creates a %Layout
  * plugin object for any SBML Level 2 document it reads in,
  * regardless of whether that document actually uses %Layout constructs.
  * Since Level 2 does not use namespaces on the top level of the
  * SBML document object, libSBML simply keys off the fact that the model
  * is a Level 2 model.  To allow the extensions for the %Layout and
  * %Render (and possibly other) packages to support this behavior, the
  * SBMLExtension class contains special methods to allow packages to
  * hook themselves into the Level 2 parsing apparatus when necessary.
  *
  * @if clike
  * This virtual method should be overridden by all package extensions
  * that want to serialize to an SBML Level 2 annotation.  In
  * Level 2, the XML namespace declaration for the package is not
  * placed on the top-level SBML document object but rather inside
  * individual annotations.  addL2Namespaces() is invoked automatically
  * for Level 2 documents when an SBMLExtensionNamespace object is
  * created; removeL2Namespaces() is automatically invoked by
  * SBMLDocument to prevent the namespace(s) from being put on the
  * top-level SBML Level 2 element (because Level 2 doesn't
  * support namespaces there); and enableL2NamespaceForDocument() is
  * called automatically when any SBML document (of any Level/Version) is
  * read in.
  * @endif
    *
    * @param xmlns an XMLNamespaces object that will be used for the annotation.
    * Implementation should override this method with something that adds
    * the package's namespace(s) to the set of namespaces in @p xmlns.  For
    * instance, here is the code from the %Layout package extension:
    * @code{.cpp}
 if (!xmlns->containsUri( LayoutExtension::getXmlnsL2()))
   xmlns->add(LayoutExtension::getXmlnsL2(), 'layout');
 @endcode
    */
 public new void addL2Namespaces(XMLNamespaces xmlns)
 {
     libsbmlPINVOKE.SBMLExtension_addL2Namespaces(swigCPtr, XMLNamespaces.getCPtr(xmlns));
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:48,代码来源:SBMLExtension.cs


注:本文中的libsbml.XMLNamespaces类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。