Inheritance: IDisposable
Esempio n. 1
0
 public void test_SBMLNamespaces_L2V1()
 {
     SBMLNamespaces sbml = new SBMLNamespaces(2,1);
       assertTrue( sbml.getLevel() == 2 );
       assertTrue( sbml.getVersion() == 1 );
       XMLNamespaces ns = sbml.getNamespaces();
       assertTrue( ns.getLength() == 1 );
       assertTrue( ns.getURI(0) ==  "http://www.sbml.org/sbml/level2" );
       assertTrue( ns.getPrefix(0) ==  "" );
       sbml = null;
 }
Esempio n. 2
0
 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;
 }
 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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 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_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;
 }
Esempio n. 8
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;
 }
 /**
    * Creates a new ListOfConstraints 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 ListOfConstraints object to be created.
    */
 public ListOfConstraints(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfConstraints__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
 }
Esempio n. 10
0
 CompartmentType(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 11
0
 internal static HandleRef getCPtr(SBMLNamespaces obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 12
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;
        }
 /**
    * 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)
 {
 }
 /**
    * Creates a new ListOfSpeciesTypes 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 ListOfSpeciesTypes object to be created.
    */
 public ListOfSpeciesTypes(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfSpeciesTypes__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
 }
Esempio n. 15
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();
 }
