Package org.nexml.model

Examples of org.nexml.model.CharacterState


    Set<CharacterState> xmlMissingStates = new HashSet<CharacterState>();
    for ( Character symbol : stateForSymbol.keySet() ) {
      char sym = symbol.charValue();     
      if ( sym != '-' && sym != '?' ) {
        String symString = symbol.toString();
        CharacterState xmlState = xmlStateSet.createCharacterState(symString);
        xmlMissingStates.add(xmlState);
        DiscreteCharState tbState = stateForSymbol.get(symbol);
        xmlState.setLabel(symString);
        attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class);       
      }       
    }
   
    // the missing symbol ("?") includes all others, including gap ("-")
View Full Code Here


   
    // lookup the equivalent state in tb and attach identifiers
    for(StateSet tbStateSet : tbMatrix.getStateSets() ) {
      for (DiscreteCharState tbState : tbStateSet.getStates() ) {
        String tbSymbol = tbState.getSymbol().toString().toUpperCase();
        CharacterState xmlState = xmlStateSet.lookupCharacterStateBySymbol(tbSymbol);
        if ( null == xmlState ) {
          xmlState = xmlStateSet.createCharacterState(tbSymbol);
        }
        attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class);
      }
View Full Code Here

    for ( MatrixColumn tbColumn : ((CharacterMatrix)tbMatrix).getColumns() ) {
     
      org.nexml.model.Character xmlCharacter = xmlCharacterList.get(charIndex);
      MatrixCell<CharacterState> xmlCell = xmlMatrix.getCell(xmlOTU, xmlCharacter);
      String value = "" + seq.charAt(charIndex);
      CharacterState xmlState = xmlMatrix.parseSymbol(value);
      xmlCell.setValue(xmlState);
      attachTreeBaseID ((Annotatable) xmlCell,  tbColumn , DiscreteMatrixElement.class);
     
      for ( RowSegment tbSegment : tbSegments ) {
        if ( tbSegment.getStartIndex() <= charIndex && charIndex <= tbSegment.getEndIndex() ) {
View Full Code Here

TOP

Related Classes of org.nexml.model.CharacterState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.