Inheritance: IDisposable
 public void test_L3_LocalParameter_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       LocalParameter p = new  LocalParameter(sbmlns);
       assertTrue( p.getTypeCode() == libsbml.SBML_LOCAL_PARAMETER );
       assertTrue( p.getMetaId() == "" );
       assertTrue( p.getNotes() == null );
       assertTrue( p.getAnnotation() == null );
       assertTrue( p.getLevel() == 3 );
       assertTrue( p.getVersion() == 1 );
       assertTrue( p.getNamespaces() != null );
       assertTrue( p.getNamespaces().getLength() == 2 );
       assertTrue( p.getId() == "" );
       assertTrue( p.getName() == "" );
       assertTrue( p.getUnits() == "" );
       assertEquals( true, double.IsNaN(p.getValue()) );
       assertEquals( false, p.isSetId() );
       assertEquals( false, p.isSetName() );
       assertEquals( false, p.isSetValue() );
       assertEquals( false, p.isSetUnits() );
       p = null;
 }
 public void test_SBMLNamespaces_add_and_remove_namespaces()
 {
     SBMLNamespaces sbmlns = new SBMLNamespaces ( 3,1 );
       assertTrue( sbmlns.getLevel() == 3 );
       assertTrue( sbmlns.getVersion() == 1 );
       sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/group/version1",  "group");
       sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/layout/version1", "layout");
       sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/render/version1", "render");
       sbmlns.addNamespace("http://www.sbml.org/sbml/level3/version1/multi/version1",  "multi");
       XMLNamespaces ns = sbmlns.getNamespaces();
       assertTrue( ns.getLength() == 5 );
       assertTrue( ns.getURI(0) ==  "http://www.sbml.org/sbml/level3/version1/core" );
       assertTrue( ns.getPrefix(0) ==  "" );
       assertTrue( ns.getURI(1) ==  "http://www.sbml.org/sbml/level3/version1/group/version1" );
       assertTrue( ns.getPrefix(1) ==  "group" );
       assertTrue( ns.getURI(2) ==  "http://www.sbml.org/sbml/level3/version1/layout/version1" );
       assertTrue( ns.getPrefix(2) ==  "layout" );
       assertTrue( ns.getURI(3) ==  "http://www.sbml.org/sbml/level3/version1/render/version1" );
       assertTrue( ns.getPrefix(3) ==  "render" );
       assertTrue( ns.getURI(4) ==  "http://www.sbml.org/sbml/level3/version1/multi/version1" );
       assertTrue( ns.getPrefix(4) ==  "multi" );
       sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/layout/version1");
       sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/group/version1");
       sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/render/version1");
       sbmlns.removeNamespace("http://www.sbml.org/sbml/level3/version1/multi/version1");
 }
 public void test_SBMLNamespaces_L1V1()
 {
     SBMLNamespaces sbml = new SBMLNamespaces(1,1);
       assertTrue( sbml.getLevel() == 1 );
       assertTrue( sbml.getVersion() == 1 );
       XMLNamespaces ns = sbml.getNamespaces();
       assertTrue( ns.getLength() == 1 );
       assertTrue( ns.getURI(0) ==  "http://www.sbml.org/sbml/level1" );
       assertTrue( ns.getPrefix(0) ==  "" );
       sbml = null;
 }
    static void Main(string[] args)
    {
        SBMLNamespaces sbmlns = new SBMLNamespaces(3, 1, "distrib", 1);
        SBMLDocument document = new SBMLDocument(sbmlns);

        // set the required attribute to true
        DistribSBMLDocumentPlugin docPlug = (DistribSBMLDocumentPlugin)
                                            (document->getPlugin("distrib"));
        docPlug.setRequired(true);

        // create the Model

        Model model = document.createModel();

        // create the FunctionDefintion

        FunctionDefinition fd = model.createFunctionDefinition();
        fd.setId("mynormal");

        ASTNode math = libsbml.parseFormula("lambda(param1, param2, 0)");
        fd.setMath(math);

        //
        // Get a DistribFunctionDefinitionPlugin object plugged in the fd object.
        //
        // The type of the returned value of SBase::getPlugin() function is SBasePlugin, and
        // thus the value needs to be casted for the corresponding derived class.
        //
        DistribFunctionDefinitionPlugin fdPlugin =
                    (DistribFunctionDefinitionPlugin)(fd.getPlugin("distrib"));

        // create a DrawFromDistribution object
        DrawFromDistribution draw = fdPlugin.createDrawFromDistribution();

        // create the distribInputs
        DistribInput input1 = draw.createDistribInput();
        input1.setId("mu");
        input1.setIndex(0);

        DistribInput input2 = draw.createDistribInput();
        input2.setId("sigma");
        input2.setIndex(1);

        // create the UncertMLNode object
        UncertMLNode uncert = libsbml.createDistributionNode
                         ("NormalDistribution", "mean, variance", "mu,sigma");

        draw.setUncertML(uncert);

        libsbml.writeSBMLToFile(document, "distrib_example1.xml");
    }
