Changeset 5641
- Timestamp:
- May 25, 2011, 12:56:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 deleted
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/PermissionUtil.java
r5632 r5641 196 196 Arrays.asList(new Item[] 197 197 { 198 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, Item. LABELEDEXTRACT, Item.TAG,198 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, Item.TAG, 199 199 Item.BIOMATERIALLIST, Item.BIOPLATE, Item.BIOPLATETYPE, Item.BIOPLATEEVENT, Item.BIOPLATEEVENTTYPE, 200 200 Item.HYBRIDIZATION, Item.SCAN, Item.RAWBIOASSAY, Item.EXPERIMENT, Item.FORMULA -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/edit/EditUtil.java
r5632 r5641 56 56 public static final Item[] EDIT_ITEMS = new Item[] 57 57 { 58 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, Item. LABELEDEXTRACT, Item.TAG,58 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, Item.TAG, 59 59 Item.BIOPLATE, Item.BIOWELL, Item.BIOPLATETYPE, Item.BIOMATERIALLIST, Item.BIOMATERIALEVENT, 60 60 Item.BIOPLATEEVENT, Item.BIOPLATEEVENTTYPE, -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java
r5632 r5641 62 62 Item.SCAN, Item.IMAGE, Item.HYBRIDIZATION, 63 63 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, 64 Item. LABELEDEXTRACT, Item.TAG, Item.BIOMATERIALEVENT,64 Item.TAG, Item.BIOMATERIALEVENT, 65 65 Item.BIOMATERIALLIST, Item.BIOPLATE, Item.BIOWELL, Item.BIOPLATETYPE, 66 66 Item.BIOPLATEEVENT, Item.BIOPLATEEVENTTYPE, -
trunk/src/clients/web/net/sf/basedb/clients/web/resources/common.properties
r5632 r5641 104 104 item.extract Extract 105 105 item.extract+ Extracts 106 item.labeledextract Labeled extract107 item.labeledextract+ Labeled extracts108 106 item.tag Tag 109 107 item.tag+ Tags -
trunk/src/clients/web/net/sf/basedb/clients/web/resources/menu.properties
r5632 r5641 111 111 extracts.tooltip.1 Manage extracts 112 112 extracts.tooltip.0 You do not have permission to manage extracts 113 labeledextracts.tooltip.1 Manage labeled extracts114 labeledextracts.tooltip.0 You do not have permission to manage labeled extracts115 113 tags.tooltip.1 Manage tags 116 114 tags.tooltip.0 You do not have permission to manage tags -
trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java
r5559 r5641 353 353 defaultProtocolType = Project.Default.EXTRACTING_PROTOCOL; 354 354 } 355 else if (parentType == Item.LABELEDEXTRACT)356 {357 defaultProtocolType = Project.Default.LABELING_PROTOCOL;358 }359 355 } 360 356 … … 752 748 case HYBRIDIZATION: 753 749 { 754 if (bioMaterial.getType() != Item. LABELEDEXTRACT)750 if (bioMaterial.getType() != Item.EXTRACT) 755 751 { 756 752 throw new InvalidDataException("The source for a hybridization must be a labeled extract"); … … 861 857 break; 862 858 } 863 case LABELEDEXTRACT:864 {865 if (pooled)866 {867 query = LabeledExtract.getQuery();868 }869 else870 {871 query = Extract.getQuery();872 }873 break;874 }875 859 case HYBRIDIZATION: 876 860 { 877 query = LabeledExtract.getQuery();861 query = Extract.getQuery(); 878 862 break; 879 863 } -
trunk/src/core/net/sf/basedb/core/BioPlateType.java
r5456 r5641 200 200 Get the biomaterial type that can be stored on plates of 201 201 this type. 202 @return One of {@link Item#SAMPLE}, {@link Item#EXTRACT} , {@link Item#LABELEDEXTRACT}202 @return One of {@link Item#SAMPLE}, {@link Item#EXTRACT} 203 203 or null if the plate can store mixed types 204 204 */ … … 211 211 /** 212 212 Set the type of biomaterial that can be stored on plates with 213 this type. Valid values are {@link Item#SAMPLE} {@link Item#EXTRACT},214 {@link Item#LABELEDEXTRACT}and null. The value can't be changed213 this type. Valid values are {@link Item#SAMPLE}, {@link Item#EXTRACT}, 214 and null. The value can't be changed 215 215 after the plate type has been saved to the database. 216 216 @param type A biomaterial item type or null … … 228 228 "bioMaterialType of BioPlateType[id=" + getId() + "]"); 229 229 } 230 boolean ok = type == null || type == Item.SAMPLE || type == Item.EXTRACT || 231 type == Item.LABELEDEXTRACT; 230 boolean ok = type == null || type == Item.SAMPLE || type == Item.EXTRACT; 232 231 if (!ok) 233 232 { 234 throw new InvalidDataException("type must be one of SAMPLE, EXTRACT , LABELEDEXTRACTor null");233 throw new InvalidDataException("type must be one of SAMPLE, EXTRACT or null"); 235 234 } 236 235 getData().setBioMaterialType(type == null ? null : type.getValue()); -
trunk/src/core/net/sf/basedb/core/Extract.java
r5632 r5641 52 52 public static final Item TYPE = Item.EXTRACT; 53 53 54 /** 55 The id for the <code>ExtractType</code> item representing a 56 labeled extract. 57 @since 3.0 58 */ 59 public static final String LABELED = "net.sf.basedb.core.ExtractType.LABELED"; 60 54 61 /** 55 62 Create a new <code>Extract</code> item. … … 180 187 Check that: 181 188 <ul> 182 <li>no {@link LabeledExtract}:s has been created from this item189 <li>no {@link PhysicalBioAssay}:s has been created from this item 183 190 <li>no {@link Extract}:s has been created from this item 184 191 </ul> … … 187 194 throws BaseException 188 195 { 189 return countLabeledExtracts() > 0 ||super.isUsed();196 return /*countPhysicalBioAssays() > 0 || */ super.isUsed(); 190 197 } 191 198 /** 192 199 Get all: 193 200 <ul> 194 <li>{@link LabeledExtract}:s created from this extract201 <li>{@link PhysicalBioassay}:s created from this extract 195 202 <ul> 196 203 @since 2.2 … … 200 207 { 201 208 Set<ItemProxy> using = super.getUsingItems(); 202 org.hibernate.Session session = getDbControl().getHibernateSession(); 203 org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, 204 "GET_LABELED_EXTRACTS_FOR_EXTRACT", "le.id"); 205 /* 206 SELECT {1} 207 FROM LabeledExtractData le 208 WHERE le.parent = :extract 209 */ 210 query.setEntity("extract", this.getData()); 211 addUsingItems(using, Item.LABELEDEXTRACT, query); 209 // TODO 212 210 return using; 213 211 } 214 212 // ------------------------------------------- 215 213 214 public Tag getTag() 215 { 216 return getDbControl().getItem(Tag.class, getData().getTag()); 217 } 218 219 public void setTag(Tag tag) 220 { 221 checkPermission(Permission.WRITE); 222 if (tag != null) tag.checkPermission(Permission.USE); 223 getData().setTag(tag == null ? null : tag.getData()); 224 } 225 216 226 /** 217 227 Get the {@link Sample} that is the parent of this extract. … … 252 262 } 253 263 254 /** 255 Create a new {@link LabeledExtract} from this extract. 256 @param label The labeling compound used to label the extract 257 @param usedQuantity The quantity used from this extract or null 258 if not known 259 @return The new <code>LabeledExtract</code> item 260 @throws PermissionDeniedException If the logged in user doesn't have 261 use permission for this extract or use permission for the label 262 @throws BaseException If there is another error 263 */ 264 public LabeledExtract newLabeledExtract(Tag tag, Float usedQuantity) 265 throws PermissionDeniedException, BaseException 266 { 267 return newLabeledExtract(tag, usedQuantity, null); 268 } 269 270 /** 271 Create a new {@link LabeledExtract} from this extract as 272 part of a master bioplate event. 273 @param label The labeling compound used to label the extract 274 @param usedQuantity The quantity used from this extract or null 275 if not known 276 @param master The master bioplate event participant or null 277 @return The new <code>LabeledExtract</code> item 278 @throws PermissionDeniedException If the logged in user doesn't have 279 use permission for this extract or use permission for the label 280 @throws BaseException If there is another error 281 @since 2.17 282 */ 283 public LabeledExtract newLabeledExtract(Tag tag, Float usedQuantity, BioPlateEventParticipant master) 284 throws PermissionDeniedException, BaseException 285 { 286 LabeledExtract le = LabeledExtract.getNew(getDbControl(), tag, master); 287 le.setExtract(this, usedQuantity); 288 return le; 289 } 290 291 292 /** 293 Get a query that returns all labeled extracts created from this extract. 294 @return An {@link ItemQuery} object 295 */ 296 public ItemQuery<LabeledExtract> getLabeledExtracts() 297 { 298 ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 299 query.restrictPermanent( 300 Restrictions.eq( 301 Hql.property("parent"), 302 Hql.entity(this) 303 ) 304 ); 305 return query; 306 } 264 265 public void setExtract(Extract extract, Float usedQuantity) 266 throws PermissionDeniedException, InvalidDataException, BaseException 267 { 268 checkPermission(Permission.WRITE); 269 if (extract != null) extract.checkPermission(Permission.USE); 270 271 getData().setPooled(true); 272 273 getData().setParent(extract == null ? null : extract.getData()); 274 getCreationEvent().setSource(extract, usedQuantity); 275 } 276 307 277 308 278 /** … … 319 289 query.restrictPermanent(Restrictions.eq(Hql.index("src", null), Hql.entity(this))); 320 290 return query; 321 }322 323 /**324 Gets the number of {@link LabeledExtract} that are create from this item.325 @return Number of <code>LabeledExtracts</code>326 @throws BaseException If there is any error.327 */328 public long countLabeledExtracts()329 throws BaseException330 {331 org.hibernate.Session session = getDbControl().getHibernateSession();332 org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,333 "GET_LABELED_EXTRACTS_FOR_EXTRACT", "count(*)");334 /*335 SELECT {1}336 FROM LabeledExtractData le337 WHERE le.parent = :extract338 */339 query.setEntity("extract", this.getData());340 return HibernateUtil.loadData(Long.class, query);341 291 } 342 292 … … 365 315 366 316 /** 367 Count the number of child extracts or labeled extracts. 368 @param pooled TRUE = count child extracts, FALSE = count child labeled extracts 317 Count the number of child extracts. Since an extract 318 can't have non-pooled children, this method always return 319 0 if pooled = false. 369 320 @since 2.16 370 321 */ … … 372 323 public long countChildren(boolean pooled) 373 324 { 374 return pooled ? countExtracts() : countLabeledExtracts(); 325 return pooled ? countExtracts() : 0; 326 } 327 328 /** 329 Get a query that returns all hybridizations created from this 330 extract. 331 @return An {@link ItemQuery} object 332 */ 333 public ItemQuery<Hybridization> getHybridizations() 334 { 335 ItemQuery<Hybridization> query = Hybridization.getQuery(); 336 query.joinPermanent(Hql.innerJoin("creationEvent.sources", Item.EXTRACT.getAlias())); 337 query.restrictPermanent( 338 Restrictions.eq( 339 Hql.index(Item.EXTRACT.getAlias(), null), 340 Hql.entity(this) 341 ) 342 ); 343 return query; 375 344 } 376 345 -
trunk/src/core/net/sf/basedb/core/Hybridization.java
r5559 r5641 240 240 { 241 241 BioMaterialEvent event = getCreationEvent(); 242 ItemQuery< LabeledExtract> query = (ItemQuery<LabeledExtract>)event.getSources();242 ItemQuery<Extract> query = (ItemQuery<Extract>)event.getSources(); 243 243 query.include(Include.ALL); 244 244 if (arrayNum > 0) … … 361 361 */ 362 362 @SuppressWarnings("unchecked") 363 public ItemQuery< LabeledExtract> getLabeledExtracts(int arrayNum)364 { 365 ItemQuery< LabeledExtract> query = (ItemQuery<LabeledExtract>)getCreationEvent().getSources();363 public ItemQuery<Extract> getLabeledExtracts(int arrayNum) 364 { 365 ItemQuery<Extract> query = (ItemQuery<Extract>)getCreationEvent().getSources(); 366 366 if (arrayNum > 0) 367 367 { -
trunk/src/core/net/sf/basedb/core/Install.java
r5632 r5641 344 344 createRoleKey(Item.SAMPLE, "Samples", "Gives access to samples", users_create); 345 345 createRoleKey(Item.EXTRACT, "Extracts", "Gives access to extracts", users_create); 346 createRoleKey(Item.LABELEDEXTRACT, "Labeled extracts", "Gives access to labeled extracts", users_create);347 346 createRoleKey(Item.BIOPLATE, "Bio plates", "Gives access to bio plates", users_create); 348 347 createRoleKey(Item.BIOPLATETYPE, "Bio plate types", "Gives access to bio plate types", guests_use_power_users_all); … … 441 440 createItemSubtype(Item.PROTOCOL, Protocol.SAMPLING, "Sampling", "Protocols used for creating samples.", protocolFileType); 442 441 createItemSubtype(Item.PROTOCOL, Protocol.EXTRACTION, "Extraction", "Protocols used for creating extracts.", protocolFileType); 443 createItemSubtype(Item.PROTOCOL, Protocol.LABELING, "Labeling", "Protocols used for creating labeled extracts.", protocolFileType); 442 ItemSubtypeData labelingProtocol = createItemSubtype(Item.PROTOCOL, Protocol.LABELING, "Labeling", 443 "Protocols used for creating labeled extracts.", protocolFileType); 444 444 createItemSubtype(Item.PROTOCOL, Protocol.POOLING, "Pooling", "Protocols used for creating pooled biomaterails.", protocolFileType); 445 445 createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION, "Hybridization", "Protocols used for creating hybridizations.", protocolFileType); … … 463 463 ItemSubtypeData barcodeTag = createItemSubtype(Item.TAG, Tag.BARCODE, "Barcode", 464 464 "Adaptor used to tag libraries to enable multiplexing in sequencing experiments."); 465 466 // Biomaterial subtypes 467 createItemSubtype(Item.EXTRACT, Extract.LABELED, "Labeled extract", 468 "A labeled extract is an extract which has been tagged with a label", 469 labelTag, labelingProtocol); 465 470 466 471 // Hardware … … 600 605 BioPlateTypeData extractReactionPlate = createBioPlateType("Extract reaction plate", "A generic reaction plate for extracts.", 601 606 Item.EXTRACT, BioWell.LockMode.LOCKED_AFTER_ADD); 602 BioPlateTypeData labeledExtractReactionPlate =603 createBioPlateType("Labeled extract reaction plate", "A generic reaction plate for labeled extracts.",604 Item.LABELEDEXTRACT, BioWell.LockMode.LOCKED_AFTER_ADD);605 607 606 608 BioPlateEventTypeData genericEvent = createBioPlateEventType("Generic", BioPlateEventType.GENERIC, -
trunk/src/core/net/sf/basedb/core/Item.java
r5632 r5641 293 293 EXTRACT(203, "Extract", "xtr", Extract.class, ExtractData.class, DefinedPermissions.shareable, 294 294 410), 295 /** 296 The item is a {@link LabeledExtract}. 297 */ 298 LABELEDEXTRACT(204, "Labeled extract", "lbe", LabeledExtract.class, LabeledExtractData.class, DefinedPermissions.shareable, 299 400), 295 300 296 /** 301 297 The item is a {@link BioMaterialEvent}. -
trunk/src/core/net/sf/basedb/core/Project.java
r5630 r5641 841 841 SAMPLING_PROTOCOL("default_sampling_protocol", "Sampling protocol", Item.PROTOCOL, Protocol.SAMPLING, Item.SAMPLE), 842 842 EXTRACTING_PROTOCOL("default_extracting_protocol", "Extracting protocol", Item.PROTOCOL, Protocol.EXTRACTION, Item.EXTRACT), 843 LABELING_PROTOCOL("default_labeling_protocol", "Labeling protocol", Item.PROTOCOL, Protocol.LABELING, Item.LABELEDEXTRACT),844 843 HYBRIDIZATION_PROTOCOL("default_hybridization_protocol", "Hybridization protocol", Item.PROTOCOL, Protocol.HYBRIDIZATION, Item.HYBRIDIZATION), 845 844 FEATURE_EXTRACTION_PROTOCOL("default_feature_extraction_protocol", "Feat. extraction protocol", Item.PROTOCOL, Protocol.FEATURE_EXTRACTION, Item.RAWBIOASSAY), -
trunk/src/core/net/sf/basedb/core/Tag.java
r5632 r5641 25 25 import java.util.Set; 26 26 27 import net.sf.basedb.core.query.Restrictions;28 import net.sf.basedb.core.query.Hql;29 27 import net.sf.basedb.core.data.TagData; 30 28 … … 205 203 // ------------------------------------------- 206 204 207 /** 208 Get a query that returns all labeled extracts labeled 209 with this label. 210 @return An {@link ItemQuery} object 211 * @throws BaseException If the query could not be created and configured. 212 */ 213 public ItemQuery<LabeledExtract> getLabeledExtracts() 214 throws BaseException 215 { 216 ItemQuery<LabeledExtract> query = LabeledExtract.getQuery(); 217 query.restrictPermanent( 218 Restrictions.eq( 219 Hql.property("label"), 220 Hql.entity(this) 221 ) 222 ); 223 return query; 224 } 205 225 206 } -
trunk/src/core/net/sf/basedb/util/biomaterial/ListUtil.java
r4723 r5641 38 38 import net.sf.basedb.core.Item; 39 39 import net.sf.basedb.core.ItemQuery; 40 import net.sf.basedb.core.LabeledExtract;41 40 import net.sf.basedb.core.PermissionDeniedException; 42 41 import net.sf.basedb.core.Sample; … … 78 77 { 79 78 query = Extract.getQuery(); 80 }81 else if (biomaterialType == Item.LABELEDEXTRACT)82 {83 query = LabeledExtract.getQuery();84 79 } 85 80 else … … 131 126 <code>sourceItem</code>:s into a collection with <code>destinationItem</code>:s 132 127 by following parent/child paths. Both the source and destination must be 133 one of {@link Item#BIOSOURCE}, {@link Item#SAMPLE}, {@link Item#EXTRACT} 134 or {@link Item#LABELEDEXTRACT}. 128 one of {@link Item#BIOSOURCE}, {@link Item#SAMPLE} or {@link Item#EXTRACT}. 135 129 136 130 @param dc The DbControl the transformers should use for loading … … 145 139 { 146 140 // The allowed item types 147 final List<Item> INDEX = Arrays.asList(new Item[] { Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT , Item.LABELEDEXTRACT});141 final List<Item> INDEX = Arrays.asList(new Item[] { Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT }); 148 142 int dIndex = INDEX.indexOf(destinationItem); 149 143 if (dIndex == -1) … … 189 183 // Moving down 190 184 if (pooled) transformers.add(new PooledChildrenTransformer<Extract>(dc, true, Extract.getQuery())); 191 transformers.add(new ExtractToLabeledExtractTransformer(dc));192 185 } 193 186 else … … 198 191 } 199 192 } 200 else if (sourceItem == Item.LABELEDEXTRACT)201 {202 // Moving up203 if (pooled) transformers.add(new PooledParentsTransformer<LabeledExtract>(dc, true, LabeledExtract.getQuery()));204 transformers.add(new LabeledExtractToExtractTransformer(dc));205 }206 193 sIndex += step; 207 194 sourceItem = INDEX.get(sIndex); -
trunk/src/core/net/sf/basedb/util/overview/loader/BasicItemNodeLoaderFactory.java
r5500 r5641 218 218 registerCheckedNodeLoader(Item.SAMPLE, SampleLoader.class); 219 219 registerCheckedNodeLoader(Item.EXTRACT, ExtractLoader.class); 220 registerCheckedNodeLoader(Item.LABELEDEXTRACT, LabeledExtractLoader.class);221 220 registerCheckedNodeLoader(Item.ARRAYDESIGN, ArrayDesignLoader.class); 222 221 registerCheckedNodeLoader(Item.ARRAYBATCH, ArrayBatchLoader.class); -
trunk/src/core/net/sf/basedb/util/overview/loader/ExtractLoader.java
r5500 r5641 24 24 import net.sf.basedb.core.DbControl; 25 25 import net.sf.basedb.core.Extract; 26 import net.sf.basedb.core.Hybridization; 26 27 import net.sf.basedb.core.Item; 27 28 import net.sf.basedb.core.ItemQuery; 28 29 import net.sf.basedb.core.ItemResultIterator; 29 import net.sf.basedb.core.LabeledExtract; 30 import net.sf.basedb.core.PermissionDeniedException; 30 import net.sf.basedb.core.RawBioAssay; 31 31 import net.sf.basedb.core.Sample; 32 32 import net.sf.basedb.util.overview.Fix; … … 34 34 import net.sf.basedb.util.overview.OverviewUtil; 35 35 import net.sf.basedb.util.overview.Validator; 36 import net.sf.basedb.util.overview.filter.ItemTypeFilter; 36 37 import net.sf.basedb.util.overview.node.ChildNodeDirection; 37 38 import net.sf.basedb.util.overview.node.NameableNameGenerator; … … 42 43 Node loader implementation for extracts. The forward-loading 43 44 direction goes from {@link Sample}:s -> {@link Extract}:s -> 44 {@link LabeledExtract}:s. The reverse-loading direction is the opposite45 {@link Hybridization}:s. The reverse-loading direction is the opposite 45 46 direction. In both cases we also need to consider pooled extracts. 46 47 … … 65 66 /** 66 67 Create forward-loading extract nodes from a given parent sample 67 o fextract. In both cases the returned node is a folder-type node68 or extract. In both cases the returned node is a folder-type node 68 69 that contains the child extracts. 69 70 @return The folder node for the extracts … … 86 87 87 88 /** 88 Create reverse-loading extract nodes from a labeled extractnode89 Create reverse-loading extract nodes from a physical bioassay node 89 90 or from a pooled extract. In the first case, the returned node is an 90 91 item-type node with the parent extract. In the second case, the returned … … 97 98 Node returnNode = null; 98 99 Item parentItem = parentNode.getItemType(); 99 if (parentItem == Item. LABELEDEXTRACT)100 { 101 returnNode = createReverseNode(( LabeledExtract)parentNode.getItem(dc), dc, context, parentNode);100 if (parentItem == Item.HYBRIDIZATION) 101 { 102 returnNode = createReverseNode((Hybridization)parentNode.getItem(dc), dc, context, parentNode); 102 103 } 103 104 else if (parentItem == Item.EXTRACT) … … 128 129 129 130 /** 130 Loads the pooled extracts and labled extracts that has been created from131 Loads the pooled extracts and hybridizations that has been created from 131 132 this extract. 132 133 @see ExtractLoader#createForwardNode(DbControl, OverviewContext, Node) 133 @see ExtractLoader#createForwardNode(DbControl, OverviewContext, Node)134 @see HybridizationLoader#createForwardNode(DbControl, OverviewContext, Node) 134 135 */ 135 136 @Override 136 137 protected void loadForwardChildNodes(DbControl dc, OverviewContext context, Node extractNode) 137 138 { 138 getNodeLoader(context, Item. LABELEDEXTRACT).createForwardNode(dc, context, extractNode);139 getNodeLoader(context, Item.HYBRIDIZATION).createForwardNode(dc, context, extractNode); 139 140 getNodeLoader(context, Item.EXTRACT).createForwardNode(dc, context, extractNode); 140 141 } … … 202 203 203 204 /** 205 Create reverse-loading extract nodes from a hybridization. Eg. the child nodes 206 are the extracts that has been used on a hybridization. 207 */ 208 private Node createReverseNode(Hybridization hyb, DbControl dc, OverviewContext context, Node parentNode) 209 { 210 Node folderNode = null; 211 NodeFactory<Extract> nf = getNodeFactory(dc, context); 212 213 // If we have followed this path from a raw bioassay we should 214 // only load labeled extracts on the specific 'array index' 215 Node rbaNode = parentNode.getFirstParent(new ItemTypeFilter(Item.RAWBIOASSAY)); 216 int arrayNum = 0; 217 if (rbaNode != null) 218 { 219 arrayNum = ((RawBioAssay)rbaNode.getItem()).getArrayNum(); 220 } 221 ItemQuery<Extract> query = context.initQuery(hyb.getLabeledExtracts(arrayNum), "name"); 222 ItemResultIterator<Extract> it = query.iterate(dc); 223 while (it.hasNext()) 224 { 225 Extract extract = it.next(); 226 if (folderNode == null) 227 { 228 folderNode = new Node("labeledextracts", "Labeled extracts", parentNode, ChildNodeDirection.REVERSE); 229 } 230 createItemNode(nf, extract, extract, false, folderNode, ChildNodeDirection.REVERSE); 231 } 232 postValidateFolder(nf, folderNode, parentNode, rbaNode == null); 233 return folderNode; 234 } 235 236 237 /** 204 238 Create a reverse-loading extract node from a labeled extract. Eg. the child node 205 239 is the extract that is the parent of the (non-pooled) labeled extract. 206 240 */ 241 /* 207 242 private Node createReverseNode(LabeledExtract labeledExtract, DbControl dc, OverviewContext context, Node parentNode) 208 243 { … … 222 257 return extractNode; 223 258 } 259 */ 224 260 225 261 /** -
trunk/src/core/net/sf/basedb/util/overview/loader/HybridizationLoader.java
r5500 r5641 24 24 import net.sf.basedb.core.ArraySlide; 25 25 import net.sf.basedb.core.DbControl; 26 import net.sf.basedb.core.Extract; 26 27 import net.sf.basedb.core.Hybridization; 27 28 import net.sf.basedb.core.Item; 28 29 import net.sf.basedb.core.ItemQuery; 29 30 import net.sf.basedb.core.ItemResultIterator; 30 import net.sf.basedb.core.LabeledExtract;31 31 import net.sf.basedb.core.PermissionDeniedException; 32 32 import net.sf.basedb.core.RawBioAssay; … … 82 82 Node returnNode = null; 83 83 Item parentType = parentNode.getItemType(); 84 if (parentType == Item. LABELEDEXTRACT)85 { 86 returnNode = createForwardNode(( LabeledExtract)parentNode.getItem(dc), dc, context, parentNode);84 if (parentType == Item.EXTRACT) 85 { 86 returnNode = createForwardNode((Extract)parentNode.getItem(dc), dc, context, parentNode); 87 87 } 88 88 else if (parentType == Item.ARRAYSLIDE) … … 166 166 } 167 167 Item parentItemType = parent == null ? null : parent.getItemType(); 168 if (parentItemType == Item. LABELEDEXTRACT)168 if (parentItemType == Item.EXTRACT) 169 169 { 170 170 getNodeLoader(context, Item.ARRAYSLIDE).createReverseNode(dc, context, hybNode); … … 172 172 if (parentItemType == Item.ARRAYSLIDE) 173 173 { 174 getNodeLoader(context, Item. LABELEDEXTRACT).createReverseNode(dc, context, hybNode);174 getNodeLoader(context, Item.EXTRACT).createReverseNode(dc, context, hybNode); 175 175 } 176 176 } … … 186 186 protected void loadReverseChildNodes(DbControl dc, OverviewContext context, Node hybNode) 187 187 { 188 getNodeLoader(context, Item. LABELEDEXTRACT).createReverseNode(dc, context, hybNode);188 getNodeLoader(context, Item.EXTRACT).createReverseNode(dc, context, hybNode); 189 189 getNodeLoader(context, Item.ARRAYSLIDE).createReverseNode(dc, context, hybNode); 190 190 } … … 195 195 that has a given labeled extract as a source. 196 196 */ 197 private Node createForwardNode( LabeledExtract extract, DbControl dc, OverviewContext context, Node parentNode)197 private Node createForwardNode(Extract extract, DbControl dc, OverviewContext context, Node parentNode) 198 198 { 199 199 NodeFactory<Hybridization> nf = getNodeFactory(dc, context); -
trunk/src/core/net/sf/basedb/util/overview/loader/RawBioAssayLoader.java
r5500 r5641 25 25 import net.sf.basedb.core.DbControl; 26 26 import net.sf.basedb.core.Experiment; 27 import net.sf.basedb.core.Extract; 27 28 import net.sf.basedb.core.Hybridization; 28 29 import net.sf.basedb.core.Item; 29 30 import net.sf.basedb.core.ItemQuery; 30 31 import net.sf.basedb.core.ItemResultIterator; 31 import net.sf.basedb.core.LabeledExtract;32 32 import net.sf.basedb.core.RawBioAssay; 33 33 import net.sf.basedb.core.Scan; … … 87 87 if (hybNode != null) 88 88 { 89 Node labeledExtractNode = hybNode.getFirstParent(new ItemTypeFilter(Item. LABELEDEXTRACT));89 Node labeledExtractNode = hybNode.getFirstParent(new ItemTypeFilter(Item.EXTRACT)); 90 90 if (labeledExtractNode != null) 91 91 { 92 92 hyb = (Hybridization)hybNode.getItem(dc); 93 LabeledExtract extract = (LabeledExtract)labeledExtractNode.getItem();93 Extract extract = (Extract)labeledExtractNode.getItem(); 94 94 arrayNum = hyb.getCreationEvent().getSourceGroup(extract); 95 95 } -
trunk/src/core/net/sf/basedb/util/overview/loader/ScanLoader.java
r5500 r5641 23 23 24 24 import net.sf.basedb.core.DbControl; 25 import net.sf.basedb.core.Extract; 25 26 import net.sf.basedb.core.Hybridization; 26 27 import net.sf.basedb.core.Item; 27 28 import net.sf.basedb.core.ItemQuery; 28 29 import net.sf.basedb.core.ItemResultIterator; 29 import net.sf.basedb.core.LabeledExtract;30 30 import net.sf.basedb.core.PermissionDeniedException; 31 31 import net.sf.basedb.core.RawBioAssay; … … 80 80 // to be able to load the correct raw bioassays later -- The same hyb may have 81 81 // other raw bioassays that are NOT related to the same labeled extract 82 Node labeledExtractNode = hybridizationNode.getFirstParent(new ItemTypeFilter(Item. LABELEDEXTRACT));82 Node labeledExtractNode = hybridizationNode.getFirstParent(new ItemTypeFilter(Item.EXTRACT)); 83 83 int arrayIndex = 0; 84 84 if (labeledExtractNode != null) 85 85 { 86 LabeledExtract extract = (LabeledExtract)labeledExtractNode.getItem();86 Extract extract = (Extract)labeledExtractNode.getItem(); 87 87 arrayIndex = hyb.getCreationEvent().getSourceGroup(extract); 88 88 } -
trunk/src/core/net/sf/basedb/util/overview/validator/BasicItemNodeValidatorFactory.java
r5500 r5641 194 194 registerCheckedNodeValidator(Item.SAMPLE, SampleValidator.class); 195 195 registerCheckedNodeValidator(Item.EXTRACT, ExtractValidator.class); 196 registerCheckedNodeValidator(Item.LABELEDEXTRACT, LabeledExtractValidator.class);197 196 registerCheckedNodeValidator(Item.ARRAYDESIGN, ArrayDesignValidator.class); 198 197 registerCheckedNodeValidator(Item.ARRAYBATCH, ArrayBatchValidator.class); -
trunk/src/core/net/sf/basedb/util/overview/validator/ExtractValidator.java
r4764 r5641 25 25 import net.sf.basedb.core.Extract; 26 26 import net.sf.basedb.core.Item; 27 import net.sf.basedb.core.LabeledExtract;28 27 import net.sf.basedb.util.overview.Fix; 29 28 import net.sf.basedb.util.overview.Validator; … … 64 63 Item parentType = parentNode.getItemType(); 65 64 BasicItem parentItem = parentNode.getItem(); 66 if (parentType == Item.LABELEDEXTRACT) 65 /* 66 if (parentType == Item.PHYSICALBIOASSAY) 67 67 { 68 68 fix = new Fix("Add parent extract to '" + ((LabeledExtract)parentItem).getName() + "'", parentItem); 69 69 } 70 else if (parentType == Item.EXTRACT)70 else */if (parentType == Item.EXTRACT) 71 71 { 72 72 fix = new Fix("Add parent extracts to '" + ((Extract)parentItem).getName() + "'", parentItem); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java
r5632 r5641 61 61 import net.sf.basedb.core.ItemSubtype; 62 62 import net.sf.basedb.core.Job; 63 import net.sf.basedb.core.LabeledExtract;64 63 import net.sf.basedb.core.NumberOutOfRangeException; 65 64 import net.sf.basedb.core.Permission; … … 84 83 import net.sf.basedb.core.StringTooLongException; 85 84 import net.sf.basedb.core.StringUtil; 85 import net.sf.basedb.core.SystemItems; 86 86 import net.sf.basedb.core.Tag; 87 87 import net.sf.basedb.core.Type; … … 1443 1443 { 1444 1444 if (identifier == null) return null; 1445 if (extractQuery == null) extractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery()); 1445 if (extractQuery == null) 1446 { 1447 extractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery()); 1448 extractQuery.restrictPermanent(Restrictions.eq(Hql.property("itemSubtype"), null)); 1449 1450 } 1446 1451 return findReferencedItem(dc, idMethod, extractQuery, identifier, false); 1447 1452 } 1448 1453 1449 private ItemQuery< LabeledExtract> labeledExtractQuery;1454 private ItemQuery<Extract> labeledExtractQuery; 1450 1455 /** 1451 1456 Find a labled extract with a given identifier. This is a utility method that … … 1461 1466 @return A labeled extract, or null if no item could be found 1462 1467 */ 1463 protected LabeledExtract findLabeledExtract(DbControl dc, IdMethod idMethod, String identifier)1468 protected Extract findLabeledExtract(DbControl dc, IdMethod idMethod, String identifier) 1464 1469 { 1465 1470 if (identifier == null) return null; 1466 1471 if (labeledExtractQuery == null) 1467 1472 { 1468 labeledExtractQuery = initReferenceQuery(dc, idMethod, LabeledExtract.getQuery()); 1473 labeledExtractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery()); 1474 labeledExtractQuery.restrictPermanent( 1475 Restrictions.eq( 1476 Hql.property("itemSubtype"), 1477 Expressions.integer(SystemItems.getId(Extract.LABELED)) 1478 ) 1479 ); 1469 1480 } 1470 1481 return findReferencedItem(dc, idMethod, labeledExtractQuery, identifier, false); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ArraySlideImporter.java
r5612 r5641 31 31 import net.sf.basedb.core.Item; 32 32 import net.sf.basedb.core.ItemQuery; 33 import net.sf.basedb.core.LabeledExtract;34 33 import net.sf.basedb.core.PluginParameter; 35 34 import net.sf.basedb.core.plugin.GuiContext; … … 166 165 { 167 166 nameMapper = getMapper(ffp, (String)job.getValue("nameColumnMapping"), 168 cropStrings ? LabeledExtract.MAX_NAME_LENGTH : null, null);167 cropStrings ? ArraySlide.MAX_NAME_LENGTH : null, null); 169 168 descriptionMapper = getMapper(ffp, (String)job.getValue("descriptionColumnMapping"), 170 cropStrings ? LabeledExtract.MAX_DESCRIPTION_LENGTH : null, null);169 cropStrings ? ArraySlide.MAX_DESCRIPTION_LENGTH : null, null); 171 170 arrayBatchMapper = getMapper(ffp, (String)job.getValue("arrayBatchColumnMapping"), null, null); 172 171 indexMapper = getMapper(ffp, (String)job.getValue("indexColumnMapping"), null, null); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/BioPlateImporter.java
r5630 r5641 34 34 import net.sf.basedb.core.ItemQuery; 35 35 import net.sf.basedb.core.ItemSubtype; 36 import net.sf.basedb.core.LabeledExtract;37 36 import net.sf.basedb.core.PlateGeometry; 38 37 import net.sf.basedb.core.PluginParameter; … … 172 171 { 173 172 nameMapper = getMapper(ffp, (String)job.getValue("nameColumnMapping"), 174 cropStrings ? LabeledExtract.MAX_NAME_LENGTH : null, null);173 cropStrings ? BioPlate.MAX_NAME_LENGTH : null, null); 175 174 descriptionMapper = getMapper(ffp, (String)job.getValue("descriptionColumnMapping"), 176 cropStrings ? LabeledExtract.MAX_DESCRIPTION_LENGTH : null, null);175 cropStrings ? BioPlate.MAX_DESCRIPTION_LENGTH : null, null); 177 176 bioPlateTypeMapper = getMapper(ffp, (String)job.getValue("bioPlateTypeColumnMapping"), null, null); 178 177 plateGeometryMapper = getMapper(ffp, (String)job.getValue("plateGeometryColumnMapping"), null, null); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/HybridizationImporter.java
r5630 r5641 30 30 import net.sf.basedb.core.BioMaterialEvent; 31 31 import net.sf.basedb.core.DbControl; 32 import net.sf.basedb.core.Extract; 32 33 import net.sf.basedb.core.Hardware; 33 34 import net.sf.basedb.core.Hybridization; … … 36 37 import net.sf.basedb.core.ItemQuery; 37 38 import net.sf.basedb.core.ItemSubtype; 38 import net.sf.basedb.core.LabeledExtract;39 39 import net.sf.basedb.core.Permission; 40 40 import net.sf.basedb.core.PermissionDeniedException; … … 289 289 { 290 290 String nameOrId = parentMapper.getValue(data); 291 LabeledExtract parent = findLabeledExtract(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId);291 Extract parent = findExtract(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId); 292 292 if (parent != null) 293 293 { -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/LabeledExtractImporter.java
r5632 r5641 34 34 import net.sf.basedb.core.ItemQuery; 35 35 import net.sf.basedb.core.ItemSubtype; 36 import net.sf.basedb.core.LabeledExtract;37 36 import net.sf.basedb.core.PluginParameter; 38 37 import net.sf.basedb.core.Protocol; … … 40 39 import net.sf.basedb.core.Tag; 41 40 import net.sf.basedb.core.plugin.GuiContext; 41 import net.sf.basedb.core.query.Expressions; 42 import net.sf.basedb.core.query.Hql; 43 import net.sf.basedb.core.query.Restrictions; 42 44 import net.sf.basedb.util.Values; 43 45 import net.sf.basedb.util.parser.FlatFileParser; … … 53 55 */ 54 56 public class LabeledExtractImporter 55 extends AbstractItemImporter< LabeledExtract>57 extends AbstractItemImporter<Extract> 56 58 { 57 59 58 60 private static final Set<GuiContext> guiContexts = 59 Collections.singleton(new GuiContext(Item. LABELEDEXTRACT, GuiContext.Type.LIST));61 Collections.singleton(new GuiContext(Item.EXTRACT, GuiContext.Type.LIST)); 60 62 61 63 … … 149 151 */ 150 152 @Override 151 protected ItemQuery<LabeledExtract> createItemQuery() 152 { 153 return LabeledExtract.getQuery(); 153 protected ItemQuery<Extract> createItemQuery() 154 { 155 ItemQuery<Extract> query = Extract.getQuery(); 156 query.restrictPermanent( 157 Restrictions.eq( 158 Hql.property("itemSubtype"), 159 Expressions.integer(SystemItems.getId(Extract.LABELED)) 160 ) 161 ); 162 return query; 154 163 } 155 164 … … 158 167 { 159 168 nameMapper = getMapper(ffp, (String)job.getValue("nameColumnMapping"), 160 cropStrings ? LabeledExtract.MAX_NAME_LENGTH : null, null);169 cropStrings ? Extract.MAX_NAME_LENGTH : null, null); 161 170 descriptionMapper = getMapper(ffp, (String)job.getValue("descriptionColumnMapping"), 162 cropStrings ? LabeledExtract.MAX_DESCRIPTION_LENGTH : null, null);171 cropStrings ? Extract.MAX_DESCRIPTION_LENGTH : null, null); 163 172 externalIdMapper = getMapper(ffp, (String)job.getValue("externalIdColumnMapping"), 164 cropStrings ? LabeledExtract.MAX_EXTERNAL_ID_LENGTH : null, null);173 cropStrings ? Extract.MAX_EXTERNAL_ID_LENGTH : null, null); 165 174 labelMapper = getMapper(ffp, (String)job.getValue("labelColumnMapping"), null, null); 166 175 originalQuantityMapper = getMapper(ffp, (String)job.getValue("originalQuantityColumnMapping"), null, null); … … 176 185 177 186 @Override 178 protected LabeledExtract createItem(DbControl dc, FlatFileParser.Data data)187 protected Extract createItem(DbControl dc, FlatFileParser.Data data) 179 188 { 180 189 Tag label = null; … … 190 199 Values.getBoolean(pooledMapper.getValue(data))) 191 200 { 192 LabeledExtract parent = findLabeledExtract(dc, FallbackIdMethod.NAME_OR_ID, parentMapper.getValue(data)); 193 if (parent != null) label = parent.getLabel(); 194 } 195 } 196 LabeledExtract e = LabeledExtract.getNew(dc, label); 201 Extract parent = findLabeledExtract(dc, FallbackIdMethod.NAME_OR_ID, parentMapper.getValue(data)); 202 if (parent != null) label = parent.getTag(); 203 } 204 } 205 Extract e = Extract.getNew(dc); 206 e.setTag(label); 197 207 updateItem(dc, e, data); 198 208 return e; … … 200 210 201 211 @Override 202 protected void updateItem(DbControl dc, LabeledExtract extract, FlatFileParser.Data data)212 protected void updateItem(DbControl dc, Extract extract, FlatFileParser.Data data) 203 213 { 204 214 if (nameMapper != null) extract.setName(nameMapper.getValue(data)); … … 227 237 ItemSubtype labelType = ItemSubtype.getById(dc, SystemItems.getId(Tag.LABEL)); 228 238 Tag label = findTag(dc, FallbackIdMethod.NAME_OR_ID, labelMapper.getValue(data), labelType); 229 extract.set Label(label);239 extract.setTag(label); 230 240 } 231 241 } … … 263 273 */ 264 274 @Override 265 protected void updateMultiLineItem(DbControl dc, LabeledExtract extract,275 protected void updateMultiLineItem(DbControl dc, Extract extract, 266 276 FlatFileParser.Data data, int multiLineNum) 267 277 { … … 269 279 { 270 280 String nameOrId = parentMapper.getValue(data); 271 LabeledExtract parent = findLabeledExtract(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId);281 Extract parent = findLabeledExtract(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId); 272 282 if (parent != null) 273 283 { -
trunk/src/test/TestAll.java
r5632 r5641 80 80 results.put("TestExtract", TestExtract.test_all()); 81 81 results.put("TestTag", TestTag.test_all()); 82 results.put("TestLabeledExtract", TestLabeledExtract.test_all());83 82 results.put("TestBioMaterialList", TestBioMaterialList.test_all()); 84 83 results.put("TestBioPlateType", TestBioPlateType.test_all()); -
trunk/src/test/TestBioPlate.java
r5632 r5641 31 31 import net.sf.basedb.core.ItemProxy; 32 32 import net.sf.basedb.core.ItemResultList; 33 import net.sf.basedb.core.LabeledExtract;34 33 import net.sf.basedb.core.MeasuredBioMaterial; 35 34 import net.sf.basedb.core.Permission; … … 73 72 int sample2Id = TestSample.test_create(0, "Sample A.2", true); 74 73 int sample3Id = TestSample.test_create(0, "Sample A.3", true); 75 int extractId = TestExtract.test_create(sampleId, true);74 int extractId = TestExtract.test_create(sampleId, "Extract A.1", 0, 0, true); 76 75 int labelId = TestTag.test_create("Test label", SystemItems.getId(Tag.LABEL), true); 77 int labeledExtractId = TestLabeledExtract.test_create(extractId, labelId, true); 76 int labeledExtractId = TestExtract.test_create(extractId, "Labeled extract A.1", 77 SystemItems.getId(Extract.LABELED), labelId, true); 78 78 int freezerId = TestHardware.test_create(SystemItems.getId(Hardware.FREEZER), null, false); 79 79 int protocolId = TestProtocol.test_create(SystemItems.getId(Protocol.SAMPLING), … … 116 116 if (TestUtil.waitBeforeDelete()) TestUtil.waitForEnter(); 117 117 // Standard test: Delete 118 Test LabeledExtract.test_delete(labeledExtractId);118 TestExtract.test_delete(labeledExtractId); 119 119 TestTag.test_delete(labelId); 120 120 TestExtract.test_delete(extractId); … … 518 518 item = Extract.getNew(dc); 519 519 } 520 else if (itemType == Item.LABELEDEXTRACT)521 {522 item = LabeledExtract.getNew(dc, label);523 }524 520 item.setName(rootName + " [" + rowFormat.format(row) + colFormat.format(col) + "]"); 525 521 dc.saveItem(item); -
trunk/src/test/TestChangeHistory.java
r5072 r5641 70 70 TestAnnotation.test_annotatate(Item.SAMPLE, sampleId, annotationTypeId, 0, 2); 71 71 TestAnnotation.test_remove_annotation(Item.SAMPLE, sampleId, annotationTypeId); 72 int extractId = TestExtract.test_create(sampleId, false);72 int extractId = TestExtract.test_create(sampleId, "Extract 1", 0, 0, false); 73 73 TestExtract.test_delete(extractId); 74 74 -
trunk/src/test/TestExtract.java
r5340 r5641 44 44 write_header(); 45 45 // Standard tests: create, load, list 46 int id = test_create(0, true);47 int id2 = test_create(0, false);48 49 int sampleId = TestSample.test_create(0, null, true);50 int id3 = test_create( sampleId, false);46 int sampleId = TestSample.test_create(0, "Parent sample", true); 47 int tagId = TestTag.test_create("Test", SystemItems.getId(Tag.LABEL), true); 48 int id = test_create(0, "Extract #1 (standalone)", 0, 0, true); 49 int id2 = test_create(sampleId, "Extract #2", 0, 0, false); 50 int id3 = test_create(id2, "Extract #3 (labeled)", SystemItems.getId(Extract.LABELED), tagId, false); 51 51 int id4 = test_create_pooled(id, id2, id3); 52 52 … … 61 61 test_list_sources(id3, 1); // The sample 62 62 test_list_sources(id4, 3); // The three id, id2 and id3 extracts 63 test_list_pooledChildren(id2, 1);63 test_list_pooledChildren(id2, 2); 64 64 65 65 if (TestUtil.waitBeforeDelete()) TestUtil.waitForEnter(); … … 75 75 } 76 76 77 static int test_create(int sampleId, boolean setAll)77 static int test_create(int parentId, String name, int subtypeId, int tagId, boolean setAll) 78 78 { 79 79 if (!TestUtil.hasPermission(Permission.CREATE, Item.EXTRACT)) return 0; … … 91 91 e.setOriginalQuantity(500.0f); 92 92 } 93 if (sampleId != 0) 94 { 95 Sample s = Sample.getById(dc, sampleId); 96 e.setSample(s, 200.0f); 97 e.setName(s.getName() + ".e"); 93 if (parentId != 0) 94 { 95 BioMaterial parent = BioMaterial.getById(dc, parentId); 96 if (parent.getType() == Item.SAMPLE) 97 { 98 Sample s = (Sample)parent; 99 e.setSample(s, 200.0f); 100 e.setName(s.getName() + ".e"); 101 } 102 else 103 { 104 e.setPooled(true); 105 e.getCreationEvent().addSource((MeasuredBioMaterial)parent, 200.0f); 106 } 107 } 108 if (subtypeId > 0) 109 { 110 e.setItemSubtype(ItemSubtype.getById(dc, subtypeId)); 111 } 112 if (tagId > 0) 113 { 114 e.setTag(Tag.getById(dc, tagId)); 98 115 } 99 116 dc.saveItem(e); … … 269 286 if (!TestUtil.getSilent()) 270 287 { 271 write(" \tID \tName \t Description\tExternal id\tPooled\tSample\tQuantity\tRemain");272 write("-- \t-- \t--------- \t------- ----\t-----------\t------\t------\t--------\t------");288 write(" \tID \tName \tSubtype\tDescription\tExternal id\tPooled\tSample\tTag\tQuantity\tRemain"); 289 write("-- \t-- \t--------- \t-------\t-----------\t-----------\t------\t------\t---\t--------\t------"); 273 290 } 274 291 } … … 276 293 throws BaseException 277 294 { 278 if (!TestUtil.getSilent()) System.out.println(i+":\t"+e.getId()+"\t"+e.getName()+"\t"+e.get Description()+279 "\t"+e.getExternalId()+"\t"+e.isPooled()+"\t"+e.getSample()+"\t"+e.get OriginalQuantity()+"\t"+e.getRemainingQuantity());295 if (!TestUtil.getSilent()) System.out.println(i+":\t"+e.getId()+"\t"+e.getName()+"\t"+e.getItemSubtype()+"\t"+e.getDescription()+ 296 "\t"+e.getExternalId()+"\t"+e.isPooled()+"\t"+e.getSample()+"\t"+e.getTag()+"\t"+e.getOriginalQuantity()+"\t"+e.getRemainingQuantity()); 280 297 } 281 298 static void write_events_header() … … 292 309 if (!TestUtil.getSilent()) System.out.println(i+":\t"+evt.getId()+"\t"+evt.getBioMaterial()+"\t"+evt.getEventType()+ 293 310 "\t"+evt.getEventDate()+"\t"+evt.getEntryDate()+"\t"+evt.getUsedQuantity(e)+"\t"+evt.getComment()); 311 } 312 static void write_item(int i, Hybridization h) 313 throws BaseException 314 { 315 if (!TestUtil.getSilent()) System.out.println(i+":\t"+h.getId()+"\t"+h.getName()+"\t"+h.getDescription()); 294 316 } 295 317 static void write_sources_header() … … 440 462 } 441 463 } 464 465 static void test_list_hybridizations(int extractId, int expectedResults) 466 { 467 if (extractId == 0) return; 468 DbControl dc = null; 469 try 470 { 471 dc = TestUtil.getDbControl(); 472 Extract le = Extract.getById(dc, extractId); 473 ItemResultList<Hybridization> l = le.getHybridizations().list(dc); 474 for (int i = 0; i<l.size(); i++) 475 { 476 write_item(i, l.get(i)); 477 } 478 if (expectedResults >= 0 && expectedResults != l.size()) 479 { 480 throw new BaseException("Expected "+expectedResults+" results, not "+l.size()); 481 } 482 write("--List hybridizations for labeled extract OK ("+l.size()+")"); 483 } 484 catch (Throwable ex) 485 { 486 write("--List hybridizations for labeled extract FAILED"); 487 ex.printStackTrace(); 488 ok = false; 489 } 490 finally 491 { 492 if (dc != null) dc.close(); 493 } 494 } 495 442 496 } -
trunk/src/test/TestGenericOverview.java
r5632 r5641 25 25 import net.sf.basedb.core.DataFileType; 26 26 import net.sf.basedb.core.DbControl; 27 import net.sf.basedb.core.Extract; 27 28 import net.sf.basedb.core.Hardware; 28 29 import net.sf.basedb.core.Item; … … 88 89 int sample1 = TestSample.test_create(biosource, "Test GO #1", false); 89 90 int sample2 = TestSample.test_create(biosource, "Test GO #2", false); 90 int extract1 = TestExtract.test_create(sample1, false);91 int extract2 = TestExtract.test_create(sample2, false);91 int extract1 = TestExtract.test_create(sample1, "Test GO #1", 0, 0, false); 92 int extract2 = TestExtract.test_create(sample2, "Test GO #2", 0, 0, false); 92 93 int extractPooled = TestExtract.test_create_pooled(extract1, extract2); 93 94 94 95 int cy3 = TestTag.test_load("cy3"); 95 96 int cy5 = TestTag.test_load("cy5"); 96 int labeledExtract1 = TestLabeledExtract.test_create(extract1, cy3, false); 97 int labeledExtract2 = TestLabeledExtract.test_create(extract2, cy3, false); 98 int labeledExtract1Ref = TestLabeledExtract.test_create(extractPooled, cy5, false); 99 int labeledExtract2Ref = TestLabeledExtract.test_create(extractPooled, cy5, false); 97 int labeledExtract = SystemItems.getId(Extract.LABELED); 98 int labeledExtract1 = TestExtract.test_create(extract1, "Labeled GO #1 (cy3)", labeledExtract, cy3, false); 99 int labeledExtract2 = TestExtract.test_create(extract2, "Labeled GO #2 (cy3)", labeledExtract, cy3, false); 100 int labeledExtract1Ref = TestExtract.test_create(extractPooled, "Labeled GO #1 (cy5)", labeledExtract, cy5, false); 101 int labeledExtract2Ref = TestExtract.test_create(extractPooled, "Labeled GO #2 (cy5)", labeledExtract, cy5, false); 100 102 101 103 // Array design … … 151 153 TestArrayBatch.test_delete(arrayBatch); 152 154 TestArrayDesign.test_delete(arrayDesign); 153 Test LabeledExtract.test_delete(labeledExtract1);154 Test LabeledExtract.test_delete(labeledExtract1Ref);155 Test LabeledExtract.test_delete(labeledExtract2);156 Test LabeledExtract.test_delete(labeledExtract2Ref);155 TestExtract.test_delete(labeledExtract1); 156 TestExtract.test_delete(labeledExtract1Ref); 157 TestExtract.test_delete(labeledExtract2); 158 TestExtract.test_delete(labeledExtract2Ref); 157 159 TestExtract.test_delete(extractPooled); 158 160 TestExtract.test_delete(extract1); -
trunk/src/test/TestHybridization.java
r5632 r5641 53 53 int id3 = test_create(arraySlideId, false); 54 54 55 int labelId1 = TestTag.test_create("Test label #1", SystemItems.getId(Tag.LABEL), false); 56 int labelId2 = TestTag.test_create("Test label #2", SystemItems.getId(Tag.LABEL), false); 57 int labeledExtractId1 = TestLabeledExtract.test_create(0, labelId1, false); 58 int labeledExtractId2 = TestLabeledExtract.test_create(0, labelId2, false); 55 int cy3 = TestTag.test_load("cy3"); 56 int cy5 = TestTag.test_load("cy5"); 57 int labeledExtract = SystemItems.getId(Extract.LABELED); 58 int labeledExtractId1 = TestExtract.test_create(0, "Labeled #1", labeledExtract, cy3, false); 59 int labeledExtractId2 = TestExtract.test_create(0, "Labeled #2", labeledExtract, cy5, false); 59 60 int id4 = test_create(0, false, labeledExtractId1, labeledExtractId2); 60 61 61 62 test_list(-1); 62 63 63 Test LabeledExtract.test_list_hybridizations(labeledExtractId1, 1);64 ok = ok && Test LabeledExtract.ok;64 TestExtract.test_list_hybridizations(labeledExtractId1, 1); 65 ok = ok && TestExtract.ok; 65 66 66 67 // Standard test: Delete … … 71 72 test_delete(id4); 72 73 73 TestLabeledExtract.test_delete(labeledExtractId1); 74 TestLabeledExtract.test_delete(labeledExtractId2); 75 TestTag.test_delete(labelId1); 76 TestTag.test_delete(labelId2); 74 TestExtract.test_delete(labeledExtractId1); 75 TestExtract.test_delete(labeledExtractId2); 77 76 78 77 TestArraySlide.test_delete(arraySlideId); … … 104 103 for (int labeledExtractId : labeledExtractIds) 105 104 { 106 LabeledExtract le = LabeledExtract.getById(dc, labeledExtractId);105 Extract le = Extract.getById(dc, labeledExtractId); 107 106 evt.addSource(le, 100.0f); 108 107 } … … 272 271 dc = TestUtil.getDbControl(); 273 272 Hybridization h = Hybridization.getById(dc, hybId); 274 LabeledExtract le = LabeledExtract.getById(dc, labeledExtractId);273 Extract le = Extract.getById(dc, labeledExtractId); 275 274 BioMaterialEvent event = h.getCreationEvent(); 276 275 event.addSource(le, usedQuantity); -
trunk/src/test/TestItemImporter.java
r5630 r5641 105 105 int labledExtractFileId = TestFile.test_create("data/test.batchimport.labeledextracts.txt", false, false); 106 106 int labledExtractImporterId = TestPluginDefinition.test_get("net.sf.basedb.plugins.batchimport.LabeledExtractImporter"); 107 int labledExtractJobId = test_create_item_import_job(Item. LABELEDEXTRACT, labledExtractImporterId, labledExtractFileId);107 int labledExtractJobId = test_create_item_import_job(Item.EXTRACT, labledExtractImporterId, labledExtractFileId); 108 108 ok &= TestJob.test_execute(labledExtractJobId, false); 109 Test LabeledExtract.test_list(7);109 TestExtract.test_list(11); 110 110 111 111 // Import array designs … … 196 196 197 197 // Delete labeled extracts 198 Test LabeledExtract.test_delete_all();198 TestExtract.test_delete_all(); 199 199 TestJob.test_delete(labledExtractJobId); 200 200 TestFile.test_delete(labledExtractFileId); … … 257 257 //write_request_information(request.getRequestInformation()); 258 258 request.getRequestInformation(); 259 260 request.setParameterValue("file", File.getById(dc, fileId));259 File file = File.getById(dc, fileId); 260 request.setParameterValue("file", file); 261 261 setParserParameters(request); 262 setColumnMappingParameters(request, itemType );262 setColumnMappingParameters(request, itemType, file); 263 263 PluginResponse response = request.invoke(); 264 264 if (response.getStatus() != Response.Status.CONTINUE) … … 330 330 } 331 331 332 private static void setColumnMappingParameters(PluginConfigurationRequest request, Item itemType )332 private static void setColumnMappingParameters(PluginConfigurationRequest request, Item itemType, File file) 333 333 { 334 334 request.setParameterValue("nameColumnMapping", "\\Name\\"); … … 341 341 request.setParameterValue("hardwareColumnMapping", "\\Freezer\\"); 342 342 } 343 if (itemType == Item.SAMPLE || itemType == Item.EXTRACT || itemType == Item.LABELEDEXTRACT)343 if (itemType == Item.SAMPLE || itemType == Item.EXTRACT) 344 344 { 345 345 request.setParameterValue("externalIdColumnMapping", "\\External ID\\"); … … 351 351 request.setParameterValue("usedQuantityColumnMapping", "\\Used quantity\\"); 352 352 } 353 if ( itemType == Item.LABELEDEXTRACT)353 if (file.getName().contains("labeledextracts")) 354 354 { 355 355 request.setParameterValue("labelColumnMapping", "\\Label\\"); -
trunk/src/test/TestItemSubtype.java
r5630 r5641 49 49 50 50 // Extra tests: 51 int extractId = TestExtract.test_create(0, true);51 int extractId = TestExtract.test_create(0, "Test extract", 0, 0, true); 52 52 test_set_on_item(id, extractId); 53 53 -
trunk/src/test/TestMetadata.java
r5632 r5641 27 27 import net.sf.basedb.core.BasicItem; 28 28 import net.sf.basedb.core.DbControl; 29 import net.sf.basedb.core.Extract; 29 30 import net.sf.basedb.core.Formula; 30 31 import net.sf.basedb.core.Item; … … 87 88 int slideId = TestArraySlide.test_create(batchId, true); 88 89 int labelId = TestTag.test_create("Test label", SystemItems.getId(Tag.LABEL), true); 89 int labeledExtractId = Test LabeledExtract.test_create(0, labelId, true);90 int labeledExtractId = TestExtract.test_create(0, "Test extract", SystemItems.getId(Extract.LABELED), labelId, true); 90 91 int hybId = TestHybridization.test_create(slideId, true, labeledExtractId); 91 92 int scanId = TestScan.test_create(hybId, 0, 0, true); … … 110 111 TestScan.test_delete(scanId); 111 112 TestHybridization.test_delete(hybId); 112 Test LabeledExtract.test_delete(labeledExtractId);113 TestExtract.test_delete(labeledExtractId); 113 114 TestTag.test_delete(labelId); 114 115 TestArraySlide.test_delete(slideId); -
trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java
r5630 r5641 230 230 p.setDefaultItem(dc, sampling, Project.Default.SAMPLING_PROTOCOL); 231 231 p.setDefaultItem(dc, extraction, Project.Default.EXTRACTING_PROTOCOL); 232 p.setDefaultItem(dc, labeling, Project.Default.LABELING_PROTOCOL);233 232 p.setDefaultItem(dc, hybridization, Project.Default.HYBRIDIZATION_PROTOCOL); 234 233 p.setDefaultItem(dc, feature, Project.Default.FEATURE_EXTRACTION_PROTOCOL); -
trunk/src/test/net/sf/basedb/test/roles/UserTest.java
r5632 r5641 43 43 import net.sf.basedb.core.ItemQuery; 44 44 import net.sf.basedb.core.Job; 45 import net.sf.basedb.core.LabeledExtract;46 45 import net.sf.basedb.core.PlateGeometry; 47 46 import net.sf.basedb.core.Platform; … … 206 205 Tag cy3 = Util.findTag(dc, "cy3"); 207 206 Tag cy5 = Util.findTag(dc, "cy5"); 208 LabeledExtract le1 = createLabeledExtract(dc, "Labeled extract A.00h", e1, cy3);207 Extract le1 = createLabeledExtract(dc, "Labeled extract A.00h", e1, cy3); 209 208 le1.setBioWell(bioPlate.getBioWell(2, 0)); 210 LabeledExtract le1DyeSwap = createLabeledExtract(dc, "Labeled extract A.00h (dye-swap)", e1, cy5);209 Extract le1DyeSwap = createLabeledExtract(dc, "Labeled extract A.00h (dye-swap)", e1, cy5); 211 210 le1DyeSwap.setBioWell(bioPlate.getBioWell(3, 0)); 212 LabeledExtract le2 = createLabeledExtract(dc, "Labeled extract A.24h", e2, cy3);211 Extract le2 = createLabeledExtract(dc, "Labeled extract A.24h", e2, cy3); 213 212 le2.setBioWell(bioPlate.getBioWell(2, 1)); 214 LabeledExtract le2DyeSwap = createLabeledExtract(dc, "Labeled extract A.24h (dye-swap)", e2, cy5);213 Extract le2DyeSwap = createLabeledExtract(dc, "Labeled extract A.24h (dye-swap)", e2, cy5); 215 214 le2DyeSwap.setBioWell(bioPlate.getBioWell(3, 1)); 216 LabeledExtract leRef = createLabeledExtract(dc, "Labeled extract A.ref", eRef, cy5);215 Extract leRef = createLabeledExtract(dc, "Labeled extract A.ref", eRef, cy5); 217 216 leRef.setBioWell(bioPlate.getBioWell(2, 2)); 218 LabeledExtract leRefDyeSwap = createLabeledExtract(dc, "Labeled extract A.ref (dye-swap)", eRef, cy3);217 Extract leRefDyeSwap = createLabeledExtract(dc, "Labeled extract A.ref (dye-swap)", eRef, cy3); 219 218 leRefDyeSwap.setBioWell(bioPlate.getBioWell(3, 2)); 220 219 // dc.commit(); … … 407 406 Create a labeled extract. 408 407 */ 409 public static LabeledExtract createLabeledExtract(DbControl dc, String name, Extract extract, Tag label)408 public static Extract createLabeledExtract(DbControl dc, String name, Extract extract, Tag label) 410 409 { 411 410 TestUtil.write("--Creating labeled extract: " + name + "\n"); 412 411 413 LabeledExtract labeledExtract = LabeledExtract.getNew(dc, label);412 Extract labeledExtract = Extract.getNew(dc); 414 413 labeledExtract.setName(name); 415 414 labeledExtract.setOriginalQuantity(100.0f); 416 labeledExtract.setExtract(extract, 50.0f); 415 labeledExtract.setTag(label); 416 labeledExtract.setPooled(true); 417 417 labeledExtract.getCreationEvent().setProtocol(Util.findProtocol(dc, "Labeling A")); 418 labeledExtract.getCreationEvent().addSource(extract, 50.0f); 418 419 dc.saveItem(labeledExtract); 419 420 return labeledExtract; … … 435 436 Create a hybridization. 436 437 */ 437 public static Hybridization createHybridization(DbControl dc, String name, String arraySlideName, LabeledExtract... extracts)438 public static Hybridization createHybridization(DbControl dc, String name, String arraySlideName, Extract... extracts) 438 439 { 439 440 TestUtil.write("--Creating hybridization: " + name + "\n"); … … 444 445 creationEvent.setProtocol(Util.findProtocol(dc, "Hybridization A")); 445 446 creationEvent.setHardware(Util.findHardware(dc, "Hybridization station A")); 446 for ( LabeledExtract le : extracts)447 for (Extract le : extracts) 447 448 { 448 449 creationEvent.addSource(le, 50.0f); -
trunk/www/biomaterials/bioplates/list_bioplates.jsp
r5566 r5641 83 83 bioMaterialTypes.add(Integer.toString(Item.SAMPLE.getValue()), Item.SAMPLE.toString()); 84 84 bioMaterialTypes.add(Integer.toString(Item.EXTRACT.getValue()), Item.EXTRACT.toString()); 85 bioMaterialTypes.add(Integer.toString(Item.LABELEDEXTRACT.getValue()), Item.LABELEDEXTRACT.toString());86 85 } 87 86 %> -
trunk/www/biomaterials/bioplates/view_bioplate.jsp
r5566 r5641 315 315 image="add.png" 316 316 onclick="createChildBioPlate()" 317 title="<%="Create child bioplate" + (bioMaterialType == Item. LABELEDEXTRACT ? "/hybridization" : "") +"…"%>"317 title="<%="Create child bioplate" + (bioMaterialType == Item.EXTRACT ? "/hybridization" : "") +"…"%>" 318 318 tooltip="Create one or more child biomaterial plates" 319 319 visible="<%=bioMaterialType != null%>" -
trunk/www/biomaterials/bioplates/wells/edit_biowell.jsp
r5492 r5641 34 34 import="net.sf.basedb.core.Sample" 35 35 import="net.sf.basedb.core.Extract" 36 import="net.sf.basedb.core.LabeledExtract"37 36 import="net.sf.basedb.core.PermissionDeniedException" 38 37 import="net.sf.basedb.core.BaseException" … … 195 194 <option value="<%=Item.EXTRACT.name()%>" 196 195 <%=currentBmType == Item.EXTRACT || bioMaterialType == Item.EXTRACT ? "selected" : ""%>>Extract 197 <option value="<%=Item.LABELEDEXTRACT.name()%>"198 <%=currentBmType == Item.LABELEDEXTRACT || bioMaterialType == Item.LABELEDEXTRACT ? "selected" : ""%>>Labeled extract199 196 <% 200 197 } -
trunk/www/biomaterials/bioplatetypes/edit_platetype.jsp
r5492 r5641 160 160 <option value="<%=Item.SAMPLE.name()%>">Sample 161 161 <option value="<%=Item.EXTRACT.name()%>">Extract 162 <option value="<%=Item.LABELEDEXTRACT.name()%>">Labeled extract163 162 </select> 164 163 </td> -
trunk/www/biomaterials/bioplatetypes/list_platetypes.jsp
r5590 r5641 73 73 bioMaterialTypes.add(Integer.toString(Item.SAMPLE.getValue()), Item.SAMPLE.toString()); 74 74 bioMaterialTypes.add(Integer.toString(Item.EXTRACT.getValue()), Item.EXTRACT.toString()); 75 bioMaterialTypes.add(Integer.toString(Item.LABELEDEXTRACT.getValue()), Item.LABELEDEXTRACT.toString());76 75 } 77 76 private static Enumeration<String, String> lockModes = new Enumeration<String, String>(); -
trunk/www/biomaterials/events/list_events.jsp
r5525 r5641 105 105 listName = "Extracts"; 106 106 viewPage = "../extracts/index.jsp"; 107 }108 else if (bioMaterialType == Item.LABELEDEXTRACT)109 {110 listName = "Labeled extracts";111 viewPage = "../labeledextracts/index.jsp";112 107 } 113 108 -
trunk/www/biomaterials/events/view_event.jsp
r5530 r5641 118 118 viewPage = "../extracts/index.jsp"; 119 119 } 120 else if (bioMaterialType == Item.LABELEDEXTRACT)121 {122 listName = "Labeled extracts";123 viewPage = "../labeledextracts/index.jsp";124 }125 120 126 121 final boolean writePermission = event.hasPermission(Permission.WRITE) && eventType == BioMaterialEvent.Type.OTHER; -
trunk/www/biomaterials/extracts/index.jsp
r5590 r5641 35 35 import="net.sf.basedb.core.BioWell" 36 36 import="net.sf.basedb.core.Protocol" 37 import="net.sf.basedb.core.Hybridization" 37 38 import="net.sf.basedb.core.ItemQuery" 38 39 import="net.sf.basedb.core.ItemResultIterator" 39 import="net.sf.basedb.core.LabeledExtract"40 40 import="net.sf.basedb.core.Permission" 41 41 import="net.sf.basedb.core.ItemContext" … … 86 86 cc.setObject("export.formatter.&children(name)", new NameableFormatter()); 87 87 cc.setObject("export.formatter.&creationEvent.sourceBioMaterials(name)", new NameableFormatter()); 88 cc.setObject("export.formatter.&sourceEvents(event.hybridization.name)", new NameableFormatter()); 88 89 cc.setObject("export.formatter.&sourceEvents(event.bioMaterial.name)", new NameableFormatter()); 89 90 … … 91 92 String restrictionParameter = "extract"; 92 93 93 // Child labeled extracts 94 ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery(); 95 labeledExtractQuery.include(cc.getInclude()); 96 labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter(restrictionParameter))); 97 labeledExtractQuery.order(Orders.asc(Hql.property("name"))); 98 cc.setObject("export.dataloader.&children(name)", new ItemQueryLoader(labeledExtractQuery, restrictionParameter)); 94 // Hybridizations 95 ItemQuery<Hybridization> hybQuery = Hybridization.getQuery(); 96 hybQuery.join(Hql.innerJoin("creationEvent", "ce")); 97 hybQuery.join(Hql.innerJoin("ce", "sources", "src")); 98 hybQuery.restrict(Restrictions.eq(Hql.index("src", null), Expressions.parameter(restrictionParameter))); 99 hybQuery.order(Orders.asc(Hql.property("name"))); 100 hybQuery.include(cc.getInclude()); 101 cc.setObject("export.dataloader.&sourceEvents(event.hybridization.name)", new ItemQueryLoader(hybQuery, restrictionParameter)); 99 102 100 103 // Child extracts … … 192 195 cc.setId(0); 193 196 forward = editPage+"&pooled="+true; 197 } 198 else if ("NewHybridization".equals(cmd)) 199 { 200 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 201 redirect = "../../views/hybridizations/index.jsp?ID="+ID+"&cmd=NewItem&useParents=true"; 194 202 } 195 203 else if ("UpdateItem".equals(cmd)) -
trunk/www/biomaterials/extracts/list_extracts.jsp
r5567 r5641 29 29 import="net.sf.basedb.core.Item" 30 30 import="net.sf.basedb.core.Extract" 31 import="net.sf.basedb.core.LabeledExtract"32 31 import="net.sf.basedb.core.Sample" 32 import="net.sf.basedb.core.Hybridization" 33 33 import="net.sf.basedb.core.BioPlate" 34 34 import="net.sf.basedb.core.BioMaterialEvent" … … 99 99 { 100 100 final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType); 101 final boolean createLabeledExtractPermission = sc.hasPermission(Permission.CREATE, Item.LABELEDEXTRACT); 102 final ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery(); 103 labeledExtractQuery.include(cc.getInclude()); 104 labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Hql.entityParameter("extract", Item.EXTRACT))); 105 labeledExtractQuery.order(Orders.asc(Hql.property("name"))); 101 final boolean createHybridizationPermission = sc.hasPermission(Permission.CREATE, Item.HYBRIDIZATION); 102 103 final ItemQuery<Hybridization> hybQuery = Hybridization.getQuery(); 104 hybQuery.join(Hql.innerJoin("creationEvent", "ce")); 105 hybQuery.join(Hql.innerJoin("ce", "sources", "src")); 106 hybQuery.restrict(Restrictions.eq(Hql.index("src", null), Hql.entityParameter("extract", Item.EXTRACT))); 107 hybQuery.order(Orders.asc(Hql.property("name"))); 108 hybQuery.include(cc.getInclude()); 106 109 107 110 final ItemQuery<Extract> childExtractsQuery = Extract.getQuery(); … … 164 167 Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'NewPooledItem'); 165 168 } 169 function newHybridization() 170 { 171 Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'NewHybridization'); 172 } 166 173 function editItem(itemId) 167 174 { … … 395 402 /> 396 403 <tbl:columndef 397 id=" labeledextracts"398 title=" Labeled extracts"399 property="& children(name)"404 id="hybridizations" 405 title="Hybridizations" 406 property="&sourceEvents(event.hybridization.name)" 400 407 datatype="string" 401 408 filterable="true" … … 523 530 title="Pool…" 524 531 tooltip="<%=createPermission ? "Create new pooled extract" : "You do not have permission to create extracts"%>" 532 /> 533 <tbl:button 534 disabled="<%=createHybridizationPermission ? false : true%>" 535 image="<%=createHybridizationPermission ? "add.png" : "add_disabled.png"%>" 536 onclick="newHybridization()" 537 title="New hybridzation…" 538 tooltip="<%=createHybridizationPermission ? "Create new hybridization with the selected extracts" : "You do not have permission to create hybridizations"%>" 525 539 /> 526 540 <tbl:button … … 749 763 %> 750 764 </tbl:cell> 751 <tbl:cell column="labeledextracts"> 752 <% 753 labeledExtractQuery.setEntityParameter("extract", item); 765 <tbl:cell column="hybridizations"> 766 <% 754 767 try 755 768 { 769 hybQuery.setEntityParameter("extract", item); 756 770 String separator = ""; 757 for ( LabeledExtract le : labeledExtractQuery.list(dc))771 for (Hybridization h : hybQuery.list(dc)) 758 772 { 759 773 out.write(separator); 760 774 if (mode.hasPropertyLink()) 761 775 { 762 out.write(Base.getLinkedName(ID, le, false, mode.hasEditLink()));776 out.write(Base.getLinkedName(ID, h, false, mode.hasEditLink())); 763 777 } 764 778 else 765 779 { 766 out.write(HTML.encodeTags( le.getName()));780 out.write(HTML.encodeTags(h.getName())); 767 781 } 768 %>769 (<base:propertyvalue770 item="<%=le%>" property="label"771 enableEditLink="<%=mode.hasEditLink()%>"772 enablePropertyLink="<%=mode.hasPropertyLink()%>"/>)773 <%774 782 separator = ", "; 775 783 } … … 782 790 } 783 791 %> 784 <base:icon 785 image="add.png" 786 onclick="<%="newLabeledExtract("+itemId+")"%>" 787 tooltip="Create a new labeled extract" 788 visible="<%=mode.hasEditLink() && createLabeledExtractPermission && usePermission%>" 789 /></tbl:cell> 790 792 </tbl:cell> 791 793 <% 792 794 BioWell well = null; -
trunk/www/biomaterials/extracts/view_extract.jsp
r5496 r5641 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Extract" 36 import="net.sf.basedb.core. LabeledExtract"36 import="net.sf.basedb.core.Hybridization" 37 37 import="net.sf.basedb.core.Sample" 38 38 import="net.sf.basedb.core.BioMaterialEvent" … … 176 176 } 177 177 } 178 function new LabeledExtract()179 { 180 Main.viewOrEditItem('<%=ID%>', ' LABELEDEXTRACT', 0, true, '&extract_id=<%=itemId%>')178 function newHybridization() 179 { 180 Main.viewOrEditItem('<%=ID%>', 'HYBRIDIZATION', 0, true, '&extract_id='+<%=itemId%>); 181 181 } 182 182 </script> … … 233 233 <tbl:button 234 234 image="add.png" 235 onclick="new LabeledExtract()"236 title="New labeled extract…"237 tooltip="Create a new labeled extract from thisextract"238 visible="<%=sc.hasPermission(Permission.CREATE, Item. LABELEDEXTRACT) && usePermission%>"235 onclick="newHybridization()" 236 title="New hybridization…" 237 tooltip="Create a new hybridization from this labeled extract" 238 visible="<%=sc.hasPermission(Permission.CREATE, Item.HYBRIDIZATION) && usePermission%>" 239 239 /> 240 240 <tbl:button … … 513 513 <% 514 514 } 515 516 ItemQuery<LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();517 labeledExtractQuery.include(Include.ALL);518 labeledExtractQuery.restrict(Restrictions.eq(Hql.property("parent"), Expressions.parameter("extracts")));519 labeledExtractQuery.setParameter("extracts", itemId, Type.INT);520 labeledExtractQuery.order(Orders.asc(Hql.property("name")));521 ItemResultList<LabeledExtract> labeledExtracts = labeledExtractQuery.list(dc);522 515 523 if (labeledExtracts.size() == 0) 524 { 525 %> 526 <h4>Labeled extracts</h4> 527 No labeled extracts have been created from this extract 516 ItemQuery<Hybridization> hybridizationQuery = extract.getHybridizations(); 517 hybridizationQuery.include(Include.ALL); 518 hybridizationQuery.order(Orders.asc(Hql.property("name"))); 519 ItemResultList<Hybridization>hybridizations = hybridizationQuery.list(dc); 520 if (hybridizations.size() == 0) 521 { 522 %> 523 <h4>Hybridizations</h4> 524 No hybridizations have been created from this extract 528 525 (or you don't have the permission to view them) 529 526 <% … … 533 530 %> 534 531 <base:section 535 id=" labeledExtractSection"536 title="<%=" Labeled extracts (" + labeledExtracts.size() + ")"%>"532 id="hybridizationSection" 533 title="<%="Hybridizations (" + hybridizations.size() + ")"%>" 537 534 context="<%=cc%>" 538 535 > 539 536 <tbl:table 540 id=" labeledextracts"537 id="hybridizations" 541 538 clazz="itemlist" 542 539 columns="all" … … 558 555 <tbl:rows> 559 556 <% 560 for ( LabeledExtract lbe : labeledExtracts)557 for (Hybridization hyb : hybridizations) 561 558 { 562 559 %> … … 565 562 image="deleted.gif" 566 563 tooltip="This item has been scheduled for deletion" 567 visible="<%= lbe.isRemoved()%>"568 /><%=Base.getLinkedName(ID, lbe, false, true)%></tbl:cell>569 <tbl:cell column="quantity"><%=Values.formatNumber( lbe.getCreationEvent().getUsedQuantity(extract), 2)%></tbl:cell>570 <tbl:cell column="description"><%=HTML.encodeTags( lbe.getDescription())%></tbl:cell>564 visible="<%=hyb.isRemoved()%>" 565 /><%=Base.getLinkedName(ID, hyb, false, true)%></tbl:cell> 566 <tbl:cell column="quantity"><%=Values.formatNumber(hyb.getCreationEvent().getUsedQuantity(extract), 2)%></tbl:cell> 567 <tbl:cell column="description"><%=HTML.encodeTags(hyb.getDescription())%></tbl:cell> 571 568 </tbl:row> 572 569 <% -
trunk/www/biomaterials/lists/edit_list.jsp
r5526 r5641 221 221 <option value="SAMPLE" <%=memberType == Item.SAMPLE ? "selected" : ""%>>Sample 222 222 <option value="EXTRACT" <%=memberType == Item.EXTRACT ? "selected" : ""%>>Extract 223 <option value="LABELEDEXTRACT" <%=memberType == Item.LABELEDEXTRACT ? "selected" : ""%>>Labeled extract224 223 </select> 225 224 </td> -
trunk/www/biomaterials/lists/index.jsp
r5590 r5641 48 48 import="net.sf.basedb.util.biomaterial.BioSourceToSampleTransformer" 49 49 import="net.sf.basedb.util.biomaterial.SampleToExtractTransformer" 50 import="net.sf.basedb.util.biomaterial.ExtractToLabeledExtractTransformer"51 50 import="net.sf.basedb.util.biomaterial.PooledChildrenTransformer" 52 51 import="net.sf.basedb.util.collections.CollectionTransformer" -
trunk/www/biomaterials/lists/list_lists.jsp
r5590 r5641 31 31 import="net.sf.basedb.core.ItemResultIterator" 32 32 import="net.sf.basedb.core.ItemContext" 33 import="net.sf.basedb.core.LabeledExtract"34 33 import="net.sf.basedb.core.Nameable" 35 34 import="net.sf.basedb.core.Permission" … … 67 66 memberTypes.add(Integer.toString(Item.SAMPLE.getValue()), Item.SAMPLE.toString()); 68 67 memberTypes.add(Integer.toString(Item.EXTRACT.getValue()), Item.EXTRACT.toString()); 69 memberTypes.add(Integer.toString(Item.LABELEDEXTRACT.getValue()), Item.LABELEDEXTRACT.toString());70 68 } 71 69 -
trunk/www/biomaterials/lists/members/add_members_frameset.jsp
r5426 r5641 56 56 urlToController = "extracts"; 57 57 } 58 else if (memberType == Item.LABELEDEXTRACT)59 {60 urlToController = "labeledextracts";61 }62 58 } 63 59 finally -
trunk/www/biomaterials/tags/view_tag.jsp
r5632 r5641 138 138 Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540); 139 139 } 140 function newLabeledExtract()141 {142 Main.viewOrEditItem('<%=ID%>', 'LABELEDEXTRACT', 0, true, '&label_id='+<%=itemId%>);143 }144 140 </script> 145 141 </base:head> … … 191 187 title="Set owner…" 192 188 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 193 />194 <tbl:button195 image="add.png"196 onclick="newLabeledExtract()"197 title="New labeled extract…"198 tooltip="Create a new labeled extract with this label"199 visible="<%=sc.hasPermission(Permission.CREATE, Item.LABELEDEXTRACT) && usePermission%>"200 189 /> 201 190 <tbl:button -
trunk/www/biomaterials/wizards/create_child_bioplate_step1.jsp
r5630 r5641 31 31 import="net.sf.basedb.core.Hardware" 32 32 import="net.sf.basedb.core.Protocol" 33 import="net.sf.basedb.core. Label"33 import="net.sf.basedb.core.Tag" 34 34 import="net.sf.basedb.core.DbControl" 35 35 import="net.sf.basedb.core.Item" … … 360 360 %> 361 361 <option value="EXTRACT">Extract → Extract 362 <option value="LABELEDEXTRACT" selected>Extract → Labeled extract 363 <% 364 } 365 else if (sourceBioMaterialType == Item.LABELEDEXTRACT) 366 { 367 %> 368 <option value="LABELEDEXTRACT">Labled extract → Labeled extract 369 <option value="HYBRIDIZATION" selected>Labled extract → Hybridization 362 <option value="HYBRIDIZATION" selected>Extract → Hybridization 370 363 <% 371 364 } … … 377 370 if (sourceBioMaterialType == Item.EXTRACT) 378 371 { 379 final ItemQuery< Label> labelsQuery = Label.getQuery();380 labelsQuery.order(Orders.asc(Hql.property("name")));381 labelsQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS);382 labelsQuery.setCacheResult(true);383 final List< Label> labels = labelsQuery.list(dc);372 final ItemQuery<Tag> tagsQuery = Tag.getQuery(); 373 tagsQuery.order(Orders.asc(Hql.property("name"))); 374 tagsQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS); 375 tagsQuery.setCacheResult(true); 376 final List<Tag> tags = tagsQuery.list(dc); 384 377 %> 385 378 <tr id="labelDiv"> … … 389 382 style="width: 20em;"> 390 383 <% 391 for ( Label label : labels)384 for (Tag tag : tags) 392 385 { 393 386 %> 394 <option value="<%= label.getId()%>"><%=HTML.encodeTags(label.getName())%>387 <option value="<%=tag.getId()%>"><%=HTML.encodeTags(tag.getName())%> 395 388 <% 396 389 } -
trunk/www/biomaterials/wizards/create_child_bioplate_step2.jsp
r5630 r5641 81 81 { 82 82 childNameSuffix = "e"; 83 }84 else if (childBioMaterialType == Item.LABELEDEXTRACT)85 {86 childNameSuffix = "le";87 83 } 88 84 -
trunk/www/biomaterials/wizards/index.jsp
r5561 r5641 41 41 import="net.sf.basedb.core.Sample" 42 42 import="net.sf.basedb.core.Extract" 43 import="net.sf.basedb.core.LabeledExtract" 44 import="net.sf.basedb.core.Label" 43 import="net.sf.basedb.core.Tag" 45 44 import="net.sf.basedb.core.PlateGeometry" 46 45 import="net.sf.basedb.core.InvalidDataException" … … 311 310 if (!pooled) ((Extract)child).setSample((Sample)parent, usedQuantity); 312 311 } 312 /* 313 313 else if (childBioMaterialType == Item.LABELEDEXTRACT) 314 314 { … … 317 317 if (!pooled) ((LabeledExtract)child).setExtract((Extract)parent, usedQuantity); 318 318 } 319 */ 319 320 else 320 321 { -
trunk/www/include/menu.jsp
r5632 r5641 653 653 final boolean hasExtracts = !sc.hasPermission(Permission.DENIED, Item.EXTRACT); 654 654 final boolean createExtracts = sc.hasPermission(Permission.CREATE, Item.EXTRACT); 655 656 final boolean hasLabeledExtracts = !sc.hasPermission(Permission.DENIED, Item.LABELEDEXTRACT);657 final boolean createLabeledExtracts = sc.hasPermission(Permission.CREATE, Item.LABELEDEXTRACT);658 655 659 656 final boolean hasBioMaterialLists = !sc.hasPermission(Permission.DENIED, Item.BIOMATERIALLIST); … … 664 661 final boolean hasBioPlateEventTypes = !sc.hasPermission(Permission.DENIED, Item.BIOPLATEEVENTTYPE); 665 662 final boolean hasBioLims = hasTags || hasBioSources || hasSamples || hasExtracts || 666 has LabeledExtracts || hasBioMaterialLists || hasBioPlates ||663 hasBioMaterialLists || hasBioPlates || 667 664 hasBioPlateTypes || hasBioPlateEventTypes; 668 665 … … 691 688 tooltip="<%=menu.getString("extracts.tooltip", hasExtracts)%>" 692 689 enabled="<%=hasExtracts%>" 693 />694 <m:menuitem695 title="<%=common.getString("item.labeledextract+")%>"696 onclick="<%="Menu.openUrl('"+root+"biomaterials/labeledextracts/index.jsp?ID="+ID+"')"%>"697 tooltip="<%=menu.getString("labeledextracts.tooltip", hasLabeledExtracts)%>"698 enabled="<%=hasLabeledExtracts%>"699 690 /> 700 691 <m:menuitem -
trunk/www/include/scripts/main.js
r5632 r5641 540 540 this.controllers['SESSION'] = { url:'views/sessions/index.jsp', width:400, height:300, popup:true, edit:false }; 541 541 this.controllers['TAG'] = { url:'biomaterials/tags/index.jsp', width:450, height:280 }; 542 this.controllers['LABELEDEXTRACT'] = { url:'biomaterials/labeledextracts/index.jsp', width:800, height:500 };543 542 this.controllers['EXTRACT'] = { url:'biomaterials/extracts/index.jsp', width:800, height:500 }; 544 543 this.controllers['SAMPLE'] = { url:'biomaterials/samples/index.jsp', width:800, height:500 }; -
trunk/www/views/hybridizations/edit_hybridization.jsp
r5630 r5641 39 39 import="net.sf.basedb.core.Protocol" 40 40 import="net.sf.basedb.core.Project" 41 import="net.sf.basedb.core. LabeledExtract"41 import="net.sf.basedb.core.Extract" 42 42 import="net.sf.basedb.core.ItemQuery" 43 43 import="net.sf.basedb.core.ItemResultList" … … 82 82 BioMaterialEvent creationEvent = null; 83 83 Date eventDate = null; 84 ItemQuery< LabeledExtract> labeledExtractsQuery = null;84 ItemQuery<Extract> labeledExtractsQuery = null; 85 85 86 86 boolean readCurrentArraySlide = true; … … 141 141 if (Values.getBoolean(request.getParameter("useParents"))) 142 142 { 143 ItemContext lc = sc.getCurrentContext(Item. LABELEDEXTRACT);143 ItemContext lc = sc.getCurrentContext(Item.EXTRACT); 144 144 if (lc.getSelected().size() > 0) 145 145 { 146 labeledExtractsQuery = LabeledExtract.getQuery();146 labeledExtractsQuery = Extract.getQuery(); 147 147 labeledExtractsQuery.include(Include.ALL); 148 148 labeledExtractsQuery.order(Orders.asc(Hql.property("name"))); … … 151 151 } 152 152 } 153 else if (request.getParameter(" labeledextract_id") != null)154 { 155 int leId = Values.getInt(request.getParameter(" labeledextract_id"));156 labeledExtractsQuery = LabeledExtract.getQuery();153 else if (request.getParameter("extract_id") != null) 154 { 155 int leId = Values.getInt(request.getParameter("extract_id")); 156 labeledExtractsQuery = Extract.getQuery(); 157 157 labeledExtractsQuery.include(Include.ALL); 158 158 labeledExtractsQuery.restrict(Restrictions.eq(Hql.property("id"), … … 194 194 195 195 // Query to retrieve source labeled extracts 196 labeledExtractsQuery = (ItemQuery< LabeledExtract>)creationEvent.getSources();196 labeledExtractsQuery = (ItemQuery<Extract>)creationEvent.getSources(); 197 197 labeledExtractsQuery.include(Include.ALL); 198 198 labeledExtractsQuery.order(Orders.asc(Hql.property("name"))); … … 306 306 if (ids.length > 0) 307 307 { 308 parents[parents.length] = ' LABELEDEXTRACT:'+ids.join(':');308 parents[parents.length] = 'EXTRACT:'+ids.join(':'); 309 309 } 310 310 return parents; … … 434 434 var excludes = ids.join(','); 435 435 436 var url = '../../biomaterials/ labeledextracts/index.jsp?ID=<%=ID%>&mode=selectmultiple&callback=addLabeledExtractCallback';436 var url = '../../biomaterials/extracts/index.jsp?ID=<%=ID%>&mode=selectmultiple&callback=addLabeledExtractCallback'; 437 437 url += '&exclude='+excludes; 438 438 Main.openPopup(url, 'AddLabeledExtracts', 1000, 700); … … 514 514 if (labeledExtractsQuery != null) 515 515 { 516 ItemResultList< LabeledExtract> labeledExtracts = labeledExtractsQuery.list(dc);517 for ( LabeledExtract le : labeledExtracts)516 ItemResultList<Extract> labeledExtracts = labeledExtractsQuery.list(dc); 517 for (Extract le : labeledExtracts) 518 518 { 519 519 if (hyb == null) -
trunk/www/views/hybridizations/index.jsp
r5590 r5641 32 32 import="net.sf.basedb.core.ArraySlide" 33 33 import="net.sf.basedb.core.BioMaterialEvent" 34 import="net.sf.basedb.core. LabeledExtract"34 import="net.sf.basedb.core.Extract" 35 35 import="net.sf.basedb.core.Protocol" 36 36 import="net.sf.basedb.core.Hardware" … … 86 86 // Register dataloaders 87 87 String hybridizationParameter = "hybridization"; 88 ItemQuery< LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();88 ItemQuery<Extract> labeledExtractQuery = Extract.getQuery(); 89 89 labeledExtractQuery.include(cc.getInclude()); 90 90 labeledExtractQuery.join(Hql.innerJoin("sourceEvents", "srcevt")); … … 228 228 if (leId != -1) 229 229 { 230 LabeledExtract le = LabeledExtract.getById(dc, leId);230 Extract le = Extract.getById(dc, leId); 231 231 String[] extra = request.getParameter("L"+leId).split(":"); 232 232 Float usedQuantity = Values.getFloat(extra[0], null); … … 240 240 { 241 241 int leId = Values.getInt(removedLabeledExtracts[i], -1); 242 if (leId != -1) creationEvent.removeSource( LabeledExtract.getById(dc, leId));242 if (leId != -1) creationEvent.removeSource(Extract.getById(dc, leId)); 243 243 } 244 244 -
trunk/www/views/hybridizations/list_hybridizations.jsp
r5559 r5641 29 29 import="net.sf.basedb.core.Item" 30 30 import="net.sf.basedb.core.Hybridization" 31 import="net.sf.basedb.core. LabeledExtract"32 import="net.sf.basedb.core. Label"31 import="net.sf.basedb.core.Extract" 32 import="net.sf.basedb.core.Tag" 33 33 import="net.sf.basedb.core.Scan" 34 34 import="net.sf.basedb.core.BioMaterialEvent" … … 96 96 97 97 // Query for labeled extracts relatated to the current hybridization 98 final ItemQuery< LabeledExtract> labeledExtractQuery = LabeledExtract.getQuery();98 final ItemQuery<Extract> labeledExtractQuery = Extract.getQuery(); 99 99 labeledExtractQuery.include(cc.getInclude()); 100 100 labeledExtractQuery.join(Hql.innerJoin("sourceEvents", "srcevt")); … … 576 576 String separator = ""; 577 577 boolean isMultiArrayHyb = item.getNumArrays() > 1; 578 for ( LabeledExtract le : labeledExtractQuery.list(dc))578 for (Extract le : labeledExtractQuery.list(dc)) 579 579 { 580 Labellabel = null;580 Tag label = null; 581 581 boolean readLabel = true; 582 582 try 583 583 { 584 label = le.get Label();584 label = le.getTag(); 585 585 } 586 586 catch (PermissionDeniedException ex) -
trunk/www/views/hybridizations/view_hybridization.jsp
r5559 r5641 41 41 import="net.sf.basedb.core.Hardware" 42 42 import="net.sf.basedb.core.User" 43 import="net.sf.basedb.core. LabeledExtract"44 import="net.sf.basedb.core. Label"43 import="net.sf.basedb.core.Extract" 44 import="net.sf.basedb.core.Tag" 45 45 import="net.sf.basedb.core.MultiPermissions" 46 46 import="net.sf.basedb.core.ItemQuery" … … 322 322 323 323 <% 324 ItemQuery< LabeledExtract> labeledExtractsQuery = (ItemQuery<LabeledExtract>)creationEvent.getSources();324 ItemQuery<Extract> labeledExtractsQuery = (ItemQuery<Extract>)creationEvent.getSources(); 325 325 labeledExtractsQuery.include(Include.ALL); 326 326 labeledExtractsQuery.order(Orders.asc(Hql.property("srcevt", "sourceGroup"))); 327 327 labeledExtractsQuery.order(Orders.asc(Hql.property("name"))); 328 ItemResultList< LabeledExtract> labeledExtracts = labeledExtractsQuery.list(dc);328 ItemResultList<Extract> labeledExtracts = labeledExtractsQuery.list(dc); 329 329 if (labeledExtracts.size() == 0) 330 330 { … … 374 374 <tbl:rows> 375 375 <% 376 for ( LabeledExtract item : labeledExtracts)376 for (Extract item : labeledExtracts) 377 377 { 378 378 %> … … 384 384 visible="<%=item.isRemoved()%>" 385 385 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 386 <tbl:cell column="label"><base:propertyvalue item="<%=item%>" property=" label" /></tbl:cell>386 <tbl:cell column="label"><base:propertyvalue item="<%=item%>" property="tag" /></tbl:cell> 387 387 <tbl:cell column="quantity"><%=Values.formatNumber(creationEvent.getUsedQuantity(item), 2)%></tbl:cell> 388 388 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
Note: See TracChangeset
for help on using the changeset viewer.