Package org.cipres.treebase.domain.matrix

Examples of org.cipres.treebase.domain.matrix.CharPartition


        CharacterPartition partition = (CharacterPartition) ss;
        // org.cipres.treebase.domain.matrix.CharWeightSet tbWeightSet = create(
        // pMesqMatrix,
        // wtSet,
        // pMatrix);
        CharPartition tbPartition = createPartition(pMesqMatrix, partition);

        pMatrix.getCharPartitions().add(tbPartition);
      }
    }
View Full Code Here


   * @param pMesqMatrix
   * @param partition
   * @return
   */
  private CharPartition createPartition(CharacterData pMesqMatrix, CharacterPartition partition) {
    CharPartition tbPartition = new CharPartition();

    tbPartition.setTitle(partition.getName());

    // int numChars = pMesqMatrix.getNumChars();
    // Collection<CharGroup> tbGroups = new ArrayList<CharGroup>();

    CharactersGroup[] parts = partition.getGroups();
    // boolean firstTime = true;

    if (parts != null) {
      for (int j = 0; j < parts.length; j++) {
        ColumnRangeConvertHelper aRangeHelper = getListOfMatches((Listable[]) partition
          .getProperties(), parts[j], CharacterStates.toExternal(0));
        if (aRangeHelper != null) {
          CharGroup aGroup = new CharGroup();
          aGroup.setTitle(StringUtil.tokenize(parts[j].getName()));
          aGroup.setCharColumns(aRangeHelper.getColRanges());

          tbPartition.addCharGroup(aGroup);
        }
      }
    }

    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug(tbPartition.getNexusString());
    }
    return tbPartition;
  }
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.matrix.CharPartition

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.