示例#5
0
 public void test_Constraint_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,2);
       sbmlns.addNamespaces(xmlns);
       Constraint object1 = new  Constraint(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_CONSTRAINT );
       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;
 }
 public void test_SpeciesType_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,2);
       sbmlns.addNamespaces(xmlns);
       SpeciesType object1 = new  SpeciesType(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_SPECIES_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;
 }
示例#7
0
 public void test_Delay_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       Delay object1 = new  Delay(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_DELAY );
       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;
 }
 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;
 }
 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;
 }
 public void test_ModifierSpeciesReference_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(2,1);
       sbmlns.addNamespaces(xmlns);
       SBase object1 = new  ModifierSpeciesReference(sbmlns);
       assertTrue( object1.getTypeCode() == libsbml.SBML_MODIFIER_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 );
       XMLNamespaces n = object1.getNamespaces();
       assertTrue( n.getLength() == 2 );
       object1 = null;
 }
 public void test_SyntaxChecker_validXHTML()
 {
     SBMLNamespaces NS24 = new  SBMLNamespaces(2,4);
       SBMLNamespaces NS31 = new  SBMLNamespaces(3,1);
       XMLToken toptoken;
       XMLNode topnode;
       XMLTriple toptriple = new  XMLTriple("notes", "", "");
       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);
       toptoken = new  XMLToken(toptriple,att);
       topnode = new XMLNode(toptoken);
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == true );
       triple = new  XMLTriple("html", "", "");
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.removeChild(0);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == true );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == true );
       triple = new  XMLTriple("html", "", "");
       ns.clear();
       token = new  XMLToken(triple,att,ns);
       node = new XMLNode(token);
       node.addChild(n1);
       topnode.removeChild(0);
       topnode.addChild(node);
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,null) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS24) == false );
       assertTrue( SyntaxChecker.hasExpectedXHTMLSyntax(topnode,NS31) == false );
 }
示例#12
0
 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;
 }
    static void Main(string[] args)
    {
        SBMLNamespaces sbmlns = new SBMLNamespaces(3, 1, "distrib", 1);
        SBMLDocument document = new SBMLDocument(sbmlns);

        // set the required attribute to true
        DistribSBMLDocumentPlugin docPlug = (DistribSBMLDocumentPlugin)
                                            (document->getPlugin("distrib"));
        docPlug.setRequired(true);

        // create the Model

        Model model = document.createModel();

        // create the Parameter

        Parameter p = model.createParameter();
        p.setId("V");
        p.setConstant(true);

        //
        // Get a DistribSBasePlugin object plugged in the parameter object.
        //
        DistribSBasePlugin pPlugin =
                    (DistribSBasePlugin)(p.getPlugin("distrib"));

        // create a Uncertainty object
        Uncertainty uncert = pPlugin.createUncertainty();

        // create the UncertMLNode object
        UncertMLNode uncertML = libsbml.createDistributionNode
                         ("Statistics", "Mean, Variance", "V_pop, V_omega");

        uncert.setUncertML(uncertML);

        libsbml.writeSBMLToFile(document, "distrib_example2.xml");
    }
