Package org.cipres.treebase.domain.matrix

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


      String itemName = continuousData.getItemName(j);
      mItemDefinitionNames[j] = itemName;
      mItemDefinitions[j] = anItem;
       
      // This can be null, means the default definition 'AVG' is used.
      ItemDefinition definition = getItemDefinition(itemName);
      //ItemDefinitionJDBC itemDefJDBC = new ItemDefinitionJDBC();
      //itemDefJDBC.setColumnIndex(pNewColumnIndex);
      //itemDefJDBC.setItemDefinitionDesc(itemName);
     
      if (definition != null) {
View Full Code Here


   *
   * @param pItemName
   * @return
   */
  private ItemDefinition getItemDefinition(String pItemName) {
    ItemDefinition anItem = null;
    if (!TreebaseUtil.isEmpty(pItemName)) {
      anItem = getItemDefinitionHome().findPredefinedItemDefinition(pItemName);

      if (anItem == null) {
        // not default, create one:
        anItem = new ItemDefinition();
        anItem.setDescription(pItemName);
      }
    }

    return anItem;
  }
View Full Code Here

          ContinuousMatrixElement anElement = new ContinuousMatrixElement();
          anElement.setValue(elementValue);
          anElement.setColumn(matrixColumn);

          // This can be null, means the default definition 'AVG' is used.
          ItemDefinition definition = getItemDefMap().get(anItem);

          if (definition != null) {
            anElement.setDefinition(definition);
          }
View Full Code Here

  public ItemDefinition findPredefinedItemDefinition(String pDescription) {
    if (TreebaseUtil.isEmpty(pDescription)) {
      return null;
    }

    ItemDefinition item = null;
    String[] predefinedItems = ItemDefinitionHome.PREDEFINED_ITEMDEFINITIONS;
    for (int i = 0; i < predefinedItems.length; i++) {
      String anItemDes = predefinedItems[i];
      if (anItemDes.compareToIgnoreCase(pDescription) == 0) {
        // Average is equivalent to Avg
View Full Code Here

   * Find by description.
   *
   * Creation date: Apr 20, 2006 2:34:56 PM
   */
  public ItemDefinition findByDescription(String pDesc) {
    ItemDefinition returnVal = null;

    Criteria c = getSession().createCriteria(ItemDefinition.class).add(
      Expression.eq("description", pDesc).ignoreCase());

    List results = c.list();
View Full Code Here

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

    String desc = "AveraGE";
    ItemDefinition result = getFixture().findPredefinedItemDefinition(desc);

    // verify
    assertTrue(result != null);
    assertTrue(result.getDescription().equals("Avg"));

    if (logger.isInfoEnabled()) {
      logger.info(testName + " verified predefinied item:" + desc);
    }
  }
View Full Code Here

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

    String desc = "MiN";
    ItemDefinition result = getFixture().findByDescription(desc);

    // verify
    assertTrue(result != null);
    assertTrue(result.getDescription().equalsIgnoreCase(desc));

    if (logger.isInfoEnabled()) {
      logger.info(testName + " verified type:" + desc);
    }
  }
View Full Code Here

TOP

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

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.