4

Maybe the title isn't that clear so I will explain this a little bit further. I use biojava to perform BLAST searches. However this BLAST.jar contains a lot of classes:

org/biojava/bio/program/PdbToXMLConverter
org/biojava/bio/program/sax/ClustalWAlignmentSAXParser
org/biojava/bio/program/sax/SummaryLineHelperIF
org/biojava/bio/program/sax/BlastLikeAlignmentSAXParser
org/biojava/bio/program/sax/AbstractNativeAppSAXParser
org/biojava/bio/program/sax/GenericSAXParserTest
org/biojava/bio/program/sax/NamespaceConfigurationIF
org/biojava/bio/program/sax/HSPSummaryHelper
org/biojava/bio/program/sax/SimpleXMLEmitterTestHelper
org/biojava/bio/program/sax/BlastSAXParser
org/biojava/bio/program/sax/GCGBlastSummaryLineHelper
org/biojava/bio/program/sax/NcbiBlastSummaryLineHelper
org/biojava/bio/program/sax/QName
org/biojava/bio/program/sax/WuBlastSummaryLineHelper
org/biojava/bio/program/sax/blastxml/StAXHandlerFactory
org/biojava/bio/program/sax/blastxml/HspHandler
org/biojava/bio/program/sax/blastxml/BlastAggregator
org/biojava/bio/program/sax/ blastxml/IterationHitsHandler
org/biojava/bio/program/sax/blastxml/BlastOutputHandler
org/biojava/bio/program/sax/blastxml/BlastOutputIterationsHandler
org/biojava/bio/program/sax/blastxml/HitHandler
org/biojava/bio/program/sax/blastxml/StAXFeatureHandlerMod
org/biojava/bio/program/sax/blastxml/IterationHandler
org/biojava/bio/program/sax/blastxml/BlastXMLParserFacade
org/biojava/bio/program/sax/blastxml/StAXFeatureHandler
org/biojava/bio/program/sax/blastxml/HitHspsHandler
org/biojava/bio/program/sax/blastxml/BlastXMLParser
org/biojava/bio/program/sax/FastaSequenceSAXParser
org/biojava/bio/program/sax/PdbSAXParser
org/biojava/bio/program/sax/HitSectionSAXParser
org/biojava/bio/program/sax/BlastLikeSAXParser
org/biojava/bio/program/sax/FastaSearchParser
org/biojava/bio/program/sax/BlastLikeVersionSupport
org/biojava/bio/program/sax/SequenceAlignmentSAXParser
org/biojava/bio/program/sax/BaseXMLWriterTest Helper
org/biojava/bio/program/sax/FastaSearchSAXParser
org/biojava/bio/program/sax/HmmerAlignmentSAXParser
org/biojava/bio/program/sax/NeedleAlignmentSAXParser
org/biojava/bio/program/sax/DomainSectionSAXParser
org/biojava/bio/program/sax/HmmerSummaryLineHelper
org/biojava/bio/program/BlastLikeToXMLConverter
org/biojava/bio/program/ssbind/StAXHandlerFactory
org/biojava/bio/program/ssbind/SeqSimilarityStAXHandler
org/biojava/bio/program/ssbind/StAXHandlerBinding
org/biojava/bio/program/ssbind/HSPSummaryStAXHandler
org/biojava/bio/program/ssbind/BlastLikeHomologyBuilder
org/biojava/bio/program/ssbind/ViewSequenceFactory
org/biojava/bio/program/ssbind/SeqSimilarityStAXAdapter
org/biojava/bio/program/ssbind/AlphabetResolver
org/biojava/bio/program/ssbind/HeaderStAXHandler
org/biojava/bio/program/ssbind/HitStAXHandler
org/biojava/bio/program/ssbind/SeqSimilarityAdapter
org/biojava/bio/program/ssbind/Simi larityPairBuilder
org/biojava/bio/program/ssbind/AlignmentStAXHandler
org/biojava/bio/program/ssbind/HSPStAXHandler
org/biojava/bio/program/ssbind/BlastLikeSearchBuilder

Should the interactions between these classes be shown in the UML class diagram? If not which approach is used to show already exisiting libraries in an UML class diagram?

4

There are a few options.

You could leave these classes out entirely. It would greatly simplify your diagram, but if you have classes that inherent from, extend, contain compositions or aggregations of, or otherwise have similar relations, then this may lead to ambiguities in your digram.

You could include a package on your diagram. Any class that has a relationship to one of these classes could have a relation to the package. Again, this may leave ambiguities in the eyes of the reader.

You could include these classes on the diagram, but have no attributes or methods shown. This way, your classes (which would likely be shown in more detail) will have specific relations to classes in this library. If you choose, you can put all of these classes inside of a package contain to indicate that they all belong to a package, although I find that decreases readability.

Keep in mind that you may not need to show these classes on a class diagram at all. Depending on how you are using them and how they are related to your classes, it may just decrease readability. Use your own judgement as to what features to show on different diagrams.

  • Thankyou! actually I have only one of my own classes (called BlastHandler) which interacts with the library(called BLAST). So I just want to draw it like BlastHandler --Association--> BLAST. However if I would add the package "BLAST" should I create all these classes inside this package or could I leave these classes out? @Thomas Owens – KingBoomie Mar 7 '17 at 19:28
  • @RickBeeloo In that case, I'd have your class BlastHandler have an appropriate relation (dependency or association, perhaps?) to a package called BLAST. It sounds like you can leave the other classes out to me. – Thomas Owens Mar 7 '17 at 19:30
2

That depends on what you want to visualize in your UML diagram.

You rarely show all the object relations of a non-trivial project in a single UML diagram. That would quickly turn out as an unreadable mess which nobody can make anything of. You usually use UML as a tool to visualize a specific aspect of your software architecture, leaving out any details which don't matter for what you want to explain.

Sometimes you want to explain the interactions between your entities and entities from libraries. In that case you would visualize these entities using the same symbols as you use for your own. But even then you would only include those which are interesting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.