示例#14
0
 /**
    * Creates a new LocalParameter object with the given SBMLNamespaces
    * object @p sbmlns.
    *
    * *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level 3) packages used in addition to SBML Level 3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * It is worth emphasizing that although this constructor does not take
    * an identifier argument, in SBML Level 2 and beyond, the 'id'
    * (identifier) attribute of a LocalParameter is required to have a value.
    * Thus, callers are cautioned to assign a value after calling this
    * constructor if no identifier is provided as an argument.  Setting the
    * identifier can be accomplished using the method
    * @if java setId(String id)@else setId()@endif.
    *
    * @param sbmlns an SBMLNamespaces object.
    *
    * @throws SBMLConstructorException
    * Thrown if the given @p level and @p version combination, or this kind
    * of SBML object, are either invalid or mismatched with respect to the
    * parent SBMLDocument object.
    *
    * *
  * @note Attempting to add an object to an SBMLDocument having a different
  * combination of SBML Level, Version and XML namespaces than the object
  * itself will result in an error at the time a caller attempts to make the
  * addition.  A parent object must have compatible Level, Version and XML
  * namespaces.  (Strictly speaking, a parent may also have more XML
  * namespaces than a child, but the reverse is not permitted.)  The
  * restriction is necessary to ensure that an SBML model has a consistent
  * overall structure.  This requires callers to manage their objects
  * carefully, but the benefit is increased flexibility in how models can be
  * created by permitting callers to create objects bottom-up if desired.  In
  * situations where objects are not yet attached to parents (e.g.,
  * SBMLDocument), knowledge of the intented SBML Level and Version help
  * libSBML determine such things as whether it is valid to assign a
  * particular value to an attribute.
  *
  *
    */
 public LocalParameter(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_LocalParameter__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#15
0
 /**
    * Creates a new AlgebraicRule object using the given SBMLNamespaces object
    * @p sbmlns.
    *
    *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level 3) packages used in addition to SBML Level 3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * @param sbmlns an SBMLNamespaces object.
    *
    *
  * @throws SBMLConstructorException
  * Thrown if the given @p sbmlns is inconsistent or incompatible
  * with this object.
  *
  *
    *
    *
  * @note Attempting to add an object to an SBMLDocument having a different
  * combination of SBML Level, Version and XML namespaces than the object
  * itself will result in an error at the time a caller attempts to make the
  * addition.  A parent object must have compatible Level, Version and XML
  * namespaces.  (Strictly speaking, a parent may also have more XML
  * namespaces than a child, but the reverse is not permitted.)  The
  * restriction is necessary to ensure that an SBML model has a consistent
  * overall structure.  This requires callers to manage their objects
  * carefully, but the benefit is increased flexibility in how models can be
  * created by permitting callers to create objects bottom-up if desired.  In
  * situations where objects are not yet attached to parents (e.g.,
  * SBMLDocument), knowledge of the intented SBML Level and Version help
  * libSBML determine such things as whether it is valid to assign a
  * particular value to an attribute.
  *
  *
    */
 public AlgebraicRule(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_AlgebraicRule__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#16
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;
 }
 /**
    * Creates a new ListOfSpecies object.
    *
    * The object is constructed such that it is valid for the SBML Level and
    * Version combination determined by the SBMLNamespaces object in @p
    * sbmlns.
    *
    * @param sbmlns an SBMLNamespaces object that is used to determine the
    * characteristics of the ListOfSpecies object to be created.
    */
 public ListOfSpecies(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfSpecies__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
 }
 /**
    * Creates a new SBMLDocumentPlugin object using the given parameters.
    *
    *
  *
  * In the XML representation of an SBML document, XML namespaces are used to
  * identify the origin of each XML construct used.  XML namespaces are
  * identified by their unique resource identifiers (URIs).  The core SBML
  * specifications stipulate the namespaces that must be used for core SBML
  * constructs; for example, all XML elements that belong to SBML Level 3
  * Version 1 Core must be placed in the XML namespace identified by the URI
  * <code>'http://www.sbml.org/sbml/level3/version1/core'</code>.  Individual
  * SBML Level&nbsp;3 packages define their own XML namespaces; for example,
  * all elements belonging to the SBML Level&nbsp;3 %Layout Version&nbsp;1
  * package must be placed in the XML namespace
  * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>.
  *
  *
    *
    *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * @param uri the URI of the SBML Level&nbsp;3 package implemented by
    * this libSBML package extension.
    *
    * @param prefix the XML namespace prefix being used for the package.
    *
    * @param sbmlns the SBMLNamespaces object for the package.
    */
 public SBMLDocumentPlugin(string uri, string prefix, SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_SBMLDocumentPlugin__SWIG_0(uri, prefix, SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#19
0
 /**
    * Sets the SBML namespaces associated with this XML input stream.
    *
    * This allows this stream to reference the available SBML namespaces being
    * read.
    *
    * @param sbmlns the list of namespaces to use.
    */
 public void setSBMLNamespaces(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.XMLInputStream_setSBMLNamespaces(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
示例#20
0
 void loadASTPlugins(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.ASTBase_loadASTPlugins(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
 ConversionProperties(SBMLNamespaces targetNS) : this(libsbmlPINVOKE.new_ConversionProperties__SWIG_0(SBMLNamespaces.getCPtr(targetNS)), true)
 {
 }
 void setTargetNamespaces(SBMLNamespaces targetNS)
 {
     libsbmlPINVOKE.ConversionProperties_setTargetNamespaces(swigCPtr, SBMLNamespaces.getCPtr(targetNS));
 }
示例#23
0
 ListOfCompartmentTypes(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_ListOfCompartmentTypes__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#24
0
 SpeciesType(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_SpeciesType__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 ListOfInitialAssignments(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_ListOfInitialAssignments__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#26
0
 LocalParameter(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_LocalParameter__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#27
0
 internal static HandleRef getCPtr(SBMLNamespaces obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
示例#28
0
 UnitDefinition(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_UnitDefinition__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#29
0
        static bool hasExpectedXHTMLSyntax(XMLNode xhtml, SBMLNamespaces sbmlns)
        {
            bool ret = libsbmlPINVOKE.SyntaxChecker_hasExpectedXHTMLSyntax__SWIG_0(XMLNode.getCPtr(xhtml), SBMLNamespaces.getCPtr(sbmlns));

            return(ret);
        }
 void setSBMLNamespaces(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.XMLInputStream_setSBMLNamespaces(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
 /**
    * Creates a new InitialAssignment using the given SBMLNamespaces object
    * @p sbmlns.
    *
    * *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * @param sbmlns an SBMLNamespaces object.
    *
    * @throws @if python ValueError @else SBMLConstructorException @endif
    * Thrown if the given @p level and @p version combination, or this kind
    * of SBML object, are either invalid or mismatched with respect to the
    * parent SBMLDocument object.
    *
    * *
  * @note Upon the addition of a InitialAssignment object to an SBMLDocument
  * (e.g., using Model::addInitialAssignment(@if java InitialAssignment
  * ia@endif)), the SBML Level, SBML Version and XML namespace of the document
  * @em override the values used when creating the InitialAssignment object
  * via this constructor.  This is necessary to ensure that an SBML document
  * is a consistent structure.  Nevertheless, the ability to supply the values
  * at the time of creation of a InitialAssignment is an important aid to
  * producing valid SBML.  Knowledge of the intented SBML Level and Version
  * determine whether it is valid to assign a particular value to an
  * attribute, or whether it is valid to add an object to an existing
  * SBMLDocument.
  *
    */
 public InitialAssignment(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_InitialAssignment__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
 /**
    * Creates a new ListOfSpeciesReferences object.
    *
    * The object is constructed such that it is valid for the SBML Level and
    * Version combination determined by the SBMLNamespaces object in @p
    * sbmlns.
    *
    * @param sbmlns an SBMLNamespaces object that is used to determine the
    * characteristics of the ListOfSpeciesReferences object to be created.
    */
 public ListOfSpeciesReferences(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfSpeciesReferences__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#33
0
 /**
    * Creates a new SpeciesType using the given SBMLNamespaces object
    * @p sbmlns.
    *
    *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * It is worth emphasizing that although this constructor does not take
    * an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
    * (identifier) attribute of a SpeciesType object is required to have a value.
    * Thus, callers are cautioned to assign a value after calling this
    * constructor.  Setting the identifier can be accomplished using the
    * method SBase::setId(@if java String@endif).
    *
    * @param sbmlns an SBMLNamespaces object.
    *
    *
  * @throws SBMLConstructorException
  * Thrown if the given @p sbmlns is inconsistent or incompatible
  * with this object.
  *
  *
    *
    *
  * @note Attempting to add an object to an SBMLDocument having a different
  * combination of SBML Level, Version and XML namespaces than the object
  * itself will result in an error at the time a caller attempts to make the
  * addition.  A parent object must have compatible Level, Version and XML
  * namespaces.  (Strictly speaking, a parent may also have more XML
  * namespaces than a child, but the reverse is not permitted.)  The
  * restriction is necessary to ensure that an SBML model has a consistent
  * overall structure.  This requires callers to manage their objects
  * carefully, but the benefit is increased flexibility in how models can be
  * created by permitting callers to create objects bottom-up if desired.  In
  * situations where objects are not yet attached to parents (e.g.,
  * SBMLDocument), knowledge of the intented SBML Level and Version help
  * libSBML determine such things as whether it is valid to assign a
  * particular value to an attribute.
  *
  *
    */
 public SpeciesType(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_SpeciesType__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
 void setPlugins(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.L3ParserSettings_setPlugins(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
示例#35
0
 /**
    * Creates a new KineticLaw using the given SBMLNamespaces object
    * @p sbmlns.
    *
    * *
  *
  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
  * information.  It is used to communicate the SBML Level, Version, and (in
  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
  * common approach to using libSBML's SBMLNamespaces facilities is to create an
  * SBMLNamespaces object somewhere in a program once, then hand that object
  * as needed to object constructors that accept SBMLNamespaces as arguments.
  *
  *
    *
    * @param sbmlns an SBMLNamespaces object.
    *
    * @throws SBMLConstructorException
    * Thrown if the given @p level and @p version combination, or this kind
    * of SBML object, are either invalid or mismatched with respect to the
    * parent SBMLDocument object.
    *
    * *
  * @note Attempting to add an object to an SBMLDocument having a different
  * combination of SBML Level, Version and XML namespaces than the object
  * itself will result in an error at the time a caller attempts to make the
  * addition.  A parent object must have compatible Level, Version and XML
  * namespaces.  (Strictly speaking, a parent may also have more XML
  * namespaces than a child, but the reverse is not permitted.)  The
  * restriction is necessary to ensure that an SBML model has a consistent
  * overall structure.  This requires callers to manage their objects
  * carefully, but the benefit is increased flexibility in how models can be
  * created by permitting callers to create objects bottom-up if desired.  In
  * situations where objects are not yet attached to parents (e.g.,
  * SBMLDocument), knowledge of the intented SBML Level and Version help
  * libSBML determine such things as whether it is valid to assign a
  * particular value to an attribute.
  *
  *
    */
 public KineticLaw(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_KineticLaw__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#36
0
 ListOfSpeciesReferences(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_ListOfSpeciesReferences__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
        public void test_SBMLNamespaces_constructor()
        {
            SBMLNamespaces s;

              try
              {
            s = new SBMLNamespaces(3,1);
              }
              catch (SBMLConstructorException e)
              {
             s = null;
              }
              assertTrue(s != null);
        }
        bool hasCorrectNamespace(SBMLNamespaces namespaces)
        {
            bool ret = libsbmlPINVOKE.L3v2extendedmathASTPlugin_hasCorrectNamespace(swigCPtr, SBMLNamespaces.getCPtr(namespaces));

            return(ret);
        }
 /**
    * Creates a new ListOfEventAssignments object.
    *
    * The object is constructed such that it is valid for the SBML Level and
    * Version combination determined by the SBMLNamespaces object in @p
    * sbmlns.
    *
    * @param sbmlns an SBMLNamespaces object that is used to determine the
    * characteristics of the ListOfEventAssignments object to be created.
    */
 public ListOfEventAssignments(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfEventAssignments__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#40
0
 SBMLConstructorException(string elementName, SBMLNamespaces xmlns) : this(libsbmlPINVOKE.new_SBMLConstructorException__SWIG_2(elementName, SBMLNamespaces.getCPtr(xmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#41
0
 /** */
 /* libsbml-internal */
 public void setSBMLNamespacesAndOwn(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.SBase_setSBMLNamespacesAndOwn(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
 SBMLDocumentPlugin(string uri, string prefix, SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_SBMLDocumentPlugin__SWIG_0(uri, prefix, SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#43
0
 /**
    * Copy constructor; creates a copy of a SBMLNamespaces.
    *
    * @param orig the SBMLNamespaces instance to copy.
    *
    * @throws SBMLConstructorException
    * Thrown if the argument @p orig is @c null.
    */
 public SBMLNamespaces(SBMLNamespaces orig)
     : this(libsbmlPINVOKE.new_SBMLNamespaces__SWIG_5(SBMLNamespaces.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
示例#44
0
 public void prepend(SBMLNamespaces item)
 {
     libsbmlPINVOKE.SBMLNamespacesList_prepend(swigCPtr, SBMLNamespaces.getCPtr(item));
 }
示例#45
0
        internal static HandleRef getCPtrAndDisown(SBMLNamespaces obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
            ptr             = obj.swigCPtr;
            obj.swigCMemOwn = false;
            }

            return ptr;
        }
 private IntPtr SwigDirectorgetTargetNamespaces()
 {
     return(SBMLNamespaces.getCPtr(getTargetNamespaces()).Handle);
 }
 /**
    * Creates a new ListOfFunctionDefinitions object.
    *
    * The object is constructed such that it is valid for the SBML Level and
    * Version combination determined by the SBMLNamespaces object in @p
    * sbmlns.
    *
    * @param sbmlns an SBMLNamespaces object that is used to determine the
    * characteristics of the ListOfFunctionDefinitions object to be created.
    *
    *
  * @throws SBMLConstructorException
  * Thrown if the given @p sbmlns is inconsistent or incompatible
  * with this object.
  *
  *
    *
    *
  * @note Attempting to add an object to an SBMLDocument having a different
  * combination of SBML Level, Version and XML namespaces than the object
  * itself will result in an error at the time a caller attempts to make the
  * addition.  A parent object must have compatible Level, Version and XML
  * namespaces.  (Strictly speaking, a parent may also have more XML
  * namespaces than a child, but the reverse is not permitted.)  The
  * restriction is necessary to ensure that an SBML model has a consistent
  * overall structure.  This requires callers to manage their objects
  * carefully, but the benefit is increased flexibility in how models can be
  * created by permitting callers to create objects bottom-up if desired.  In
  * situations where objects are not yet attached to parents (e.g.,
  * SBMLDocument), knowledge of the intented SBML Level and Version help
  * libSBML determine such things as whether it is valid to assign a
  * particular value to an attribute.
  *
  *
    */
 public ListOfFunctionDefinitions(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfFunctionDefinitions__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
 L3ParserSettings(Model model, int parselog, bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive, SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_L3ParserSettings__SWIG_1(Model.getCPtr(model), parselog, collapseminus, parseunits, avocsymbol, caseSensitive, SBMLNamespaces.getCPtr(sbmlns)), true)
 {
 }