Changeset 5642
- Timestamp:
- May 26, 2011, 9:37:32 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 deleted
- 69 edited
- 4 copied
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/dist/ehcache.xml
r5632 r5642 135 135 /> 136 136 <cache 137 name="net.sf.basedb.core.data.HybridizationData"138 maxElementsInMemory="100"139 eternal="false"140 timeToIdleSeconds="3600"141 timeToLiveSeconds="3600"142 overflowToDisk="false"143 />144 <cache145 137 name="net.sf.basedb.core.data.ItemSubtypeData" 146 138 maxElementsInMemory="100" … … 167 159 /> 168 160 <cache 161 name="net.sf.basedb.core.data.PhysicalBioAssayData" 162 maxElementsInMemory="100" 163 eternal="false" 164 timeToIdleSeconds="3600" 165 timeToLiveSeconds="3600" 166 overflowToDisk="false" 167 /> 168 <cache 169 169 name="net.sf.basedb.core.data.PlateData" 170 170 maxElementsInMemory="100" -
trunk/config/dist/hibernate.cfg.xml
r5632 r5642 99 99 /> 100 100 <class-cache 101 class="net.sf.basedb.core.data.HybridizationData"102 usage="nonstrict-read-write"103 />104 <class-cache105 101 class="net.sf.basedb.core.data.ItemSubtypeData" 106 102 usage="nonstrict-read-write" … … 115 111 /> 116 112 <class-cache 113 class="net.sf.basedb.core.data.PhysicalBioAssayData" 114 usage="nonstrict-read-write" 115 /> 116 <class-cache 117 117 class="net.sf.basedb.core.data.PlateData" 118 118 usage="nonstrict-read-write" -
trunk/src/clients/web/net/sf/basedb/clients/web/PermissionUtil.java
r5641 r5642 198 198 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, Item.TAG, 199 199 Item.BIOMATERIALLIST, Item.BIOPLATE, Item.BIOPLATETYPE, Item.BIOPLATEEVENT, Item.BIOPLATEEVENTTYPE, 200 Item. HYBRIDIZATION, Item.SCAN, Item.RAWBIOASSAY, Item.EXPERIMENT, Item.FORMULA200 Item.PHYSICALBIOASSAY, Item.SCAN, Item.RAWBIOASSAY, Item.EXPERIMENT, Item.FORMULA 201 201 }) 202 202 ); -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/edit/EditUtil.java
r5641 r5642 63 63 Item.PLATEGEOMETRY, Item.PLATEMAPPING, 64 64 Item.DIRECTORY, Item.FILE, Item.FILESERVER, Item.PROJECT, Item.PERMISSIONTEMPLATE, 65 Item. HYBRIDIZATION, Item.SCAN, Item.IMAGE, Item.RAWBIOASSAY,65 Item.PHYSICALBIOASSAY, Item.SCAN, Item.IMAGE, Item.RAWBIOASSAY, 66 66 Item.FORMULA, Item.REPORTER, Item.REPORTERLIST, 67 67 Item.EXPERIMENT, Item.TRANSFORMATION, Item.BIOASSAYSET, Item.BIOASSAY, -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java
r5641 r5642 60 60 Item.RAWBIOASSAY, Item.RAWDATA, Item.FORMULA, 61 61 Item.REPORTER, Item.REPORTERLIST, Item.REPORTERSCORE, 62 Item.SCAN, Item.IMAGE, Item. HYBRIDIZATION,62 Item.SCAN, Item.IMAGE, Item.PHYSICALBIOASSAY, 63 63 Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT, 64 64 Item.TAG, Item.BIOMATERIALEVENT, -
trunk/src/clients/web/net/sf/basedb/clients/web/resources/common.properties
r5641 r5642 82 82 item.session Session 83 83 item.session+ Sessions 84 item. hybridization Hybridization85 item. hybridization+ Hybridizations84 item.physicalbioassay Physical bioassay 85 item.physicalbioassay+ Physical bioassays 86 86 item.scan Scan 87 87 item.scan+ Scans -
trunk/src/clients/web/net/sf/basedb/clients/web/resources/menu.properties
r5641 r5642 85 85 sessions.tooltip.0 You do not have permission to access sessions 86 86 # -------------- 87 hybridizations.tooltip.1 Manage hybridizations88 hybridizations.tooltip.0 You do not have permission to manage hybridizations87 physicalbioassays.tooltip.1 Manage physical bioassays 88 physicalbioassays.tooltip.0 You do not have permission to manage physical bioassays 89 89 scans.tooltip.1 Manage scans 90 90 scans.tooltip.0 You do not have permission to manage scans -
trunk/src/core/common-queries.xml
r5632 r5642 1062 1062 </query> 1063 1063 1064 <query id="GET_LABELED_EXTRACTS_FOR_EXTRACT" type="HQL">1065 <sql>1066 SELECT {1}1067 FROM LabeledExtractData le1068 WHERE le.parent = :extract1069 </sql>1070 <description>1071 A Hibernate query that gets labeled extracts1072 created from a given extract.1073 </description>1074 </query>1075 1076 1064 <query id="GET_EXTRACTS_FOR_TAG" type="HQL"> 1077 1065 <sql> -
trunk/src/core/net/sf/basedb/core/ArraySlide.java
r4889 r5642 24 24 25 25 import net.sf.basedb.core.data.ArraySlideData; 26 import net.sf.basedb.core.data. HybridizationData;26 import net.sf.basedb.core.data.PhysicalBioAssayData; 27 27 28 28 import java.util.Date; … … 186 186 throws BaseException 187 187 { 188 return getData().get Hybridization() != null || super.isUsed();189 } 190 /** 191 Get the hybridizationthat was used on this plate.188 return getData().getPhysicalBioAssay() != null || super.isUsed(); 189 } 190 /** 191 Get the bioassay that was used on this plate. 192 192 @since 2.2 193 193 */ … … 197 197 { 198 198 Set<ItemProxy> using = super.getUsingItems(); 199 Hybridization item = getHybridization();199 PhysicalBioAssay item = getPhysicalBioAssay(); 200 200 if (item != null) using.add(new ItemProxy(item.getId(), item.getType())); 201 201 return using; … … 313 313 314 314 /** 315 Get the {@link Hybridization} item which was used on this slide. To set the316 hybridization use the {@link Hybridization#setArraySlide(ArraySlide)} method.317 318 @return The <code> Hybridization</code> item315 Get the {@link PhysicalBioAssay} item which was used on this slide. To set, 316 use the {@link PhysicalBioAssay#setArraySlide(ArraySlide)} method. 317 318 @return The <code>PhysicalBioAssay</code> item, or null 319 319 @throws PermissionDeniedException This exception is thrown if 320 320 the logged in user doesn't have read permission to the item 321 321 @throws BaseException If there is another error 322 */ 323 public Hybridization getHybridization() 322 @since 3.0 323 */ 324 public PhysicalBioAssay getPhysicalBioAssay() 324 325 throws PermissionDeniedException, BaseException 325 326 { 326 return getDbControl().getItem( Hybridization.class, getData().getHybridization());327 } 328 329 /** 330 Checks if this array design is used by a different hybridization327 return getDbControl().getItem(PhysicalBioAssay.class, getData().getPhysicalBioAssay()); 328 } 329 330 /** 331 Checks if this array slide is used by a different bioassay 331 332 than the given one. 332 @param hyb The hybridizationto check, or null to check if the slide is used333 by any hybridization334 @return TRUE if the slide is used by a different hybridization, or335 FALSE if it is used by the given hybridization, or not used at all333 @param pba The bioassay to check, or null to check if the slide is used 334 by any bioassay 335 @return TRUE if the slide is used by a different bioassay, or 336 FALSE if it is used by the given bioassay, or not used at all 336 337 @since 2.8.3 337 338 */ 338 public boolean isUsedByOther( Hybridization hyb)339 { 340 HybridizationData usedBy = getData().getHybridization();339 public boolean isUsedByOther(PhysicalBioAssay pba) 340 { 341 PhysicalBioAssayData usedBy = getData().getPhysicalBioAssay(); 341 342 if (usedBy == null) return false; 342 if ( hyb== null) return true;343 return !usedBy.equals( hyb.getData());343 if (pba == null) return true; 344 return !usedBy.equals(pba.getData()); 344 345 } 345 346 -
trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java
r5641 r5642 155 155 156 156 /** 157 Create a new <code>BioMaterialEvent</code> of the {@link Type# HYBRIDIZATION}157 Create a new <code>BioMaterialEvent</code> of the {@link Type#BIOASSAY} 158 158 type. 159 159 @param dc The <code>DbControl</code> which will be used for 160 160 permission checking and database access 161 @param hybridizationThe hybridization that was created.161 @param physicalBioAssay The hybridization that was created. 162 162 @param master The master bioplate event or null 163 163 @return The new <code>BioMaterialEvent</code> item … … 165 165 @since 2.17 166 166 */ 167 static BioMaterialEvent getNew HybridizationEvent(DbControl dc, Hybridization hybridization, BioPlateEventParticipant master)167 static BioMaterialEvent getNewBioAssayEvent(DbControl dc, PhysicalBioAssay physicalBioAssay, BioPlateEventParticipant master) 168 168 throws BaseException 169 169 { 170 170 BioMaterialEvent bme = dc.newItem(BioMaterialEvent.class); 171 bme.set Hybridization(hybridization);172 bme.getData().setEventType(Type. HYBRIDIZATION.getValue());171 bme.setPhysicalBioAssay(physicalBioAssay); 172 bme.getData().setEventType(Type.BIOASSAY.getValue()); 173 173 if (master != null) 174 174 { … … 296 296 break; 297 297 } 298 case HYBRIDIZATION:298 case BIOASSAY: 299 299 { 300 300 granted |= Permission.grant(Permission.READ); … … 332 332 Project.Default defaultHardwareType = null; 333 333 334 if (getEventType() == Type. HYBRIDIZATION)334 if (getEventType() == Type.BIOASSAY) 335 335 { 336 336 defaultProtocolType = Project.Default.HYBRIDIZATION_PROTOCOL; … … 385 385 return getData().getBioMaterial(); 386 386 } 387 case HYBRIDIZATION:388 { 389 return getData().get Hybridization();387 case BIOASSAY: 388 { 389 return getData().getPhysicalBioAssay(); 390 390 } 391 391 case OTHER: … … 436 436 437 437 /** 438 Get the {@link Hybridization} that was created by this event.439 @return A <code> Hybridization</code> item or null if this isn't a440 hybridizationevent438 Get the {@link PhysicalBioAssay} that was created by this event. 439 @return A <code>PhysicalBioAssay</code> item or null if this isn't a 440 bioassay event 441 441 @throws PermissionDeniedException If the logged in user doesn't have 442 read permission to the hybridization442 read permission to the bioassay 443 443 @throws BaseException If there is another error 444 444 */ 445 public Hybridization getHybridization()445 public PhysicalBioAssay getPhysicalBioAssay() 446 446 throws PermissionDeniedException, BaseException 447 447 { 448 return getDbControl().getItem( Hybridization.class, getData().getHybridization());448 return getDbControl().getItem(PhysicalBioAssay.class, getData().getPhysicalBioAssay()); 449 449 } 450 450 … … 452 452 Set the hybidization that was created by this event. 453 453 */ 454 private void set Hybridization(Hybridization hybridization)454 private void setPhysicalBioAssay(PhysicalBioAssay physicalBioAssay) 455 455 throws PermissionDeniedException, InvalidDataException 456 456 { 457 457 // No write permission check since this is only called at object creation 458 if ( hybridization == null) throw new InvalidUseOfNullException("hybridization");459 hybridization.checkPermission(Permission.USE);460 getData().set Hybridization(hybridization.getData());458 if (physicalBioAssay == null) throw new InvalidUseOfNullException("physicalBioAssay"); 459 physicalBioAssay.checkPermission(Permission.USE); 460 getData().setPhysicalBioAssay(physicalBioAssay.getData()); 461 461 } 462 462 … … 667 667 where it is essential to know which array a labeled extract goes on. The source 668 668 group is then simply the number of the array on the hybridization and should be 669 a value between 1 and {@link Hybridization#getNumArrays()}.669 a value between 1 and {@link PhysicalBioAssay#getSize()}. 670 670 <p> 671 671 A single labeled extract can only be used in a single group. Experiments using a n-channel … … 746 746 throw new InvalidDataException("OTHER events can't have sources"); 747 747 } 748 case HYBRIDIZATION:748 case BIOASSAY: 749 749 { 750 750 if (bioMaterial.getType() != Item.EXTRACT) 751 751 { 752 throw new InvalidDataException("The source for a hybridization must be a labeledextract");752 throw new InvalidDataException("The source for a physical bioassay must be an extract"); 753 753 } 754 754 break; … … 782 782 to specify the parent. 783 783 @see Extract#setSample(Sample, Float) 784 @see LabeledExtract#setExtract(Extract, Float)785 784 */ 786 785 void setSource(MeasuredBioMaterial bioMaterial, Float usedQuantity) … … 837 836 MeasuredBioMaterialData bioMaterialData = getData().getBioMaterial(); 838 837 boolean pooled = bioMaterialData != null ? bioMaterialData.isPooled() : false; 839 Item parentType = Item.fromDataObject(bioMaterialData == null ? getData().get Hybridization() : bioMaterialData);838 Item parentType = Item.fromDataObject(bioMaterialData == null ? getData().getPhysicalBioAssay() : bioMaterialData); 840 839 switch (parentType) 841 840 { … … 857 856 break; 858 857 } 859 case HYBRIDIZATION:858 case PHYSICALBIOASSAY: 860 859 { 861 860 query = Extract.getQuery(); … … 950 949 951 950 /** 952 An event of this type created a hybridization.951 An event of this type created a physical bioassay. 953 952 */ 954 HYBRIDIZATION(2, "Hybridization"),953 BIOASSAY(2, "Bioassay creation"), 955 954 956 955 /** -
trunk/src/core/net/sf/basedb/core/BioPlateEventType.java
r5559 r5642 69 69 The system ID for "Hybridization" event type. 70 70 */ 71 public static final String HYBRIDIZATION = "net.sf.basedb.core.BioPlateEventType.HYBRIDIZATION";71 public static final String PHYSICAL_BIOASSAY = "net.sf.basedb.core.BioPlateEventType.PHYSICAL_BIOASSAY"; 72 72 73 73 -
trunk/src/core/net/sf/basedb/core/Extract.java
r5641 r5642 58 58 */ 59 59 public static final String LABELED = "net.sf.basedb.core.ExtractType.LABELED"; 60 61 /** 62 The id for the <code>ExtractType</code> item representing a library. 63 @since 3.0 64 */ 65 public static final String LIBRARY = "net.sf.basedb.core.ExtractType.LIBRARY"; 60 66 61 67 /** … … 327 333 328 334 /** 329 Get a query that returns all hybridizations created from this335 Get a query that returns all bioassays created from this 330 336 extract. 331 337 @return An {@link ItemQuery} object 332 338 */ 333 public ItemQuery< Hybridization> getHybridizations()334 { 335 ItemQuery< Hybridization> query = Hybridization.getQuery();339 public ItemQuery<PhysicalBioAssay> getPhysicalBioAssays() 340 { 341 ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery(); 336 342 query.joinPermanent(Hql.innerJoin("creationEvent.sources", Item.EXTRACT.getAlias())); 337 343 query.restrictPermanent( -
trunk/src/core/net/sf/basedb/core/Hardware.java
r5630 r5642 68 68 */ 69 69 public static final String HYBRIDIZATION_STATION = "net.sf.basedb.core.HardwareType.HYBRIDIZATION_STATION"; 70 70 71 /** 72 The id for the <code>HardwareType</code> object representing a 73 sequencer. 74 @since 3.0 75 */ 76 public static final String SEQUENCER = "net.sf.basedb.core.HardwareType.SEQUENCER"; 77 71 78 /** 72 79 The id for the <code>HardwareType</code> object representing a … … 270 277 <li>{@link Scan}:s with this hardware 271 278 <li>{@link ArrayBatch}:s with this hardware 272 <li>{@link BioMaterial}:s and {@link Hybridization}:s with this hardware279 <li>{@link BioMaterial}:s and {@link PhysicalBioAssay}:s with this hardware 273 280 <li>{@link Plate}:s with this hardware 274 281 <ul> … … 316 323 // BioMaterial events - hybridizations 317 324 query = HibernateUtil.getPredefinedQuery(session, 318 "GET_BIOMATERIALEVENTS_FOR_HARDWARE", "bme. hybridization");325 "GET_BIOMATERIALEVENTS_FOR_HARDWARE", "bme.physicalBioAssay"); 319 326 /* 320 327 SELECT {1} -
trunk/src/core/net/sf/basedb/core/Install.java
r5641 r5642 367 367 368 368 // Hybridization, raw data and experiments 369 createRoleKey(Item. HYBRIDIZATION, "Hybridizations", "Gives access to hybridizations", users_create);369 createRoleKey(Item.PHYSICALBIOASSAY, "Physical bioassays", "Gives access to physical bioassays", users_create); 370 370 createRoleKey(Item.SCAN, "Scans", "Gives access to scan", users_create); 371 371 createRoleKey(Item.RAWBIOASSAY, "Raw bioassays", "Gives access to raw bioassays", users_create); … … 440 440 createItemSubtype(Item.PROTOCOL, Protocol.SAMPLING, "Sampling", "Protocols used for creating samples.", protocolFileType); 441 441 createItemSubtype(Item.PROTOCOL, Protocol.EXTRACTION, "Extraction", "Protocols used for creating extracts.", protocolFileType); 442 ItemSubtypeData labelingProtocol = createItemSubtype(Item.PROTOCOL, Protocol.LABELING, "Labeling", 443 "Protocols used for creating labeled extracts.", protocolFileType); 442 ItemSubtypeData labelingProtocol = createItemSubtype(Item.PROTOCOL, Protocol.LABELING, 443 "Labeling", "Protocols used for creating labeled extracts.", protocolFileType); 444 ItemSubtypeData libraryPreparation = createItemSubtype(Item.PROTOCOL, Protocol.LIBRARY_PREPARATION, 445 "Library preparation", "Protocols used for library preparation", protocolFileType); 444 446 createItemSubtype(Item.PROTOCOL, Protocol.POOLING, "Pooling", "Protocols used for creating pooled biomaterails.", protocolFileType); 445 createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION, "Hybridization", "Protocols used for creating hybridizations.", protocolFileType); 447 ItemSubtypeData hybProtocol = createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION, 448 "Hybridization", "Protocols used for creating hybridizations.", protocolFileType); 449 ItemSubtypeData sequencingProtocol = createItemSubtype(Item.PROTOCOL, Protocol.SEQUENCING, 450 "Sequencing", "Protocol used while sequencing", protocolFileType); 446 451 createItemSubtype(Item.PROTOCOL, Protocol.PRINTING, "Printing", "Protocols used for printing a batch of array slides.", protocolFileType); 447 452 createItemSubtype(Item.PROTOCOL, Protocol.SCANNING, "Scanning", "Protocols used for scanning microarray images.", protocolFileType); … … 452 457 ItemSubtypeData robot = createItemSubtype(Item.HARDWARE, Hardware.PRINT_ROBOT, "Print robot", "Spot the probe on the array."); 453 458 ItemSubtypeData hybStation = createItemSubtype(Item.HARDWARE, Hardware.HYBRIDIZATION_STATION, "Hybridization station", "Automate the hybridization of microarrays on slides."); 459 ItemSubtypeData sequencer = createItemSubtype(Item.HARDWARE, Hardware.SEQUENCER, "Sequencer", "Determines the sequence of DNA or RNA"); 454 460 ItemSubtypeData freezer = createItemSubtype(Item.HARDWARE, Hardware.FREEZER, "Freezer", "Storage area for bioplates"); 455 461 ItemSubtypeData otherHardware = createItemSubtype(Item.HARDWARE, Hardware.OTHER, "Other", "Other kinds of hardware that is used for some process."); … … 465 471 466 472 // Biomaterial subtypes 467 createItemSubtype(Item.EXTRACT, Extract.LABELED, "Labeled extract",473 ItemSubtypeData labeledExtract = createItemSubtype(Item.EXTRACT, Extract.LABELED, "Labeled extract", 468 474 "A labeled extract is an extract which has been tagged with a label", 469 475 labelTag, labelingProtocol); 476 ItemSubtypeData library = createItemSubtype(Item.EXTRACT, Extract.LIBRARY, "Library", 477 "An extract that has been prepared with an adaptor sequence before sequencing", 478 barcodeTag, libraryPreparation); 479 480 // Physical bioassay subtypes 481 createItemSubtype(Item.PHYSICALBIOASSAY, PhysicalBioAssay.HYBRIDIZATION, "Hybridization", 482 "", hybProtocol, hybStation, labeledExtract); 483 createItemSubtype(Item.PHYSICALBIOASSAY, PhysicalBioAssay.FLOW_CELL, "Flow cell", 484 "", sequencingProtocol, sequencer, library); 470 485 471 486 // Hardware … … 482 497 createHardware("OmniGrid", "100", "", robot, rootUser, keyEveryoneUse); 483 498 createHardware("Qarray", "Max", "", robot, rootUser, keyEveryoneUse); 499 // Sequencers 500 createHardware("Illumina HiSeq 2000", null, "", sequencer, rootUser, keyEveryoneUse); 484 501 485 502 // Software … … 622 639 "An event that creates child biomaterial. It is recommended that the creation event is " + 623 640 "linked with the destination plate."); 624 BioPlateEventTypeData hybridizationEvent = createBioPlateEventType("Hybridization", BioPlateEventType.HYBRIDIZATION,625 "An event that creates child hybridizations.");641 BioPlateEventTypeData bioAssayEvent = createBioPlateEventType("Physical bioassay", BioPlateEventType.PHYSICAL_BIOASSAY, 642 "An event that creates child physical bioassays."); 626 643 627 644 // Tags -
trunk/src/core/net/sf/basedb/core/Item.java
r5641 r5642 422 422 423 423 /** 424 The item is a {@link Hybridization}.425 */ 426 HYBRIDIZATION(261, "Hybridization", "hyb", Hybridization.class, HybridizationData.class, DefinedPermissions.shareable,424 The item is a {@link PhysicalBioAssay}. 425 */ 426 PHYSICALBIOASSAY(261, "Physical bioassay", "pba", PhysicalBioAssay.class, PhysicalBioAssayData.class, DefinedPermissions.shareable, 427 427 350), 428 428 /** -
trunk/src/core/net/sf/basedb/core/PhysicalBioAssay.java
r5641 r5642 2 2 $Id$ 3 3 4 Copyright (C) 2005 Johan Enell, Nicklas Nordborg 5 Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg 4 Copyright (C) 2011 Nicklas Nordborg 6 5 7 6 This file is part of BASE - BioArray Software Environment. … … 24 23 25 24 import net.sf.basedb.core.data.ArraySlideData; 26 import net.sf.basedb.core.data. HybridizationData;25 import net.sf.basedb.core.data.PhysicalBioAssayData; 27 26 import net.sf.basedb.core.query.Expressions; 28 27 import net.sf.basedb.core.query.Restrictions; 29 28 import net.sf.basedb.core.query.Hql; 30 29 30 import java.util.Collection; 31 31 import java.util.Date; 32 32 import java.util.Set; … … 34 34 35 35 /** 36 A hybridization is a representation of the process of hybridizing37 one or more {@link LabeledExtract}:s on an {@link ArraySlide}.38 39 @author Enell,Nicklas40 @ version 2.036 A physical bioassay is a representation of the process of 37 performing an experiment one or more {@link Extract}:s. 38 39 @author Nicklas 40 @since 3.0 41 41 @base.modified $Date$ 42 42 */ 43 public class Hybridization44 extends AnnotatedItem< HybridizationData>45 implements Registered 43 public class PhysicalBioAssay 44 extends AnnotatedItem<PhysicalBioAssayData> 45 implements Registered, Subtypable, FileStoreEnabled 46 46 { 47 47 /** 48 48 The type of item represented by this class. 49 @see Item# HYBRIDIZATION49 @see Item#PHYSICALBIOASSAY 50 50 @see #getType() 51 51 */ 52 public static final Item TYPE = Item.HYBRIDIZATION; 53 54 /** 55 Create a new <code>Hybridization</code> item. 52 public static final Item TYPE = Item.PHYSICALBIOASSAY; 53 54 /** 55 The id for the <code>PhysicalBioAssayType</code> item representing a 56 hybridization. 57 */ 58 public static final String HYBRIDIZATION = "net.sf.basedb.core.PhysicalBioAssayType.HYBRIDIZATION"; 59 60 /** 61 The id for the <code>PhysicalBioAssayType</code> item representing a 62 flow cell. 63 */ 64 public static final String FLOW_CELL = "net.sf.basedb.core.PhysicalBioAssayType.FLOW_CELL"; 65 66 67 /** 68 Create a new <code>PhysicalBioAssay</code> item. 56 69 57 70 @param dc The <code>DbControl</code> which will be used for 58 71 permission checking and database access 59 @return The new <code> Hybridization</code> item72 @return The new <code>PhysicalBioAssay</code> item 60 73 @throws BaseException If there is an error 61 74 */ 62 public static HybridizationgetNew(DbControl dc)75 public static PhysicalBioAssay getNew(DbControl dc) 63 76 throws BaseException 64 77 { … … 67 80 68 81 /** 69 Create a new <code> Hybridization</code> item as part of a82 Create a new <code>PhysicalBioAssay</code> item as part of a 70 83 master bioplate event. 71 84 … … 73 86 permission checking and database access 74 87 @param master The master bioplate event participant or null 75 @return The new <code> Hybridization</code> item88 @return The new <code>PhysicalBioAssay</code> item 76 89 @throws BaseException If there is an error 77 90 @since 2.17 78 91 */ 79 public static HybridizationgetNew(DbControl dc, BioPlateEventParticipant master)80 throws BaseException 81 { 82 Hybridization h = dc.newItem(Hybridization.class);92 public static PhysicalBioAssay getNew(DbControl dc, BioPlateEventParticipant master) 93 throws BaseException 94 { 95 PhysicalBioAssay h = dc.newItem(PhysicalBioAssay.class); 83 96 h.setName("New hybridization"); 84 h.set NumArrays(1);97 h.setSize(1); 85 98 h.setBioPlateEventParticipant(master); 86 99 return h; … … 100 113 @throws BaseException If there is another error 101 114 */ 102 public static HybridizationgetById(DbControl dc, int id)115 public static PhysicalBioAssay getById(DbControl dc, int id) 103 116 throws ItemNotFoundException, PermissionDeniedException, BaseException 104 117 { 105 Hybridization h = dc.loadItem(Hybridization.class, id);106 if ( h == null) throw new ItemNotFoundException("Hybridization[id="+id+"]");107 return h;108 } 109 110 /** 111 Get a query that returns hybridizations.118 PhysicalBioAssay pba = dc.loadItem(PhysicalBioAssay.class, id); 119 if (pba == null) throw new ItemNotFoundException("PhysicalBioAssay[id="+id+"]"); 120 return pba; 121 } 122 123 /** 124 Get a query that returns physical bioassays. 112 125 @return An {@link ItemQuery} object 113 126 */ 114 public static ItemQuery< Hybridization> getQuery()115 { 116 return new ItemQuery< Hybridization>(Hybridization.class);127 public static ItemQuery<PhysicalBioAssay> getQuery() 128 { 129 return new ItemQuery<PhysicalBioAssay>(PhysicalBioAssay.class); 117 130 } 118 131 … … 121 134 private BioPlateEventParticipant bioPlateEventParticipant; 122 135 123 Hybridization(HybridizationData hybridizationData)124 { 125 super( hybridizationData);136 PhysicalBioAssay(PhysicalBioAssayData physicalBioAssayData) 137 { 138 super(physicalBioAssayData); 126 139 } 127 140 … … 167 180 } 168 181 // ------------------------------------------- 182 /* 183 From the Subtypable interface 184 ----------------------------- 185 */ 186 @Override 187 @SubtypableRelatedItems({Item.HARDWARE, Item.PROTOCOL, Item.EXTRACT}) 188 public ItemSubtype getItemSubtype() 189 { 190 return getDbControl().getItem(ItemSubtype.class, getData().getItemSubtype()); 191 } 192 @Override 193 public void setItemSubtype(ItemSubtype subtype) 194 { 195 checkPermission(Permission.WRITE); 196 if (subtype != null) 197 { 198 subtype.setOnItem(this); 199 } 200 else 201 { 202 getData().setItemSubtype(null); 203 } 204 } 205 // ------------------------------------------- 206 /* 207 From the FileStoreEnabled interface 208 ------------------------------------------- 209 */ 210 @Override 211 public FileSet getFileSet() 212 { 213 DbControl dc = getDbControl(); 214 FileSet fs = dc.getItem(FileSet.class, getData().getFileSet(), this); 215 if (fs == null) 216 { 217 fs = FileSet.getNew(dc, this); 218 getData().setFileSet(fs.getData()); 219 dc.saveItemIf(this, fs, false); 220 } 221 return fs; 222 } 223 @Override 224 public boolean hasFileSet() 225 { 226 return getData().getFileSet() != null; 227 } 228 /** 229 @return Always null 230 */ 231 @Override 232 public Platform getPlatform() 233 { 234 return null; 235 } 236 /** 237 @return Always null 238 */ 239 @Override 240 public PlatformVariant getVariant() 241 { 242 return null; 243 } 244 /** 245 @return Always null 246 */ 247 @Override 248 public Collection<FileSet> getParentFileSets() 249 { 250 return null; 251 } 252 // ------------------------------------------- 253 169 254 /* 170 255 From the BasicItem class … … 226 311 227 312 /** 228 Get the labeled extracts, possible on a specific array, 229 and the array slide. 230 @param arrayNum If > 0 only include the labeled extracts which has been 313 Get the extracts, possible on a specific assay index, and the array slide. 314 @param index If > 0 only include the extracts which has been 231 315 linked with {@link BioMaterialEvent#setSourceGroup(MeasuredBioMaterial, int)}. 232 If <= 0 include all labeledextracts.316 If <= 0 include all extracts. 233 317 */ 234 318 @SuppressWarnings("unchecked") 235 public Set<Annotatable> getAnnotatableParents(int arrayNum)319 public Set<Annotatable> getAnnotatableParents(int index) 236 320 throws BaseException 237 321 { … … 242 326 ItemQuery<Extract> query = (ItemQuery<Extract>)event.getSources(); 243 327 query.include(Include.ALL); 244 if ( arrayNum> 0)328 if (index > 0) 245 329 { 246 330 query.restrict( 247 331 Restrictions.eq( 248 332 Hql.property("srcevt", "sourceGroup"), 249 Expressions.integer( arrayNum)333 Expressions.integer(index) 250 334 ) 251 335 ); … … 274 358 if (!isInDatabase()) 275 359 { 276 creationEvent = BioMaterialEvent.getNew HybridizationEvent(dc, this, bioPlateEventParticipant);360 creationEvent = BioMaterialEvent.getNewBioAssayEvent(dc, this, bioPlateEventParticipant); 277 361 } 278 362 else … … 322 406 arraySlide.checkPermission(Permission.USE); 323 407 data = arraySlide.getData(); 324 data.set Hybridization(getData());408 data.setPhysicalBioAssay(getData()); 325 409 } 326 410 getData().setArraySlide(data); … … 328 412 329 413 /** 330 Get the number of arrays that on the slide. 414 Get the size of the bioassay. The size is the number of 415 independent positions for biomaterial. 331 416 The default value is 1. 332 @since 2.6 333 */ 334 public int getNumArrays() 335 { 336 return getData().getNumArrays(); 337 } 338 /** 339 Set the number of arrays on a single slide. The value should be 340 between 1 and the number of arrays specified by the connected array 341 design. The latter requiremed is not checked. 342 @param numArrays A value > 0 417 */ 418 public int getSize() 419 { 420 return getData().getSize(); 421 } 422 /** 423 Set the size of the bioassay. 424 @param size A value > 0 343 425 @throws NumberOutOfRangeException If the value is <=0 344 @since 2.6 345 */ 346 public void setNumArrays(int numArrays) 426 */ 427 public void setSize(int size) 347 428 { 348 429 checkPermission(Permission.WRITE); 349 if ( numArrays <= 0) throw new NumberOutOfRangeException("numArrays", numArrays, 0, false);350 getData().set NumArrays(numArrays);351 } 352 353 /** 354 Get a query that returns labeledextracts connected to355 this hybridization.356 @param arrayNum If > 0 only labeled extracts on the specific sub-array357 are returned by the query, if <= 0, all labeledextracts430 if (size <= 0) throw new NumberOutOfRangeException("size", size, 0, false); 431 getData().setSize(size); 432 } 433 434 /** 435 Get a query that returns extracts connected to 436 this bioassay. 437 @param index If > 0 only extracts on the specific position 438 are returned by the query, if <= 0, all extracts 358 439 are returned 359 440 @return An {@link ItemQuery} object 360 @since 2.6361 441 */ 362 442 @SuppressWarnings("unchecked") 363 public ItemQuery<Extract> get LabeledExtracts(int arrayNum)443 public ItemQuery<Extract> getExtracts(int index) 364 444 { 365 445 ItemQuery<Extract> query = (ItemQuery<Extract>)getCreationEvent().getSources(); 366 if ( arrayNum> 0)446 if (index > 0) 367 447 { 368 448 query.restrictPermanent( 369 449 Restrictions.eq( 370 450 Hql.property("srcevt", "sourceGroup"), 371 Expressions.integer( arrayNum)451 Expressions.integer(index) 372 452 ) 373 453 ); -
trunk/src/core/net/sf/basedb/core/Project.java
r5641 r5642 835 835 SOFTWARE("default_software", "Software", Item.SOFTWARE, Software.FEATURE_EXTRACTION, Item.RAWBIOASSAY), 836 836 ARRAYDESIGN("default_arraydesign", "Array design", Item.ARRAYDESIGN, null, null), 837 HYBRIDIZATION_HARDWARE("default_hybridization_hardware", "Hybridization station", Item.HARDWARE, Hardware.HYBRIDIZATION_STATION, Item. HYBRIDIZATION),837 HYBRIDIZATION_HARDWARE("default_hybridization_hardware", "Hybridization station", Item.HARDWARE, Hardware.HYBRIDIZATION_STATION, Item.PHYSICALBIOASSAY), 838 838 SCANNER_HARDWARE("default_scanner_hardware", "Scanner", Item.HARDWARE, Hardware.SCANNER, Item.SCAN), 839 839 PRINTROBOT_HARDWARE("default_print_robot_hardware", "Print robot", Item.HARDWARE, Hardware.PRINT_ROBOT, Item.ARRAYBATCH), … … 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 HYBRIDIZATION_PROTOCOL("default_hybridization_protocol", "Hybridization protocol", Item.PROTOCOL, Protocol.HYBRIDIZATION, Item. HYBRIDIZATION),843 HYBRIDIZATION_PROTOCOL("default_hybridization_protocol", "Hybridization protocol", Item.PROTOCOL, Protocol.HYBRIDIZATION, Item.PHYSICALBIOASSAY), 844 844 FEATURE_EXTRACTION_PROTOCOL("default_feature_extraction_protocol", "Feat. extraction protocol", Item.PROTOCOL, Protocol.FEATURE_EXTRACTION, Item.RAWBIOASSAY), 845 845 POOLING_PROTOCOL("default_pooling_protocol", "Pooling protocol", Item.PROTOCOL, Protocol.POOLING, null), -
trunk/src/core/net/sf/basedb/core/Protocol.java
r5631 r5642 66 66 /** 67 67 The ID for the labeling protocol type, for example a protocol 68 used when creating a {@link LabeledExtract} from 69 an {@link Extract}. 68 used when creating a labeled extract from an {@link Extract}. 70 69 @since 3.0 71 70 */ 72 71 public static final String LABELING = "net.sf.basedb.core.ProtocolType.LABELING"; 72 73 /** 74 The ID for the library preparation protocol type, for example a protocol 75 used when creating a library extract from an {@link Extract}. 76 @since 3.0 77 */ 78 public static final String LIBRARY_PREPARATION = "net.sf.basedb.core.ProtocolType.LIBRARY_PREPARATION"; 79 73 80 74 81 /** 75 82 The ID for the pooling protocol type, for example a protocol 76 used when creating a biomaterial item ({@link Sample}, 77 {@link Extract} or {@link LabeledExtract}) 78 from a set of other biomaterial items. 83 used when creating a biomaterial item ({@link Sample} or 84 {@link Extract}) from a set of other biomaterial items. 79 85 @since 3.0 80 86 */ … … 83 89 /** 84 90 The ID for the hybridization protocol type, for example a protocol 85 used when creating a {@link Hybridization} from a set of86 {@link LabeledExtract}:s.91 used when creating a {@link PhysicalBioAssay} from a set of 92 (labeled) {@link Extract}:s. 87 93 @since 3.0 88 94 */ 89 95 public static final String HYBRIDIZATION = "net.sf.basedb.core.ProtocolType.HYBRIDIZATION"; 96 97 /** 98 The ID for the sequencing protocol type, for example a protocol 99 used when creating a {@link PhysicalBioAssay} from a set of 100 (library) {@link Extract}:s. 101 @since 3.0 102 */ 103 public static final String SEQUENCING = "net.sf.basedb.core.ProtocolType.SEQUENCING"; 104 90 105 91 106 /** … … 338 353 Get all: 339 354 <ul> 340 <li>a {@link BioMaterial}:s and {@link Hybridization}:s using this protocol355 <li>a {@link BioMaterial}:s and {@link PhysicalBioAssay}:s using this protocol 341 356 <li>a {@link Plate}:s using this protocol 342 357 <li>an {@link ArrayBatch}:s using this protocol … … 365 380 // Biomaterial events - hybridizations 366 381 query = HibernateUtil.getPredefinedQuery(session, 367 "GET_BIOMATERIALEVENTS_FOR_PROTOCOL", "bme. hybridization");382 "GET_BIOMATERIALEVENTS_FOR_PROTOCOL", "bme.physicalBioAssay"); 368 383 /* 369 384 SELECT {1} -
trunk/src/core/net/sf/basedb/core/RawBioAssay.java
r5623 r5642 617 617 Set the hybridization array number this raw bioassay is linked to. The value should be 618 618 between 1 and the number of arrays specified by the hybridization, 619 {@link Hybridization#getNumArrays()}.619 {@link PhysicalBioAssay#getNumArrays()}. 620 620 @param arrayNum A value > 0 621 621 @throws NumberOutOfRangeException If the value is <=0 -
trunk/src/core/net/sf/basedb/core/Scan.java
r5590 r5642 26 26 import net.sf.basedb.core.data.ArraySlideData; 27 27 import net.sf.basedb.core.data.HardwareData; 28 import net.sf.basedb.core.data. HybridizationData;28 import net.sf.basedb.core.data.PhysicalBioAssayData; 29 29 import net.sf.basedb.core.data.ProtocolData; 30 30 import net.sf.basedb.core.data.ScanData; … … 37 37 38 38 /** 39 A scan represents the scanning of a {@link Hybridization} by39 A scan represents the scanning of a {@link PhysicalBioAssay} by 40 40 some scanner. A single hybridization may be scanned multiple 41 41 times by the same or different scanner. … … 64 64 @param dc The <code>DbControl</code> which will be used for 65 65 permission checking and database access 66 @param hybridizationThe hybridization the scan originates from66 @param physicalBioAssay The hybridization the scan originates from 67 67 @return The new <code>Scan</code> item 68 68 @throws PermissionDeniedException If the logged in user doesn't … … 70 70 @throws BaseException If there is an error 71 71 */ 72 public static Scan getNew(DbControl dc, Hybridization hybridization)72 public static Scan getNew(DbControl dc, PhysicalBioAssay physicalBioAssay) 73 73 throws PermissionDeniedException, BaseException 74 74 { 75 75 Scan scn = dc.newItem(Scan.class); 76 scn.setHybridization( hybridization);76 scn.setHybridization(physicalBioAssay); 77 77 scn.setName("New scan"); 78 78 scn.getData().setEntryDate(new Date()); … … 216 216 217 217 /** 218 Get the {@link Hybridization} this scan is created from. A scan218 Get the {@link PhysicalBioAssay} this scan is created from. A scan 219 219 must always have a hybridization. 220 220 … … 224 224 @throws BaseException If there is another error. 225 225 */ 226 public HybridizationgetHybridization()227 throws PermissionDeniedException, BaseException 228 { 229 return getDbControl().getItem( Hybridization.class, getData().getHybridization());226 public PhysicalBioAssay getHybridization() 227 throws PermissionDeniedException, BaseException 228 { 229 return getDbControl().getItem(PhysicalBioAssay.class, getData().getHybridization()); 230 230 } 231 231 … … 233 233 Set the {@link ArraySlide} this hybridization is using. 234 234 235 @param hybridizationThe hybridization, null is not allowed235 @param physicalBioAssay The hybridization, null is not allowed 236 236 @throws InvalidDataException If the hybridization is null 237 237 @throws PermissionDeniedException If the logged in user doesn't have … … 239 239 @throws BaseException If there is another error 240 240 */ 241 public void setHybridization( Hybridization hybridization)241 public void setHybridization(PhysicalBioAssay physicalBioAssay) 242 242 throws InvalidDataException, PermissionDeniedException 243 243 { 244 244 checkPermission(Permission.WRITE); 245 if ( hybridization== null) throw new InvalidUseOfNullException("hybridization");246 hybridization.checkPermission(Permission.USE);247 getData().setHybridization( hybridization.getData());245 if (physicalBioAssay == null) throw new InvalidUseOfNullException("hybridization"); 246 physicalBioAssay.checkPermission(Permission.USE); 247 getData().setHybridization(physicalBioAssay.getData()); 248 248 } 249 249 … … 324 324 throws PermissionDeniedException, BaseException 325 325 { 326 HybridizationData hyb = getData().getHybridization();326 PhysicalBioAssayData hyb = getData().getHybridization(); 327 327 if (hyb == null) return null; 328 328 ArraySlideData slide = hyb.getArraySlide(); -
trunk/src/core/net/sf/basedb/core/data/ArraySlideData.java
r5119 r5642 121 121 } 122 122 123 private HybridizationData hybridization;123 private PhysicalBioAssayData bioassay; 124 124 125 125 /** 126 Get the hybridization 127 @hibernate.one-to-one property-ref="arraySlide" 128 */ 129 public HybridizationData getHybridization() 126 Get the bioassay. 127 @hibernate.one-to-one property-ref="arraySlide" 128 @since 3.0 129 */ 130 public PhysicalBioAssayData getPhysicalBioAssay() 130 131 { 131 return hybridization;132 return bioassay; 132 133 } 133 134 134 public void set Hybridization(HybridizationData hybridization)135 public void setPhysicalBioAssay(PhysicalBioAssayData bioassay) 135 136 { 136 this. hybridization = hybridization;137 this.bioassay = bioassay; 137 138 } 138 139 } -
trunk/src/core/net/sf/basedb/core/data/BioMaterialEventData.java
r5523 r5642 121 121 122 122 123 private HybridizationData hybridization;123 private PhysicalBioAssayData bioassay; 124 124 /** 125 125 Get the hybridization that was created by this event. 126 @hibernate.many-to-one column="` hybridization_id`" not-null="false" outer-join="false" update="false"127 */ 128 public HybridizationData getHybridization()129 { 130 return hybridization;131 } 132 public void set Hybridization(HybridizationData hybridization)133 { 134 this. hybridization = hybridization;126 @hibernate.many-to-one column="`physicalbioassay_id`" not-null="false" outer-join="false" update="false" 127 */ 128 public PhysicalBioAssayData getPhysicalBioAssay() 129 { 130 return bioassay; 131 } 132 public void setPhysicalBioAssay(PhysicalBioAssayData bioassay) 133 { 134 this.bioassay = bioassay; 135 135 } 136 136 -
trunk/src/core/net/sf/basedb/core/data/PhysicalBioAssayData.java
r5640 r5642 1 1 /* 2 2 $Id$ 3 3 4 Copyright (C) 2005 Johan Enell, Nicklas Nordborg 5 Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg 4 Copyright (C) 2011 Nicklas Nordborg 6 5 7 6 This file is part of BASE - BioArray Software Environment. 8 7 Available at http://base.thep.lu.se/ 9 8 10 11 12 13 14 15 16 17 18 19 20 21 22 9 BASE is free software; you can redistribute it and/or 10 modify it under the terms of the GNU General Public License 11 as published by the Free Software Foundation; either version 3 12 of the License, or (at your option) any later version. 13 14 BASE is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with BASE. If not, see <http://www.gnu.org/licenses/>. 21 */ 23 22 package net.sf.basedb.core.data; 24 23 … … 26 25 27 26 /** 28 This class holds information about a n hybridization.27 This class holds information about a physical bioassay (eg. a hybridization or similar). 29 28 30 29 @author Nicklas 31 @version 2.0 32 @see net.sf.basedb.core.Hybridization 33 @see <a href="../../../../../../html/developerdoc/api/data_api.rawdata.html">Hybridzations and raw data overview</a> 30 @since 3.0 31 @see net.sf.basedb.core.PhysicalBioAssay 34 32 @base.modified $Date$ 35 @hibernate.class table="` Hybridizations`" lazy="true"33 @hibernate.class table="`PhysicalBioAssays`" lazy="true" 36 34 */ 37 public class HybridizationData35 public class PhysicalBioAssayData 38 36 extends AnnotatedData 37 implements SubtypableData, FileStoreEnabledData 39 38 { 40 39 41 public HybridizationData()40 public PhysicalBioAssayData() 42 41 {} 42 43 /* 44 From the SubtypableData interface 45 ---------------------------------- 46 */ 47 private ItemSubtypeData subtype; 48 @Override 49 public ItemSubtypeData getItemSubtype() 50 { 51 return subtype; 52 } 53 @Override 54 public void setItemSubtype(ItemSubtypeData subtype) 55 { 56 this.subtype = subtype; 57 } 58 // ------------------------------ 59 60 /* 61 From the FileStoreEnabledData interface 62 ------------------------------------------- 63 */ 64 private FileSetData fileSet; 65 public FileSetData getFileSet() 66 { 67 return fileSet; 68 } 69 public void setFileSet(FileSetData fileSet) 70 { 71 this.fileSet = fileSet; 72 } 73 // ------------------------------------------- 43 74 44 75 private ArraySlideData arraySlide; … … 60 91 private BioMaterialEventData creationEvent; 61 92 /** 62 Get the event that created this hybidization. Mapping is defined63 in hibernate-properties- HybridizationData.xml since XDoclet cannot64 generate it.93 Get the event that created this bioassay. Mapping is defined 94 in hibernate-properties-PhysicalBioassayData.xml since XDoclet 95 cannot generate it. 65 96 */ 66 97 public BioMaterialEventData getCreationEvent() … … 73 104 } 74 105 75 private int numArrays;106 private int size; 76 107 /** 77 The number of arrays that was hybridized. Shold be <= ArrayDesign.numArrays78 @hibernate.property column="`num_arrays`" type="int" not-null="true"79 @ since 2.6108 The number size of the bioassay. Eg. the number of biomaterial positions that 109 it has. A single position may or may not hold more than one biomaterial. 110 @hibernate.property column="`size`" type="int" not-null="true" 80 111 */ 81 public int get NumArrays()112 public int getSize() 82 113 { 83 return numArrays;114 return size; 84 115 } 85 public void set NumArrays(int numArrays)116 public void setSize(int size) 86 117 { 87 this. numArrays = numArrays;118 this.size = size; 88 119 } 89 120 … … 105 136 } 106 137 138 107 139 } -
trunk/src/core/net/sf/basedb/core/data/ScanData.java
r4889 r5642 59 59 // ------------------------------------------- 60 60 61 private HybridizationData hybridization;61 private PhysicalBioAssayData hybridization; 62 62 /** 63 63 Get the hybridization. 64 64 @hibernate.many-to-one column="`hybridization_id`" not-null="true" outer-join="false" 65 65 */ 66 public HybridizationData getHybridization()66 public PhysicalBioAssayData getHybridization() 67 67 { 68 68 return hybridization; 69 69 } 70 public void setHybridization( HybridizationData hybridization)70 public void setHybridization(PhysicalBioAssayData hybridization) 71 71 { 72 72 this.hybridization = hybridization; -
trunk/src/core/net/sf/basedb/core/data/hibernate-properties-BioMaterialEventData.xml
r4889 r5642 56 56 57 57 <properties 58 name=" hybridizationEvent"58 name="bioAssayEvent" 59 59 > 60 60 <property … … 68 68 /> 69 69 <many-to-one 70 name=" hybridization"71 class="net.sf.basedb.core.data. HybridizationData"70 name="physicalBioAssay" 71 class="net.sf.basedb.core.data.PhysicalBioAssayData" 72 72 cascade="none" 73 73 fetch="select" … … 75 75 insert="false" 76 76 access="property" 77 column="` hybridization_id`"77 column="`physicalbioassay_id`" 78 78 not-null="false" 79 79 /> -
trunk/src/core/net/sf/basedb/core/data/hibernate-properties-PhysicalBioAssayData.xml
r5640 r5642 34 34 class="net.sf.basedb.core.data.BioMaterialEventData" 35 35 fetch="select" 36 property-ref=" hybridizationEvent"36 property-ref="bioAssayEvent" 37 37 cascade="delete" 38 38 > -
trunk/src/core/net/sf/basedb/core/log/db/BioMaterialEventLogger.java
r5384 r5642 74 74 change = details.toChangeHistoryDetailData(event.getBioMaterial(), ChangeType.UPDATE, detailedProperties); 75 75 } 76 else if (eventType == BioMaterialEvent.Type. HYBRIDIZATION)76 else if (eventType == BioMaterialEvent.Type.BIOASSAY) 77 77 { 78 change = details.toChangeHistoryDetailData(event.get Hybridization(), ChangeType.UPDATE, detailedProperties);78 change = details.toChangeHistoryDetailData(event.getPhysicalBioAssay(), ChangeType.UPDATE, detailedProperties); 79 79 } 80 80 } -
trunk/src/core/net/sf/basedb/util/AnnotationUtil.java
r5384 r5642 31 31 import net.sf.basedb.core.BaseException; 32 32 import net.sf.basedb.core.DbControl; 33 import net.sf.basedb.core. Hybridization;33 import net.sf.basedb.core.PhysicalBioAssay; 34 34 import net.sf.basedb.core.RawBioAssay; 35 35 import net.sf.basedb.core.Scan; … … 102 102 that. The array num is kept as we move up to Scan and Hybridization. 103 103 When the Hybridization is reached we use the arrayNum to call 104 {@link Hybridization#getAnnotatableParents(int)} so that we only104 {@link PhysicalBioAssay#getAnnotatableParents(int)} so that we only 105 105 get labeled extracts that are linked with the correct array num. 106 106 */ … … 121 121 return ((RawBioAssay)item).getArrayNum(); 122 122 } 123 else if (item instanceof Scan || item instanceof Hybridization)123 else if (item instanceof Scan || item instanceof PhysicalBioAssay) 124 124 { 125 125 return arrayNum; … … 153 153 Set<Annotatable> parents = null; 154 154 Set<AnnotatableWrapper> wrappedParents = Collections.emptySet(); 155 if (item instanceof Hybridization)155 if (item instanceof PhysicalBioAssay) 156 156 { 157 parents = (( Hybridization)item).getAnnotatableParents(arrayNum);157 parents = ((PhysicalBioAssay)item).getAnnotatableParents(arrayNum); 158 158 } 159 159 else -
trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java
r5500 r5642 37 37 import net.sf.basedb.core.DbControl; 38 38 import net.sf.basedb.core.Presets; 39 import net.sf.basedb.core. Hybridization;39 import net.sf.basedb.core.PhysicalBioAssay; 40 40 import net.sf.basedb.core.Item; 41 41 import net.sf.basedb.core.ItemQuery; … … 366 366 String cacheKey = "annotatable.parent." + item.getType().name() + "." + item.getId(); 367 367 368 Hybridizationhyb = null;368 PhysicalBioAssay hyb = null; 369 369 int arrayNum = 1; 370 370 // Special case when starting with a raw bioassay since we only … … 379 379 cacheKey += "#" + arrayNum; 380 380 } 381 else if (item instanceof Hybridization)382 { 383 hyb = ( Hybridization)item;381 else if (item instanceof PhysicalBioAssay) 382 { 383 hyb = (PhysicalBioAssay)item; 384 384 cacheKey += "#" + arrayNum; 385 385 } -
trunk/src/core/net/sf/basedb/util/overview/loader/ArraySlideLoader.java
r5500 r5642 25 25 import net.sf.basedb.core.ArraySlide; 26 26 import net.sf.basedb.core.DbControl; 27 import net.sf.basedb.core. Hybridization;27 import net.sf.basedb.core.PhysicalBioAssay; 28 28 import net.sf.basedb.core.Item; 29 29 import net.sf.basedb.core.ItemQuery; … … 39 39 Node loader implementation for array slides. The forward-loading 40 40 direction goes from {@link ArrayBatch}:s -> {@link ArraySlide}:s -> 41 {@link Hybridization}:s. The reverse-loading direction is the opposite41 {@link PhysicalBioAssay}:s. The reverse-loading direction is the opposite 42 42 direction. 43 43 … … 99 99 try 100 100 { 101 slide = (( Hybridization)hybNode.getItem(dc)).getArraySlide();101 slide = ((PhysicalBioAssay)hybNode.getItem(dc)).getArraySlide(); 102 102 } 103 103 catch (PermissionDeniedException ex) … … 128 128 129 129 /** 130 Loads the hybridizationnode that is related to the given array slide node.130 Loads the physical bioassay node that is related to the given array slide node. 131 131 @see HybridizationLoader#createForwardNode(DbControl, OverviewContext, Node) 132 132 */ … … 134 134 protected void loadForwardChildNodes(DbControl dc, OverviewContext context, Node slideNode) 135 135 { 136 getNodeLoader(context, Item. HYBRIDIZATION).createForwardNode(dc, context, slideNode);136 getNodeLoader(context, Item.PHYSICALBIOASSAY).createForwardNode(dc, context, slideNode); 137 137 } 138 138 -
trunk/src/core/net/sf/basedb/util/overview/loader/BasicItemNodeLoaderFactory.java
r5641 r5642 221 221 registerCheckedNodeLoader(Item.ARRAYBATCH, ArrayBatchLoader.class); 222 222 registerCheckedNodeLoader(Item.ARRAYSLIDE, ArraySlideLoader.class); 223 registerCheckedNodeLoader(Item. HYBRIDIZATION, HybridizationLoader.class);223 registerCheckedNodeLoader(Item.PHYSICALBIOASSAY, HybridizationLoader.class); 224 224 registerCheckedNodeLoader(Item.SCAN, ScanLoader.class); 225 225 registerCheckedNodeLoader(Item.RAWBIOASSAY, RawBioAssayLoader.class); -
trunk/src/core/net/sf/basedb/util/overview/loader/ExtractLoader.java
r5641 r5642 24 24 import net.sf.basedb.core.DbControl; 25 25 import net.sf.basedb.core.Extract; 26 import net.sf.basedb.core. Hybridization;26 import net.sf.basedb.core.PhysicalBioAssay; 27 27 import net.sf.basedb.core.Item; 28 28 import net.sf.basedb.core.ItemQuery; … … 43 43 Node loader implementation for extracts. The forward-loading 44 44 direction goes from {@link Sample}:s -> {@link Extract}:s -> 45 {@link Hybridization}:s. The reverse-loading direction is the opposite45 {@link PhysicalBioAssay}:s. The reverse-loading direction is the opposite 46 46 direction. In both cases we also need to consider pooled extracts. 47 47 … … 98 98 Node returnNode = null; 99 99 Item parentItem = parentNode.getItemType(); 100 if (parentItem == Item. HYBRIDIZATION)101 { 102 returnNode = createReverseNode(( Hybridization)parentNode.getItem(dc), dc, context, parentNode);100 if (parentItem == Item.PHYSICALBIOASSAY) 101 { 102 returnNode = createReverseNode((PhysicalBioAssay)parentNode.getItem(dc), dc, context, parentNode); 103 103 } 104 104 else if (parentItem == Item.EXTRACT) … … 129 129 130 130 /** 131 Loads the pooled extracts and hybridizations that has been created from131 Loads the pooled extracts and physical bioassays that has been created from 132 132 this extract. 133 133 @see ExtractLoader#createForwardNode(DbControl, OverviewContext, Node) … … 137 137 protected void loadForwardChildNodes(DbControl dc, OverviewContext context, Node extractNode) 138 138 { 139 getNodeLoader(context, Item. HYBRIDIZATION).createForwardNode(dc, context, extractNode);139 getNodeLoader(context, Item.PHYSICALBIOASSAY).createForwardNode(dc, context, extractNode); 140 140 getNodeLoader(context, Item.EXTRACT).createForwardNode(dc, context, extractNode); 141 141 } … … 203 203 204 204 /** 205 Create reverse-loading extract nodes from a hybridization. Eg. the child nodes206 are the extracts that has been used on a hybridization.207 */ 208 private Node createReverseNode( Hybridizationhyb, DbControl dc, OverviewContext context, Node parentNode)205 Create reverse-loading extract nodes from a physical bioassay. Eg. the child nodes 206 are the extracts that has been used on a bioassay. 207 */ 208 private Node createReverseNode(PhysicalBioAssay hyb, DbControl dc, OverviewContext context, Node parentNode) 209 209 { 210 210 Node folderNode = null; … … 212 212 213 213 // If we have followed this path from a raw bioassay we should 214 // only load labeledextracts on the specific 'array index'214 // only load extracts on the specific 'array index' 215 215 Node rbaNode = parentNode.getFirstParent(new ItemTypeFilter(Item.RAWBIOASSAY)); 216 216 int arrayNum = 0; … … 219 219 arrayNum = ((RawBioAssay)rbaNode.getItem()).getArrayNum(); 220 220 } 221 ItemQuery<Extract> query = context.initQuery(hyb.get LabeledExtracts(arrayNum), "name");221 ItemQuery<Extract> query = context.initQuery(hyb.getExtracts(arrayNum), "name"); 222 222 ItemResultIterator<Extract> it = query.iterate(dc); 223 223 while (it.hasNext()) -
trunk/src/core/net/sf/basedb/util/overview/loader/HardwareLoader.java
r4748 r5642 26 26 import net.sf.basedb.core.DbControl; 27 27 import net.sf.basedb.core.Hardware; 28 import net.sf.basedb.core. Hybridization;28 import net.sf.basedb.core.PhysicalBioAssay; 29 29 import net.sf.basedb.core.Item; 30 30 import net.sf.basedb.core.PermissionDeniedException; … … 82 82 hardware = ((Scan)parentItem).getScanner(); 83 83 } 84 else if (parentItem instanceof Hybridization)84 else if (parentItem instanceof PhysicalBioAssay) 85 85 { 86 86 nodeTitlePrefix = "Hyb. station"; 87 hardware = (( Hybridization)parentItem).getCreationEvent().getHardware();87 hardware = ((PhysicalBioAssay)parentItem).getCreationEvent().getHardware(); 88 88 } 89 89 else if (parentItem instanceof ArrayBatch) -
trunk/src/core/net/sf/basedb/util/overview/loader/HybridizationLoader.java
r5641 r5642 25 25 import net.sf.basedb.core.DbControl; 26 26 import net.sf.basedb.core.Extract; 27 import net.sf.basedb.core. Hybridization;27 import net.sf.basedb.core.PhysicalBioAssay; 28 28 import net.sf.basedb.core.Item; 29 29 import net.sf.basedb.core.ItemQuery; … … 44 44 directions: 45 45 <ol> 46 <li>{@link LabeledExtract}:s -> {@link Hybridization}:s ->46 <li>{@link LabeledExtract}:s -> {@link PhysicalBioAssay}:s -> 47 47 {@link Scan}:s. 48 <li>{@link ArraySlide}:s -> {@link Hybridization}:s ->48 <li>{@link ArraySlide}:s -> {@link PhysicalBioAssay}:s -> 49 49 {@link Scan}:s 50 50 </ol> … … 58 58 */ 59 59 public class HybridizationLoader 60 extends BasicItemNodeLoader< Hybridization>60 extends BasicItemNodeLoader<PhysicalBioAssay> 61 61 { 62 62 public HybridizationLoader() 63 63 { 64 super(Item. HYBRIDIZATION, ALLOW_ROOT_NODE,65 new NameableNameGenerator< Hybridization>("hybridization", "Hybridization"));64 super(Item.PHYSICALBIOASSAY, ALLOW_ROOT_NODE, 65 new NameableNameGenerator<PhysicalBioAssay>("hybridization", "Hybridization")); 66 66 } 67 67 … … 101 101 public Node createReverseNode(DbControl dc, OverviewContext context, Node scanNode) 102 102 { 103 NodeFactory< Hybridization> nf = getNodeFactory(dc, context);104 Hybridizationhyb = null;103 NodeFactory<PhysicalBioAssay> nf = getNodeFactory(dc, context); 104 PhysicalBioAssay hyb = null; 105 105 boolean denied = false; 106 106 int arrayNum = 0; … … 197 197 private Node createForwardNode(Extract extract, DbControl dc, OverviewContext context, Node parentNode) 198 198 { 199 NodeFactory< Hybridization> nf = getNodeFactory(dc, context);199 NodeFactory<PhysicalBioAssay> nf = getNodeFactory(dc, context); 200 200 Node folderNode = null; 201 ItemQuery< Hybridization> query = context.initQuery(extract.getHybridizations(), "name");202 ItemResultIterator< Hybridization> it = query.iterate(dc);201 ItemQuery<PhysicalBioAssay> query = context.initQuery(extract.getPhysicalBioAssays(), "name"); 202 ItemResultIterator<PhysicalBioAssay> it = query.iterate(dc); 203 203 while (it.hasNext()) 204 204 { 205 Hybridizationhyb = it.next();205 PhysicalBioAssay hyb = it.next(); 206 206 int arrayNum = hyb.getCreationEvent().getSourceGroup(extract); 207 207 Object cacheKey = arrayNum == 0 ? hyb : new IndexedCacheKey(hyb, arrayNum); … … 221 221 private Node createForwardNode(ArraySlide slide, DbControl dc, OverviewContext context, Node parentNode) 222 222 { 223 NodeFactory< Hybridization> nf = getNodeFactory(dc, context);224 Hybridizationhyb = null;223 NodeFactory<PhysicalBioAssay> nf = getNodeFactory(dc, context); 224 PhysicalBioAssay hyb = null; 225 225 boolean denied = false; 226 226 try 227 227 { 228 hyb = slide.get Hybridization();228 hyb = slide.getPhysicalBioAssay(); 229 229 } 230 230 catch (PermissionDeniedException ex) -
trunk/src/core/net/sf/basedb/util/overview/loader/RawBioAssayLoader.java
r5641 r5642 26 26 import net.sf.basedb.core.Experiment; 27 27 import net.sf.basedb.core.Extract; 28 import net.sf.basedb.core. Hybridization;28 import net.sf.basedb.core.PhysicalBioAssay; 29 29 import net.sf.basedb.core.Item; 30 30 import net.sf.basedb.core.ItemQuery; … … 79 79 ItemQuery<RawBioAssay> query = context.initQuery(scan.getRawBioAssays(), "name"); 80 80 81 // If we have a labeledextract as parent we need to know the array number82 // to be able to load the correct raw bioassays -- The same hyb may have83 // other raw bioassays that are NOT related to the same labeledextract81 // If we have a extract as parent we need to know the array number 82 // to be able to load the correct raw bioassays -- The same physical bioassay 83 // may have other raw bioassays that are NOT related to the same extract 84 84 int arrayNum = 0; 85 Hybridizationhyb = null;86 Node hybNode = scanNode.getFirstParent(new ItemTypeFilter(Item.HYBRIDIZATION));87 if ( hybNode != null)85 PhysicalBioAssay hyb = null; 86 Node assayNode = scanNode.getFirstParent(new ItemTypeFilter(Item.PHYSICALBIOASSAY)); 87 if (assayNode != null) 88 88 { 89 Node labeledExtractNode = hybNode.getFirstParent(new ItemTypeFilter(Item.EXTRACT));90 if ( labeledExtractNode != null)89 Node extractNode = assayNode.getFirstParent(new ItemTypeFilter(Item.EXTRACT)); 90 if (extractNode != null) 91 91 { 92 hyb = ( Hybridization)hybNode.getItem(dc);93 Extract extract = (Extract) labeledExtractNode.getItem();92 hyb = (PhysicalBioAssay)assayNode.getItem(dc); 93 Extract extract = (Extract)extractNode.getItem(); 94 94 arrayNum = hyb.getCreationEvent().getSourceGroup(extract); 95 95 } -
trunk/src/core/net/sf/basedb/util/overview/loader/ScanLoader.java
r5641 r5642 24 24 import net.sf.basedb.core.DbControl; 25 25 import net.sf.basedb.core.Extract; 26 import net.sf.basedb.core. Hybridization;26 import net.sf.basedb.core.PhysicalBioAssay; 27 27 import net.sf.basedb.core.Item; 28 28 import net.sf.basedb.core.ItemQuery; … … 41 41 /** 42 42 Node loader implementation for scans. The forward-loading 43 direction goes from {@link Hybridization}:s -> {@link Scan}:s ->43 direction goes from {@link PhysicalBioAssay}:s -> {@link Scan}:s -> 44 44 {@link RawBioAssay}:s. The reverse-loading direction is the opposite 45 45 direction. … … 74 74 NodeFactory<Scan> nf = getNodeFactory(dc, context); 75 75 Node folderNode = null; 76 Hybridization hyb = (Hybridization)hybridizationNode.getItem(dc);76 PhysicalBioAssay hyb = (PhysicalBioAssay)hybridizationNode.getItem(dc); 77 77 ItemQuery<Scan> scanQuery = context.initQuery(hyb.getScans(), "name"); 78 78 … … 164 164 165 165 /** 166 Loads the hybridizationnode that is the parent of this scan.166 Loads the physical bioassay node that is the parent of this scan. 167 167 @see HybridizationLoader#createReverseNode(DbControl, OverviewContext, Node) 168 168 */ … … 170 170 protected void loadReverseChildNodes(DbControl dc, OverviewContext context, Node scanNode) 171 171 { 172 getNodeLoader(context, Item. HYBRIDIZATION).createReverseNode(dc, context, scanNode);172 getNodeLoader(context, Item.PHYSICALBIOASSAY).createReverseNode(dc, context, scanNode); 173 173 } 174 174 // --------------------------------------- -
trunk/src/core/net/sf/basedb/util/overview/validator/BasicItemNodeValidatorFactory.java
r5641 r5642 197 197 registerCheckedNodeValidator(Item.ARRAYBATCH, ArrayBatchValidator.class); 198 198 registerCheckedNodeValidator(Item.ARRAYSLIDE, ArraySlideValidator.class); 199 registerCheckedNodeValidator(Item. HYBRIDIZATION, HybridizationValidator.class);199 registerCheckedNodeValidator(Item.PHYSICALBIOASSAY, HybridizationValidator.class); 200 200 registerCheckedNodeValidator(Item.SCAN, ScanValidator.class); 201 201 registerCheckedNodeValidator(Item.RAWBIOASSAY, RawBioAssayValidator.class); -
trunk/src/core/net/sf/basedb/util/overview/validator/HybridizationValidator.java
r4764 r5642 22 22 package net.sf.basedb.util.overview.validator; 23 23 24 import net.sf.basedb.core. Hybridization;24 import net.sf.basedb.core.PhysicalBioAssay; 25 25 import net.sf.basedb.core.Item; 26 26 import net.sf.basedb.util.overview.Fix; … … 40 40 */ 41 41 public class HybridizationValidator 42 extends NameableNodeValidator< Hybridization>42 extends NameableNodeValidator<PhysicalBioAssay> 43 43 { 44 44 -
trunk/src/core/net/sf/basedb/util/overview/validator/RawBioAssayValidator.java
r5384 r5642 27 27 import net.sf.basedb.core.ArrayDesign; 28 28 import net.sf.basedb.core.DbControl; 29 import net.sf.basedb.core. Hybridization;29 import net.sf.basedb.core.PhysicalBioAssay; 30 30 import net.sf.basedb.core.Project; 31 31 import net.sf.basedb.core.RawBioAssay; … … 120 120 } 121 121 122 Hybridizationhyb = scan.getHybridization();123 if (arrayIndex > hyb.get NumArrays() || arrayIndex < 1)122 PhysicalBioAssay hyb = scan.getHybridization(); 123 if (arrayIndex > hyb.getSize() || arrayIndex < 1) 124 124 { 125 125 context.createFailure(Validator.INCORRECT_ARRAY_NUM, node, 126 126 "Incorrect sub-array index: " + arrayIndex + 127 " (expected 1.." + hyb.get NumArrays() + ")",127 " (expected 1.." + hyb.getSize() + ")", 128 128 new Fix("Change array index on raw bioassay", rba), 129 129 new Fix("Increase arrays on hybridization", hyb)); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java
r5641 r5642 48 48 import net.sf.basedb.core.File; 49 49 import net.sf.basedb.core.Hardware; 50 import net.sf.basedb.core. Hybridization;50 import net.sf.basedb.core.PhysicalBioAssay; 51 51 import net.sf.basedb.core.Image; 52 52 import net.sf.basedb.core.Include; … … 1557 1557 } 1558 1558 1559 private ItemQuery< Hybridization> hybQuery;1559 private ItemQuery<PhysicalBioAssay> hybQuery; 1560 1560 /** 1561 1561 Find a hybridization with a given identifier. This is a utility method that … … 1571 1571 @return A hybridization, or null if no item could be found 1572 1572 */ 1573 protected HybridizationfindHybridization(DbControl dc, IdMethod idMethod, String identifier)1573 protected PhysicalBioAssay findHybridization(DbControl dc, IdMethod idMethod, String identifier) 1574 1574 { 1575 1575 if (identifier == null) return null; 1576 1576 if (hybQuery == null) 1577 1577 { 1578 hybQuery = initReferenceQuery(dc, idMethod, Hybridization.getQuery());1578 hybQuery = initReferenceQuery(dc, idMethod, PhysicalBioAssay.getQuery()); 1579 1579 } 1580 1580 return findReferencedItem(dc, idMethod, hybQuery, identifier, false); -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ArrayDesignImporter.java
r5623 r5642 30 30 import net.sf.basedb.core.DbControl; 31 31 import net.sf.basedb.core.File; 32 import net.sf.basedb.core. Hybridization;32 import net.sf.basedb.core.PhysicalBioAssay; 33 33 import net.sf.basedb.core.Item; 34 34 import net.sf.basedb.core.ItemQuery; … … 190 190 191 191 /** 192 Calls {@link Hybridization#getQuery()}.192 Calls {@link PhysicalBioAssay#getQuery()}. 193 193 */ 194 194 @Override -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/HybridizationImporter.java
r5641 r5642 32 32 import net.sf.basedb.core.Extract; 33 33 import net.sf.basedb.core.Hardware; 34 import net.sf.basedb.core. Hybridization;34 import net.sf.basedb.core.PhysicalBioAssay; 35 35 import net.sf.basedb.core.InvalidDataException; 36 36 import net.sf.basedb.core.Item; … … 56 56 */ 57 57 public class HybridizationImporter 58 extends AbstractItemImporter< Hybridization>58 extends AbstractItemImporter<PhysicalBioAssay> 59 59 { 60 60 61 61 private static final Set<GuiContext> guiContexts = 62 Collections.singleton(new GuiContext(Item. HYBRIDIZATION, GuiContext.Type.LIST));62 Collections.singleton(new GuiContext(Item.PHYSICALBIOASSAY, GuiContext.Type.LIST)); 63 63 64 64 protected static final PluginParameter<String> hardwareColumnMapping = new PluginParameter<String>( … … 192 192 193 193 /** 194 Calls {@link Hybridization#getQuery()}.195 */ 196 @Override 197 protected ItemQuery< Hybridization> createItemQuery()198 { 199 return Hybridization.getQuery();194 Calls {@link PhysicalBioAssay#getQuery()}. 195 */ 196 @Override 197 protected ItemQuery<PhysicalBioAssay> createItemQuery() 198 { 199 return PhysicalBioAssay.getQuery(); 200 200 } 201 201 … … 204 204 { 205 205 nameMapper = getMapper(ffp, (String)job.getValue("nameColumnMapping"), 206 cropStrings ? Hybridization.MAX_NAME_LENGTH : null, null);206 cropStrings ? PhysicalBioAssay.MAX_NAME_LENGTH : null, null); 207 207 descriptionMapper = getMapper(ffp, (String)job.getValue("descriptionColumnMapping"), 208 cropStrings ? Hybridization.MAX_DESCRIPTION_LENGTH : null, null);208 cropStrings ? PhysicalBioAssay.MAX_DESCRIPTION_LENGTH : null, null); 209 209 numArraysMapper = getMapper(ffp, (String)job.getValue("numArraysColumnMapping"), null, null); 210 210 createdMapper = getMapper(ffp, (String)job.getValue("createdColumnMapping"), null, null); … … 219 219 220 220 @Override 221 protected HybridizationcreateItem(DbControl dc, FlatFileParser.Data data)222 { 223 Hybridization hyb = Hybridization.getNew(dc);221 protected PhysicalBioAssay createItem(DbControl dc, FlatFileParser.Data data) 222 { 223 PhysicalBioAssay hyb = PhysicalBioAssay.getNew(dc); 224 224 updateItem(dc, hyb, data); 225 225 return hyb; … … 227 227 228 228 @Override 229 protected void updateItem(DbControl dc, Hybridizationhyb, FlatFileParser.Data data)229 protected void updateItem(DbControl dc, PhysicalBioAssay hyb, FlatFileParser.Data data) 230 230 { 231 231 if (nameMapper != null) hyb.setName(nameMapper.getValue(data)); 232 232 if (descriptionMapper != null) hyb.setDescription(descriptionMapper.getValue(data)); 233 if (numArraysMapper != null) hyb.set NumArrays(numArraysMapper.getInt(data));233 if (numArraysMapper != null) hyb.setSize(numArraysMapper.getInt(data)); 234 234 BioMaterialEvent creationEvent = hyb.getCreationEvent(); 235 235 if (createdMapper != null) creationEvent.setEventDate(parseDate(createdMapper.getValue(data))); … … 269 269 try 270 270 { 271 hyb.set NumArrays(slide.getArrayBatch().getArrayDesign().getNumArrays());271 hyb.setSize(slide.getArrayBatch().getArrayDesign().getNumArrays()); 272 272 } 273 273 catch (RuntimeException ex) … … 283 283 */ 284 284 @Override 285 protected void updateMultiLineItem(DbControl dc, Hybridizationhyb,285 protected void updateMultiLineItem(DbControl dc, PhysicalBioAssay hyb, 286 286 FlatFileParser.Data data, int multiLineNum) 287 287 { -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ScanImporter.java
r5630 r5642 25 25 import net.sf.basedb.core.File; 26 26 import net.sf.basedb.core.Hardware; 27 import net.sf.basedb.core. Hybridization;27 import net.sf.basedb.core.PhysicalBioAssay; 28 28 import net.sf.basedb.core.Image; 29 29 import net.sf.basedb.core.Item; … … 245 245 protected Scan createItem(DbControl dc, FlatFileParser.Data data) 246 246 { 247 Hybridizationhyb = null;247 PhysicalBioAssay hyb = null; 248 248 if (hybridizationMapper != null) 249 249 { … … 266 266 if (nameOrId != null) 267 267 { 268 Hybridizationhyb = findHybridization(dc, FallbackIdMethod.NAME_OR_ID, hybridizationMapper.getValue(data));268 PhysicalBioAssay hyb = findHybridization(dc, FallbackIdMethod.NAME_OR_ID, hybridizationMapper.getValue(data)); 269 269 scan.setHybridization(hyb); 270 270 } -
trunk/src/test/TestAll.java
r5641 r5642 113 113 results.put("TestArraySlide", TestArraySlide.test_all()); 114 114 115 // Hybridizations and raw data116 results.put("Test Hybridization", TestHybridization.test_all());115 // Physical bioassays and raw data 116 results.put("TestPhysicalBioAssay", TestPhysicalBioAssay.test_all()); 117 117 results.put("TestScan", TestScan.test_all()); 118 118 results.put("TestRawBioAssay", TestRawBioAssay.test_all()); -
trunk/src/test/TestExtract.java
r5641 r5642 310 310 "\t"+evt.getEventDate()+"\t"+evt.getEntryDate()+"\t"+evt.getUsedQuantity(e)+"\t"+evt.getComment()); 311 311 } 312 static void write_item(int i, Hybridizationh)312 static void write_item(int i, PhysicalBioAssay h) 313 313 throws BaseException 314 314 { … … 463 463 } 464 464 465 static void test_list_ hybridizations(int extractId, int expectedResults)465 static void test_list_bioassays(int extractId, int expectedResults) 466 466 { 467 467 if (extractId == 0) return; … … 471 471 dc = TestUtil.getDbControl(); 472 472 Extract le = Extract.getById(dc, extractId); 473 ItemResultList< Hybridization> l = le.getHybridizations().list(dc);473 ItemResultList<PhysicalBioAssay> l = le.getPhysicalBioAssays().list(dc); 474 474 for (int i = 0; i<l.size(); i++) 475 475 { … … 480 480 throw new BaseException("Expected "+expectedResults+" results, not "+l.size()); 481 481 } 482 write("--List hybridizations for labeledextract OK ("+l.size()+")");483 } 484 catch (Throwable ex) 485 { 486 write("--List hybridizations for labeledextract FAILED");482 write("--List bioassays for extract OK ("+l.size()+")"); 483 } 484 catch (Throwable ex) 485 { 486 write("--List bioassays for extract FAILED"); 487 487 ex.printStackTrace(); 488 488 ok = false; -
trunk/src/test/TestGenericOverview.java
r5641 r5642 28 28 import net.sf.basedb.core.Hardware; 29 29 import net.sf.basedb.core.Item; 30 import net.sf.basedb.core.PhysicalBioAssay; 30 31 import net.sf.basedb.core.Platform; 31 32 import net.sf.basedb.core.Protocol; … … 110 111 111 112 // Hybridization 112 int hyb = Test Hybridization.test_create(arraySlide, false);113 Test Hybridization.test_add_labeledextract(hyb, labeledExtract1, 1, null);114 Test Hybridization.test_add_labeledextract(hyb, labeledExtract1Ref, 1, null);115 Test Hybridization.test_add_labeledextract(hyb, labeledExtract2, 2, null);116 Test Hybridization.test_add_labeledextract(hyb, labeledExtract2Ref, 2, null);113 int hyb = TestPhysicalBioAssay.test_create(arraySlide, SystemItems.getId(PhysicalBioAssay.HYBRIDIZATION), false); 114 TestPhysicalBioAssay.test_add_labeledextract(hyb, labeledExtract1, 1, null); 115 TestPhysicalBioAssay.test_add_labeledextract(hyb, labeledExtract1Ref, 1, null); 116 TestPhysicalBioAssay.test_add_labeledextract(hyb, labeledExtract2, 2, null); 117 TestPhysicalBioAssay.test_add_labeledextract(hyb, labeledExtract2Ref, 2, null); 117 118 118 119 // Scan … … 138 139 // Show some overviews 139 140 test_overview(Item.BIOSOURCE, biosource); 140 test_overview(Item. HYBRIDIZATION, hyb);141 test_overview(Item.PHYSICALBIOASSAY, hyb); 141 142 test_overview(Item.ARRAYDESIGN, arrayDesign); 142 143 test_overview(Item.EXPERIMENT, experiment); … … 149 150 TestRawBioAssay.test_delete(rawBioAssay2); 150 151 TestScan.test_delete(scan); 151 Test Hybridization.test_delete(hyb);152 TestPhysicalBioAssay.test_delete(hyb); 152 153 TestArraySlide.test_delete(arraySlide); 153 154 TestArrayBatch.test_delete(arrayBatch); -
trunk/src/test/TestIlluminaImporter.java
r5630 r5642 43 43 TestReporter.test_import_from_file("data/test.illumina.reporters.txt", "Search_key,Target,ProbeId.*", ",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))", 1, 1); 44 44 int fileId = TestFile.test_create("data/test.illumina.rawdata.txt", false, false); 45 int hybId = Test Hybridization.test_create(0, false, new int[] {});45 int hybId = TestPhysicalBioAssay.test_create(0, 0, false); 46 46 int scanId = TestScan.test_create(hybId, 0, 0, false); 47 47 int protocolId = TestProtocol.test_create(SystemItems.getId(Protocol.FEATURE_EXTRACTION), null, false); … … 75 75 TestSoftware.test_delete(softwareId); 76 76 TestProtocol.test_delete(protocolId); 77 Test Hybridization.test_delete(hybId);77 TestPhysicalBioAssay.test_delete(hybId); 78 78 TestFile.test_delete(fileId); 79 79 TestReporter.test_delete(); -
trunk/src/test/TestItemImporter.java
r5641 r5642 137 137 int hybFileId = TestFile.test_create("data/test.batchimport.hybridizations.txt", false, false); 138 138 int hybImporterId = TestPluginDefinition.test_get("net.sf.basedb.plugins.batchimport.HybridizationImporter"); 139 int hybJobId = test_create_item_import_job(Item. HYBRIDIZATION, hybImporterId, hybFileId);139 int hybJobId = test_create_item_import_job(Item.PHYSICALBIOASSAY, hybImporterId, hybFileId); 140 140 ok &= TestJob.test_execute(hybJobId, false); 141 Test Hybridization.test_list(3);141 TestPhysicalBioAssay.test_list(3); 142 142 143 143 // Import scans … … 174 174 175 175 // Delete hybridizations 176 Test Hybridization.test_delete_all();176 TestPhysicalBioAssay.test_delete_all(); 177 177 TestJob.test_delete(hybJobId); 178 178 TestFile.test_delete(hybFileId); … … 355 355 request.setParameterValue("labelColumnMapping", "\\Label\\"); 356 356 } 357 if (itemType == Item. HYBRIDIZATION)357 if (itemType == Item.PHYSICALBIOASSAY) 358 358 { 359 359 request.setParameterValue("numArraysColumnMapping", "\\Num arrays\\"); -
trunk/src/test/TestMetadata.java
r5641 r5642 31 31 import net.sf.basedb.core.Item; 32 32 import net.sf.basedb.core.Metadata; 33 import net.sf.basedb.core.PhysicalBioAssay; 33 34 import net.sf.basedb.core.Platform; 34 35 import net.sf.basedb.core.RawBioAssay; … … 89 90 int labelId = TestTag.test_create("Test label", SystemItems.getId(Tag.LABEL), true); 90 91 int labeledExtractId = TestExtract.test_create(0, "Test extract", SystemItems.getId(Extract.LABELED), labelId, true); 91 int hybId = Test Hybridization.test_create(slideId, true, labeledExtractId);92 int hybId = TestPhysicalBioAssay.test_create(slideId, SystemItems.getId(PhysicalBioAssay.HYBRIDIZATION), true, labeledExtractId); 92 93 int scanId = TestScan.test_create(hybId, 0, 0, true); 93 94 int rawId = TestRawBioAssay.test_create(Platform.GENERIC, "genepix", "My raw bioassay", … … 110 111 TestRawBioAssay.test_delete(rawId); 111 112 TestScan.test_delete(scanId); 112 Test Hybridization.test_delete(hybId);113 TestPhysicalBioAssay.test_delete(hybId); 113 114 TestExtract.test_delete(labeledExtractId); 114 115 TestTag.test_delete(labelId); -
trunk/src/test/TestPhysicalBioAssay.java
r5641 r5642 26 26 import java.util.Set; 27 27 28 public class Test Hybridization28 public class TestPhysicalBioAssay 29 29 { 30 30 … … 40 40 static boolean test_all() 41 41 { 42 write("++Testing hybridizations");42 write("++Testing physical bioassays"); 43 43 write_header(); 44 44 // Standard tests: create, load, list 45 int id = test_create(0, true);46 int id2 = test_create(0, false);45 int id = test_create(0, SystemItems.getId(PhysicalBioAssay.HYBRIDIZATION), true); 46 int id2 = test_create(0, SystemItems.getId(PhysicalBioAssay.FLOW_CELL), false); 47 47 48 48 test_load(id); … … 51 51 int arrayBatchId = TestArrayBatch.test_create(arrayDesignId, false); 52 52 int arraySlideId = TestArraySlide.test_create(arrayBatchId, false); 53 int id3 = test_create(arraySlideId, false);53 int id3 = test_create(arraySlideId, 0, false); 54 54 55 55 int cy3 = TestTag.test_load("cy3"); … … 58 58 int labeledExtractId1 = TestExtract.test_create(0, "Labeled #1", labeledExtract, cy3, false); 59 59 int labeledExtractId2 = TestExtract.test_create(0, "Labeled #2", labeledExtract, cy5, false); 60 int id4 = test_create(0, false, labeledExtractId1, labeledExtractId2);60 int id4 = test_create(0, SystemItems.getId(PhysicalBioAssay.HYBRIDIZATION), false, labeledExtractId1, labeledExtractId2); 61 61 62 62 test_list(-1); 63 63 64 TestExtract.test_list_ hybridizations(labeledExtractId1, 1);64 TestExtract.test_list_bioassays(labeledExtractId1, 1); 65 65 ok = ok && TestExtract.ok; 66 66 … … 78 78 TestArrayBatch.test_delete(arrayBatchId); 79 79 TestArrayDesign.test_delete(arrayDesignId); 80 write("++Testing hybridizations "+(ok ? "OK" : "Failed")+"\n");80 write("++Testing physical bioassays "+(ok ? "OK" : "Failed")+"\n"); 81 81 return ok; 82 82 } 83 83 84 static int test_create(int arraySlideId, boolean setAll, int... labeledExtractIds)85 { 86 if (!TestUtil.hasPermission(Permission.CREATE, Item. HYBRIDIZATION)) return 0;84 static int test_create(int arraySlideId, int subtypeId, boolean setAll, int... labeledExtractIds) 85 { 86 if (!TestUtil.hasPermission(Permission.CREATE, Item.PHYSICALBIOASSAY)) return 0; 87 87 int id = 0; 88 88 DbControl dc = null; … … 90 90 { 91 91 dc = TestUtil.getDbControl(); 92 Hybridization h = Hybridization.getNew(dc);92 PhysicalBioAssay h = PhysicalBioAssay.getNew(dc); 93 93 if (setAll) 94 94 { 95 h.setName("Test hybridization");95 h.setName("Test physical bioassay"); 96 96 h.setDescription("Added at "+new Date()); 97 } 98 if (subtypeId != 0) 99 { 100 h.setItemSubtype(ItemSubtype.getById(dc, subtypeId)); 97 101 } 98 102 if (arraySlideId != 0) … … 113 117 dc.reattachItem(h.getCreationEvent(), false); 114 118 write_item(0, h); 115 write("--Create hybridizationOK");116 } 117 catch (Throwable ex) 118 { 119 write("--Create hybridizationFAILED");119 write("--Create physical bioassay OK"); 120 } 121 catch (Throwable ex) 122 { 123 write("--Create physical bioassay FAILED"); 120 124 ex.printStackTrace(); 121 125 ok = false; … … 135 139 { 136 140 dc = TestUtil.getDbControl(); 137 Hybridization h = Hybridization.getById(dc, id);141 PhysicalBioAssay h = PhysicalBioAssay.getById(dc, id); 138 142 write_item(0, h); 139 write("--Load hybridizationOK");140 } 141 catch (Throwable ex) 142 { 143 write("--Load hybridizationFAILED");143 write("--Load physical bioassay OK"); 144 } 145 catch (Throwable ex) 146 { 147 write("--Load physical bioassay FAILED"); 144 148 ex.printStackTrace(); 145 149 ok = false; … … 157 161 { 158 162 dc = TestUtil.getDbControl(); 159 ItemResultList< Hybridization> l = Hybridization.getQuery().list(dc);163 ItemResultList<PhysicalBioAssay> l = PhysicalBioAssay.getQuery().list(dc); 160 164 for (int i = 0; i<l.size(); i++) 161 165 { … … 166 170 throw new BaseException("Expected "+expectedResults+" results, not "+l.size()); 167 171 } 168 write("--List hybridizationsOK ("+l.size()+")");169 } 170 catch (Throwable ex) 171 { 172 write("--List hybridizationsFAILED");172 write("--List physical bioassay OK ("+l.size()+")"); 173 } 174 catch (Throwable ex) 175 { 176 write("--List physical bioassay FAILED"); 173 177 ex.printStackTrace(); 174 178 ok = false; … … 187 191 { 188 192 dc = TestUtil.getDbControl(); 189 Hybridization h = Hybridization.getById(dc, id);193 PhysicalBioAssay h = PhysicalBioAssay.getById(dc, id); 190 194 dc.deleteItem(h); 191 195 Set<ItemProxy> using = h.getUsingItems(); … … 195 199 } 196 200 dc.commit(); 197 write("--Delete hybridizationOK");198 } 199 catch (Throwable ex) 200 { 201 write("--Delete hybridizationFAILED");201 write("--Delete physical bioassay OK"); 202 } 203 catch (Throwable ex) 204 { 205 write("--Delete physical bioassay FAILED"); 202 206 ex.printStackTrace(); 203 207 ok = false; … … 215 219 { 216 220 dc = TestUtil.getDbControl(); 217 ItemResultList< Hybridization> l = Hybridization.getQuery().list(dc);221 ItemResultList<PhysicalBioAssay> l = PhysicalBioAssay.getQuery().list(dc); 218 222 Trashcan.delete(dc.getSessionControl(), l, true, null); 219 223 dc.commit(); 220 write("--Delete all hybridizationsOK ("+l.size()+")");221 } 222 catch (Throwable ex) 223 { 224 write("--Delete all hybridizationsFAILED");224 write("--Delete all physical bioassay OK ("+l.size()+")"); 225 } 226 catch (Throwable ex) 227 { 228 write("--Delete all physical bioassay FAILED"); 225 229 ex.printStackTrace(); 226 230 ok = false; … … 237 241 if (!TestUtil.getSilent()) 238 242 { 239 write(" \tID \tName \t Description\tArray slide\tLabeled extracts");240 write("-- \t-- \t--------- \t---- -------\t-----------\t----------------");241 } 242 } 243 static void write_item(int i, Hybridizationh)243 write(" \tID \tName \tType\tDescription\tArray slide\tLabeled extracts"); 244 write("-- \t-- \t--------- \t----\t-----------\t-----------\t----------------"); 245 } 246 } 247 static void write_item(int i, PhysicalBioAssay h) 244 248 throws BaseException 245 249 { … … 254 258 } 255 259 sb.append("]"); 256 System.out.println(i+":\t"+h.getId()+"\t"+h.getName()+"\t"+h.get Description()+260 System.out.println(i+":\t"+h.getId()+"\t"+h.getName()+"\t"+h.getItemSubtype()+"\t"+h.getDescription()+ 257 261 "\t"+h.getArraySlide()+"\t"+sb); 258 262 } … … 270 274 { 271 275 dc = TestUtil.getDbControl(); 272 Hybridization h = Hybridization.getById(dc, hybId);276 PhysicalBioAssay h = PhysicalBioAssay.getById(dc, hybId); 273 277 Extract le = Extract.getById(dc, labeledExtractId); 274 278 BioMaterialEvent event = h.getCreationEvent(); -
trunk/src/test/TestProject.java
r5630 r5642 83 83 test_activate_project(id, pp); 84 84 int sampleId = TestSample.test_create(0, "Sample (shared)", false); 85 int hybId = Test Hybridization.test_create(0, false, new int[] {});85 int hybId = TestPhysicalBioAssay.test_create(0, 0, false); 86 86 test_list_items(id, pp, 2); 87 87 test_noactive_project(); … … 89 89 if (TestUtil.waitBeforeDelete()) TestUtil.waitForEnter(); 90 90 TestSample.test_delete(sampleId); 91 Test Hybridization.test_delete(hybId);91 TestPhysicalBioAssay.test_delete(hybId); 92 92 93 93 // Standard test: Delete -
trunk/src/test/TestRawBioAssay.java
r5630 r5642 54 54 write_header(); 55 55 56 int hybridizationId = Test Hybridization.test_create(0, false);56 int hybridizationId = TestPhysicalBioAssay.test_create(0, 0, false); 57 57 int scanId = TestScan.test_create(hybridizationId, 0, 0, false); 58 58 int arrayDesignId = TestArrayDesign.test_create(Platform.GENERIC, false); … … 103 103 TestFile.test_delete(celId); 104 104 TestScan.test_delete(scanId); 105 Test Hybridization.test_delete(hybridizationId);105 TestPhysicalBioAssay.test_delete(hybridizationId); 106 106 TestArrayDesign.test_delete(arrayDesignId); 107 107 TestArrayDesign.test_delete(arrayDesignId2); -
trunk/src/test/TestScan.java
r5630 r5642 43 43 write_header(); 44 44 45 int hybridizationId = Test Hybridization.test_create(0, false);45 int hybridizationId = TestPhysicalBioAssay.test_create(0, 0, false); 46 46 int scannerId = TestHardware.test_create(SystemItems.getId(Hardware.SCANNER), null, false); 47 47 int protocolId = TestProtocol.test_create(SystemItems.getId(Protocol.SCANNING), null, false); … … 61 61 test_delete(id2); 62 62 63 Test Hybridization.test_delete(hybridizationId);63 TestPhysicalBioAssay.test_delete(hybridizationId); 64 64 TestHardware.test_delete(scannerId); 65 65 TestProtocol.test_delete(protocolId); … … 76 76 { 77 77 dc = TestUtil.getDbControl(); 78 Scan s = Scan.getNew(dc, Hybridization.getById(dc, hybridizationId));78 Scan s = Scan.getNew(dc, PhysicalBioAssay.getById(dc, hybridizationId)); 79 79 if (setAll) 80 80 { -
trunk/src/test/net/sf/basedb/test/roles/UserTest.java
r5641 r5642 37 37 import net.sf.basedb.core.File; 38 38 import net.sf.basedb.core.FileParameterType; 39 import net.sf.basedb.core. Hybridization;39 import net.sf.basedb.core.PhysicalBioAssay; 40 40 import net.sf.basedb.core.Include; 41 41 import net.sf.basedb.core.Item; … … 221 221 // Hybridizations, etc. 222 222 // dc = TestUtil.getDbControl(); 223 Hybridizationh1 = createHybridization(dc, "Hybridization A.00h", "Array slide A.1", le1, leRef);224 Hybridizationh2 = createHybridization(dc, "Hybridization A.24h", "Array slide A.2", le2, leRef);225 Hybridizationh1DyeSwap = createHybridization(dc, "Hybridization A.00h (dye-swap)", "Array slide A.3", le1DyeSwap, leRefDyeSwap);226 Hybridizationh2DyeSwap = createHybridization(dc, "Hybridization A.24h (dye-swap)", "Array slide A.4", le2DyeSwap, leRefDyeSwap);223 PhysicalBioAssay h1 = createHybridization(dc, "Hybridization A.00h", "Array slide A.1", le1, leRef); 224 PhysicalBioAssay h2 = createHybridization(dc, "Hybridization A.24h", "Array slide A.2", le2, leRef); 225 PhysicalBioAssay h1DyeSwap = createHybridization(dc, "Hybridization A.00h (dye-swap)", "Array slide A.3", le1DyeSwap, leRefDyeSwap); 226 PhysicalBioAssay h2DyeSwap = createHybridization(dc, "Hybridization A.24h (dye-swap)", "Array slide A.4", le2DyeSwap, leRefDyeSwap); 227 227 228 228 // Affymetrix 229 HybridizationaffyHyb1 = createHybridization(dc, "Affymetrix hyb A.1", "Affymetrix slide A.1", le1);230 HybridizationaffyHyb2 = createHybridization(dc, "Affymetrix hyb A.2", "Affymetrix slide A.2", le2);231 HybridizationaffyHyb3 = createHybridization(dc, "Affymetrix hyb A.3", "Affymetrix slide A.3", leRef);229 PhysicalBioAssay affyHyb1 = createHybridization(dc, "Affymetrix hyb A.1", "Affymetrix slide A.1", le1); 230 PhysicalBioAssay affyHyb2 = createHybridization(dc, "Affymetrix hyb A.2", "Affymetrix slide A.2", le2); 231 PhysicalBioAssay affyHyb3 = createHybridization(dc, "Affymetrix hyb A.3", "Affymetrix slide A.3", leRef); 232 232 233 233 sc1 = createScan(dc, "Scan A.00h", h1, 400f, volt); … … 436 436 Create a hybridization. 437 437 */ 438 public static HybridizationcreateHybridization(DbControl dc, String name, String arraySlideName, Extract... extracts)438 public static PhysicalBioAssay createHybridization(DbControl dc, String name, String arraySlideName, Extract... extracts) 439 439 { 440 440 TestUtil.write("--Creating hybridization: " + name + "\n"); 441 Hybridization hyb = Hybridization.getNew(dc);441 PhysicalBioAssay hyb = PhysicalBioAssay.getNew(dc); 442 442 hyb.setName(name); 443 443 hyb.setArraySlide(Util.findArraySlide(dc, arraySlideName)); … … 456 456 Create a scan. 457 457 */ 458 public static Scan createScan(DbControl dc, String name, Hybridizationhyb, Float pmtGain, Unit unit)458 public static Scan createScan(DbControl dc, String name, PhysicalBioAssay hyb, Float pmtGain, Unit unit) 459 459 { 460 460 TestUtil.write("--Creating scan: " + name + "\n"); -
trunk/www/biomaterials/bioplates/events/view_event.jsp
r5525 r5642 35 35 import="net.sf.basedb.core.BioMaterialEvent" 36 36 import="net.sf.basedb.core.MeasuredBioMaterial" 37 import="net.sf.basedb.core. Hybridization"37 import="net.sf.basedb.core.PhysicalBioAssay" 38 38 import="net.sf.basedb.core.Protocol" 39 39 import="net.sf.basedb.core.Hardware" … … 385 385 ItemQuery<BioMaterialEvent> eventQuery = event.getBioMaterialEvents(); 386 386 eventQuery.join(Hql.leftJoin("bioMaterial", "bm")); 387 eventQuery.join(Hql.leftJoin(" hybridization", "hyb"));387 eventQuery.join(Hql.leftJoin("physicalBioAssay", "pba")); 388 388 eventQuery.include(Include.ALL); 389 389 eventQuery.order(Orders.asc(Hql.property("bm", "name"))); 390 eventQuery.order(Orders.asc(Hql.property(" hyb", "name")));390 eventQuery.order(Orders.asc(Hql.property("pba", "name"))); 391 391 ItemResultList<BioMaterialEvent> events = eventQuery.list(dc); 392 392 if (events.size() == 0) … … 413 413 <tbl:columndef 414 414 id="item" 415 title="Biomaterial/ Hybridization"415 title="Biomaterial/Bioassay" 416 416 /> 417 417 <tbl:columndef … … 437 437 try 438 438 { 439 if (eventType == BioMaterialEvent.Type. HYBRIDIZATION)439 if (eventType == BioMaterialEvent.Type.BIOASSAY) 440 440 { 441 item = bmEvent.get Hybridization();441 item = bmEvent.getPhysicalBioAssay(); 442 442 } 443 443 else -
trunk/www/biomaterials/bioplates/view_bioplate.jsp
r5641 r5642 315 315 image="add.png" 316 316 onclick="createChildBioPlate()" 317 title="<%="Create child bioplate" + (bioMaterialType == Item.EXTRACT ? "/ hybridization" : "") +"…"%>"317 title="<%="Create child bioplate" + (bioMaterialType == Item.EXTRACT ? "/bioassay" : "") +"…"%>" 318 318 tooltip="Create one or more child biomaterial plates" 319 319 visible="<%=bioMaterialType != null%>" -
trunk/www/biomaterials/events/list_events.jsp
r5641 r5642 523 523 } 524 524 } 525 else if (eventType == BioMaterialEvent.Type. HYBRIDIZATION)525 else if (eventType == BioMaterialEvent.Type.BIOASSAY) 526 526 { 527 527 %> 528 528 <div class="link" onclick="viewItem(<%=itemId%>)"> 529 Hybridization: <base:propertyvalue529 Bioassay: <base:propertyvalue 530 530 item="<%=item%>" 531 property=" hybridization"531 property="physicalBioAssay" 532 532 enableEditLink="<%=false%>" 533 533 enablePropertyLink="<%=false%>" -
trunk/www/biomaterials/events/view_event.jsp
r5641 r5642 36 36 import="net.sf.basedb.core.BioPlate" 37 37 import="net.sf.basedb.core.MeasuredBioMaterial" 38 import="net.sf.basedb.core. Hybridization"38 import="net.sf.basedb.core.PhysicalBioAssay" 39 39 import="net.sf.basedb.core.Protocol" 40 40 import="net.sf.basedb.core.PermissionDeniedException" … … 268 268 <% 269 269 } 270 else if (eventType == BioMaterialEvent.Type. HYBRIDIZATION)270 else if (eventType == BioMaterialEvent.Type.BIOASSAY) 271 271 { 272 272 %> 273 273 <tr> 274 <td class="prompt">Hybridization</td> 275 <td><base:propertyvalue item="<%=event%>" property="hybridization"/></td> 276 </tr> 277 <tr> 278 <td class="prompt">Labeled extracts</td> 279 <td> 280 </td> 274 <td class="prompt">Physical bioassay</td> 275 <td><base:propertyvalue item="<%=event%>" property="physicalBioAssay"/></td> 281 276 </tr> 282 277 <% -
trunk/www/biomaterials/extracts/index.jsp
r5641 r5642 35 35 import="net.sf.basedb.core.BioWell" 36 36 import="net.sf.basedb.core.Protocol" 37 import="net.sf.basedb.core. Hybridization"37 import="net.sf.basedb.core.PhysicalBioAssay" 38 38 import="net.sf.basedb.core.ItemQuery" 39 39 import="net.sf.basedb.core.ItemResultIterator" … … 77 77 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 78 78 <%! 79 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,originalQuantity,remainingQuantity, labeledextracts,description");79 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,originalQuantity,remainingQuantity,physicalBioAssays,description"); 80 80 private static final Item itemType = Item.EXTRACT; 81 81 … … 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 cc.setObject("export.formatter.&sourceEvents(event.physicalBioAssay.name)", new NameableFormatter()); 89 89 cc.setObject("export.formatter.&sourceEvents(event.bioMaterial.name)", new NameableFormatter()); 90 90 … … 92 92 String restrictionParameter = "extract"; 93 93 94 // Hybridizations95 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));94 // Physical bioassays 95 ItemQuery<PhysicalBioAssay> bioAssayQuery = PhysicalBioAssay.getQuery(); 96 bioAssayQuery.join(Hql.innerJoin("creationEvent", "ce")); 97 bioAssayQuery.join(Hql.innerJoin("ce", "sources", "src")); 98 bioAssayQuery.restrict(Restrictions.eq(Hql.index("src", null), Expressions.parameter(restrictionParameter))); 99 bioAssayQuery.order(Orders.asc(Hql.property("name"))); 100 bioAssayQuery.include(cc.getInclude()); 101 cc.setObject("export.dataloader.&sourceEvents(event.physicalBioAssay.name)", new ItemQueryLoader(bioAssayQuery, restrictionParameter)); 102 102 103 103 // Child extracts … … 196 196 forward = editPage+"&pooled="+true; 197 197 } 198 else if ("New Hybridization".equals(cmd))199 { 200 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 201 redirect = "../../views/ hybridizations/index.jsp?ID="+ID+"&cmd=NewItem&useParents=true";198 else if ("NewPhysicalBioAssay".equals(cmd)) 199 { 200 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 201 redirect = "../../views/physicalbioassays/index.jsp?ID="+ID+"&cmd=NewItem&useParents=true"; 202 202 } 203 203 else if ("UpdateItem".equals(cmd)) -
trunk/www/biomaterials/extracts/list_extracts.jsp
r5641 r5642 30 30 import="net.sf.basedb.core.Extract" 31 31 import="net.sf.basedb.core.Sample" 32 import="net.sf.basedb.core. Hybridization"32 import="net.sf.basedb.core.PhysicalBioAssay" 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 create HybridizationPermission = sc.hasPermission(Permission.CREATE, Item.HYBRIDIZATION);101 final boolean createBioAssayPermission = sc.hasPermission(Permission.CREATE, Item.PHYSICALBIOASSAY); 102 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());103 final ItemQuery<PhysicalBioAssay> bioAssayQuery = PhysicalBioAssay.getQuery(); 104 bioAssayQuery.join(Hql.innerJoin("creationEvent", "ce")); 105 bioAssayQuery.join(Hql.innerJoin("ce", "sources", "src")); 106 bioAssayQuery.restrict(Restrictions.eq(Hql.index("src", null), Hql.entityParameter("extract", Item.EXTRACT))); 107 bioAssayQuery.order(Orders.asc(Hql.property("name"))); 108 bioAssayQuery.include(cc.getInclude()); 109 109 110 110 final ItemQuery<Extract> childExtractsQuery = Extract.getQuery(); … … 167 167 Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'NewPooledItem'); 168 168 } 169 function new Hybridization()170 { 171 Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'New Hybridization');169 function newPhysicalBioAssay() 170 { 171 Table.poolItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'NewPhysicalBioAssay'); 172 172 } 173 173 function editItem(itemId) … … 182 182 { 183 183 Table.itemOnClick(formId, evt, itemId, '<%=mode.getName()%>', viewItem, editItem, returnSelected); 184 }185 function newLabeledExtract(extractId)186 {187 Main.viewOrEditItem('<%=ID%>', 'LABELEDEXTRACT', 0, true, '&extract_id='+extractId);188 184 } 189 185 function deleteItems() … … 402 398 /> 403 399 <tbl:columndef 404 id=" hybridizations"405 title=" Hybridizations"406 property="&sourceEvents(event. hybridization.name)"400 id="physicalBioAssays" 401 title="Physical bioassays" 402 property="&sourceEvents(event.physicalBioAssay.name)" 407 403 datatype="string" 408 404 filterable="true" … … 532 528 /> 533 529 <tbl:button 534 disabled="<%=create HybridizationPermission ? false : true%>"535 image="<%=create HybridizationPermission ? "add.png" : "add_disabled.png"%>"536 onclick="new Hybridization()"537 title="New hybridzation…"538 tooltip="<%=create HybridizationPermission ? "Create new hybridization with the selected extracts" : "You do not have permission to create hybridizations"%>"530 disabled="<%=createBioAssayPermission ? false : true%>" 531 image="<%=createBioAssayPermission ? "add.png" : "add_disabled.png"%>" 532 onclick="newPhysicalBioAssay()" 533 title="New physical bioassay…" 534 tooltip="<%=createBioAssayPermission ? "Create new bioassay with the selected extracts" : "You do not have permission to create bioassays"%>" 539 535 /> 540 536 <tbl:button … … 763 759 %> 764 760 </tbl:cell> 765 <tbl:cell column=" hybridizations">761 <tbl:cell column="physicalBioAssays"> 766 762 <% 767 763 try 768 764 { 769 hybQuery.setEntityParameter("extract", item);765 bioAssayQuery.setEntityParameter("extract", item); 770 766 String separator = ""; 771 for ( Hybridization h : hybQuery.list(dc))767 for (PhysicalBioAssay pba : bioAssayQuery.list(dc)) 772 768 { 773 769 out.write(separator); 774 770 if (mode.hasPropertyLink()) 775 771 { 776 out.write(Base.getLinkedName(ID, h, false, mode.hasEditLink()));772 out.write(Base.getLinkedName(ID, pba, false, mode.hasEditLink())); 777 773 } 778 774 else 779 775 { 780 out.write(HTML.encodeTags( h.getName()));776 out.write(HTML.encodeTags(pba.getName())); 781 777 } 782 778 separator = ", "; -
trunk/www/biomaterials/extracts/view_extract.jsp
r5641 r5642 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Extract" 36 import="net.sf.basedb.core. Hybridization"36 import="net.sf.basedb.core.PhysicalBioAssay" 37 37 import="net.sf.basedb.core.Sample" 38 38 import="net.sf.basedb.core.BioMaterialEvent" … … 176 176 } 177 177 } 178 function new Hybridization()179 { 180 Main.viewOrEditItem('<%=ID%>', ' HYBRIDIZATION', 0, true, '&extract_id='+<%=itemId%>);178 function newPhysicalBioAssay() 179 { 180 Main.viewOrEditItem('<%=ID%>', 'PHYSICALBIOASSAY', 0, true, '&extract_id='+<%=itemId%>); 181 181 } 182 182 </script> … … 233 233 <tbl:button 234 234 image="add.png" 235 onclick="new Hybridization()"236 title="New hybridization…"237 tooltip="Create a new hybridization from this labeledextract"238 visible="<%=sc.hasPermission(Permission.CREATE, Item. HYBRIDIZATION) && usePermission%>"235 onclick="newPhysicalBioAssay()" 236 title="New physical bioassay…" 237 tooltip="Create a new physical bioassay from this extract" 238 visible="<%=sc.hasPermission(Permission.CREATE, Item.PHYSICALBIOASSAY) && usePermission%>" 239 239 /> 240 240 <tbl:button … … 514 514 } 515 515 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 extract516 ItemQuery<PhysicalBioAssay> bioAssayQuery = extract.getPhysicalBioAssays(); 517 bioAssayQuery.include(Include.ALL); 518 bioAssayQuery.order(Orders.asc(Hql.property("name"))); 519 ItemResultList<PhysicalBioAssay> bioAssays = bioAssayQuery.list(dc); 520 if (bioAssays.size() == 0) 521 { 522 %> 523 <h4>Physical bioassays</h4> 524 No bioassays have been created from this extract 525 525 (or you don't have the permission to view them) 526 526 <% … … 530 530 %> 531 531 <base:section 532 id=" hybridizationSection"533 title="<%=" Hybridizations (" + hybridizations.size() + ")"%>"532 id="bioAssaysSection" 533 title="<%="Physical bioassays (" + bioAssays.size() + ")"%>" 534 534 context="<%=cc%>" 535 535 > 536 536 <tbl:table 537 id=" hybridizations"537 id="bioAssays" 538 538 clazz="itemlist" 539 539 columns="all" … … 555 555 <tbl:rows> 556 556 <% 557 for ( Hybridization hyb : hybridizations)557 for (PhysicalBioAssay pba : bioAssays) 558 558 { 559 559 %> … … 562 562 image="deleted.gif" 563 563 tooltip="This item has been scheduled for deletion" 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>564 visible="<%=pba.isRemoved()%>" 565 /><%=Base.getLinkedName(ID, pba, false, true)%></tbl:cell> 566 <tbl:cell column="quantity"><%=Values.formatNumber(pba.getCreationEvent().getUsedQuantity(extract), 2)%></tbl:cell> 567 <tbl:cell column="description"><%=HTML.encodeTags(pba.getDescription())%></tbl:cell> 568 568 </tbl:row> 569 569 <% -
trunk/www/biomaterials/wizards/create_child_bioplate_step1.jsp
r5641 r5642 109 109 return; 110 110 } 111 if (frm.plategeometry_id.length == 0 && childType != ' HYBRIDIZATION')111 if (frm.plategeometry_id.length == 0 && childType != 'PHYSICALBIOASSAY') 112 112 { 113 113 alert("You must select a plate geometry"); … … 115 115 return false; 116 116 } 117 if (frm.bioplatetype_id.length == 0 && childType != ' HYBRIDIZATION')117 if (frm.bioplatetype_id.length == 0 && childType != 'PHYSICALBIOASSAY') 118 118 { 119 119 alert("You must select a plate type"); … … 242 242 var frm = document.forms['main']; 243 243 var childType = frm.child_biomaterial_type[frm.child_biomaterial_type.selectedIndex].value; 244 Main.showHide(' labelDiv', childType == 'LABELEDEXTRACT');245 var is Hyb = childType == 'HYBRIDIZATION';246 Main.showHide('originalQuantityDiv', !is Hyb);247 Main.showHide('freezerDiv', !is Hyb);248 Main.showHide('plateTypeDiv', !is Hyb);249 Main.showHide('geometryDiv', !is Hyb);250 Main.showHide(' numArraysDiv', isHyb);244 Main.showHide('tagDiv', childType == 'EXTRACT'); 245 var isBioAssay = childType == 'PHYSICALBIOASSAY'; 246 Main.showHide('originalQuantityDiv', !isBioAssay); 247 Main.showHide('freezerDiv', !isBioAssay); 248 Main.showHide('plateTypeDiv', !isBioAssay); 249 Main.showHide('geometryDiv', !isBioAssay); 250 Main.showHide('sizeDiv', isBioAssay); 251 251 } 252 252 … … 360 360 %> 361 361 <option value="EXTRACT">Extract → Extract 362 <option value=" HYBRIDIZATION" selected>Extract → Hybridization362 <option value="PHYSICALBIOASSAY" selected>Extract → Physical bioassay 363 363 <% 364 364 } … … 376 376 final List<Tag> tags = tagsQuery.list(dc); 377 377 %> 378 <tr id=" labelDiv">379 <td class="prompt"> Label</td>378 <tr id="tagDiv"> 379 <td class="prompt">Tag</td> 380 380 <td> 381 <select name=" label_id" size="1" class="required"381 <select name="tag_id" size="1" 382 382 style="width: 20em;"> 383 <option value="">- none - 383 384 <% 384 385 for (Tag tag : tags) … … 451 452 </td> 452 453 </tr> 453 <tr id=" numArraysDiv" style="display: none;">454 <td class="prompt"> Number of arrays/hyb</td>455 <td><input <%=requiredClazz%> type="text" name=" num_arrays" size="12"454 <tr id="sizeDiv" style="display: none;"> 455 <td class="prompt">Size of bioassay</td> 456 <td><input <%=requiredClazz%> type="text" name="size" size="12" 456 457 value="<%=sourceGeometry.getRows() %>" 457 458 maxlength="10" onkeypress="return Numbers.numberOnly(event)"></td> -
trunk/www/biomaterials/wizards/create_child_bioplate_step2.jsp
r5641 r5642 67 67 final BioPlate sourcePlate = BioPlate.getById(dc, sourcePlateId); 68 68 final Item childBioMaterialType = Item.valueOf(request.getParameter("child_biomaterial_type")); 69 final boolean is HybridizationEvent = childBioMaterialType == Item.HYBRIDIZATION;70 71 final PlateGeometry geometry = is HybridizationEvent ? null : PlateGeometry.getById(dc, childPlateGeometryId);72 final int numArrays = Values.getInt(request.getParameter("num_arrays"));69 final boolean isBioAssayEvent = childBioMaterialType == Item.PHYSICALBIOASSAY; 70 71 final PlateGeometry geometry = isBioAssayEvent ? null : PlateGeometry.getById(dc, childPlateGeometryId); 72 final int size = Values.getInt(request.getParameter("size")); 73 73 final BioPlateType sourceType = sourcePlate.getBioPlateType(); 74 74 final Item sourceBioMaterialType = sourceType.getBioMaterialType(); … … 95 95 <script language="javascript"> 96 96 97 var is HybridizationEvent = <%=isHybridizationEvent ? "true" : "false"%>;97 var isBioAssayEvent = <%=isBioAssayEvent ? "true" : "false"%>; 98 98 99 99 // For drawing … … 121 121 selectedPen = new jsPen(new jsColor('445577'), 2); 122 122 setSourceBioPlate(<%=sourcePlateId%>, '<%=HTML.javaScriptEncode(sourcePlate.getName())%>'); 123 createDestinationPlates(<%=numChildPlates%>, <%=is HybridizationEvent ? 1 : geometry.getRows()%>, <%=isHybridizationEvent ? numArrays: geometry.getColumns()%>, '<%=HTML.javaScriptEncode(childPlateNamePrefix)%>');123 createDestinationPlates(<%=numChildPlates%>, <%=isBioAssayEvent ? 1 : geometry.getRows()%>, <%=isBioAssayEvent ? size : geometry.getColumns()%>, '<%=HTML.javaScriptEncode(childPlateNamePrefix)%>'); 124 124 } 125 125 … … 387 387 var request = Ajax.getXmlHttpRequest(); 388 388 var url = '../bioplates/ajax.jsp?ID=<%=ID%>&cmd=GetFullPlateInfo&item_id=' + bioPlateId; 389 if (!is HybridizationEvent)389 if (!isBioAssayEvent) 390 390 { 391 391 url += '&countChildren=<%=sourceBioMaterialType == childBioMaterialType ? "pooled" : "1"%>'; … … 422 422 well.id = bmInfo.id; 423 423 well.name = bmInfo.name; 424 if (!is HybridizationEvent)424 if (!isBioAssayEvent) 425 425 { 426 426 well.childCount = bmInfo.childCount; … … 538 538 var destPlate = destPlates[plateNo]; 539 539 Forms.createHidden(frm, 'plate.' + plateNo + '.name', destPlate.name); 540 if (!is HybridizationEvent)540 if (!isBioAssayEvent) 541 541 { 542 542 Forms.createHidden(frm, 'plate.' + plateNo + '.barcode', destPlate.barcode); … … 551 551 var prefix = 'well.' +plateNo + '.' + row + '.' + column; 552 552 Forms.createHidden(frm, prefix, well.mappedWell.id); 553 if (!is HybridizationEvent)553 if (!isBioAssayEvent) 554 554 { 555 555 Forms.createHidden(frm, prefix + '.name', well.mappedWell.childName); … … 658 658 { 659 659 frm.plate_name.value = editingPlate.name; 660 if (!is HybridizationEvent)660 if (!isBioAssayEvent) 661 661 { 662 662 frm.plate_barcode.value = editingPlate.barcode; … … 664 664 Main.show('childplate.info'); 665 665 } 666 if (editingWell && !is HybridizationEvent)666 if (editingWell && !isBioAssayEvent) 667 667 { 668 668 frm.biomaterial_name.value = editingWell.childName; … … 674 674 { 675 675 var frm = document.forms['main']; 676 if (editingWell && !is HybridizationEvent)676 if (editingWell && !isBioAssayEvent) 677 677 { 678 678 Main.hide('childbiomaterial.info'); … … 684 684 Main.hide('childplate.info'); 685 685 editingPlate.name = frm.plate_name.value; 686 if (!is HybridizationEvent)686 if (!isBioAssayEvent) 687 687 { 688 688 editingPlate.barcode = frm.plate_barcode.value; … … 710 710 <!-- child plate properties --> 711 711 <input type="hidden" name="number_of_plates" value="<%=numChildPlates%>"> 712 <input type="hidden" name=" num_arrays" value="<%=numArrays%>">712 <input type="hidden" name="size" value="<%=size%>"> 713 713 <input type="hidden" name="plategeometry_id" value="<%=childPlateGeometryId%>"> 714 714 <input type="hidden" name="bioplatetype_id" value="<%=childPlateTypeId%>"> … … 755 755 <td style="width: 50%;"> 756 756 <div style="max-height: <%=(int)(scale*350)%>px; overflow: auto;"> 757 <b><%=is HybridizationEvent ?758 " Hybridization(s)" : "Destination plate(s):"%></b>757 <b><%=isBioAssayEvent ? 758 "Physical bioassay(s)" : "Destination plate(s):"%></b> 759 759 <span id="plate.dest.info"><i>not created</i></span> 760 760 … … 774 774 <tr valign="top"> 775 775 <td width="50%"> 776 <h3><%=is HybridizationEvent ? "Hybridization" : "Child plate:"%></h3>776 <h3><%=isBioAssayEvent ? "Physical bioassay" : "Child plate:"%></h3> 777 777 <table class="form" cellspacing="0" id="childplate.info" style="display: none;"> 778 778 <tr> … … 782 782 </tr> 783 783 <% 784 if (!is HybridizationEvent)784 if (!isBioAssayEvent) 785 785 { 786 786 %> … … 797 797 <td width="50%"> 798 798 <% 799 if (!is HybridizationEvent)799 if (!isBioAssayEvent) 800 800 { 801 801 %> -
trunk/www/biomaterials/wizards/index.jsp
r5641 r5642 32 32 import="net.sf.basedb.core.BioPlateEventParticipant" 33 33 import="net.sf.basedb.core.BioWell" 34 import="net.sf.basedb.core. Hybridization"34 import="net.sf.basedb.core.PhysicalBioAssay" 35 35 import="net.sf.basedb.core.DbControl" 36 36 import="net.sf.basedb.core.Item" … … 200 200 Item sourceBioMaterialType = sourcePlate.getBioPlateType().getBioMaterialType(); 201 201 Item childBioMaterialType = Item.valueOf(request.getParameter("child_biomaterial_type")); 202 boolean is HybridizationEvent = childBioMaterialType == Item.HYBRIDIZATION;202 boolean isBioAssayEvent = childBioMaterialType == Item.PHYSICALBIOASSAY; 203 203 204 204 // The event object 205 205 BioPlateEventType createBioMaterial = BioPlateEventType.getById(dc, 206 is HybridizationEvent ? BioPlateEventType.HYBRIDIZATION: BioPlateEventType.CREATE_BIOMATERIAL);206 isBioAssayEvent ? BioPlateEventType.PHYSICAL_BIOASSAY : BioPlateEventType.CREATE_BIOMATERIAL); 207 207 BioPlateEvent event = BioPlateEvent.getNew(dc, createBioMaterial); 208 208 event.setName(Values.getStringOrNull(request.getParameter("event_name"))); … … 229 229 // Child plates & biomaterial 230 230 Hardware freezer = null; 231 if (!is HybridizationEvent)231 if (!isBioAssayEvent) 232 232 { 233 233 int freezerId = Values.getInt(request.getParameter("freezer_id")); … … 239 239 } 240 240 int numChildPlates = Values.getInt(request.getParameter("number_of_plates")); 241 int numArrays = Values.getInt(request.getParameter("num_arrays"));241 int size = Values.getInt(request.getParameter("size")); 242 242 PlateGeometry childGeometry = null; 243 if (!is HybridizationEvent)243 if (!isBioAssayEvent) 244 244 { 245 245 childGeometry = PlateGeometry.getById(dc, Values.getInt(request.getParameter("plategeometry_id"))); 246 246 cc.setRecent(childGeometry, sourceBioMaterialType.name(), maxRecent); 247 247 } 248 int rows = is HybridizationEvent ? 1 : childGeometry.getRows();249 int columns = is HybridizationEvent ? numArrays: childGeometry.getColumns();248 int rows = isBioAssayEvent ? 1 : childGeometry.getRows(); 249 int columns = isBioAssayEvent ? size : childGeometry.getColumns(); 250 250 int numCreated = 0; 251 251 BioPlateType childPlateType = null; 252 if (!is HybridizationEvent)252 if (!isBioAssayEvent) 253 253 { 254 254 childPlateType = BioPlateType.getById(dc, Values.getInt(request.getParameter("bioplatetype_id"))); … … 259 259 for (int plateNo = 0; plateNo < numChildPlates; ++plateNo) 260 260 { 261 Hybridization hyb= null;262 BioMaterialEvent hybCreationEvent = null;261 PhysicalBioAssay pba = null; 262 BioMaterialEvent pbaCreationEvent = null; 263 263 BioPlate childPlate = null; 264 264 BioPlateEventParticipant destParticipant = null; 265 if (is HybridizationEvent)266 { 267 hyb = Hybridization.getNew(dc, sourceParticipant);268 hyb.setName(Values.getStringOrNull(request.getParameter("plate." + plateNo + ".name")));269 hyb.setDescription(Values.getStringOrNull(request.getParameter("plate_description")));270 hyb.setNumArrays(numArrays);271 dc.saveItem( hyb);272 hybCreationEvent = hyb.getCreationEvent();265 if (isBioAssayEvent) 266 { 267 pba = PhysicalBioAssay.getNew(dc, sourceParticipant); 268 pba.setName(Values.getStringOrNull(request.getParameter("plate." + plateNo + ".name"))); 269 pba.setDescription(Values.getStringOrNull(request.getParameter("plate_description"))); 270 pba.setSize(size); 271 dc.saveItem(pba); 272 pbaCreationEvent = pba.getCreationEvent(); 273 273 } 274 274 else … … 291 291 { 292 292 MeasuredBioMaterial parent = (MeasuredBioMaterial)sourceBioMaterialType.getById(dc, bioMaterialId); 293 if (is HybridizationEvent)293 if (isBioAssayEvent) 294 294 { 295 hybCreationEvent.addSource(parent, usedQuantity);296 hybCreationEvent.setSourceGroup(parent, column+1);295 pbaCreationEvent.addSource(parent, usedQuantity); 296 pbaCreationEvent.setSourceGroup(parent, column+1); 297 297 } 298 298 else … … 341 341 342 342 dc.commit(); 343 if (is HybridizationEvent)344 { 345 message = " Hybridized " + numCreated + " items on " + numChildPlates + " hybridizations(s)";343 if (isBioAssayEvent) 344 { 345 message = "Used " + numCreated + " items on " + numChildPlates + " physical bioassay(s)"; 346 346 } 347 347 else -
trunk/www/common/annotations/inherit.jsp
r5426 r5642 39 39 import="net.sf.basedb.core.Annotation" 40 40 import="net.sf.basedb.core.RawBioAssay" 41 import="net.sf.basedb.core. Hybridization"41 import="net.sf.basedb.core.PhysicalBioAssay" 42 42 import="net.sf.basedb.core.ItemQuery" 43 43 import="net.sf.basedb.core.Include" … … 66 66 { 67 67 Set<Annotatable> parents = null; 68 if (root instanceof RawBioAssay && current instanceof Hybridization)69 { 70 Hybridization hyb = (Hybridization)current;68 if (root instanceof RawBioAssay && current instanceof PhysicalBioAssay) 69 { 70 PhysicalBioAssay hyb = (PhysicalBioAssay)current; 71 71 RawBioAssay rba = (RawBioAssay)root; 72 72 parents = hyb.getAnnotatableParents(rba.getArrayNum()); -
trunk/www/include/menu.jsp
r5641 r5642 464 464 final boolean createMessages = sc.hasPermission(Permission.CREATE, Item.MESSAGE); 465 465 466 final boolean hasHybridizations = !sc.hasPermission(Permission.DENIED, Item.HYBRIDIZATION); 467 final boolean createHybridizations = sc.hasPermission(Permission.CREATE, Item.HYBRIDIZATION); 466 final boolean hasPhysicalBioAssays = !sc.hasPermission(Permission.DENIED, Item.PHYSICALBIOASSAY); 468 467 469 468 final boolean hasScans = !sc.hasPermission(Permission.DENIED, Item.SCAN); … … 546 545 <m:menuseparator /> 547 546 <m:menuitem 548 title="<%=common.getString("item. hybridization+")%>"549 onclick="<%="Menu.openUrl('"+root+"views/ hybridizations/index.jsp?ID="+ID+"')"%>"550 tooltip="<%=menu.getString(" hybridizations.tooltip", hasHybridizations)%>"551 enabled="<%=has Hybridizations%>"547 title="<%=common.getString("item.physicalbioassay+")%>" 548 onclick="<%="Menu.openUrl('"+root+"views/physicalbioassays/index.jsp?ID="+ID+"')"%>" 549 tooltip="<%=menu.getString("physicalbioassays.tooltip", hasPhysicalBioAssays)%>" 550 enabled="<%=hasPhysicalBioAssays%>" 552 551 /> 553 552 <m:menuitem -
trunk/www/include/scripts/main.js
r5641 r5642 530 530 this.controllers['JOB'] = { url:'views/jobs/index.jsp', width:640, height:480, popup:true, edit:false }; 531 531 this.controllers['FORMULA'] = { url:'views/formulas/index.jsp', width:850, height:600 }; 532 this.controllers[' HYBRIDIZATION'] = { url:'views/hybridizations/index.jsp', width:800, height:500 };532 this.controllers['PHYSICALBIOASSAY'] = { url:'views/physicalbioassays/index.jsp', width:800, height:500 }; 533 533 this.controllers['RAWBIOASSAY'] = { url:'views/rawbioassays/index.jsp', width:800, height:500 }; 534 534 this.controllers['RAWDATA'] = { url:'views/rawbioassays/rawdata/index.jsp', width:700, height:500, popup: true, edit:false }; -
trunk/www/lims/arrayslides/index.jsp
r5590 r5642 30 30 import="net.sf.basedb.core.Item" 31 31 import="net.sf.basedb.core.Include" 32 import="net.sf.basedb.core. Hybridization"32 import="net.sf.basedb.core.PhysicalBioAssay " 33 33 import="net.sf.basedb.core.ArraySlide" 34 34 import="net.sf.basedb.core.ArrayBatch" … … 66 66 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 67 67 <%! 68 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,arrayDesign, hybridization,description");68 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,arrayDesign,physicalBioAssay,description"); 69 69 private static final Item itemType = Item.ARRAYSLIDE; 70 70 %> -
trunk/www/lims/arrayslides/list_slides.jsp
r5426 r5642 28 28 import="net.sf.basedb.core.DbControl" 29 29 import="net.sf.basedb.core.Item" 30 import="net.sf.basedb.core. Hybridization"30 import="net.sf.basedb.core.PhysicalBioAssay" 31 31 import="net.sf.basedb.core.ArraySlide" 32 32 import="net.sf.basedb.core.AnnotationType" … … 271 271 /> 272 272 <tbl:columndef 273 id=" hybridization"274 property=" hybridization.name"275 datatype="string" 276 title=" Hybridization"273 id="physicalBioAssay" 274 property="physicalBioassay.name" 275 datatype="string" 276 title="Physical bioassay" 277 277 sortable="true" 278 278 filterable="true" … … 554 554 enablePropertyLink="<%=mode.hasPropertyLink()%>" 555 555 /></tbl:cell> 556 <tbl:cell column=" hybridization"556 <tbl:cell column="physicalBioAssay" 557 557 ><base:propertyvalue 558 558 item="<%=item%>" 559 property=" hybridization"559 property="physicalBioAssay" 560 560 enableEditLink="<%=mode.hasEditLink()%>" 561 561 enablePropertyLink="<%=mode.hasPropertyLink()%>" -
trunk/www/lims/arrayslides/view_slide.jsp
r5499 r5642 33 33 import="net.sf.basedb.core.AnnotationType" 34 34 import="net.sf.basedb.core.AnnotationSet" 35 import="net.sf.basedb.core. Hybridization"35 import="net.sf.basedb.core.PhysicalBioAssay" 36 36 import="net.sf.basedb.core.ArraySlide" 37 37 import="net.sf.basedb.core.ArrayBatch" … … 278 278 </tr> 279 279 <tr> 280 <td class="prompt"> Hybridization</td>281 <td><base:propertyvalue item="<%=slide%>" property=" hybridization" /></td>280 <td class="prompt">Physical bioassay</td> 281 <td><base:propertyvalue item="<%=slide%>" property="physicalBioAssay" /></td> 282 282 </tr> 283 283 <tr> -
trunk/www/views/physicalbioassays/edit_bioassay.jsp
r5641 r5642 20 20 along with BASE. If not, see <http://www.gnu.org/licenses/>. 21 21 ------------------------------------------------------------------ 22 23 22 24 23 @author Nicklas … … 34 33 import="net.sf.basedb.core.Include" 35 34 import="net.sf.basedb.core.Hardware" 36 import="net.sf.basedb.core. Hybridization"35 import="net.sf.basedb.core.PhysicalBioAssay" 37 36 import="net.sf.basedb.core.BioMaterialEvent" 38 37 import="net.sf.basedb.core.ArraySlide" … … 68 67 <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> 69 68 <% 70 final Item itemType = Item. HYBRIDIZATION;69 final Item itemType = Item.PHYSICALBIOASSAY; 71 70 final SessionControl sc = Base.getExistingSessionControl(pageContext, true); 72 71 final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); … … 79 78 String title = null; 80 79 String name = null; 81 Hybridization hyb= null;80 PhysicalBioAssay pba = null; 82 81 BioMaterialEvent creationEvent = null; 83 82 Date eventDate = null; 84 ItemQuery<Extract> labeledExtractsQuery = null;83 ItemQuery<Extract> extractsQuery = null; 85 84 86 85 boolean readCurrentArraySlide = true; … … 91 90 Protocol defaultProtocol = null; 92 91 93 boolean readCurrentH ybStation= true;94 Hardware currentH ybStation= null;95 Hardware defaultH ybStation= null;92 boolean readCurrentHardware = true; 93 Hardware currentHardware = null; 94 Hardware defaultHardware = null; 96 95 97 96 // Load recently used items 98 97 List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL); 99 List<Hardware> recent Stations= (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);98 List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE); 100 99 101 100 int activeProjectId = sc.getActiveProjectId(); … … 113 112 try 114 113 { 115 defaultH ybStation= (Hardware)activeProject.getDefaultItem(dc, Project.Default.HYBRIDIZATION_HARDWARE);114 defaultHardware = (Hardware)activeProject.getDefaultItem(dc, Project.Default.HYBRIDIZATION_HARDWARE); 116 115 } 117 116 catch (PermissionDeniedException pdex) 118 117 { 119 defaultH ybStation= null;118 defaultHardware = null; 120 119 } 121 120 } 122 121 if (itemId == 0) 123 122 { 124 title = "Create hybridization";123 title = "Create physical bioassay"; 125 124 cc.removeObject("item"); 126 125 if (cc.getPropertyFilter("creationEvent.protocol.name") != null) … … 130 129 if (cc.getPropertyFilter("creationEvent.hardware.name") != null) 131 130 { 132 currentH ybStation= Base.getFirstMatching(dc, Hardware.getQuery(), "name", cc.getPropertyFilter("creationEvent.hardware.name"));131 currentHardware = Base.getFirstMatching(dc, Hardware.getQuery(), "name", cc.getPropertyFilter("creationEvent.hardware.name")); 133 132 } 134 133 if (cc.getPropertyFilter("arraySlide.name") != null) … … 144 143 if (lc.getSelected().size() > 0) 145 144 { 146 labeledExtractsQuery = Extract.getQuery();147 labeledExtractsQuery.include(Include.ALL);148 labeledExtractsQuery.order(Orders.asc(Hql.property("name")));149 labeledExtractsQuery.restrict(Restrictions.in(Hql.property("id"),145 extractsQuery = Extract.getQuery(); 146 extractsQuery.include(Include.ALL); 147 extractsQuery.order(Orders.asc(Hql.property("name"))); 148 extractsQuery.restrict(Restrictions.in(Hql.property("id"), 150 149 Expressions.parameter("selected", lc.getSelected(), Type.INT))); 151 150 } … … 154 153 { 155 154 int leId = Values.getInt(request.getParameter("extract_id")); 156 labeledExtractsQuery = Extract.getQuery();157 labeledExtractsQuery.include(Include.ALL);158 labeledExtractsQuery.restrict(Restrictions.eq(Hql.property("id"),155 extractsQuery = Extract.getQuery(); 156 extractsQuery.include(Include.ALL); 157 extractsQuery.restrict(Restrictions.eq(Hql.property("id"), 159 158 Expressions.integer(leId))); 160 159 } … … 162 161 else 163 162 { 164 hyb = Hybridization.getById(dc, itemId);165 creationEvent = hyb.getCreationEvent();163 pba = PhysicalBioAssay.getById(dc, itemId); 164 creationEvent = pba.getCreationEvent(); 166 165 eventDate = creationEvent.getEventDate(); 167 cc.setObject("item", hyb);168 title = "Edit hybridization -- " + HTML.encodeTags(hyb.getName());169 name = hyb.getName();166 cc.setObject("item", pba); 167 title = "Edit physical bioassay -- " + HTML.encodeTags(pba.getName()); 168 name = pba.getName(); 170 169 try 171 170 { 172 currentArraySlide = hyb.getArraySlide();171 currentArraySlide = pba.getArraySlide(); 173 172 } 174 173 catch (PermissionDeniedException ex) … … 186 185 try 187 186 { 188 currentH ybStation= creationEvent.getHardware();187 currentHardware = creationEvent.getHardware(); 189 188 } 190 189 catch (PermissionDeniedException ex) 191 190 { 192 readCurrentH ybStation= false;193 } 194 195 // Query to retrieve source labeledextracts196 labeledExtractsQuery = (ItemQuery<Extract>)creationEvent.getSources();197 labeledExtractsQuery.include(Include.ALL);198 labeledExtractsQuery.order(Orders.asc(Hql.property("name")));191 readCurrentHardware = false; 192 } 193 194 // Query to retrieve source extracts 195 extractsQuery = (ItemQuery<Extract>)creationEvent.getSources(); 196 extractsQuery.include(Include.ALL); 197 extractsQuery.order(Orders.asc(Hql.property("name"))); 199 198 200 199 } 201 if ( hyb != null) hyb.checkPermission(Permission.WRITE);200 if (pba != null) pba.checkPermission(Permission.WRITE); 202 201 203 202 final String clazz = "class=\"text\""; … … 207 206 String jsDateFormat = HTML.javaScriptEncode(dateFormat); 208 207 String htmlDateFormat = HTML.encodeTags(dateFormat); 209 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), hyb);208 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), pba); 210 209 ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); 211 210 %> … … 215 214 <ext:stylesheets context="<%=jspContext%>" /> 216 215 <script language="JavaScript"> 217 // Validate the " Hybridization" tab218 function validate Hybridization()219 { 220 var frm = document.forms[' hybridization'];216 // Validate the "Physical bioassay" tab 217 function validatePhysicalBioAssay() 218 { 219 var frm = document.forms['bioassay']; 221 220 if (Main.trimString(frm.name.value) == '') 222 221 { … … 225 224 return false; 226 225 } 227 else if (!Numbers.isInteger(frm. numArrays.value))228 { 229 alert("'" + frm. numArrays.value + "' is not a valid number");230 frm. numArrays.focus();226 else if (!Numbers.isInteger(frm.size.value)) 227 { 228 alert("'" + frm.size.value + "' is not a valid number"); 229 frm.size.focus(); 231 230 return false; 232 231 } 233 else if (parseInt(frm. numArrays.value) <= 0)234 { 235 alert(" Number of arraysmust be > 0");236 frm. numArrays.focus();232 else if (parseInt(frm.size.value) <= 0) 233 { 234 alert("Size must be > 0"); 235 frm.size.focus(); 237 236 return false; 238 237 } … … 243 242 function saveSettings() 244 243 { 245 var frm = document.forms[' hybridization'];244 var frm = document.forms['bioassay']; 246 245 if (TabControl.validateActiveTab('settings')) 247 246 { … … 254 253 Annotations.addInheritedAnnotationsToForm(frames.inheritedAnnotations, frm); 255 254 } 256 frm.modified LabeledExtracts.value = Link.exportModified(frm, 'L', true).join(',');257 frm.removed LabeledExtracts.value = Link.getActionIds(-1, 'L').join(',');255 frm.modifiedExtracts.value = Link.exportModified(frm, 'E', true).join(','); 256 frm.removedExtracts.value = Link.getActionIds(-1, 'E').join(','); 258 257 frm.submit(); 259 258 } … … 270 269 if (tabId == 'annotations' && (protocolChanged || !annotationsLoaded)) 271 270 { 272 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%= hyb == null ? 0 : hyb.getId()%>, getProtocolId());271 Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=pba == null ? 0 : pba.getId()%>, getProtocolId()); 273 272 annotationsLoaded = true; 274 273 protocolChanged = false; … … 286 285 function getProtocolId() 287 286 { 288 var frm = document.forms[' hybridization'];287 var frm = document.forms['bioassay']; 289 288 var protocolId = 0; 290 289 if (frm.protocol_id.length > 0 && !frm.protocol_id.disabled) … … 297 296 function getParents() 298 297 { 299 var frm = document.forms[' hybridization'];298 var frm = document.forms['bioassay']; 300 299 var parents = new Array(); 301 300 … … 303 302 if (arraySlideId > 0) parents[parents.length] = 'ARRAYSLIDE:'+arraySlideId; 304 303 305 var ids = Link.getListIds(frm. labeled_extracts, 'L');304 var ids = Link.getListIds(frm.extracts, 'L'); 306 305 if (ids.length > 0) 307 306 { … … 313 312 function selectProtocolOnClick() 314 313 { 315 var frm = document.forms[' hybridization'];314 var frm = document.forms['bioassay']; 316 315 var url = '../../admin/protocols/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setProtocolCallback'; 317 316 if (frm.protocol_id.length > 1) … … 325 324 function setProtocolCallback(id, name) 326 325 { 327 var frm = document.forms[' hybridization'];326 var frm = document.forms['bioassay']; 328 327 var list = frm.protocol_id; 329 328 if (list.length < 2 || list[1].value == '0') // > … … 341 340 } 342 341 343 function selectH ybStationOnClick()344 { 345 var frm = document.forms[' hybridization'];346 var url = '../../admin/hardware/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setH ybStationCallback';342 function selectHardwareOnClick() 343 { 344 var frm = document.forms['bioassay']; 345 var url = '../../admin/hardware/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setHardwareCallback'; 347 346 if (frm.hardware_id.length > 1) 348 347 { … … 351 350 } 352 351 url += '&resetTemporary=1&tmpfilter:INT:itemSubtype=<%=SystemItems.getId(Hardware.HYBRIDIZATION_STATION)%>'; 353 Main.openPopup(url, 'SelectH ybStation', 1000, 700);354 } 355 function setH ybStationCallback(id, name)356 { 357 var frm = document.forms[' hybridization'];352 Main.openPopup(url, 'SelectHardware', 1000, 700); 353 } 354 function setHardwareCallback(id, name) 355 { 356 var frm = document.forms['bioassay']; 358 357 var list = frm.hardware_id; 359 358 if (list.length < 2 || list[1].value == '0') // > … … 368 367 function arraySlideOnChange() 369 368 { 370 var frm = document.forms[' hybridization'];369 var frm = document.forms['bioassay']; 371 370 var selectedIndex = frm.arrayslide_id.selectedIndex 372 371 var arraySlideId = frm.arrayslide_id[selectedIndex].value; 373 if (arraySlideId > 0) update NumArrays(arraySlideId);372 if (arraySlideId > 0) updateSize(arraySlideId); 374 373 parentsChanged = true; 375 374 } 376 375 function selectArraySlideOnClick() 377 376 { 378 var frm = document.forms[' hybridization'];377 var frm = document.forms['bioassay']; 379 378 var url = '../../lims/arrayslides/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setArraySlideCallback'; 380 379 if (frm.arrayslide_id.length > 1) … … 383 382 url += '&item_id='+id; 384 383 } 385 url += '&resetTemporary=1&tmpfilter:STRING: hybridization.name==';384 url += '&resetTemporary=1&tmpfilter:STRING:physicalBioAssay.name=='; 386 385 url += '&tmpfilter:BOOLEAN:destroyed=false'; 387 386 Main.openPopup(url, 'SelectArraySlide', 1000, 700); … … 389 388 function setArraySlideCallback(arraySlideId, name) 390 389 { 391 var frm = document.forms[' hybridization'];390 var frm = document.forms['bioassay']; 392 391 if (frm.arrayslide_id.length < 2) // > 393 392 { … … 397 396 frm.arrayslide_id[1].text = name; 398 397 frm.arrayslide_id.selectedIndex = 1; 399 update NumArrays(arraySlideId);398 updateSize(arraySlideId); 400 399 parentsChanged = true; 401 400 } … … 414 413 function updateNumArraysCallback(request) 415 414 { 416 var frm = document.forms[' hybridization'];415 var frm = document.forms['bioassay']; 417 416 var response = Ajax.parseJsonResponse(request.responseText); 418 417 if (response.status != 'ok') … … 424 423 if (response.numArrays) 425 424 { 426 frm. numArrays.value = response.numArrays;427 } 428 } 429 430 function add LabeledExtractsOnClick()431 { 432 var frm = document.forms[' hybridization'];433 var ids = Link.getListIds(frm. labeled_extracts, 'L');425 frm.size.value = response.numArrays; 426 } 427 } 428 429 function addExtractsOnClick() 430 { 431 var frm = document.forms['bioassay']; 432 var ids = Link.getListIds(frm.extracts, 'L'); 434 433 var excludes = ids.join(','); 435 434 436 var url = '../../biomaterials/extracts/index.jsp?ID=<%=ID%>&mode=selectmultiple&callback=add LabeledExtractCallback';435 var url = '../../biomaterials/extracts/index.jsp?ID=<%=ID%>&mode=selectmultiple&callback=addExtractCallback'; 437 436 url += '&exclude='+excludes; 438 Main.openPopup(url, 'Add LabeledExtracts', 1000, 700);439 } 440 function add LabeledExtractCallback(labeledExtractId, name)441 { 442 var item = Link.getItem(' L', labeledExtractId);443 if (!item) item = new Item(' L', labeledExtractId, '1: '+name+' [-]', '', '');444 Link.addItem(document.forms[' hybridization'].labeled_extracts, item);437 Main.openPopup(url, 'AddExtracts', 1000, 700); 438 } 439 function addExtractCallback(extractId, name) 440 { 441 var item = Link.getItem('E', extractId); 442 if (!item) item = new Item('E', extractId, '1: '+name+' [-]', '', ''); 443 Link.addItem(document.forms['bioassay'].extracts, item); 445 444 parentsChanged = true; 446 labeledExtractsOnChange();447 } 448 function labeledExtractsOnChange()449 { 450 var frm = document.forms[' hybridization'];451 var item = frm. labeled_extracts[frm.labeled_extracts.selectedIndex].item;445 extractsOnChange(); 446 } 447 function extractsOnChange() 448 { 449 var frm = document.forms['bioassay']; 450 var item = frm.extracts[frm.extracts.selectedIndex].item; 452 451 if (item && item.id) 453 452 { … … 465 464 function usedQuantityOnBlur() 466 465 { 467 var frm = document.forms[' hybridization'];466 var frm = document.forms['bioassay']; 468 467 var usedQuantity = frm.used_quantity.value; 469 468 var arrayIndex = frm.array_index.value; 470 var numArrays = parseInt(frm.numArrays.value);471 if (arrayIndex != '' && (arrayIndex > numArrays|| arrayIndex <= 0))472 { 473 alert('Array index must be between 1 and ' + numArrays);469 var size = parseInt(frm.size.value); 470 if (arrayIndex != '' && (arrayIndex > size || arrayIndex <= 0)) 471 { 472 alert('Array index must be between 1 and ' + size); 474 473 return; 475 474 } 476 475 if (arrayIndex == '') arrayIndex = 1; 477 476 var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg'; 478 for (var i = 0; i < frm. labeled_extracts.length; i++) // >479 { 480 var option = frm. labeled_extracts[i];477 for (var i = 0; i < frm.extracts.length; i++) // > 478 { 479 var option = frm.extracts[i]; 481 480 if (option.selected && option.item.id) 482 481 { … … 495 494 function removeOnClick() 496 495 { 497 Link.removeSelected(document.forms[' hybridization'].labeled_extracts);496 Link.removeSelected(document.forms['bioassay'].extracts); 498 497 parentsChanged = true; 499 498 } … … 502 501 function init() 503 502 { 504 var frm = document.forms[' hybridization'];505 var labeledExtracts = frm.labeled_extracts;503 var frm = document.forms['bioassay']; 504 var extracts = frm.extracts; 506 505 <% 507 if ( hyb== null)506 if (pba == null) 508 507 { 509 508 %> … … 512 511 <% 513 512 } 514 if ( labeledExtractsQuery != null)515 { 516 ItemResultList<Extract> labeledExtracts = labeledExtractsQuery.list(dc);517 for (Extract le : labeledExtracts)513 if (extractsQuery != null) 514 { 515 ItemResultList<Extract> extracts = extractsQuery.list(dc); 516 for (Extract extract : extracts) 518 517 { 519 if ( hyb== null)518 if (pba == null) 520 519 { 521 520 %> 522 Link.addItem( labeledExtracts, new Item('L', <%=le.getId()%>, '1: <%=HTML.javaScriptEncode(le.getName())%> [-]', ':1'));521 Link.addItem(extracts, new Item('E', <%=extract.getId()%>, '1: <%=HTML.javaScriptEncode(extract.getName())%> [-]', ':1')); 523 522 <% 524 523 } 525 524 else 526 525 { 527 Float used = creationEvent.getUsedQuantity( le);526 Float used = creationEvent.getUsedQuantity(extract); 528 527 String usedQuantity = Values.formatNumber(used, -1); 529 528 String usedWithUnit = used == null ? "-" : usedQuantity + " µg"; 530 int arrayIndex = creationEvent.getSourceGroup( le);529 int arrayIndex = creationEvent.getSourceGroup(extract); 531 530 %> 532 Link.addNewItem( labeledExtracts, new Item('L', <%=le.getId()%>, '<%=arrayIndex + ": " + HTML.javaScriptEncode(le.getName())%> [<%=usedWithUnit%>]', '<%=usedQuantity%>:<%=arrayIndex%>'));531 Link.addNewItem(extracts, new Item('E', <%=extract.getId()%>, '<%=arrayIndex + ": " + HTML.javaScriptEncode(extract.getName())%> [<%=usedWithUnit%>]', '<%=usedQuantity%>:<%=arrayIndex%>')); 533 532 <% 534 533 } … … 541 540 <base:body onload="init()"> 542 541 <p> 543 <form action="index.jsp?ID=<%=ID%>" method="post" name=" hybridization" onsubmit="return false;">542 <form action="index.jsp?ID=<%=ID%>" method="post" name="bioassay" onsubmit="return false;"> 544 543 <input type="hidden" name="cmd" value="UpdateItem"> 545 544 546 545 <h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3> 547 546 <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*370)+"px;"%>" 548 position="bottom" remember="<%= hyb!= null%>" switch="switchTab"547 position="bottom" remember="<%=pba != null%>" switch="switchTab" 549 548 extensions="<%=invoker%>"> 550 <t:tab id="info" title=" Hybridization" validate="validateHybridization()" helpid="hybridization.edit">549 <t:tab id="info" title="Physical bioassay" validate="validatePhysicalBioAssay()" helpid="physicalbioassay.edit"> 551 550 <table class="form" cellspacing=0> 552 551 <tr> … … 554 553 <td><input <%=requiredClazz%> type="text" name="name" 555 554 value="<%=name%>" 556 size="40" maxlength="<%= Hybridization.MAX_NAME_LENGTH%>"></td>557 </tr> 558 <tr> 559 <td class="prompt"> Arrays</td>560 <td><input <%=requiredClazz%> type="text" name=" numArrays"561 value="<%= hyb == null ? Values.getString(cc.getPropertyValue("numArrays"), "1") : hyb.getNumArrays()%>"555 size="40" maxlength="<%=PhysicalBioAssay.MAX_NAME_LENGTH%>"></td> 556 </tr> 557 <tr> 558 <td class="prompt">Size</td> 559 <td><input <%=requiredClazz%> type="text" name="size" 560 value="<%=pba == null ? Values.getString(cc.getPropertyValue("size"), "1") : pba.getSize()%>" 562 561 size="12" maxlength="10" onkeypress="return Numbers.integerOnly(event)"></td> 563 562 </tr> … … 575 574 <td> 576 575 <base:button 577 onclick="<%="Dates.selectDate('Created', ' hybridization', 'event_date', null, '"+jsDateFormat+"')"%>"576 onclick="<%="Dates.selectDate('Created', 'bioassay', 'event_date', null, '"+jsDateFormat+"')"%>" 578 577 image="calendar.png" 579 578 title="Calendar…" … … 600 599 recent="<%=recentProtocols%>" 601 600 defaultitem="<%=defaultProtocol%>" 602 newitem="<%= hyb== null%>"601 newitem="<%=pba == null%>" 603 602 onselect="selectProtocolOnClick()" 604 603 onchange="protocolOnChange()" … … 613 612 clazz="selectionlist" 614 613 required="false" 615 current="<%=currentH ybStation%>"616 denied="<%=!readCurrentH ybStation%>"617 recent="<%=recent Stations%>"618 defaultitem="<%=defaultH ybStation%>"619 newitem="<%= hyb== null%>"620 onselect="selectH ybStationOnClick()"614 current="<%=currentHardware%>" 615 denied="<%=!readCurrentHardware%>" 616 recent="<%=recentHardware%>" 617 defaultitem="<%=defaultHardware%>" 618 newitem="<%=pba == null%>" 619 onselect="selectHardwareOnClick()" 621 620 /> 622 621 </td> … … 631 630 current="<%=currentArraySlide%>" 632 631 denied="<%=!readCurrentArraySlide%>" 633 newitem="<%= hyb== null%>"632 newitem="<%=pba == null%>" 634 633 onselect="selectArraySlideOnClick()" 635 634 onchange="arraySlideOnChange()" … … 641 640 <td nowrap> 642 641 <textarea <%=clazz%> rows="4" cols="40" name="description" wrap="virtual" 643 ><%=HTML.encodeTags( hyb == null ? cc.getPropertyValue("description") : hyb.getDescription())%></textarea>644 <a href="javascript:Main.zoom('Description', ' hybridization', 'description')"642 ><%=HTML.encodeTags(pba == null ? cc.getPropertyValue("description") : pba.getDescription())%></textarea> 643 <a href="javascript:Main.zoom('Description', 'bioassay', 'description')" 645 644 title="Edit in larger window"><base:icon image="zoom.gif" /></a> 646 645 </td> … … 650 649 </t:tab> 651 650 652 <t:tab id=" labeledExtracts" title="Labeled extracts" helpid="hybridization.labeledextracts">653 <input type="hidden" name="modified LabeledExtracts" value="">654 <input type="hidden" name="removed LabeledExtracts" value="">651 <t:tab id="extracts" title="Extracts" helpid="physicalbioassay.extracts"> 652 <input type="hidden" name="modifiedExtracts" value=""> 653 <input type="hidden" name="removedExtracts" value=""> 655 654 656 655 <table class="form" cellspacing=0> 657 656 <tr valign="top"> 658 <td class="prompt"> Labeled extracts</td>657 <td class="prompt">Extracts</td> 659 658 <td> 660 659 <table border="0" cellspacing="0" cellpadding="0"> 661 660 <tr valign="top"> 662 661 <td> 663 <select name=" labeled_extracts" size="5" multiple style="width: 20em;"664 onchange=" labeledExtractsOnChange()">662 <select name="extracts" size="5" multiple style="width: 20em;" 663 onchange="extractsOnChange()"> 665 664 </select> <br> 666 665 </td> … … 668 667 <table border="0"> 669 668 <tr><td width="150"><base:button 670 onclick="add LabeledExtractsOnClick()"671 title="Add labeled extracts…"672 tooltip="Add labeledextracts"669 onclick="addExtractsOnClick()" 670 title="Add extracts…" 671 tooltip="Add extracts" 673 672 /></td></tr> 674 673 <tr><td width="150"><base:button 675 674 onclick="removeOnClick()" 676 675 title="Remove" 677 tooltip="Remove the selected labeledextracts"676 tooltip="Remove the selected extracts" 678 677 /></td></tr> 679 678 </table> -
trunk/www/views/physicalbioassays/index.jsp
r5641 r5642 29 29 import="net.sf.basedb.core.Item" 30 30 import="net.sf.basedb.core.Include" 31 import="net.sf.basedb.core. Hybridization"31 import="net.sf.basedb.core.PhysicalBioAssay" 32 32 import="net.sf.basedb.core.ArraySlide" 33 33 import="net.sf.basedb.core.BioMaterialEvent" … … 75 75 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 76 76 <%! 77 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name, labeledExtracts,arraySlide,scans,description");78 private static final Item itemType = Item. HYBRIDIZATION;77 private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,extracts,arraySlide,scans,description"); 78 private static final Item itemType = Item.PHYSICALBIOASSAY; 79 79 80 80 private static void registerExportUtils(ItemContext cc) … … 85 85 86 86 // Register dataloaders 87 String hybridizationParameter = "hybridization";88 ItemQuery<Extract> labeledExtractQuery = Extract.getQuery();89 labeledExtractQuery.include(cc.getInclude());90 labeledExtractQuery.join(Hql.innerJoin("sourceEvents", "srcevt"));91 labeledExtractQuery.join(Hql.innerJoin("srcevt", "event", "evt"));92 labeledExtractQuery.restrict(Restrictions.eq(Hql.property("evt", "hybridization"), Expressions.parameter(hybridizationParameter)));93 labeledExtractQuery.order(Orders.asc(Hql.property("name")));94 cc.setObject("export.dataloader.&creationEvent.sourceBioMaterials(name)", new ItemQueryLoader( labeledExtractQuery, hybridizationParameter));87 String bioassayParameter = "bioassay"; 88 ItemQuery<Extract> extractQuery = Extract.getQuery(); 89 extractQuery.include(cc.getInclude()); 90 extractQuery.join(Hql.innerJoin("sourceEvents", "srcevt")); 91 extractQuery.join(Hql.innerJoin("srcevt", "event", "evt")); 92 extractQuery.restrict(Restrictions.eq(Hql.property("evt", "physicalBioAssay"), Expressions.parameter(bioassayParameter))); 93 extractQuery.order(Orders.asc(Hql.property("name"))); 94 cc.setObject("export.dataloader.&creationEvent.sourceBioMaterials(name)", new ItemQueryLoader(extractQuery, bioassayParameter)); 95 95 96 96 ItemQuery<Scan> scanQuery = Scan.getQuery(); 97 97 scanQuery.include(cc.getInclude()); 98 scanQuery.restrict(Restrictions.eq(Hql.property("hybridization"), Expressions.parameter( hybridizationParameter)));98 scanQuery.restrict(Restrictions.eq(Hql.property("hybridization"), Expressions.parameter(bioassayParameter))); 99 99 scanQuery.order(Orders.asc(Hql.property("name"))); 100 cc.setObject("export.dataloader.&scans(name)", new ItemQueryLoader(scanQuery, hybridizationParameter));100 cc.setObject("export.dataloader.&scans(name)", new ItemQueryLoader(scanQuery, bioassayParameter)); 101 101 } 102 102 %> … … 109 109 final String callback = request.getParameter("callback"); 110 110 final String itemId = request.getParameter("item_id"); 111 final String listPage = "list_ hybridizations.jsp?ID="+ID111 final String listPage = "list_bioassays.jsp?ID="+ID 112 112 +(mode == null ? "" : "&mode="+mode) 113 113 +(callback == null ? "" : "&callback="+callback) 114 114 +(itemId == null ? "" : "&item_id="+itemId); 115 final String viewPage = "view_ hybridization.jsp?ID="+ID;116 final String editPage = "edit_ hybridization.jsp?ID="+ID;115 final String viewPage = "view_bioassay.jsp?ID="+ID; 116 final String editPage = "edit_bioassay.jsp?ID="+ID; 117 117 118 118 String forward = null; … … 172 172 final int maxRecent = Base.getMaxRecent(sc); 173 173 dc = sc.newDbControl(); 174 Hybridization hyb = (Hybridization)cc.getObject("item");174 PhysicalBioAssay pba = (PhysicalBioAssay)cc.getObject("item"); 175 175 BioMaterialEvent creationEvent = null; 176 if ( hyb== null)177 { 178 hyb = Hybridization.getNew(dc);179 creationEvent = hyb.getCreationEvent();180 message = " Hybridizationcreated";181 dc.saveItem( hyb);176 if (pba == null) 177 { 178 pba = PhysicalBioAssay.getNew(dc); 179 creationEvent = pba.getCreationEvent(); 180 message = "Physical bioassay created"; 181 dc.saveItem(pba); 182 182 } 183 183 else 184 184 { 185 creationEvent = hyb.getCreationEvent();186 dc.reattachItem( hyb, false);185 creationEvent = pba.getCreationEvent(); 186 dc.reattachItem(pba, false); 187 187 dc.reattachItem(creationEvent, false); 188 message = " Hybridizationupdated";189 } 190 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(Item. HYBRIDIZATION), hyb);188 message = "Physical bioassay updated"; 189 } 190 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(Item.PHYSICALBIOASSAY), pba); 191 191 ExtensionsInvoker invoker = EditUtil.useOnSaveExtensions(jspContext); 192 192 try 193 193 { 194 hyb.setName(Values.getStringOrNull(request.getParameter("name")));195 hyb.setDescription(Values.getStringOrNull(request.getParameter("description")));196 hyb.setNumArrays(Values.getInt(request.getParameter("numArrays"), 1));194 pba.setName(Values.getStringOrNull(request.getParameter("name"))); 195 pba.setDescription(Values.getStringOrNull(request.getParameter("description"))); 196 pba.setSize(Values.getInt(request.getParameter("size"), 1)); 197 197 198 198 int arraySlideId = Values.getInt(request.getParameter("arrayslide_id"), -1); … … 200 200 { 201 201 ArraySlide slide = arraySlideId == 0 ? null : ArraySlide.getById(dc, arraySlideId); 202 hyb.setArraySlide(slide);202 pba.setArraySlide(slide); 203 203 } 204 204 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); … … 212 212 } 213 213 214 //H ybridization station215 int h ybStationId = Values.getInt(request.getParameter("hardware_id"), -1);216 if (h ybStationId >= 0) // < 0 denied or unchanged214 //Hardware 215 int hardwareId = Values.getInt(request.getParameter("hardware_id"), -1); 216 if (hardwareId >= 0) // < 0 denied or unchanged 217 217 { 218 Hardware hw = h ybStationId == 0 ? null : Hardware.getById(dc, hybStationId);218 Hardware hw = hardwareId == 0 ? null : Hardware.getById(dc, hardwareId); 219 219 creationEvent.setHardware(hw); 220 220 if (hw != null) cc.setRecent(hw, maxRecent); 221 221 } 222 222 223 // Labeled extracts224 String[] modified LabeledExtracts = Values.getString(request.getParameter("modifiedLabeledExtracts")).split(",");225 for (int i = 0; i < modified LabeledExtracts.length; ++i)223 // Extracts 224 String[] modifiedExtracts = Values.getString(request.getParameter("modifiedExtracts")).split(","); 225 for (int i = 0; i < modifiedExtracts.length; ++i) 226 226 { 227 int leId = Values.getInt(modifiedLabeledExtracts[i], -1);228 if ( leId != -1)227 int extractId = Values.getInt(modifiedExtracts[i], -1); 228 if (extractId != -1) 229 229 { 230 Extract le = Extract.getById(dc, leId);231 String[] extra = request.getParameter(" L"+leId).split(":");230 Extract e = Extract.getById(dc, extractId); 231 String[] extra = request.getParameter("E"+extractId).split(":"); 232 232 Float usedQuantity = Values.getFloat(extra[0], null); 233 233 int arrayIndex = extra.length > 1 ? Values.getInt(extra[1], 1) : 1; 234 creationEvent.addSource( le, usedQuantity);235 creationEvent.setSourceGroup( le, arrayIndex);234 creationEvent.addSource(e, usedQuantity); 235 creationEvent.setSourceGroup(e, arrayIndex); 236 236 } 237 237 } 238 String[] removed LabeledExtracts = Values.getString(request.getParameter("removedLabeledExtracts")).split(",");239 for (int i = 0; i < removed LabeledExtracts.length; ++i)238 String[] removedExtracts = Values.getString(request.getParameter("removedExtracts")).split(","); 239 for (int i = 0; i < removedExtracts.length; ++i) 240 240 { 241 int leId = Values.getInt(removedLabeledExtracts[i], -1);242 if ( leId != -1) creationEvent.removeSource(Extract.getById(dc, leId));241 int extractId = Values.getInt(removedExtracts[i], -1); 242 if (extractId != -1) creationEvent.removeSource(Extract.getById(dc, extractId)); 243 243 } 244 244 245 245 // Annotations tab 246 Base.updateAnnotations(dc, hyb, hyb, request);246 Base.updateAnnotations(dc, pba, pba, request); 247 247 248 248 // OnSave extensions … … 354 354 // Run an export plugin in a list context 355 355 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 356 final ItemQuery< Hybridization> query = Hybridization.getQuery();356 final ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery(); 357 357 registerExportUtils(cc); 358 358 dc = sc.newDbControl(); … … 360 360 dc.close(); 361 361 cc.setQuery(query); 362 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+ hybridizations";362 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+physical+bioassays"; 363 363 } 364 364 else if ("ExportItem".equals(cmd)) … … 367 367 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 368 368 registerExportUtils(cc); 369 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Export+ hybridization";369 redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Export+physical+bioassay"; 370 370 } 371 371 else if ("ImportItems".equals(cmd)) … … 373 373 // Run an import plugin in a list context 374 374 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 375 final ItemQuery< Hybridization> query = Hybridization.getQuery();375 final ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery(); 376 376 dc = sc.newDbControl(); 377 377 cc.configureQuery(dc, query, true); 378 378 dc.close(); 379 379 cc.setQuery(query); 380 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+ hybrydizations";380 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+physical+bioassays"; 381 381 } 382 382 else if ("ImportItem".equals(cmd)) … … 384 384 // Run an import plugin in single-item context 385 385 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 386 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Import+ hybridization";386 redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Import+physical+bioassay"; 387 387 } 388 388 else if ("RunListPlugin".equals(cmd)) … … 390 390 // Run another plugin in a list context 391 391 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 392 final ItemQuery< Hybridization> query = Hybridization.getQuery();392 final ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery(); 393 393 dc = sc.newDbControl(); 394 394 cc.configureQuery(dc, query, true); -
trunk/www/views/physicalbioassays/list_bioassays.jsp
r5641 r5642 28 28 import="net.sf.basedb.core.DbControl" 29 29 import="net.sf.basedb.core.Item" 30 import="net.sf.basedb.core. Hybridization"30 import="net.sf.basedb.core.PhysicalBioAssay" 31 31 import="net.sf.basedb.core.Extract" 32 32 import="net.sf.basedb.core.Tag" … … 76 76 <%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> 77 77 <%! 78 private static final Item itemType = Item. HYBRIDIZATION;78 private static final Item itemType = Item.PHYSICALBIOASSAY; 79 79 private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); 80 80 %> … … 87 87 final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); 88 88 final String callback = request.getParameter("callback"); 89 final String title = mode.generateTitle(" hybridization", "hybridizations");89 final String title = mode.generateTitle("physical bioassay", "physical bioassays"); 90 90 final DbControl dc = sc.newDbControl(); 91 ItemResultIterator< Hybridization> hybridizations = null;91 ItemResultIterator<PhysicalBioAssay> bioAssays = null; 92 92 ItemResultList<AnnotationType> annotationTypes = null; 93 93 try … … 95 95 final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType); 96 96 97 // Query for labeled extracts relatated to the current hybridization98 final ItemQuery<Extract> labeledExtractQuery = Extract.getQuery();99 labeledExtractQuery.include(cc.getInclude());100 labeledExtractQuery.join(Hql.innerJoin("sourceEvents", "srcevt"));101 labeledExtractQuery.join(Hql.innerJoin("srcevt", "event", "evt"));102 labeledExtractQuery.restrict(Restrictions.eq(Hql.property("evt", "hybridization"), Expressions.parameter("hybridization")));103 labeledExtractQuery.order(Orders.asc(Hql.property("srcevt", "sourceGroup")));104 labeledExtractQuery.order(Orders.asc(Hql.property("name")));97 // Query for extracts relatated to the current bioassay 98 final ItemQuery<Extract> extractQuery = Extract.getQuery(); 99 extractQuery.include(cc.getInclude()); 100 extractQuery.join(Hql.innerJoin("sourceEvents", "srcevt")); 101 extractQuery.join(Hql.innerJoin("srcevt", "event", "evt")); 102 extractQuery.restrict(Restrictions.eq(Hql.property("evt", "physicalBioAssay"), Expressions.parameter("bioAssay"))); 103 extractQuery.order(Orders.asc(Hql.property("srcevt", "sourceGroup"))); 104 extractQuery.order(Orders.asc(Hql.property("name"))); 105 105 106 106 // Query for scans relatated to the current hybridization … … 115 115 try 116 116 { 117 final ItemQuery< Hybridization> query = Base.getConfiguredQuery(dc, cc, true, Hybridization.getQuery(), mode);118 hybridizations = query.iterate(dc);117 final ItemQuery<PhysicalBioAssay> query = Base.getConfiguredQuery(dc, cc, true, PhysicalBioAssay.getQuery(), mode); 118 bioAssays = query.iterate(dc); 119 119 } 120 120 catch (Throwable t) … … 128 128 ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext); 129 129 %> 130 <base:page title="<%=title==null ? " Hybridizations" : title%>" type="<%=mode.getPageType()%>">130 <base:page title="<%=title==null ? "Physical bioassays" : title%>" type="<%=mode.getPageType()%>"> 131 131 <base:head scripts="menu.js,table.js" styles="menu.css,table.css"> 132 132 <ext:scripts context="<%=jspContext%>" /> … … 134 134 <script language="JavaScript"> 135 135 var submitPage = 'index.jsp'; 136 var formId = ' hybridizations';136 var formId = 'bioassays'; 137 137 function newItem() 138 138 { … … 185 185 function shareItem(itemId) 186 186 { 187 Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id='+itemId, 'Share Hybridizations', 600, 400);187 Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id='+itemId, 'ShareItem', 600, 400); 188 188 } 189 189 function shareItems() … … 226 226 %> 227 227 <tbl:table 228 id=" hybridizations"228 id="bioassays" 229 229 clazz="itemlist" 230 230 columns="<%=cc.getSetting("columns")%>" … … 266 266 /> 267 267 <tbl:columndef 268 id=" numArrays"269 property=" numArrays"268 id="size" 269 property="size" 270 270 datatype="int" 271 title=" Arrays/slide"271 title="Size" 272 272 sortable="true" 273 273 filterable="true" … … 275 275 /> 276 276 <tbl:columndef 277 id=" labeledExtracts"278 title=" Labeled extracts"277 id="extracts" 278 title="Extracts" 279 279 property="&creationEvent.sourceBioMaterials(name)" 280 280 datatype="string" … … 312 312 /> 313 313 <tbl:columndef 314 id="h ybStation"314 id="hardware" 315 315 property="creationEvent.hardware" 316 316 datatype="string" … … 409 409 onclick="newItem()" 410 410 title="New…" 411 tooltip="<%=createPermission ? "Create new hybridization" : "You do not have permission to create hybridizations"%>"411 tooltip="<%=createPermission ? "Create new physical bioassay" : "You do not have permission to create physical bioassays"%>" 412 412 /> 413 413 <tbl:button … … 468 468 page="<%=cc.getPage()%>" 469 469 rowsperpage="<%=cc.getRowsPerPage()%>" 470 totalrows="<%= hybridizations == null ? 0 : hybridizations.getTotalCount()%>"470 totalrows="<%=bioAssays == null ? 0 : bioAssays.getTotalCount()%>" 471 471 visible="<%=mode.hasNavigator()%>" 472 472 /> … … 507 507 int index = cc.getPage()*cc.getRowsPerPage(); 508 508 int selectedItemId = cc.getId(); 509 if ( hybridizations != null)509 if (bioAssays != null) 510 510 { 511 while ( hybridizations.hasNext())511 while (bioAssays.hasNext()) 512 512 { 513 Hybridization item = hybridizations.next();513 PhysicalBioAssay item = bioAssays.next(); 514 514 BioMaterialEvent creationEvent = item.getCreationEvent(); 515 515 int itemId = item.getId(); … … 568 568 title="<%=tooltip%>"><%=name%></div></tbl:cell> 569 569 <tbl:cell column="id"><%=item.getId()%></tbl:cell> 570 <tbl:cell column=" numArrays"><%=item.getNumArrays()%></tbl:cell>571 <tbl:cell column=" labeledExtracts">570 <tbl:cell column="size"><%=item.getSize()%></tbl:cell> 571 <tbl:cell column="extracts"> 572 572 <% 573 labeledExtractQuery.setParameter("hybridization", itemId, Type.INT);573 extractQuery.setParameter("bioAssay", itemId, Type.INT); 574 574 try 575 575 { 576 576 String separator = ""; 577 boolean isMultiArrayHyb = item.getNumArrays() > 1;578 for (Extract le : labeledExtractQuery.list(dc))577 boolean needIndex = item.getSize() > 1; 578 for (Extract extract : extractQuery.list(dc)) 579 579 { 580 Tag label= null;581 boolean read Label= true;580 Tag tag = null; 581 boolean readTag = true; 582 582 try 583 583 { 584 label = le.getTag();584 tag = extract.getTag(); 585 585 } 586 586 catch (PermissionDeniedException ex) 587 587 { 588 read Label= false;588 readTag = false; 589 589 } 590 590 out.write(separator); 591 if ( isMultiArrayHyb)591 if (needIndex) 592 592 { 593 out.write(creationEvent.getSourceGroup( le) + ": ");593 out.write(creationEvent.getSourceGroup(extract) + ": "); 594 594 } 595 595 if (mode.hasPropertyLink()) 596 596 { 597 out.write(Base.getLinkedName(ID, le, false, mode.hasEditLink()));598 out.write(" (" + Base.getLinkedName(ID, label, !readLabel, mode.hasEditLink()) + ")");597 out.write(Base.getLinkedName(ID, extract, false, mode.hasEditLink())); 598 out.write(" (" + Base.getLinkedName(ID, tag, !readTag, mode.hasEditLink()) + ")"); 599 599 } 600 600 else 601 601 { 602 out.write(HTML.encodeTags( le.getName()));603 out.write(" (" + Base.getEncodedName( label, !readLabel) + ")");602 out.write(HTML.encodeTags(extract.getName())); 603 out.write(" (" + Base.getEncodedName(tag, !readTag) + ")"); 604 604 } 605 605 separator = ", "; … … 662 662 enablePropertyLink="<%=mode.hasPropertyLink()%>" 663 663 /></tbl:cell> 664 <tbl:cell column="h ybStation"664 <tbl:cell column="hardware" 665 665 ><base:propertyvalue 666 666 item="<%=creationEvent%>" … … 732 732 { 733 733 %> 734 <tbl:panel><%= hybridizations == null || hybridizations.getTotalCount() == 0 ? "No hybridizations were found" : "No hybridizations on this page. Please select another page!" %></tbl:panel>734 <tbl:panel><%=bioAssays == null || bioAssays.getTotalCount() == 0 ? "No physical bioassays were found" : "No physical bioassays on this page. Please select another page!" %></tbl:panel> 735 735 <% 736 736 } … … 741 741 page="<%=cc.getPage()%>" 742 742 rowsperpage="<%=cc.getRowsPerPage()%>" 743 totalrows="<%= hybridizations == null ? 0 : hybridizations.getTotalCount()%>"743 totalrows="<%=bioAssays == null ? 0 : bioAssays.getTotalCount()%>" 744 744 visible="<%=mode.hasNavigator()%>" 745 745 locked="true" … … 761 761 finally 762 762 { 763 if ( hybridizations != null) hybridizations.close();763 if (bioAssays != null) bioAssays.close(); 764 764 if (dc != null) dc.close(); 765 765 } -
trunk/www/views/physicalbioassays/view_bioassay.jsp
r5641 r5642 33 33 import="net.sf.basedb.core.AnnotationType" 34 34 import="net.sf.basedb.core.AnnotationSet" 35 import="net.sf.basedb.core. Hybridization"35 import="net.sf.basedb.core.PhysicalBioAssay" 36 36 import="net.sf.basedb.core.ArraySlide" 37 37 import="net.sf.basedb.core.BioMaterialEvent" … … 79 79 <%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> 80 80 <%! 81 private static final Item itemType = Item. HYBRIDIZATION;81 private static final Item itemType = Item.PHYSICALBIOASSAY; 82 82 private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); 83 83 %> … … 96 96 97 97 String title = null; 98 Hybridization hyb = Hybridization.getById(dc, itemId);99 BioMaterialEvent creationEvent = hyb.getCreationEvent();98 PhysicalBioAssay pba = PhysicalBioAssay.getById(dc, itemId); 99 BioMaterialEvent creationEvent = pba.getCreationEvent(); 100 100 101 final boolean usePermission = hyb.hasPermission(Permission.USE);102 final boolean writePermission = hyb.hasPermission(Permission.WRITE);103 final boolean deletePermission = hyb.hasPermission(Permission.DELETE);104 final boolean sharePermission = hyb.hasPermission(Permission.SET_PERMISSION);105 final boolean setOwnerPermission = hyb.hasPermission(Permission.SET_OWNER);106 final boolean isRemoved = hyb.isRemoved();107 final boolean isUsed = isRemoved && hyb.isUsed();101 final boolean usePermission = pba.hasPermission(Permission.USE); 102 final boolean writePermission = pba.hasPermission(Permission.WRITE); 103 final boolean deletePermission = pba.hasPermission(Permission.DELETE); 104 final boolean sharePermission = pba.hasPermission(Permission.SET_PERMISSION); 105 final boolean setOwnerPermission = pba.hasPermission(Permission.SET_OWNER); 106 final boolean isRemoved = pba.isRemoved(); 107 final boolean isUsed = isRemoved && pba.isUsed(); 108 108 final boolean deletePermanentlyPermission = deletePermission && !isUsed; 109 final boolean isOwner = hyb.isOwner();110 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, hyb);109 final boolean isOwner = pba.isOwner(); 110 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, pba); 111 111 ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext); 112 112 %> … … 122 122 function shareItem() 123 123 { 124 Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id=<%=itemId%>', 'Share Hybridization', 600, 400);124 Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id=<%=itemId%>', 'SharePhysicalBioAssay', 600, 400); 125 125 } 126 126 function deleteItem() … … 174 174 <p> 175 175 <p:path> 176 <p:pathelement title=" Hybridizations" href="<%="index.jsp?ID="+ID%>" />177 <p:pathelement title="<%=HTML.encodeTags( hyb.getName())%>" />176 <p:pathelement title="Physical bioassays" href="<%="index.jsp?ID="+ID%>" /> 177 <p:pathelement title="<%=HTML.encodeTags(pba.getName())%>" /> 178 178 </p:path> 179 179 <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false"> … … 187 187 onclick="editItem()" 188 188 title="Edit…" 189 tooltip="<%=writePermission ? "Edit this hybridization" : "You do not have permission to edit this hybridization"%>"189 tooltip="<%=writePermission ? "Edit this physical bioassay" : "You do not have permission to edit this physical bioassay"%>" 190 190 /> 191 191 <tbl:button … … 194 194 onclick="deleteItem()" 195 195 title="Delete" 196 visible="<%=! hyb.isRemoved()%>"197 tooltip="<%=deletePermission ? "Delete this hybridization" : "You do not have permission to delete this hybridization"%>"196 visible="<%=!pba.isRemoved()%>" 197 tooltip="<%=deletePermission ? "Delete this physical bioassay" : "You do not have permission to delete this physical bioassay"%>" 198 198 /> 199 199 <tbl:button … … 202 202 onclick="restoreItem()" 203 203 title="Restore" 204 visible="<%= hyb.isRemoved()%>"205 tooltip="<%=writePermission ? "Restore this hybridization" : "You do not have permission to restore this hybridization"%>"204 visible="<%=pba.isRemoved()%>" 205 tooltip="<%=writePermission ? "Restore this physical bioassay" : "You do not have permission to restore this physical bioassay"%>" 206 206 /> 207 207 <tbl:button … … 210 210 onclick="shareItem()" 211 211 title="Share…" 212 tooltip="<%=sharePermission ? "Share this hybridization to other user, groups and projects" : "You do not have permission to share this hybridization"%>"212 tooltip="<%=sharePermission ? "Share this physical bioassay to other user, groups and projects" : "You do not have permission to share this physical bioassay"%>" 213 213 /> 214 214 <tbl:button … … 251 251 <tbl:button 252 252 image="help.gif" 253 onclick="<%="Main.openHelp('" + ID +"', ' hybridization.view.properties')"%>"253 onclick="<%="Main.openHelp('" + ID +"', 'physicalbioassay.view.properties')"%>" 254 254 title="Help…" 255 255 tooltip="Get help about this page" … … 257 257 </tbl:toolbar> 258 258 <div class="boxedbottom"> 259 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames( hyb)%></i></div>259 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(pba)%></i></div> 260 260 <% 261 if ( hyb.isRemoved() || hyb.isShared())261 if (pba.isRemoved() || pba.isShared()) 262 262 { 263 263 %> … … 273 273 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 274 274 <base:icon image="shared.gif" 275 visible="<%= hyb.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon>275 visible="<%=pba.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 276 276 </div> 277 277 <% … … 281 281 <tr> 282 282 <td class="prompt">Name</td> 283 <td><%=HTML.encodeTags( hyb.getName())%></td>284 </tr> 285 <tr> 286 <td class="prompt"> Arrays</td>287 <td><%= hyb.getNumArrays()%></td>283 <td><%=HTML.encodeTags(pba.getName())%></td> 284 </tr> 285 <tr> 286 <td class="prompt">Size</td> 287 <td><%=pba.getSize()%></td> 288 288 </tr> 289 289 <tr> 290 290 <td class="prompt">Array slide</td> 291 <td><base:propertyvalue item="<%= hyb%>" property="arraySlide" /></td>291 <td><base:propertyvalue item="<%=pba%>" property="arraySlide" /></td> 292 292 </tr> 293 293 <tr> 294 294 <td class="subprompt">-barcode</td> 295 <td><base:propertyvalue item="<%= hyb%>" property="arraySlide.barcode" /></td>295 <td><base:propertyvalue item="<%=pba%>" property="arraySlide.barcode" /></td> 296 296 </tr> 297 297 <tr> … … 313 313 <tr> 314 314 <td class="prompt">Owner</td> 315 <td><base:propertyvalue item="<%= hyb%>" property="owner" /></td>315 <td><base:propertyvalue item="<%=pba%>" property="owner" /></td> 316 316 </tr> 317 317 <tr> 318 318 <td class="prompt">Description</td> 319 <td><%=HTML.niceFormat( hyb.getDescription())%></td>319 <td><%=HTML.niceFormat(pba.getDescription())%></td> 320 320 </tr> 321 321 </table> 322 322 323 323 <% 324 ItemQuery<Extract> labeledExtractsQuery = (ItemQuery<Extract>)creationEvent.getSources();325 labeledExtractsQuery.include(Include.ALL);326 labeledExtractsQuery.order(Orders.asc(Hql.property("srcevt", "sourceGroup")));327 labeledExtractsQuery.order(Orders.asc(Hql.property("name")));328 ItemResultList<Extract> labeledExtracts = labeledExtractsQuery.list(dc);329 if ( labeledExtracts.size() == 0)330 { 331 %> 332 <h4> Labeled extracts</h4>333 No labeled extracts has been added to this hybridization324 ItemQuery<Extract> extractsQuery = (ItemQuery<Extract>)creationEvent.getSources(); 325 extractsQuery.include(Include.ALL); 326 extractsQuery.order(Orders.asc(Hql.property("srcevt", "sourceGroup"))); 327 extractsQuery.order(Orders.asc(Hql.property("name"))); 328 ItemResultList<Extract> extracts = extractsQuery.list(dc); 329 if (extracts.size() == 0) 330 { 331 %> 332 <h4>Extracts</h4> 333 No extracts has been added to this physical bioassay 334 334 (or, you don't have permission to view them). 335 335 <% … … 339 339 %> 340 340 <base:section 341 id=" labeledExtractSection"342 title="<%=" Labeled extracts (" + labeledExtracts.size() + ")"%>"341 id="extractSection" 342 title="<%="Extracts (" + extracts.size() + ")"%>" 343 343 context="<%=cc%>" 344 344 > 345 345 <tbl:table 346 id=" labeledextracts"346 id="extracts" 347 347 clazz="itemlist" 348 348 columns="all" 349 349 > 350 350 <tbl:columndef 351 id=" arrayNum"352 title=" Array"353 show="<%= hyb.getNumArrays() > 1 ? "always" : "never"%>"351 id="position" 352 title="Position" 353 show="<%=pba.getSize() > 1 ? "always" : "never"%>" 354 354 /> 355 355 <tbl:columndef … … 358 358 /> 359 359 <tbl:columndef 360 id=" label"361 title=" Label"360 id="tag" 361 title="Tag" 362 362 /> 363 363 <tbl:columndef … … 374 374 <tbl:rows> 375 375 <% 376 for (Extract item : labeledExtracts)376 for (Extract item : extracts) 377 377 { 378 378 %> 379 379 <tbl:row> 380 <tbl:cell column=" arrayNum"><%=creationEvent.getSourceGroup(item)%></tbl:cell>380 <tbl:cell column="position"><%=creationEvent.getSourceGroup(item)%></tbl:cell> 381 381 <tbl:cell column="name"><base:icon 382 382 image="deleted.gif" … … 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="tag" /></tbl:cell>386 <tbl:cell column="tag"><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> … … 400 400 401 401 <% 402 ItemQuery<Scan> scanQuery = (ItemQuery<Scan>) hyb.getScans();402 ItemQuery<Scan> scanQuery = (ItemQuery<Scan>)pba.getScans(); 403 403 scanQuery.include(Include.ALL); 404 404 scanQuery.order(Orders.asc(Hql.property("name"))); … … 469 469 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 470 470 <jsp:param name="item_id" value="<%=itemId%>" /> 471 <jsp:param name="title" value="Other items related to this hybridization" />471 <jsp:param name="title" value="Other items related to this physical bioassay" /> 472 472 </jsp:include> 473 473 <% 474 474 // Tables with users/groups/projects that this item is shared to 475 MultiPermissions mp = new MultiPermissions(Collections.singleton( hyb));475 MultiPermissions mp = new MultiPermissions(Collections.singleton(pba)); 476 476 ItemResultList<User> users = mp.getUsers().list(dc); 477 477 ItemResultList<Group> groups = mp.getGroups().list(dc); -
trunk/www/views/scans/edit_scan.jsp
r5630 r5642 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Scan" 36 import="net.sf.basedb.core. Hybridization"36 import="net.sf.basedb.core.PhysicalBioAssay" 37 37 import="net.sf.basedb.core.Protocol" 38 38 import="net.sf.basedb.core.Project" … … 71 71 72 72 boolean readCurrentHybridization = true; 73 HybridizationcurrentHybridization = null;73 PhysicalBioAssay currentHybridization = null; 74 74 boolean readCurrentProtocol = true; 75 75 Protocol currentProtocol = null; … … 82 82 List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL); 83 83 List<Hardware> recentScanners = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE); 84 List< Hybridization> recentHybridizations = (List<Hybridization>)cc.getRecent(dc, Item.HYBRIDIZATION);84 List<PhysicalBioAssay> recentHybridizations = (List<PhysicalBioAssay>)cc.getRecent(dc, Item.PHYSICALBIOASSAY); 85 85 86 86 int activeProjectId = sc.getActiveProjectId(); … … 120 120 if (hybridizationId != 0) 121 121 { 122 currentHybridization = Hybridization.getById(dc, hybridizationId);122 currentHybridization = PhysicalBioAssay.getById(dc, hybridizationId); 123 123 } 124 124 else if (cc.getPropertyFilter("hybridization.name") != null) 125 125 { 126 currentHybridization = Base.getFirstMatching(dc, Hybridization.getQuery(), "name", cc.getPropertyFilter("hybridization.name"));126 currentHybridization = Base.getFirstMatching(dc, PhysicalBioAssay.getQuery(), "name", cc.getPropertyFilter("hybridization.name")); 127 127 } 128 128 … … 257 257 var parents = new Array(); 258 258 var hybridizationId = Math.abs(parseInt(frm.hybridization_id[frm.hybridization_id.selectedIndex].value)); 259 if (hybridizationId > 0) parents[parents.length] = ' HYBRIDIZATION:'+hybridizationId;259 if (hybridizationId > 0) parents[parents.length] = 'PHYSICALBIOASSAY:'+hybridizationId; 260 260 return parents; 261 261 } … … 324 324 { 325 325 var frm = document.forms['scan']; 326 var url = '../ hybridizations/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setHybridizationCallback';326 var url = '../physicalbioassays/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setHybridizationCallback'; 327 327 if (frm.hybridization_id.length > 0) 328 328 { -
trunk/www/views/scans/index.jsp
r5590 r5642 30 30 import="net.sf.basedb.core.Include" 31 31 import="net.sf.basedb.core.Scan" 32 import="net.sf.basedb.core. Hybridization"32 import="net.sf.basedb.core.PhysicalBioAssay" 33 33 import="net.sf.basedb.core.Protocol" 34 34 import="net.sf.basedb.core.Hardware" … … 162 162 if (scan == null) 163 163 { 164 scan = Scan.getNew(dc, Hybridization.getById(dc, hybridizationId));164 scan = Scan.getNew(dc, PhysicalBioAssay.getById(dc, hybridizationId)); 165 165 message = "Scan created"; 166 166 dc.saveItem(scan); … … 193 193 if (hybridizationId >= 0) // < 0 = denied or unchanged 194 194 { 195 Hybridization hyb = hybridizationId == 0 ? null : Hybridization.getById(dc, hybridizationId);195 PhysicalBioAssay hyb = hybridizationId == 0 ? null : PhysicalBioAssay.getById(dc, hybridizationId); 196 196 scan.setHybridization(hyb); 197 197 if (hyb != null) cc.setRecent(hyb, maxRecent); -
trunk/www/views/scans/view_scan.jsp
r5502 r5642 37 37 import="net.sf.basedb.core.Protocol" 38 38 import="net.sf.basedb.core.Hardware" 39 import="net.sf.basedb.core. Hybridization"39 import="net.sf.basedb.core.PhysicalBioAssay" 40 40 import="net.sf.basedb.core.User" 41 41 import="net.sf.basedb.core.Group" … … 291 291 </tr> 292 292 <tr> 293 <td class="prompt"> Hybridization</td>293 <td class="prompt">Physical bioassay</td> 294 294 <td><base:propertyvalue item="<%=scan%>" property="hybridization" /></td> 295 295 </tr>
Note: See TracChangeset
for help on using the changeset viewer.