001/* 002 * BioJava development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * For more information on the BioJava project and its aims, 015 * or to join the biojava-l mailing list, visit the home page 016 * at: 017 * 018 * http://www.biojava.org/ 019 * 020 */ 021package org.biojavax.bio.phylo.io.nexus; 022 023import org.biojava.bio.seq.io.ParseException; 024 025/** 026 * Listens to events that represent Nexus distances blocks. 027 * 028 * @author Richard Holland 029 * @author Tobias Thierer 030 * @author Jim Balhoff 031 * @since 1.6 032 */ 033public interface DistancesBlockListener extends NexusBlockListener { 034 035 /** 036 * Set the NTAX value. 037 * 038 * @param dimensionsNTax 039 * the NTAX value. 040 */ 041 public void setDimensionsNTax(int dimensionsNTax); 042 043 /** 044 * Set the NCHAR value. 045 * 046 * @param dimensionsNChar 047 * the NCHAR value. 048 */ 049 public void setDimensionsNChar(int dimensionsNChar); 050 051 public void setTriangle(final String triangle); 052 053 public void setDiagonal(final boolean diagonal); 054 055 public void setLabels(final boolean labels); 056 057 public void setMissing(final String missing); 058 059 public void setInterleaved(final boolean interleaved); 060 061 /** 062 * Add a TAXLABEL. If it already exists, or is a number that refers to an 063 * index position that already exists, an exception is thrown. 064 * 065 * @param taxLabel 066 * the label to add. 067 * @throws ParseException 068 * if the label cannot be added. 069 */ 070 public void addTaxLabel(final String taxLabel) throws ParseException; 071 072 public void addMatrixEntry(final String taxa); 073 074 public void appendMatrixData(final String taxa, final Object data); 075}