Skip to main content

Advertisement

Fig. 5 | BMC Bioinformatics

Fig. 5

From: JPhyloIO: a Java library for event-based reading and writing of different phylogenetic file formats through a common interface

Fig. 5

UML diagram showing the data adapter interfaces providing access to the application model for JPhyloIO writers. From top to bottom the object relation (indicated by compositions) is shown, while the class hierarchy can be read from bottom to top. Note that not all but only exemplary methods are shown for each interface. The DocumentDataAdapter is the main adapter that provides access to other adapters modelling OTU lists, matrices and phylogenetic trees or networks. Not all application models will provide all these datatypes and therefore not need to implement all types of adapters. The format specific writer classes in JPhyloIO can access the data either by event getter methods (e.g., MatrixDataAdapter.getSequenceStartEvent()) with an event ID as its parameter or by writeXXX() methods (e.g., MatrixDataAdapter.writeSequencePart-ContentData()), which write a whole subsequence of the event stream to a special receiver object provided by the application. To simplify the adapter implementation for application developers only frequently used events are provided by getter methods, while the others can directly be written in a sequence by implementing an appropriate writer method. (Getter methods were introduced for cases where random access to events with known IDs is frequently necessary for writers, to avoid requesting a whole sequence, if only one event is needed. Providing some events by getter and some by writer methods in the data adapter model is a compromise between ease of implementation and runtime performance.). Some adapters share common functionality, which is modelled by common superinterfaces, such as AnnotatedDataAdapter or ElementDataAdapter

Back to article page