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 java.util.List; 024 025import org.biojava.bio.seq.io.ParseException; 026 027/** 028 * Listens to events that represent Nexus characters blocks. 029 * 030 * @author Richard Holland 031 * @author Tobias Thierer 032 * @author Jim Balhoff 033 * @since 1.6 034 */ 035public interface CharactersBlockListener extends NexusBlockListener { 036 037 /** 038 * Set the NTAX value. 039 * 040 * @param dimensionsNTax 041 * the NTAX value. 042 */ 043 public void setDimensionsNTax(int dimensionsNTax); 044 045 /** 046 * Set the NCHAR value. 047 * 048 * @param dimensionsNChar 049 * the NCHAR value. 050 */ 051 public void setDimensionsNChar(int dimensionsNChar); 052 053 public void setDataType(final String dataType); 054 055 public void setRespectCase(final boolean respectCase); 056 057 public void setMissing(final String missing); 058 059 public void setGap(final String gap); 060 061 public void addSymbol(final String symbol); 062 063 public void addEquate(final String symbol, final List symbols); 064 065 public void setMatchChar(final String matchChar); 066 067 public void setLabels(final boolean labels); 068 069 public void setTransposed(final boolean transposed); 070 071 public void setInterleaved(final boolean interleaved); 072 073 public void addItem(final String item); 074 075 public void setStatesFormat(final String statesFormat); 076 077 public void setTokens(final boolean tokens); 078 079 public void setEliminateStart(final int eliminateStart); 080 081 public void setEliminateEnd(final int eliminateEnd); 082 083 /** 084 * Add a TAXLABEL. If it already exists, or is a number that refers to an 085 * index position that already exists, an exception is thrown. 086 * 087 * @param taxLabel 088 * the label to add. 089 * @throws ParseException 090 * if the label cannot be added. 091 */ 092 public void addTaxLabel(final String taxLabel) throws ParseException; 093 094 public void addCharState(final String charState); 095 096 public void setCharStateLabel(final String charState, final String label); 097 098 public void addCharStateKeyword(final String charState, final String keyword); 099 100 public void addCharLabel(final String charLabel); 101 102 public void addState(final String state); 103 104 public void addStateLabel(final String state, final String label); 105 106 public void addMatrixEntry(final String taxa); 107 108 public void appendMatrixData(final String taxa, final Object data); 109}