Package org.cipres.treebase.framework

Examples of org.cipres.treebase.framework.ExecutionResult.addErrorMessage()


    List<RowSegmentField> pMappedFields,
    boolean pSkipFirstRow) {

    ExecutionResult returnVal = new ExecutionResult();
    if (pStudyId == null || pMatrixId == null || pFile == null || pMappedFields == null) {
      returnVal.addErrorMessage("Null parameters passed in. Cannot create Row Segment.");
      return returnVal;
    }
   
    TSVFileParser parser = new TSVFileParser();
    List<List<String>> values = parser.parseFile(pFile, pSkipFirstRow, returnVal);
View Full Code Here


   */
  public ExecutionResult createUser(User pUser) {
    ExecutionResult exeResult = new ExecutionResult();

    if (pUser == null) {
      exeResult.addErrorMessage("The user object is empty.");
    } else {

      // the match is case sensitive.
      if (findUserByName(pUser.getUsername()) != null) {
        exeResult.addErrorMessage("Username is already taken.  Please try another one.");
View Full Code Here

      exeResult.addErrorMessage("The user object is empty.");
    } else {

      // the match is case sensitive.
      if (findUserByName(pUser.getUsername()) != null) {
        exeResult.addErrorMessage("Username is already taken.  Please try another one.");
      }

      // the match is case insensitive.
      List<User> existingUsers = findUserByEmail(pUser.getEmailAddressString());
View Full Code Here

      // the match is case insensitive.
      List<User> existingUsers = findUserByEmail(pUser.getEmailAddressString());

      if (existingUsers != null && !existingUsers.isEmpty()) {
        exeResult
          .addErrorMessage("An account has already been created for this email address.");
      }

      if (exeResult.isSuccessful()) {
        pUser.setRole(getUserHome().getUserRole());
View Full Code Here

        if (m != null) {
          if (matrixTaxonLabels.isEmpty()) {
            matrixTaxonLabels.addAll(m.getAllTaxonLabels());
          } else if (!matrixTaxonLabels.containsAll(m.getAllTaxonLabels())) {
            // all matrices must have the same set of taxon labels.
            result.addErrorMessage("Error: matrix(id " + m.getId()
              + "): all matrices must have the same set of taxon labels");
          }
        }

        if (tree != null) {
View Full Code Here

    }

    // tree taxon labels must be a subset of matrix taxon labels.
    for (PhyloTree tree : allTrees) {
      if (!matrixTaxonLabels.containsAll(tree.getAllTaxonLabels())) {
        result.addErrorMessage("Error: tree(id " + tree.getId()
          + ") taxon labels must be a subset of matrix taxon labels");
      }
    }

    setValidated(result.isSuccessful());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.