Deleting controlled vocabulary terms or URIs within those terms
03 Jun '09 08:47
Dear all,
I just tried to get rid of unnecessary CVTerms of some instances of SBase in libSBML 3.3.2 in Java. First I tried to apply a function within XMLAttributes to delete some URIs but I recognized that these don't do anything:
String myUnnecessaryURI = "something"; // just an example
XMLAttributes attribute = myCVTerm.getResources();
attribute.remove("rdf:resource", myUnnecessaryURI);
doesn't work. Second, I tried the following:
myCVTerm.removeResource(myUnnecessaryURI);
This method is even deprecated. I don't see any other method to remove any URIs. Furthermore, I didn't find any method in SBase that would allow the programmer to remove just one certain CVTerm. There is a method
unsetCVTerms();
in SBase. But I don't see how one can remove just one single CVTerm. It would be great if someone has an idea of what to do.