Changeset 6755


Ignore:
Timestamp:
Feb 20, 2015, 1:00:55 PM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1325: Lists of items (similar funcion as biomaterial lists)

Deprecated several classes related to biomaterial lists to prepare for it's removal.

Implemented support for item lists in the 'Item overview' feature.

Location:
trunk
Files:
2 added
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/Base.java

    r6749 r6755  
    12191219    @since 2.10
    12201220  */
     1221  @Deprecated
    12211222  public static net.sf.basedb.util.Enumeration<String, String>
    12221223    getBioMaterialListsEnum(DbControl dc, Item memberType, Collection<Include> include)
  • trunk/src/core/net/sf/basedb/core/BioMaterialList.java

    r6390 r6755  
    4646  @base.modified $Date$
    4747*/
     48@Deprecated
    4849public class BioMaterialList
    4950  extends AnnotatedItem<BioMaterialListData>
  • trunk/src/core/net/sf/basedb/core/Item.java

    r6738 r6755  
    360360    The item is a {@link BioMaterialList}
    361361  */
     362  @Deprecated
    362363  BIOMATERIALLIST(209, "Biomaterial list", "bml", BioMaterialList.class, BioMaterialListData.class, DefinedPermissions.shareable,
    363364      480),
  • trunk/src/core/net/sf/basedb/core/data/BioMaterialListData.java

    r6390 r6755  
    3636  @base.modified $Date$
    3737*/
     38@Deprecated
    3839public class BioMaterialListData
    3940  extends AnnotatedData
  • trunk/src/core/net/sf/basedb/util/overview/loader/BasicItemNodeLoaderFactory.java

    r6444 r6755  
    232232    registerCheckedNodeLoader(Item.BIOWELL, BioWellLoader.class);
    233233    registerCheckedNodeLoader(Item.BIOMATERIALLIST, BioMaterialListLoader.class);
     234    registerCheckedNodeLoader(Item.ITEMLIST, ItemListLoader.class);
    234235    registerCheckedNodeLoader(Item.BIOPLATEEVENT, BioPlateEventLoader.class);
    235236   
  • trunk/src/core/net/sf/basedb/util/overview/loader/BioMaterialListLoader.java

    r6390 r6755  
    4545  @since 3.2
    4646*/
     47@Deprecated
    4748public class BioMaterialListLoader
    4849  extends BasicItemNodeLoader<BioMaterialList>
  • trunk/src/core/net/sf/basedb/util/overview/loader/BioSourceLoader.java

    r6043 r6755  
    7070      BioMaterialListLoader.loadMemberNodes(this, dc, context, parentNode);
    7171    }
     72    if (parentType == Item.ITEMLIST)
     73    {
     74      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     75    }
    7276    return returnNode;
    7377  }
  • trunk/src/core/net/sf/basedb/util/overview/loader/DerivedBioAssayLoader.java

    r6090 r6755  
    9797      returnNode = createForwardNode((DerivedBioAssay)parentNode.getItem(dc), dc, context, parentNode);
    9898    }
    99    
     99    else if (parentType == Item.ITEMLIST)
     100    {
     101      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     102    }
    100103    return returnNode;
    101104  }
  • trunk/src/core/net/sf/basedb/util/overview/loader/ExtractLoader.java

    r6455 r6755  
    104104      BioMaterialListLoader.loadMemberNodes(this, dc, context, parentNode);
    105105    }
     106    else if (parentType == Item.ITEMLIST)
     107    {
     108      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     109    }
    106110    return returnNode;
    107111  }
     
    469473  }
    470474
    471   private void createForwardNode(BioMaterialList list, DbControl dc, OverviewContext context, Node listNode)
    472   {
    473    
    474   }
    475  
    476475  private Set<Extract> getExtractChain(Node node)
    477476  {
  • trunk/src/core/net/sf/basedb/util/overview/loader/PhysicalBioAssayLoader.java

    r6090 r6755  
    9292      returnNode = createForwardNode((ArraySlide)parentNode.getItem(dc), dc, context, parentNode);
    9393    }
     94    else if (parentType == Item.ITEMLIST)
     95    {
     96      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     97    }
    9498    return returnNode;
    9599  }
  • trunk/src/core/net/sf/basedb/util/overview/loader/RawBioAssayLoader.java

    r5807 r6755  
    9898      returnNode = createForwardNode((Extract)parentNode.getItem(dc), dc, context, parentNode);
    9999    }
     100    else if (parentType == Item.ITEMLIST)
     101    {
     102      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     103    }
    100104    return returnNode;
    101105  }
  • trunk/src/core/net/sf/basedb/util/overview/loader/SampleLoader.java

    r6043 r6755  
    9191      BioMaterialListLoader.loadMemberNodes(this, dc, context, parentNode);
    9292    }
     93    else if (parentType == Item.ITEMLIST)
     94    {
     95      ItemListLoader.loadMemberNodes(this, dc, context, parentNode);
     96    }
    9397    return returnNode;
    9498  }
  • trunk/src/core/net/sf/basedb/util/overview/node/BioMaterialListMemberNameGenerator.java

    r6043 r6755  
    3434  @base.modified $Date $
    3535*/
     36@Deprecated
    3637public class BioMaterialListMemberNameGenerator
    3738  implements NodeNameGenerator<BioMaterial>
  • trunk/src/test/TestAll.java

    r6739 r6755  
    8080    results.put("TestExtract", TestExtract.test_all());
    8181    results.put("TestTag", TestTag.test_all());
    82     results.put("TestBioMaterialList", TestBioMaterialList.test_all());
    8382    results.put("TestBioPlateType", TestBioPlateType.test_all());
    8483    results.put("TestBioPlate", TestBioPlate.test_all());
  • trunk/www/views/itemlists/lists.js

    r6753 r6755  
    8686      TabControl.addTabActivateListener('main.annotations', AnnotationsList.loadOnce);
    8787      TabControl.addTabActivateListener('main.members', lists.viewMembers);
     88      if (Doc.element('main.overview'))
     89      {
     90        TabControl.addTabActivateListener('main.overview', Overview.loadOnce);
     91      }
    8892      TabControl.addTabActivateListener('main.history', History.loadOnce);
    8993    }
  • trunk/www/views/itemlists/members/list_members.jsp

    r6747 r6755  
    637637    </t:tab>
    638638   
     639    <t:tab id="overview" title="Overview"
     640      tooltip="Display a tree overview of related items"
     641      visible="<%=list.getMemberType() != Item.FILE %>"/>
     642     
    639643    <t:tab id="history" title="Change history"
    640644      tooltip="Displays a log of all modifications made to this item"
  • trunk/www/views/itemlists/merge.jsp

    r6742 r6755  
    7474          <select name="mergeType" id="mergeType" style="width: 15em;">
    7575            <option value="union" <%="union".equals(mergeType) ? "selected" : ""%>
    76               >Add items to
     76              >Add items
    7777            <option value="intersection" <%="intersection".equals(mergeType) ? "selected" : ""%>
    78               >Keep items in
     78              >Keep items
    7979            <option value="complement" <%="complement".equals(mergeType) ? "selected" : ""%>
    80               >Remove items from
     80              >Remove items
     81          </select> that are<br>
     82          <select style="width: 10em;">
     83            <option>present in
     84            <option>child items to
     85            <option>parent items to
     86          </select>
     87          <select name="sourceMerge" id="sourceMerge" style="width: 7em;">
     88            <option value="union" <%="intersection".equals(mergeType) ? "" : "selected"%>
     89              >some
     90            <option value="intersection" <%="intersection".equals(mergeType) ? "selected" : ""%>
     91              >all
    8192          </select><br>
    82           this list that are present in
    83           <br>
    84           <select name="sourceMerge" id="sourceMerge" style="width: 15em;">
    85             <option value="union" <%="intersection".equals(mergeType) ? "" : "selected"%>
    86               >some of
    87             <option value="intersection" <%="intersection".equals(mergeType) ? "selected" : ""%>
    88               >all of
    89           </select><br>
    90           the other lists selected below.
     93          of the other lists selected below.
    9194          <p>
    9295          After the operation this list will
  • trunk/www/views/itemlists/view_list.jsp

    r6753 r6755  
    303303    </t:tab>
    304304    <t:tab id="members" title="Members" />
     305    <t:tab id="overview" title="Overview"
     306      tooltip="Display a tree overview of related items"
     307      visible="<%=list.getMemberType() != Item.FILE%>">
     308      <jsp:include page="../../common/overview/overview.jsp">
     309        <jsp:param name="item_type" value="<%=itemType.name()%>" />
     310        <jsp:param name="item_id" value="<%=itemId%>" />
     311        <jsp:param name="ID" value="<%=ID%>" />
     312      </jsp:include>
     313    </t:tab>     
    305314    <t:tab id="history" title="Change history"
    306315      tooltip="Displays a log of all modifications made to this item"
Note: See TracChangeset for help on using the changeset viewer.