Package org.cipres.treebase.domain.matrix

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


        warn("  Fixing matrix " + m.getId());
         
        // Map matrixDataType -> matrixKind
        {
          Collection<MatrixKind> mks = matrixService.findSomethingByString(MatrixKind.class, "description", matrixDataType);
          MatrixKind mk = null;
          if (mks.isEmpty()) {
            warn("Unknown MatrixKind '" + matrixDataType + "'; skipping it");
/*            // Or you can manufacture a fresh one here, which is not normally allowed
*                      // Note that mk.setDescription is private, so you will have to make it public to use this code
*                      // 20090320 MJD
View Full Code Here


  public MatrixKind findKindByDescription(String pDescription) {
    if (TreebaseUtil.isEmpty(pDescription)) {
      return null;
    }

    MatrixKind returnVal = null;

    Criteria c = getSession().createCriteria(MatrixKind.class).add(
      org.hibernate.criterion.Expression.eq("description", pDescription));

    returnVal = (MatrixKind) c.uniqueResult();
View Full Code Here

    if (logger.isInfoEnabled()) {
      logger.info("\n\t\tRunning Test: " + testName);
    }

    String desc = MatrixKind.KIND_AA;
    MatrixKind result = getFixture().findKindByDescription(desc);
   
    //verify
    assertTrue(result != null);
    assertTrue(result.getDescription().equals(desc));   

    if (logger.isInfoEnabled()) {
      logger.info(testName + " - end "); //$NON-NLS-1$
    }
  }
View Full Code Here

        testList.remove(0);
        request.setAttribute("errors", testList);
        return showForm(request, response, myerrors);
      } else {
        for (Matrix matrix : matrices) {
          MatrixKind kind = getMatrixHome().findKindByDescription(matrix.getKindDescription());
          matrix.setMatrixKind(kind);
        }
        getMatrixService().updateCollection(matrices);
      }
    }
View Full Code Here

TOP

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

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.