I'm worried I may be misunderstanding the intended usage of BioJava. What made me question this was a simple example...
I followed the tutorial, and examples in the cookbook. I make a Sequence via the DNATools.createDNASequence(str, str) method. This returns a Sequence object. Sequence is an Interface, so there must be an implementation I don't see... however by following the examples, it shouldn't be necessary to worry about it. According to the tutorial there are 2 global pieces of annotation that have their own accessors - name and URN. The name gets set when I called createDNASequence, but how do I set the URN? There is no method declared on Sequence, or anything it inherits to be able to set the URN. This seems weird. So I start to dig through the source code. I find that createDNASequence(str, str) eventually ends up returning a SimpleSequence impl object, and sure enough, SimpleSequence implements setURN(str); So... in my code... if I want to set the URN, I need to create SimpleSequence objects explicitly instead of referencing them as Sequence objects. Like this: SimpleSequence simpSeq = (SimpleSequence)DNATools.createDNASequence(seq, name); This seems like an unintentional use of the package, and I only even came to this possibility by having to search through the source sode. If this is true and you are you not supposed to use the .impl classes directly, then how would I perform the simple task of setting the URN? Am I misunderstanding? Thanks much. -- View this message in context: http://www.nabble.com/Am-I-misunderstanding--tf2004940.html#a5507066 Sent from the BioJava forum at Nabble.com. _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
