removeNamespace() 공개 메소드

public removeNamespace ( string uri ) : int
uri string
리턴 int
예제 #1
0
 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");
 }