getNamespaces() public method

public getNamespaces ( ) : XMLNamespaces
return XMLNamespaces
 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;
 }
示例#3
0
        public static SBMLNamespaces DowncastSBMLNamespaces(IntPtr cPtr, bool owner)
        {
            if (cPtr.Equals(IntPtr.Zero)) return null;

            SBMLNamespaces sbn = new SBMLNamespaces(cPtr, false);
            if (sbn != null)
            {
            XMLNamespaces ns = sbn.getNamespaces();

            }
            return new SBMLNamespaces(cPtr, owner);
        }