本文整理汇总了C#中libsbml.SBMLNamespaces类的典型用法代码示例。如果您正苦于以下问题:C# SBMLNamespaces类的具体用法?C# SBMLNamespaces怎么用?C# SBMLNamespaces使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SBMLNamespaces类属于libsbml命名空间,在下文中一共展示了SBMLNamespaces类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_SBMLNamespaces_L2V1
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;
}
示例2: 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;
}
示例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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}
示例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;
}
示例8: 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;
}
示例9: AssignmentRule
/**
* 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 [email protected])), 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();
}
示例10: SBMLConstructorException
public SBMLConstructorException(string elementName, SBMLNamespaces xmlns)
: this(libsbmlPINVOKE.new_SBMLConstructorException__SWIG_2(elementName, SBMLNamespaces.getCPtr(xmlns)), true)
{
}
示例11: setSBMLNamespaces
/**
* 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));
}
示例12: setTargetNamespaces
/**
* Sets the target namespace.
*
* @param targetNS the target namespace to use.
*/
public void setTargetNamespaces(SBMLNamespaces targetNS)
{
libsbmlPINVOKE.ConversionProperties_setTargetNamespaces(swigCPtr, SBMLNamespaces.getCPtr(targetNS));
}
示例13: SBMLDocumentPlugin
/**
* 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)
{
}
示例14: ListOfEventAssignments
/**
* 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)
{
}
示例15: 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;
}