Changeset 6690


Ignore:
Timestamp:
Jan 21, 2015, 1:25:49 PM (8 years ago)
Author:
Nicklas Nordborg
Message:

References #1906: Display inherited annotations in list views

Implemented this for samples, extracts physical bioassays, derived bioassays and array (slide/batch/desing) list views

Location:
trunk/www
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r6604 r6690  
    108108try
    109109{
    110   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     110  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    111111  SnapshotManager manager = new SnapshotManager();
    112112  for (AnnotationType at : annotationTypeQuery.list(dc))
    113113  {
    114114    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     115  }
     116  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     117  for (AnnotationType at : annotationTypeQuery.list(dc))
     118  {
     119    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    115120  }
    116121  final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType);
     
    208213      item="<%=itemType%>"
    209214      subclass="fulltable"
     215      data-inherited-annotations="true"
    210216      >
    211217      <tbl:hidden
     
    453459        %>
    454460        <tbl:columndef
    455           id="<%="at"+at.getId()%>"
    456           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    457           property="<%="#"+at.getId()%>"
     461          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     462          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     463          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    458464          annotation="true"
    459465          datatype="<%=at.getValueType().getStringValue()%>"
    460466          enumeration="<%=annotationEnum%>"
    461467          smartenum="<%=at.getDisplayAsList() %>"
    462           sortable="<%=at.getMultiplicity() == 1%>"
     468          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    463469          filterable="true"
    464470          exportable="true"
     
    924930                      %>
    925931                      <tbl:cell
    926                         column="<%="at"+loader.getId()%>"
     932                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    927933                        ><tbl:cellvalue
    928934                          list="<%=loader.getValues()%>"
  • trunk/www/biomaterials/samples/list_samples.jsp

    r6604 r6690  
    106106try
    107107{
    108   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     108  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    109109  final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType);
    110110 
     
    138138  {
    139139    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     140  }
     141  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     142  for (AnnotationType at : annotationTypeQuery.list(dc))
     143  {
     144    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    140145  }
    141146  try
     
    197202      item="<%=itemType%>"
    198203      subclass="fulltable"
     204      data-inherited-annotations="true"
    199205      >
    200206      <tbl:hidden
     
    425431        %>
    426432        <tbl:columndef
    427           id="<%="at"+at.getId()%>"
    428           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    429           property="<%="#"+at.getId()%>"
     433          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     434          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     435          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    430436          annotation="true"
    431437          datatype="<%=at.getValueType().getStringValue()%>"
    432438          enumeration="<%=annotationEnum%>"
    433439          smartenum="<%=at.getDisplayAsList() %>"
    434           sortable="<%=at.getMultiplicity() == 1%>"
     440          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    435441          filterable="true"
    436442          exportable="true"
     
    855861                      %>
    856862                      <tbl:cell
    857                         column="<%="at"+loader.getId()%>"
     863                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    858864                        ><tbl:cellvalue
    859865                          list="<%=loader.getValues()%>"
  • trunk/www/lims/arraybatches/list_batches.jsp

    r6604 r6690  
    9898{
    9999  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    100   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     100  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    101101  SnapshotManager manager = new SnapshotManager();
    102102  for (AnnotationType at : annotationTypeQuery.list(dc))
    103103  {
    104104    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     105  }
     106  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     107  for (AnnotationType at : annotationTypeQuery.list(dc))
     108  {
     109    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    105110  }
    106111
     
    146151      item="<%=itemType%>"
    147152      subclass="fulltable"
     153      data-inherited-annotations="true"
    148154      >
    149155      <tbl:hidden
     
    256262        %>
    257263        <tbl:columndef
    258           id="<%="at"+at.getId()%>"
    259           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    260           property="<%="#"+at.getId()%>"
     264          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     265          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     266          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    261267          annotation="true"
    262268          datatype="<%=at.getValueType().getStringValue()%>"
    263269          enumeration="<%=annotationEnum%>"
    264270          smartenum="<%=at.getDisplayAsList() %>"
    265           sortable="<%=at.getMultiplicity() == 1%>"
     271          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    266272          filterable="true"
    267273          exportable="true"
     
    548554                      %>
    549555                      <tbl:cell
    550                         column="<%="at"+loader.getId()%>"
     556                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    551557                        ><tbl:cellvalue
    552558                          list="<%=loader.getValues()%>"
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r6604 r6690  
    111111try
    112112{
    113   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     113  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    114114  SnapshotManager manager = new SnapshotManager();
    115115  for (AnnotationType at : annotationTypeQuery.list(dc))
    116116  {
    117117    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     118  }
     119  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     120  for (AnnotationType at : annotationTypeQuery.list(dc))
     121  {
     122    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    118123  }
    119124
     
    172177      item="<%=itemType%>"
    173178      subclass="fulltable"
     179      data-inherited-annotations="true"
    174180      >
    175181      <tbl:hidden
     
    355361        %>
    356362        <tbl:columndef
    357           id="<%="at"+at.getId()%>"
    358           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    359           property="<%="#"+at.getId()%>"
     363          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     364          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     365          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    360366          annotation="true"
    361367          datatype="<%=at.getValueType().getStringValue()%>"
    362368          enumeration="<%=annotationEnum%>"
    363369          smartenum="<%=at.getDisplayAsList() %>"
    364           sortable="<%=at.getMultiplicity() == 1%>"
     370          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    365371          filterable="true"
    366372          exportable="true"
     
    675681                      %>
    676682                      <tbl:cell
    677                         column="<%="at"+loader.getId()%>"
     683                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    678684                        ><tbl:cellvalue
    679685                          list="<%=loader.getValues()%>"
  • trunk/www/lims/arrayslides/list_slides.jsp

    r6604 r6690  
    9494{
    9595  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    96   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     96  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    9797  SnapshotManager manager = new SnapshotManager();
    9898  for (AnnotationType at : annotationTypeQuery.list(dc))
    9999  {
    100100    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     101  }
     102  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     103  for (AnnotationType at : annotationTypeQuery.list(dc))
     104  {
     105    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    101106  }
    102107
     
    135140      item="<%=itemType%>"
    136141      subclass="fulltable"
     142      data-inherited-annotations="true"
    137143      >
    138144      <tbl:hidden
     
    265271        %>
    266272        <tbl:columndef
    267           id="<%="at"+at.getId()%>"
    268           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    269           property="<%="#"+at.getId()%>"
     273          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     274          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     275          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    270276          annotation="true"
    271277          datatype="<%=at.getValueType().getStringValue()%>"
    272278          enumeration="<%=annotationEnum%>"
    273279          smartenum="<%=at.getDisplayAsList() %>"
    274           sortable="<%=at.getMultiplicity() == 1%>"
     280          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    275281          filterable="true"
    276282          exportable="true"
     
    533539                      %>
    534540                      <tbl:cell
    535                         column="<%="at"+loader.getId()%>"
     541                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    536542                        ><tbl:cellvalue
    537543                          list="<%=loader.getValues()%>"
  • trunk/www/views/derivedbioassays/list_bioassays.jsp

    r6604 r6690  
    9898try
    9999{
    100   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     100  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    101101  SnapshotManager manager = new SnapshotManager();
    102102  for (AnnotationType at : annotationTypeQuery.list(dc))
    103103  {
    104104    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     105  }
     106  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     107  for (AnnotationType at : annotationTypeQuery.list(dc))
     108  {
     109    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    105110  }
    106111  final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType);
     
    168173      item="<%=itemType%>"
    169174      subclass="fulltable"
     175      data-inherited-annotations="true"
    170176      >
    171177      <tbl:hidden
     
    333339        %>
    334340        <tbl:columndef
    335           id="<%="at"+at.getId()%>"
    336           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    337           property="<%="#"+at.getId()%>"
     341          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     342          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     343          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    338344          annotation="true"
    339345          datatype="<%=at.getValueType().getStringValue()%>"
    340346          enumeration="<%=annotationEnum%>"
    341347          smartenum="<%=at.getDisplayAsList() %>"
    342           sortable="<%=at.getMultiplicity() == 1%>"
     348          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    343349          filterable="true"
    344350          exportable="true"
     
    750756                      %>
    751757                      <tbl:cell
    752                         column="<%="at"+loader.getId()%>"
     758                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    753759                        ><tbl:cellvalue
    754760                          list="<%=loader.getValues()%>"
  • trunk/www/views/physicalbioassays/list_bioassays.jsp

    r6684 r6690  
    102102try
    103103{
    104   final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
     104  ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
    105105  SnapshotManager manager = new SnapshotManager();
    106106  for (AnnotationType at : annotationTypeQuery.list(dc))
    107107  {
    108108    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at));
     109  }
     110  annotationTypeQuery = Base.getInheritedAnnotationColumns(cc.getSetting("columns"));
     111  for (AnnotationType at : annotationTypeQuery.list(dc))
     112  {
     113    annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at, false, true));
    109114  }
    110115  final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType);
     
    164169      item="<%=itemType%>"
    165170      subclass="fulltable"
     171      data-inherited-annotations="true"
    166172      >
    167173      <tbl:hidden
     
    314320        %>
    315321        <tbl:columndef
    316           id="<%="at"+at.getId()%>"
    317           title="<%=HTML.encodeTags(at.getName())+" [A]"%>"
    318           property="<%="#"+at.getId()%>"
     322          id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>"
     323          title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>"
     324          property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>"
    319325          annotation="true"
    320326          datatype="<%=at.getValueType().getStringValue()%>"
    321327          enumeration="<%=annotationEnum%>"
    322328          smartenum="<%=at.getDisplayAsList() %>"
    323           sortable="<%=at.getMultiplicity() == 1%>"
     329          sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>"
    324330          filterable="true"
    325331          exportable="true"
     
    687693                      %>
    688694                      <tbl:cell
    689                         column="<%="at"+loader.getId()%>"
     695                        column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>"
    690696                        ><tbl:cellvalue
    691697                          list="<%=loader.getValues()%>"
Note: See TracChangeset for help on using the changeset viewer.