Esempio n. 16
0
 KineticLaw(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 17
0
 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)
 {
 }
 ListOfFunctionDefinitions(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_ListOfFunctionDefinitions__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 19
0
 ListOfSpeciesReferences(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_ListOfSpeciesReferences__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 20
0
 EventAssignment(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_EventAssignment__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 21
0
 StoichiometryMath(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_StoichiometryMath__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 22
0
 void setSBMLNamespaces(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.XMLInputStream_setSBMLNamespaces(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
Esempio n. 23
0
 public static bool hasExpectedXHTMLSyntax(XMLNode xhtml, SBMLNamespaces sbmlns)
 {
     bool ret = libsbmlPINVOKE.SyntaxChecker_hasExpectedXHTMLSyntax__SWIG_0(XMLNode.getCPtr(xhtml), SBMLNamespaces.getCPtr(sbmlns));
     return ret;
 }
 private global::System.IntPtr SwigDirectorgetTargetNamespaces()
 {
     return(SBMLNamespaces.getCPtr(getTargetNamespaces()).Handle);
 }
Esempio n. 25
0
 /**
    * Creates a new FunctionDefinition 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 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 FunctionDefinition(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_FunctionDefinition__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 26
0
 /**
    *  Constructor
    *
    * @param uri the URI of package
    * @param prefix the prefix for the given 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)
 {
 }
Esempio n. 27
0
 public void test_L3_Species_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Species s = new  Species(sbmlns);
       assertTrue( s.getTypeCode() == libsbml.SBML_SPECIES );
       assertTrue( s.getMetaId() == "" );
       assertTrue( s.getNotes() == null );
       assertTrue( s.getAnnotation() == null );
       assertTrue( s.getLevel() == 3 );
       assertTrue( s.getVersion() == 1 );
       assertTrue( s.getNamespaces() != null );
       assertTrue( s.getNamespaces().getLength() == 2 );
       assertTrue( s.getId() == "" );
       assertTrue( s.getName() == "" );
       assertTrue( s.getCompartment() == "" );
       assertEquals( true, isnan(s.getInitialAmount()) );
       assertEquals( true, isnan(s.getInitialConcentration()) );
       assertTrue( s.getSubstanceUnits() == "" );
       assertTrue( s.getHasOnlySubstanceUnits() == false );
       assertTrue( s.getBoundaryCondition() == false );
       assertTrue( s.getConstant() == false );
       assertTrue( s.getConversionFactor() == "" );
       assertEquals( false, s.isSetId() );
       assertEquals( false, s.isSetName() );
       assertEquals( false, s.isSetCompartment() );
       assertEquals( false, s.isSetInitialAmount() );
       assertEquals( false, s.isSetInitialConcentration() );
       assertEquals( false, s.isSetSubstanceUnits() );
       assertEquals( false, s.isSetHasOnlySubstanceUnits() );
       assertEquals( false, s.isSetBoundaryCondition() );
       assertEquals( false, s.isSetConstant() );
       assertEquals( false, s.isSetConversionFactor() );
       s = null;
 }
 /**
    * Sets the target namespace.
    *
    * @param targetNS the target namespace to use.
    */
 public void setTargetNamespaces(SBMLNamespaces targetNS)
 {
     libsbmlPINVOKE.ConversionProperties_setTargetNamespaces(swigCPtr, SBMLNamespaces.getCPtr(targetNS));
 }
Esempio n. 29
0
 internal static HandleRef getCPtr(SBMLNamespaces obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Esempio n. 30
0
 /**
    * Sets the SBMLNamespaces object to allow this stream to reference
    * the available SBML namespaces being read.
    */
 public void setSBMLNamespaces(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.XMLOutputStream_setSBMLNamespaces(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
Esempio n. 31
0
 public Compartment(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_Compartment__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 32
0
 LocalParameter(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_LocalParameter__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 /**
    * Creates a new ListOfInitialAssignments 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 ListOfInitialAssignments object to be created.
    */
 public ListOfInitialAssignments(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOfInitialAssignments__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 34
0
 void loadASTPlugins(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.ASTBase_loadASTPlugins(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
Esempio n. 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 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 KineticLaw(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_KineticLaw__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
 public SBMLConstructorException(string elementName, SBMLNamespaces xmlns)
     : this(libsbmlPINVOKE.new_SBMLConstructorException__SWIG_2(elementName, SBMLNamespaces.getCPtr(xmlns)), true)
 {
 }
 /**
    * Constructor that initializes the conversion properties
    * with a specific SBML target namespace.
    *
    * @param targetNS the target namespace to convert to
    */
 public ConversionProperties(SBMLNamespaces targetNS)
     : this(libsbmlPINVOKE.new_ConversionProperties__SWIG_0(SBMLNamespaces.getCPtr(targetNS)), true)
 {
 }
Esempio n. 38
0
 /**
    * Creates a new AssignmentRule 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 this class constructor is to create an
    * SBMLNamespaces object somewhere in a program, once, then pass it to
    * object constructors such as this one when needed.
    *
    * @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 an AssignmentRule object to an SBMLDocument
  * (e.g., using Model::addRule(@if java Rule r@endif)), the SBML Level, SBML
  * Version and XML namespace of the document @em override the values used
  * when creating the AssignmentRule object via the AssignmentRule constructors.
  * This is necessary to ensure that an SBML document has a consistent overall
  * structure.  Nevertheless, the ability to supply the values at the time of
  * creation of a AssignmentRule 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 AssignmentRule(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_AssignmentRule__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 39
0
 /**
    * Creates a new ListOf with a given SBMLNamespaces object.
    *
    * @param sbmlns the set of SBML namespaces that this ListOf should
    * contain.
    *
    *
  * @note Bare ListOf @if conly structures @else objects@endif are
  * impossible to add to SBML models.  The ListOf
  * @if conly structure type@else class@endif is simply the base
  * of <em>other</em> @if conly structure types @else classes@endif in
  * libSBML.  Calling programs are not intended to create bare ListOf
  * @if conly structures @else objects@endif themselves.
    *
    *
  * @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 ListOf(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_ListOf__SWIG_3(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 40
0
 void setPlugins(SBMLNamespaces sbmlns)
 {
     libsbmlPINVOKE.L3ParserSettings_setPlugins(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
 }
Esempio n. 41
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 id@endif).
    *
    * @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 SpeciesType object to an SBMLDocument
  * (e.g., using Model::addSpeciesType(@if java SpeciesType st@endif)),
  * the SBML Level, SBML Version and XML namespace of the document @em
  * override the values used when creating the SpeciesType 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 SpeciesType 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 SpeciesType(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_SpeciesType__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
 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;
 }
Esempio n. 43
0
 /**
    * Creates a new Parameter 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 Parameter 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 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 Parameter(SBMLNamespaces sbmlns)
     : this(libsbmlPINVOKE.new_Parameter__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Esempio n. 44
0
 SBMLNamespaces(SBMLNamespaces orig) : this(libsbmlPINVOKE.new_SBMLNamespaces__SWIG_5(SBMLNamespaces.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending)
     {
         throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
     }
 }