Changeset 2381
- Timestamp:
- Nov 14, 2007, 11:40:46 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 303 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/api/core/src/org/proteios/core/AbstractEntityQuery.java
r1916 r2381 161 161 @throws UnsupportedOperationException Always 162 162 */ 163 @Override 163 164 public void select(Select select) 164 165 { … … 169 170 @throws UnsupportedOperationException Always 170 171 */ 172 @Override 171 173 public void selectPermanent(Select select) 172 174 { … … 178 180 @throws UnsupportedOperationException Always 179 181 */ 182 @Override 180 183 public void group(Expression expression) 181 184 { … … 186 189 @throws UnsupportedOperationException Always 187 190 */ 191 @Override 188 192 public void groupPermanent(Expression expression) 189 193 { … … 195 199 @throws UnsupportedOperationException Always 196 200 */ 201 @Override 197 202 public void having(Restriction restriction) 198 203 { … … 203 208 @throws UnsupportedOperationException Always 204 209 */ 210 @Override 205 211 public void havingPermanent(Restriction restriction) 206 212 { … … 234 240 clear cached queries. 235 241 */ 242 @Override 236 243 public void reset() 237 244 { -
trunk/api/core/src/org/proteios/core/Acquisition.java
r1916 r2381 27 27 import org.proteios.core.data.AcquisitionData; 28 28 import org.proteios.core.data.InstrumentConfigurationData; 29 import org.proteios.core.data.PeakListData;30 29 31 30 /** … … 89 88 * </ul> 90 89 */ 90 @Override 91 91 public boolean isUsed() 92 92 throws BaseException … … 182 182 public void setPeakList(PeakList peakList) 183 183 { 184 getData().setPeakList( (PeakListData)peakList.getData());184 getData().setPeakList(peakList.getData()); 185 185 } 186 186 } -
trunk/api/core/src/org/proteios/core/Annotation.java
r1916 r2381 98 98 * Always return FALSE. 99 99 */ 100 @Override 100 101 public boolean isUsed() 101 102 throws BaseException … … 110 111 * the logged in user has WRITE permission on the associated item. 111 112 */ 113 @Override 112 114 void initPermissions(int granted, int denied) 113 115 throws BaseException … … 143 145 getData().getAnnotationSet()); 144 146 } 145 else 146 { 147 return annotationSet; 148 } 147 return annotationSet; 149 148 } 150 149 -
trunk/api/core/src/org/proteios/core/AnnotationBetweenRestriction.java
r1916 r2381 82 82 ------------------------------------------- 83 83 */ 84 @Override 84 85 String getRestrictionSql(Query query, DbControl dc) 85 86 throws BaseException … … 89 90 } 90 91 92 @Override 91 93 void setRestrictionParameters(SQLQuery query) 92 94 { -
trunk/api/core/src/org/proteios/core/AnnotationInRestriction.java
r1916 r2381 77 77 ------------------------------------------- 78 78 */ 79 @Override 79 80 String getRestrictionSql(Query query, DbControl dc) 80 81 throws BaseException … … 84 85 } 85 86 87 @Override 86 88 void setRestrictionParameters(SQLQuery query) 87 89 { -
trunk/api/core/src/org/proteios/core/AnnotationSet.java
r1916 r2381 124 124 * deleted. 125 125 */ 126 @Override 126 127 public boolean isUsed() 127 128 throws BaseException … … 136 137 * the logged in user has WRITE permission on the associated item. 137 138 */ 139 @Override 138 140 void initPermissions(int granted, int denied) 139 141 throws BaseException -
trunk/api/core/src/org/proteios/core/AnnotationSimpleRestriction.java
r1916 r2381 100 100 ------------------------------------------- 101 101 */ 102 @Override 102 103 String getRestrictionSql(Query query, DbControl dc) 103 104 throws BaseException … … 107 108 } 108 109 110 @Override 109 111 void setRestrictionParameters(SQLQuery query) 110 112 { -
trunk/api/core/src/org/proteios/core/AnnotationType.java
r1916 r2381 109 109 * </ul> 110 110 */ 111 @Override 111 112 public boolean isUsed() 112 113 throws BaseException -
trunk/api/core/src/org/proteios/core/Application.java
r2351 r2381 664 664 * From the TimerTask class ------------------------------------------- 665 665 */ 666 @Override 666 667 public void run() 667 668 { -
trunk/api/core/src/org/proteios/core/BasicBatcher.java
r1916 r2381 203 203 Close all open SQL statements. 204 204 */ 205 @Override 205 206 void onBeforeClose() 206 207 throws BaseException -
trunk/api/core/src/org/proteios/core/BasicItem.java
r1916 r2381 130 130 ------------------------------------------- 131 131 */ 132 @Override 132 133 public String toString() 133 134 { … … 145 146 @see BasicData#equals(Object) 146 147 */ 148 @Override 147 149 public final boolean equals(Object o) 148 150 { … … 159 161 @see BasicData#hashCode() 160 162 */ 163 @Override 161 164 public final int hashCode() 162 165 { -
trunk/api/core/src/org/proteios/core/BioMaterial.java
r2145 r2381 91 91 public void addFile(File file) 92 92 { 93 ( (FileData)file.getData()).getBioMaterials().add(this.getData());94 getData().getFiles().add( (FileData)file.getData());93 (file.getData()).getBioMaterials().add(this.getData()); 94 getData().getFiles().add(file.getData()); 95 95 } 96 96 … … 135 135 while (it.hasNext()) 136 136 { 137 fileDataSet.add( (FileData)it.next().getData());137 fileDataSet.add(it.next().getData()); 138 138 } 139 139 getData().setFiles(fileDataSet); -
trunk/api/core/src/org/proteios/core/BioMaterialEvent.java
r2287 r2381 31 31 import org.proteios.core.query.Hql; 32 32 import org.proteios.core.query.Restrictions; 33 34 33 import java.util.Date; 35 34 import java.util.HashMap; … … 116 115 * @return Always false 117 116 */ 117 @Override 118 118 public boolean isUsed() 119 119 throws BaseException … … 126 126 * Return used guantity to biomaterials on delete action. 127 127 */ 128 @Override 128 129 void onBeforeCommit(Transactional.Action action) 129 130 throws BaseException … … 142 143 * biomaterial. 143 144 */ 145 @Override 144 146 void initPermissions(int granted, int denied) 145 147 throws BaseException … … 164 166 * first of multiple sources 165 167 */ 168 @Override 166 169 SharedData getSharedParent() 167 170 { … … 287 290 // userData.checkPermission(Permission.USE); 288 291 // getData().setUser((UserData) user.getData()); 289 getData().setUser( (UserData)userData);292 getData().setUser(userData); 290 293 } 291 294 … … 366 369 return getUsedQuantity(); 367 370 } 368 else 369 { 370 UsedQuantity used = getData().getSources().get( 371 (MeasuredBioMaterialData) bioMaterial.getData()); 372 return used == null ? null : used.getUsedQuantity(); 373 } 371 UsedQuantity used = getData().getSources().get( 372 bioMaterial.getData()); 373 return used == null ? null : used.getUsedQuantity(); 374 374 } 375 375 … … 677 677 } 678 678 679 /** 680 * This function returns the previous event that is directly linked to this event. 681 * It can be used for linking series of separation events and possibly more 679 680 /** 681 * This function returns the previous event that is directly linked to this 682 * event. It can be used for linking series of separation events and 683 * possibly more 682 684 * 683 685 * @return Returns the previousBioMaterialEvent. … … 685 687 public BioMaterialEvent<?> getPreviousBioMaterialEvent() 686 688 { 687 return getDbControl().getItem( 688 BioMaterialEvent.class, getData().getPreviousBioMaterialEvent()); 689 } 690 691 692 /** 693 * This function sets the previous event that is directly linked to this event. 694 * It can be used for linking series of separation events and possibly more 689 return getDbControl().getItem(BioMaterialEvent.class, 690 getData().getPreviousBioMaterialEvent()); 691 } 692 693 694 /** 695 * This function sets the previous event that is directly linked to this 696 * event. It can be used for linking series of separation events and 697 * possibly more 695 698 * 696 699 * @param previousBioMaterialEvent The previousBioMaterialEvent to set. … … 702 705 previousBioMaterialEvent.getData()); 703 706 } 704 707 705 708 /** 706 709 * The type of the event. … … 761 764 762 765 766 @Override 763 767 public String toString() 764 768 { -
trunk/api/core/src/org/proteios/core/BioSource.java
r1916 r2381 99 99 * </ul> 100 100 */ 101 @Override 101 102 public boolean isUsed() 102 103 throws BaseException -
trunk/api/core/src/org/proteios/core/BooleanParameterType.java
r1916 r2381 58 58 ------------------------------------------- 59 59 */ 60 @Override 60 61 public String toString() 61 62 { -
trunk/api/core/src/org/proteios/core/ChildItem.java
r1916 r2381 69 69 is granted. 70 70 */ 71 @Override 71 72 void initPermissions(int granted, int denied) 72 73 throws BaseException -
trunk/api/core/src/org/proteios/core/Client.java
r1916 r2381 26 26 27 27 import org.proteios.core.data.ClientData; 28 import org.proteios.core.query.Expressions;29 import org.proteios.core.query.Hql;30 import org.proteios.core.query.Restrictions;31 28 32 29 /** … … 129 126 * deleted and aren't inclued in this check. 130 127 */ 128 @Override 131 129 public boolean isUsed() 132 130 throws BaseException -
trunk/api/core/src/org/proteios/core/ContextKey.java
r1916 r2381 58 58 object. They are equal if both have the same item and subcontext. 59 59 */ 60 @Override 60 61 public boolean equals(Object o) 61 62 { … … 71 72 Calculate the hash code for the object. 72 73 */ 74 @Override 73 75 public int hashCode() 74 76 { 75 return (int)53 * item.getValue() + 17 * subContext.hashCode();77 return 53 * item.getValue() + 17 * subContext.hashCode(); 76 78 } 77 79 } -
trunk/api/core/src/org/proteios/core/CreationEvent.java
r2116 r2381 110 110 * biomaterial is set. 111 111 */ 112 @Override 112 113 SharedData getSharedParent() 113 114 { … … 191 192 * biomaterial. 192 193 */ 194 @Override 193 195 void initPermissions(int granted, int denied) 194 196 throws BaseException -
trunk/api/core/src/org/proteios/core/DataProcessingStep.java
r2032 r2381 26 26 27 27 import org.proteios.core.data.DataProcessingStepData; 28 import org.proteios.core.data.SoftwareData;29 28 import java.util.Date; 30 29 import java.util.Set; … … 95 94 * </ul> 96 95 */ 96 @Override 97 97 public boolean isUsed() 98 98 throws BaseException … … 141 141 * @return the description of this data processing step 142 142 */ 143 @Override 143 144 public String getDescription() 144 145 { … … 158 159 * {@link #MAX_DESCRIPTION_LENGTH} 159 160 */ 161 @Override 160 162 public void setDescription(String description) 161 163 throws PermissionDeniedException, InvalidDataException … … 201 203 if (software == null) 202 204 throw new InvalidUseOfNullException("software"); 203 getData().setSoftware( (SoftwareData)software.getData());205 getData().setSoftware(software.getData()); 204 206 } 205 207 } -
trunk/api/core/src/org/proteios/core/DataResultIterator.java
r1916 r2381 63 63 64 64 /** 65 The class of the data objects returned by the query (and this object).66 */67 private final Class<I> dataClass;68 69 /**70 65 The type of items returned by the query. 71 66 */ … … 78 73 this.dc = dc; 79 74 this.sc = dc.getSessionControl(); 80 this.dataClass = dataClass;81 75 this.itemType = Item.fromDataClass(dataClass); 82 76 this.totalCount = totalCount; -
trunk/api/core/src/org/proteios/core/DatabaseException.java
r1977 r2381 24 24 */ 25 25 package org.proteios.core; 26 27 import org.hibernate.metadata.ClassMetadata;28 import org.proteios.core.data.BasicData;29 26 30 27 /** -
trunk/api/core/src/org/proteios/core/DateParameterType.java
r1916 r2381 66 66 ------------------------------------------- 67 67 */ 68 @Override 68 69 public String toString() 69 70 { -
trunk/api/core/src/org/proteios/core/DbControl.java
r2036 r2381 727 727 // To get the real instance we... 728 728 // 1. Find out the real data-layer class 729 realDataClass = (Class<? extends BasicData>)org.hibernate.proxy.HibernateProxyHelper729 realDataClass = org.hibernate.proxy.HibernateProxyHelper 730 730 .getClassWithoutInitializingProxy(data); 731 731 // 2. Initialise the proxy using the stateful session (the proxy … … 754 754 else 755 755 { 756 realDataClass = (Class<? extends BasicData>)data.getClass();756 realDataClass = data.getClass(); 757 757 } 758 758 // Check if the item is in the cache. … … 1010 1010 * Clean up if a bad client application forgot to close the connection. 1011 1011 */ 1012 @Override 1012 1013 protected void finalize() 1013 1014 throws Throwable -
trunk/api/core/src/org/proteios/core/DigestParameter.java
r1937 r2381 26 26 27 27 import org.proteios.core.data.DigestParameterData; 28 import org.proteios.core.data.SpectrumSearchData;29 30 28 import java.util.Set; 31 29 … … 95 93 * </ul> 96 94 */ 95 @Override 97 96 public boolean isUsed() 98 97 throws BaseException … … 125 124 { 126 125 getData().setSpectrumSearch( 127 (SpectrumSearchData)spectrumSearch.getData());126 spectrumSearch.getData()); 128 127 } 129 128 … … 159 158 * @return the name of this digest parameter 160 159 */ 160 @Override 161 161 public String getName() 162 162 { … … 174 174 * {@link #MAX_NAME_LENGTH} 175 175 */ 176 @Override 176 177 public void setName(String name) 177 178 throws InvalidDataException -
trunk/api/core/src/org/proteios/core/DoubleParameterType.java
r1916 r2381 85 85 ------------------------------------------- 86 86 */ 87 @Override 87 88 public String toString() 88 89 { -
trunk/api/core/src/org/proteios/core/Experiment.java
r1916 r2381 168 168 169 169 170 @Override 170 171 void onBeforeCommit(Transactional.Action action) 171 172 throws BaseException -
trunk/api/core/src/org/proteios/core/ExtendedProperties.java
r1916 r2381 165 165 className = className.substring(index+1); 166 166 } 167 List<ExtendedProperty> l = (List<ExtendedProperty>)properties.get(className);167 List<ExtendedProperty> l = properties.get(className); 168 168 return l; 169 169 } … … 176 176 private static void loadClasses(Document dom) 177 177 { 178 List<Element> classTags = (List<Element>)dom.getRootElement().getChildren("class");178 List<Element> classTags = dom.getRootElement().getChildren("class"); 179 179 for (Element el : classTags) 180 180 { … … 193 193 { 194 194 List<ExtendedProperty> properties = new ArrayList<ExtendedProperty>(); 195 List<Element> children = (List<Element>)classElement.getChildren("property");195 List<Element> children = classElement.getChildren("property"); 196 196 for (Element property : children) 197 197 { -
trunk/api/core/src/org/proteios/core/ExtendedPropertyAccessor.java
r1916 r2381 44 44 * <code>Setter</code> objects for each extended property of an 45 45 * <code>Extendable</code> item. These objects are then used to access the 46 * extended properties for all items via the <code>GetterSetter.get</code> 47 * and <code>GetterSetter.set</code> 48 * methods. 46 * extended properties for all items via the <code>GetterSetter.get</code> and 47 * <code>GetterSetter.set</code> methods. 49 48 * 50 49 * @author Nicklas, Samuel … … 52 51 * @see org.proteios.core.data.ExtendableData 53 52 * @see ExtendedProperty 54 * @see ExtendedProperties 53 * @see ExtendedProperties 55 54 */ 56 55 public final class ExtendedPropertyAccessor … … 77 76 return new GetterSetter(clazz, property); 78 77 } 79 else 80 { 81 throw new PropertyNotFoundException( 82 clazz.getName() + " is not Extendable"); 83 } 78 throw new PropertyNotFoundException( 79 clazz.getName() + " is not Extendable"); 84 80 } 85 81 … … 101 97 return new GetterSetter(clazz, property); 102 98 } 103 else 104 { 105 throw new PropertyNotFoundException( 106 clazz.getName() + " is not Extendable"); 107 } 99 throw new PropertyNotFoundException( 100 clazz.getName() + " is not Extendable"); 108 101 } 109 102 … … 118 111 implements Getter, Setter 119 112 { 120 private final Class clazz;121 113 private final String property; 122 114 … … 130 122 private GetterSetter(Class clazz, String property) 131 123 { 132 this.clazz = clazz;133 124 this.property = property; 134 125 } -
trunk/api/core/src/org/proteios/core/Extract.java
r2260 r2381 120 120 * </ul> 121 121 */ 122 @Override 122 123 public boolean isUsed() 123 124 throws BaseException -
trunk/api/core/src/org/proteios/core/File.java
r2313 r2381 193 193 * From the Nameable interface ------------------------------------------- 194 194 */ 195 @Override 195 196 public void setName(String name) 196 197 throws PermissionDeniedException, InvalidDataException -
trunk/api/core/src/org/proteios/core/FileMap.java
r1916 r2381 61 61 // We use a stack to temporary store filenodes 62 62 Stack<FileNode> stack = new Stack<FileNode>(); 63 int level = 0;64 63 for (String line : text.split("\n")) 65 64 { … … 141 140 if (node.getFileId() == fileId) 142 141 return node; 143 else 144 return findFileNodeById(node.getChildren(), fileId); 142 return findFileNodeById(node.getChildren(), fileId); 145 143 } 146 144 return null; -
trunk/api/core/src/org/proteios/core/FileNode.java
r1916 r2381 161 161 162 162 163 @Override 163 164 public String toString() 164 165 { -
trunk/api/core/src/org/proteios/core/FileParameterType.java
r1916 r2381 59 59 ------------------------------------------- 60 60 */ 61 @Override 61 62 public String toString() 62 63 { -
trunk/api/core/src/org/proteios/core/FileType.java
r1916 r2381 202 202 203 203 204 @Override 204 205 void initPermissions(int granted, int denied) 205 206 throws BaseException -
trunk/api/core/src/org/proteios/core/FloatParameterType.java
r1916 r2381 86 86 ------------------------------------------- 87 87 */ 88 @Override 88 89 public String toString() 89 90 { -
trunk/api/core/src/org/proteios/core/GelElectrophoresis.java
r2203 r2381 72 72 * ------------------------------------------- 73 73 */ 74 @Override 74 75 public Item getType() 75 76 { … … 97 98 * </ul> 98 99 */ 100 @Override 99 101 public boolean isUsed() 100 102 throws BaseException -
trunk/api/core/src/org/proteios/core/GelImageAnalysisEvent.java
r1982 r2381 25 25 26 26 import org.proteios.core.data.GelImageAnalysisEventData; 27 import org.proteios.core.data.HardwareConfigurationData;28 import org.proteios.core.data.SoftwareConfigurationData;29 27 import org.proteios.core.data.UserData; 30 28 import java.util.Date; … … 99 97 * ------------------------------------------- 100 98 */ 99 @Override 101 100 public Item getType() 102 101 { … … 126 125 * </ul> 127 126 */ 127 @Override 128 128 public boolean isUsed() 129 129 throws BaseException … … 191 191 throw new InvalidUseOfNullException("hardwareSettings"); 192 192 getData().setHardwareSettings( 193 (HardwareConfigurationData)hardwareSettings.getData());193 hardwareSettings.getData()); 194 194 } 195 195 … … 213 213 throw new InvalidUseOfNullException("softwareSettings"); 214 214 getData().setSoftwareSettings( 215 (SoftwareConfigurationData)softwareSettings.getData());215 softwareSettings.getData()); 216 216 } 217 217 } -
trunk/api/core/src/org/proteios/core/GelScanEvent.java
r2114 r2381 24 24 package org.proteios.core; 25 25 26 import org.proteios.core.data.GelElectrophoresisData;27 26 import org.proteios.core.data.GelScanEventData; 28 import org.proteios.core.data.HardwareConfigurationData;29 30 27 import java.util.Set; 31 28 … … 73 70 * ------------------------------------------- 74 71 */ 72 @Override 75 73 public Item getType() 76 74 { … … 100 98 * </ul> 101 99 */ 100 @Override 102 101 public boolean isUsed() 103 102 throws BaseException … … 131 130 { 132 131 getData().setSeparationMethod( 133 (GelElectrophoresisData)gelElectrophoresis.getData());132 gelElectrophoresis.getData()); 134 133 } 135 134 … … 173 172 throw new InvalidUseOfNullException("hardwareSettings"); 174 173 getData().setHardwareSettings( 175 (HardwareConfigurationData)hardwareSettings.getData());174 hardwareSettings.getData()); 176 175 } 177 176 } -
trunk/api/core/src/org/proteios/core/GlobalDefaultSetting.java
r1916 r2381 88 88 * READ permission is always granted. 89 89 */ 90 @Override 90 91 void initPermissions(int granted, int denied) 91 92 throws BaseException -
trunk/api/core/src/org/proteios/core/Group.java
r1916 r2381 189 189 * deleted and aren't included in this check. 190 190 */ 191 @Override 191 192 public boolean isUsed() 192 193 throws BaseException … … 208 209 * revoked. 209 210 */ 211 @Override 210 212 void initPermissions(int granted, int denied) 211 213 throws BaseException -
trunk/api/core/src/org/proteios/core/HardwareConfiguration.java
r1916 r2381 95 95 * </ul> 96 96 */ 97 @Override 97 98 public boolean isUsed() 98 99 throws BaseException -
trunk/api/core/src/org/proteios/core/HardwareType.java
r1916 r2381 116 116 * revoked. 117 117 */ 118 @Override 118 119 void initPermissions(int granted, int denied) 119 120 throws BaseException -
trunk/api/core/src/org/proteios/core/HibernateUtil.java
r1977 r2381 1114 1114 try 1115 1115 { 1116 return (List<T>)query.list();1116 return query.list(); 1117 1117 } 1118 1118 catch (Throwable ex) -
trunk/api/core/src/org/proteios/core/IPG.java
r2146 r2381 68 68 * ------------------------------------------- 69 69 */ 70 @Override 70 71 public Item getType() 71 72 { … … 95 96 * </ul> 96 97 */ 98 @Override 97 99 public boolean isUsed() 98 100 throws BaseException -
trunk/api/core/src/org/proteios/core/Install.java
r2326 r2381 97 97 timer = new TimerTask() 98 98 { 99 @Override 99 100 public void run() 100 101 { … … 217 218 218 219 220 @Override 219 221 public String toString() 220 222 { -
trunk/api/core/src/org/proteios/core/IntegerParameterType.java
r1916 r2381 86 86 ------------------------------------------- 87 87 */ 88 @Override 88 89 public String toString() 89 90 { -
trunk/api/core/src/org/proteios/core/InternalJobQueue.java
r1916 r2381 211 211 * in it's own thread. 212 212 */ 213 @Override 213 214 public void run() 214 215 { … … 517 518 * Never reload since everyting is static. 518 519 */ 520 @Override 519 521 boolean getReload() 520 522 { … … 527 529 * <code>itemType</code> = {@link Item#SYSTEM}, 0 otherwise. 528 530 */ 531 @Override 529 532 int getRolePermissions(Item itemType) 530 533 { … … 533 536 return systemPermissions; 534 537 } 535 else 536 { 537 return 0; 538 } 538 return 0; 539 539 } 540 540 … … 543 543 * Return 0. 544 544 */ 545 @Override 545 546 int getSharedPermissions(ShareableData sharableData) 546 547 { … … 552 553 * Return 0. 553 554 */ 555 @Override 554 556 int getAllPermissions(Item itemType, UserData owner, 555 557 ItemKeyData itemKey, ProjectKeyData projectKey) … … 562 564 * Return empty set. 563 565 */ 566 @Override 564 567 Set<Integer> getRoles() 565 568 { … … 571 574 * Return empty set. 572 575 */ 576 @Override 573 577 Set<Integer> getGroups() 574 578 { … … 580 584 * Return empty set. 581 585 */ 586 @Override 582 587 Set<Integer> getUsers() 583 588 { … … 589 594 * Return empty map. 590 595 */ 596 @Override 591 597 Map<Integer, Integer> getProjects() 592 598 { … … 598 604 * Return empty set. 599 605 */ 606 @Override 600 607 Set<Integer> getItemKeys() 601 608 { … … 607 614 * Return empty set. 608 615 */ 616 @Override 609 617 Set<Integer> getProjectKeys() 610 618 { -
trunk/api/core/src/org/proteios/core/Item.java
r2378 r2381 622 622 623 623 624 @Override 624 625 public String toString() 625 626 { … … 706 707 throw new ItemNotFoundException(itemClass + "[id=" + id + "]"); 707 708 } 708 else 709 { 710 try 709 try 710 { 711 return (BasicItem) getById.invoke(null, dc, id); 712 } 713 catch (Throwable ex) 714 { 715 Throwable cause = ex.getCause(); 716 if (cause instanceof BaseException) 711 717 { 712 return (BasicItem) getById.invoke(null, dc, id);718 throw (BaseException) cause; 713 719 } 714 catch (Throwable ex)720 else if (cause != null) 715 721 { 716 Throwable cause = ex.getCause(); 717 if (cause instanceof BaseException) 718 { 719 throw (BaseException) cause; 720 } 721 else if (cause != null) 722 { 723 throw new BaseException(cause); 724 } 725 else 726 { 727 throw new BaseException(ex); 728 } 722 throw new BaseException(cause); 723 } 724 else 725 { 726 throw new BaseException(ex); 729 727 } 730 728 } … … 819 817 if (data instanceof org.hibernate.proxy.HibernateProxy) 820 818 { 821 dataClass = (Class<? extends BasicData>)org.hibernate.proxy.HibernateProxyHelper819 dataClass = org.hibernate.proxy.HibernateProxyHelper 822 820 .getClassWithoutInitializingProxy(data); 823 821 } -
trunk/api/core/src/org/proteios/core/ItemContext.java
r1916 r2381 750 750 } 751 751 752 @Override 752 753 public String toString() 753 754 { -
trunk/api/core/src/org/proteios/core/ItemFactory.java
r2162 r2381 142 142 return item; 143 143 } 144 else 145 { 146 log.error("DbControl is not set or is null in ItemFactory"); 147 return null; 148 } 144 log.error("DbControl is not set or is null in ItemFactory"); 145 return null; 149 146 } 150 147 … … 596 593 throw new ItemNotFoundException("File[path=" + path + "]"); 597 594 } 598 else 599 { 600 Directory d = getByPath(path); 601 file = create(File.class); 602 file.setDirectory(d); 603 file.setName(path.getFilename()); 604 } 595 Directory d = getByPath(path); 596 file = create(File.class); 597 file.setDirectory(d); 598 file.setName(path.getFilename()); 605 599 } 606 600 else -
trunk/api/core/src/org/proteios/core/ItemKey.java
r1916 r2381 206 206 </ul> 207 207 */ 208 @Override 208 209 public boolean isUsed() 209 210 throws BaseException … … 223 224 permission is always granted. 224 225 */ 226 @Override 225 227 void initPermissions(int granted, int denied) 226 228 throws BaseException … … 373 375 return data.getId(); 374 376 } 375 else 376 { 377 if (tx != null) HibernateUtil.commit(tx); 378 return candidates.get(0); 379 } 377 if (tx != null) 378 HibernateUtil.commit(tx); 379 return candidates.get(0); 380 380 } 381 381 catch (BaseException ex) -
trunk/api/core/src/org/proteios/core/ItemParameterType.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/ItemResultList.java
r1916 r2381 83 83 return data.contains(((BasicItem)o).getData()); 84 84 } 85 else 86 { 87 return false; 88 } 85 return false; 89 86 } 90 87 /** … … 103 100 return data.indexOf(((BasicItem)o).getData()); 104 101 } 105 else 106 { 107 return -1; 108 } 102 return -1; 109 103 } 110 104 public int lastIndexOf(Object o) … … 114 108 return data.lastIndexOf(((BasicItem)o).getData()); 115 109 } 116 else 117 { 118 return -1; 119 } 110 return -1; 120 111 } 121 112 public boolean isEmpty() … … 179 170 ------------------------------------------- 180 171 */ 172 @Override 181 173 public boolean equals(Object o) 182 174 { … … 185 177 return data.equals(((ItemResultList)o).data); 186 178 } 187 else 188 { 189 return false; 190 } 179 return false; 191 180 } 192 181 182 @Override 193 183 public int hashCode() 194 184 { -
trunk/api/core/src/org/proteios/core/Job.java
r1916 r2381 191 191 * Return TRUE if the status is EXECUTING, FALSE otherwise. 192 192 */ 193 @Override 193 194 public boolean isUsed() 194 195 throws BaseException … … 961 962 962 963 964 @Override 963 965 public String toString() 964 966 { … … 1044 1046 1045 1047 1048 @Override 1046 1049 public String toString() 1047 1050 { … … 1128 1131 1129 1132 1133 @Override 1130 1134 public String toString() 1131 1135 { -
trunk/api/core/src/org/proteios/core/Keyring.java
r1916 r2381 754 754 extends TimerTask 755 755 { 756 @Override 756 757 public void run() 757 758 { -
trunk/api/core/src/org/proteios/core/Label.java
r1916 r2381 110 110 * </ul> 111 111 */ 112 @Override 112 113 public boolean isUsed() 113 114 throws BaseException -
trunk/api/core/src/org/proteios/core/LabeledExtract.java
r2260 r2381 112 112 </ul> 113 113 */ 114 @Override 114 115 public boolean isUsed() 115 116 throws BaseException -
trunk/api/core/src/org/proteios/core/Location.java
r1916 r2381 86 86 } 87 87 88 @Override 88 89 public String toString() 89 90 { -
trunk/api/core/src/org/proteios/core/LongParameterType.java
r1916 r2381 86 86 ------------------------------------------- 87 87 */ 88 @Override 88 89 public String toString() 89 90 { -
trunk/api/core/src/org/proteios/core/LsidElement.java
r1916 r2381 38 38 * were added, method setAccession_number(String acc) was changed from 39 39 * private to public, and CoreException was exchanged for BaseException. 40 * (2007-04-12/Olle M ånsson)40 * (2007-04-12/Olle M�nsson) 41 41 */ 42 42 import java.net.URL; … … 224 224 { 225 225 throw new BaseException(); 226 }227 else228 {229 BufferedReader in = new BufferedReader(230 new InputStreamReader(resolver.getData(dataport)));231 retval = in.readLine();232 in.close();233 226 } 227 BufferedReader in = new BufferedReader( 228 new InputStreamReader(resolver.getData(dataport))); 229 retval = in.readLine(); 230 in.close(); 234 231 } 235 232 catch (LSIDException e) -
trunk/api/core/src/org/proteios/core/MeasuredArea.java
r1954 r2381 24 24 package org.proteios.core; 25 25 26 import org.proteios.core.data.ExtractData;27 26 import org.proteios.core.data.MeasuredAreaData; 28 27 … … 84 83 * </ul> 85 84 */ 85 @Override 86 86 public boolean isUsed() 87 87 throws BaseException -
trunk/api/core/src/org/proteios/core/MeasuredBioMaterial.java
r2057 r2381 26 26 27 27 import org.proteios.core.data.BioMaterialEventData; 28 import org.proteios.core.data.CreationEventData;29 28 import org.proteios.core.data.MeasuredBioMaterialData; 30 29 … … 68 67 * </ul> 69 68 */ 69 @Override 70 70 public boolean isUsed() 71 71 throws BaseException … … 89 89 * Hibernate. 90 90 */ 91 @Override 91 92 void onBeforeCommit(Transactional.Action action) 92 93 throws BaseException … … 121 122 public void setCreationEvent(CreationEvent creationEvent) 122 123 { 123 getData().setCreationEvent( (CreationEventData)creationEvent.getData());124 getData().setCreationEvent(creationEvent.getData()); 124 125 } 125 126 … … 202 203 return; 203 204 } 204 else 205 { 206 remain = bioMaterial.getRemainingQuantity(); 207 } 205 remain = bioMaterial.getRemainingQuantity(); 208 206 } 209 207 bioMaterial.setRemainingQuantity(remain - usedQuantity); -
trunk/api/core/src/org/proteios/core/Message.java
r1916 r2381 197 197 A message is not used by other items. 198 198 */ 199 @Override 199 200 public boolean isUsed() 200 201 throws BaseException … … 206 207 is the same as the user the message is to. 207 208 */ 209 @Override 208 210 void initPermissions(int granted, int denied) 209 211 throws BaseException -
trunk/api/core/src/org/proteios/core/Metadata.java
r1916 r2381 331 331 } 332 332 333 @Override 333 334 public String toString() 334 335 { -
trunk/api/core/src/org/proteios/core/News.java
r1916 r2381 165 165 * Always return FALSE. A News item is not used by other items. 166 166 */ 167 @Override 167 168 public boolean isUsed() 168 169 throws BaseException … … 175 176 * Check that startDate is before newsDate is before endDate. 176 177 */ 178 @Override 177 179 void validate() 178 180 throws InvalidDataException, BaseException … … 200 202 * Read permission is granted if today is between the start and end date. 201 203 */ 204 @Override 202 205 void initPermissions(int granted, int denied) 203 206 throws BaseException -
trunk/api/core/src/org/proteios/core/ObservedModification.java
r1539 r2381 98 98 * </ul> 99 99 */ 100 @Override 100 101 public boolean isUsed() 101 102 throws BaseException -
trunk/api/core/src/org/proteios/core/Operator.java
r1916 r2381 39 39 AND(1, "AND", "AND", false) 40 40 { 41 @Override 41 42 public Restriction getRestriction(Expression lvalue, Expression rvalue) 42 43 throws InvalidDataException … … 48 49 OR(2, "OR", "OR", false) 49 50 { 51 @Override 50 52 public Restriction getRestriction(Expression lvalue, Expression rvalue) 51 53 throws InvalidDataException … … 57 59 NOT(3, "NOT", "NOT", false) 58 60 { 61 @Override 59 62 public Restriction getRestriction(Expression lvalue, Expression rvalue) 60 63 throws InvalidDataException … … 66 69 EQ(4, "=", "=", true) 67 70 { 71 @Override 68 72 public Restriction getRestriction(Expression lvalue, Expression rvalue) 69 73 throws InvalidDataException … … 75 79 NEQ(5, "!=", "!=", true) 76 80 { 81 @Override 77 82 public Restriction getRestriction(Expression lvalue, Expression rvalue) 78 83 throws InvalidDataException … … 84 89 LT(6, "<", "<", true) 85 90 { 91 @Override 86 92 public Restriction getRestriction(Expression lvalue, Expression rvalue) 87 93 throws InvalidDataException … … 93 99 LTEQ(7, "<=", "<=", true) 94 100 { 101 @Override 95 102 public Restriction getRestriction(Expression lvalue, Expression rvalue) 96 103 throws InvalidDataException … … 102 109 GT(8, ">", ">", true) 103 110 { 111 @Override 104 112 public Restriction getRestriction(Expression lvalue, Expression rvalue) 105 113 throws InvalidDataException … … 111 119 GTEQ(9, ">=", ">=", true) 112 120 { 121 @Override 113 122 public Restriction getRestriction(Expression lvalue, Expression rvalue) 114 123 throws InvalidDataException … … 120 129 LIKE(10, "LIKE", "LIKE", true) 121 130 { 131 @Override 122 132 public Restriction getRestriction(Expression lvalue, Expression rvalue) 123 133 throws InvalidDataException -
trunk/api/core/src/org/proteios/core/OwnedItem.java
r1916 r2381 77 77 @throws BaseException If there is another error 78 78 */ 79 @Override 79 80 void onBeforeCommit(Transactional.Action action) 80 81 throws NotLoggedInException, BaseException … … 94 95 SET_OWNER and SET_PERMISSION permission is granted. 95 96 */ 97 @Override 96 98 void initPermissions(int granted, int denied) 97 99 throws BaseException -
trunk/api/core/src/org/proteios/core/ParameterValuesImpl.java
r1916 r2381 117 117 return values.get(0); 118 118 } 119 else 120 { 121 return null; 122 } 119 return null; 123 120 } 124 121 -
trunk/api/core/src/org/proteios/core/Peak.java
r1916 r2381 26 26 27 27 import org.proteios.core.data.PeakData; 28 import org.proteios.core.data.PeakListData;29 28 30 29 /** … … 113 112 * </ul> 114 113 */ 114 @Override 115 115 public boolean isUsed() 116 116 throws BaseException … … 203 203 public void setPeakList(PeakList peakList) 204 204 { 205 getData().setPeakList( (PeakListData)peakList.getData());205 getData().setPeakList(peakList.getData()); 206 206 } 207 207 } -
trunk/api/core/src/org/proteios/core/PeakList.java
r1916 r2381 28 28 import org.proteios.core.data.PeakData; 29 29 import org.proteios.core.data.PeakListData; 30 import org.proteios.core.data.PeakListSetData;31 30 import org.proteios.core.data.PrecursorData; 32 31 import org.proteios.core.query.Hql; … … 136 135 * </ul> 137 136 */ 137 @Override 138 138 public boolean isUsed() 139 139 throws BaseException … … 166 166 throws BaseException 167 167 { 168 getData().setPeakListSet( (PeakListSetData)peakListSet.getData());168 getData().setPeakListSet(peakListSet.getData()); 169 169 } 170 170 … … 220 220 * @return the description of this peak list 221 221 */ 222 @Override 222 223 public String getDescription() 223 224 { … … 235 236 * {@link #MAX_DESCRIPTION_LENGTH} 236 237 */ 238 @Override 237 239 public void setDescription(String description) 238 240 throws InvalidDataException … … 667 669 for (int i = 0; i < arraySize; i++) 668 670 { 669 acquisitionDataList.add(i, (AcquisitionData)acquisitionList.get(i)671 acquisitionDataList.add(i, acquisitionList.get(i) 670 672 .getData()); 671 673 } 672 674 getData().setAcquisitionList( 673 (List<AcquisitionData>)acquisitionDataList);675 acquisitionDataList); 674 676 } 675 677 … … 744 746 for (int i = 0; i < arraySize; i++) 745 747 { 746 precursorDataList.add(i, (PrecursorData)precursorList.get(i)748 precursorDataList.add(i, precursorList.get(i) 747 749 .getData()); 748 750 } 749 getData().setPrecursorList( (List<PrecursorData>)precursorDataList);751 getData().setPrecursorList(precursorDataList); 750 752 } 751 753 -
trunk/api/core/src/org/proteios/core/PeakListSet.java
r1916 r2381 27 27 import org.proteios.core.data.DataProcessingStepData; 28 28 import org.proteios.core.data.HardwareConfigurationData; 29 import org.proteios.core.data.HardwareData;30 29 import org.proteios.core.data.InstrumentConfigurationData; 31 30 import org.proteios.core.data.PeakListData; … … 278 277 analyzersData.add(i, analyzers.get(i).getData()); 279 278 } 280 getData().setAnalyzers( (List<HardwareConfigurationData>)analyzersData);279 getData().setAnalyzers(analyzersData); 281 280 } 282 281 … … 314 313 throw new InvalidDataException( 315 314 "detector hardware not equal to instrument hardware"); 316 getData().setDetector( (HardwareConfigurationData)detector.getData());315 getData().setDetector(detector.getData()); 317 316 } 318 317 … … 348 347 if (instrument == null) 349 348 throw new InvalidUseOfNullException("instrument"); 350 getData().setInstrument( (HardwareData)instrument.getData());349 getData().setInstrument(instrument.getData()); 351 350 } 352 351 … … 385 384 "ionisationSource hardware not equal to instrument hardware"); 386 385 getData().setIonisationSource( 387 (HardwareConfigurationData)ionisationSource.getData());386 ionisationSource.getData()); 388 387 } 389 388 … … 477 476 { 478 477 dataProcessingStepDataList.add(i, 479 (DataProcessingStepData)dataProcessingStepList.get(i)478 dataProcessingStepList.get(i) 480 479 .getData()); 481 480 } 482 481 getData().setDataProcessingStepList( 483 (List<DataProcessingStepData>)dataProcessingStepDataList);482 dataProcessingStepDataList); 484 483 } 485 484 … … 493 492 { 494 493 getData().getDataProcessingStepList().add( 495 (DataProcessingStepData)dp.getData());494 dp.getData()); 496 495 } 497 496 … … 594 593 while (peakListIterator.hasNext()) 595 594 { 596 peakLists.add( (PeakListData)peakListIterator.next().getData());595 peakLists.add(peakListIterator.next().getData()); 597 596 } 598 597 getData().setPeakLists(peakLists); -
trunk/api/core/src/org/proteios/core/Peptide.java
r1547 r2381 97 97 * </ul> 98 98 */ 99 @Override 99 100 public boolean isUsed() 100 101 throws BaseException -
trunk/api/core/src/org/proteios/core/Permission.java
r1916 r2381 149 149 } 150 150 151 @Override 151 152 public String toString() 152 153 { -
trunk/api/core/src/org/proteios/core/Plate.java
r1916 r2381 149 149 Wells are deleted automatically. 150 150 */ 151 @Override 151 152 public boolean isUsed() 152 153 throws BaseException -
trunk/api/core/src/org/proteios/core/PlateEvent.java
r1916 r2381 26 26 import org.proteios.core.data.PlateEventData; 27 27 import org.proteios.core.data.SharedData; 28 import org.proteios.core.data.UserData;29 28 import org.proteios.core.query.Hql; 30 29 import org.proteios.core.query.Restrictions; … … 138 137 Always false. 139 138 */ 139 @Override 140 140 public boolean isUsed() 141 141 throws BaseException … … 148 148 ------------------------------------------- 149 149 */ 150 @Override 150 151 SharedData getSharedParent() 151 152 { -
trunk/api/core/src/org/proteios/core/PlateEventType.java
r1916 r2381 198 198 </ul> 199 199 */ 200 @Override 200 201 public boolean isUsed() 201 202 throws BaseException … … 215 216 ------------------------------------------- 216 217 */ 218 @Override 217 219 SharedData getSharedParent() 218 220 { -
trunk/api/core/src/org/proteios/core/PlateGeometry.java
r1916 r2381 174 174 </ul> 175 175 */ 176 @Override 176 177 public boolean isUsed() 177 178 throws BaseException -
trunk/api/core/src/org/proteios/core/PlateMapping.java
r1916 r2381 153 153 </ul> 154 154 */ 155 @Override 155 156 public boolean isUsed() 156 157 throws BaseException -
trunk/api/core/src/org/proteios/core/PlateType.java
r1916 r2381 107 107 </ul> 108 108 */ 109 @Override 109 110 public boolean isUsed() 110 111 throws BaseException -
trunk/api/core/src/org/proteios/core/PluginConfiguration.java
r1916 r2381 188 188 * </ul> 189 189 */ 190 @Override 190 191 public boolean isUsed() 191 192 throws BaseException -
trunk/api/core/src/org/proteios/core/PluginConfigurationRequest.java
r1916 r2381 96 96 ------------------------------------------- 97 97 */ 98 @Override 98 99 public PluginResponse invoke() 99 100 { -
trunk/api/core/src/org/proteios/core/PluginDefinition.java
r1916 r2381 322 322 * Check if a {@link PluginConfiguration} is using this definition. 323 323 */ 324 @Override 324 325 public boolean isUsed() 325 326 throws BaseException -
trunk/api/core/src/org/proteios/core/PluginExecutionRequest.java
r1916 r2381 74 74 ------------------------------------------- 75 75 */ 76 @Override 76 77 public PluginResponse invoke() 77 78 { -
trunk/api/core/src/org/proteios/core/PluginRequest.java
r1916 r2381 52 52 { 53 53 54 private final SessionControl sc;55 56 54 private String command; 57 55 … … 72 70 Job job, ParameterValuesImpl jobParameters) 73 71 { 74 this.sc = sc;75 72 this.plugin = plugin; 76 73 this.command = command; -
trunk/api/core/src/org/proteios/core/PluginType.java
r1916 r2381 203 203 All users get READ access. 204 204 */ 205 @Override 205 206 void initPermissions(int granted, int denied) 206 207 throws BaseException -
trunk/api/core/src/org/proteios/core/PolyPeptide.java
r1916 r2381 26 26 import org.proteios.core.data.ObservedModificationData; 27 27 import org.proteios.core.data.PolyPeptideData; 28 import org.proteios.core.data.SearchResultData;29 28 import java.util.HashSet; 30 29 import java.util.Iterator; … … 183 182 throws BaseException 184 183 { 185 getData().setSearchResult( (SearchResultData)searchResult.getData());184 getData().setSearchResult(searchResult.getData()); 186 185 } 187 186 … … 227 226 while (it.hasNext()) 228 227 { 229 dpData.add( (ObservedModificationData)it.next().getData());228 dpData.add(it.next().getData()); 230 229 } 231 230 getData().setObservedModifications(dpData); … … 241 240 { 242 241 getData().getObservedModifications().add( 243 (ObservedModificationData)modification.getData());242 modification.getData()); 244 243 } 245 244 } -
trunk/api/core/src/org/proteios/core/Precursor.java
r1916 r2381 26 26 27 27 import org.proteios.core.data.InstrumentConfigurationData; 28 import org.proteios.core.data.PeakListData;29 28 import org.proteios.core.data.PrecursorData; 30 29 import java.util.Set; … … 118 117 * </ul> 119 118 */ 119 @Override 120 120 public boolean isUsed() 121 121 throws BaseException … … 345 345 public void setPeakList(PeakList peakList) 346 346 { 347 getData().setPeakList( (PeakListData)peakList.getData());347 getData().setPeakList(peakList.getData()); 348 348 } 349 349 -
trunk/api/core/src/org/proteios/core/Project.java
r1916 r2381 222 222 * project is deleted and aren't inclued in this check. 223 223 */ 224 @Override 224 225 public boolean isUsed() 225 226 throws BaseException … … 233 234 * is granted. 234 235 */ 236 @Override 235 237 void initPermissions(int granted, int denied) 236 238 throws BaseException -
trunk/api/core/src/org/proteios/core/ProjectKey.java
r1916 r2381 191 191 </ul> 192 192 */ 193 @Override 193 194 public boolean isUsed() 194 195 throws BaseException … … 208 209 permission is always granted. 209 210 */ 211 @Override 210 212 void initPermissions(int granted, int denied) 211 213 throws BaseException … … 293 295 return data.getId(); 294 296 } 295 else 296 { 297 if (tx != null) HibernateUtil.commit(tx); 298 return candidates.get(0); 299 } 297 if (tx != null) HibernateUtil.commit(tx); 298 return candidates.get(0); 300 299 } 301 300 catch (BaseException ex) -
trunk/api/core/src/org/proteios/core/Protein.java
r1556 r2381 98 98 * </ul> 99 99 */ 100 @Override 100 101 public boolean isUsed() 101 102 throws BaseException -
trunk/api/core/src/org/proteios/core/Protocol.java
r1916 r2381 137 137 * </ul> 138 138 */ 139 @Override 139 140 public boolean isUsed() 140 141 throws BaseException -
trunk/api/core/src/org/proteios/core/ProtocolType.java
r2108 r2381 227 227 * </ul> 228 228 */ 229 @Override 229 230 public boolean isUsed() 230 231 throws BaseException … … 258 259 * revoked. 259 260 */ 261 @Override 260 262 void initPermissions(int granted, int denied) 261 263 throws BaseException -
trunk/api/core/src/org/proteios/core/QueryFactory.java
r1916 r2381 80 80 return query; 81 81 } 82 else 83 { 84 return null; 85 } 82 return null; 86 83 } 87 84 -
trunk/api/core/src/org/proteios/core/Role.java
r1916 r2381 228 228 * aren't inclued in this check. 229 229 */ 230 @Override 230 231 public boolean isUsed() 231 232 throws BaseException … … 240 241 * revoked. 241 242 */ 243 @Override 242 244 void initPermissions(int granted, int denied) 243 245 throws BaseException -
trunk/api/core/src/org/proteios/core/RoleKey.java
r1916 r2381 173 173 All role keys are system items and cannot be deleted. 174 174 */ 175 @Override 175 176 public boolean isUsed() 176 177 throws BaseException … … 182 183 Other permissions are inherited from the {@link Role}. 183 184 */ 185 @Override 184 186 void initPermissions(int granted, int denied) 185 187 throws BaseException -
trunk/api/core/src/org/proteios/core/Sample.java
r2260 r2381 146 146 * </ul> 147 147 */ 148 @Override 148 149 public boolean isUsed() 149 150 throws BaseException -
trunk/api/core/src/org/proteios/core/SearchDatabase.java
r1937 r2381 26 26 27 27 import org.proteios.core.data.SearchDatabaseData; 28 import org.proteios.core.data.SpectrumSearchData;29 30 28 import java.util.Date; 31 29 import java.util.Set; … … 98 96 * </ul> 99 97 */ 98 @Override 100 99 public boolean isUsed() 101 100 throws BaseException … … 129 128 { 130 129 getData().setSpectrumSearch( 131 (SpectrumSearchData)spectrumSearch.getData());130 spectrumSearch.getData()); 132 131 } 133 132 … … 199 198 * @return the name of this digest parameter 200 199 */ 200 @Override 201 201 public String getName() 202 202 { … … 214 214 * {@link #MAX_NAME_LENGTH} 215 215 */ 216 @Override 216 217 public void setName(String name) 217 218 throws InvalidDataException -
trunk/api/core/src/org/proteios/core/SearchModification.java
r1937 r2381 6 6 7 7 import org.proteios.core.data.SearchModificationData; 8 import org.proteios.core.data.SpectrumSearchData;9 10 8 import java.util.Set; 11 9 … … 75 73 * </ul> 76 74 */ 75 @Override 77 76 public boolean isUsed() 78 77 throws BaseException … … 105 104 { 106 105 getData().setSpectrumSearch( 107 (SpectrumSearchData)spectrumSearch.getData());106 spectrumSearch.getData()); 108 107 } 109 108 -
trunk/api/core/src/org/proteios/core/SearchResult.java
r1994 r2381 25 25 package org.proteios.core; 26 26 27 import org.proteios.core.data.PeakListData;28 27 import org.proteios.core.data.PolyPeptideData; 29 28 import org.proteios.core.data.SearchResultData; 30 import org.proteios.core.data.SpectrumSearchData;31 29 import java.util.ArrayList; 32 30 import java.util.HashSet; … … 109 107 * </ul> 110 108 */ 109 @Override 111 110 public boolean isUsed() 112 111 throws BaseException … … 138 137 throws BaseException 139 138 { 140 getData().setPeakList( (PeakListData)peakList.getData());139 getData().setPeakList(peakList.getData()); 141 140 } 142 141 … … 166 165 { 167 166 getData().setSpectrumSearch( 168 (SpectrumSearchData)spectrumSearch.getData());167 spectrumSearch.getData()); 169 168 } 170 169 -
trunk/api/core/src/org/proteios/core/SeparationEvent.java
r2114 r2381 24 24 package org.proteios.core; 25 25 26 import org.proteios.core.data.HardwareConfigurationData;27 26 import org.proteios.core.data.SeparationEventData; 28 27 import org.proteios.core.data.SeparationMethodData; … … 61 60 * ------------------------------------------- 62 61 */ 62 @Override 63 63 public Item getType() 64 64 { … … 88 88 * </ul> 89 89 */ 90 @Override 90 91 public boolean isUsed() 91 92 throws BaseException … … 133 134 throw new InvalidUseOfNullException("hardwareSettings"); 134 135 getData().setHardwareSettings( 135 (HardwareConfigurationData)hardwareSettings.getData());136 hardwareSettings.getData()); 136 137 } 137 138 -
trunk/api/core/src/org/proteios/core/SeparationMethod.java
r2287 r2381 129 129 * the separation method is deleted and aren't included in this check. 130 130 */ 131 @Override 131 132 public boolean isUsed() 132 133 throws BaseException -
trunk/api/core/src/org/proteios/core/Session.java
r1916 r2381 123 123 A session is not referenced from other items. 124 124 */ 125 @Override 125 126 public boolean isUsed() 126 127 throws BaseException … … 132 133 session. All other permissions are denied. 133 134 */ 135 @Override 134 136 void initPermissions(int granted, int denied) 135 137 throws BaseException -
trunk/api/core/src/org/proteios/core/SessionControl.java
r1916 r2381 1497 1497 return loginInfo.sessionSettings.remove(name); 1498 1498 } 1499 else 1500 { 1501 return loginInfo.sessionSettings.put(name, value); 1502 } 1499 return loginInfo.sessionSettings.put(name, value); 1503 1500 } 1504 1501 … … 1714 1711 Clean up if a bad client application forgets to logout. 1715 1712 */ 1713 @Override 1716 1714 protected void finalize() 1717 1715 throws Throwable -
trunk/api/core/src/org/proteios/core/Setting.java
r1916 r2381 102 102 @return FALSE 103 103 */ 104 @Override 104 105 public boolean isUsed() 105 106 throws BaseException … … 110 111 Add permissions granted to {@link Item#SETTING}. 111 112 */ 113 @Override 112 114 void initPermissions(int granted, int denied) 113 115 throws BaseException -
trunk/api/core/src/org/proteios/core/SharedItem.java
r1916 r2381 93 93 @throws BaseException If there is another error 94 94 */ 95 @Override 95 96 void onBeforeCommit(Transactional.Action action) 96 97 throws NotLoggedInException, BaseException … … 111 112 Grant permissions according to the item and project keys. 112 113 */ 114 @Override 113 115 void initPermissions(int granted, int denied) 114 116 throws BaseException -
trunk/api/core/src/org/proteios/core/SimpleJobQueue.java
r1916 r2381 75 75 76 76 77 @Override 77 78 public String toString() 78 79 { … … 91 92 * in it's own thread. Lists jobs in database and adds them to the queue. 92 93 */ 94 @Override 93 95 public void run() 94 96 { … … 418 420 * Never reload since everyting is static. 419 421 */ 422 @Override 420 423 boolean getReload() 421 424 { … … 428 431 * <code>itemType</code> = {@link Item#SYSTEM}, 0 otherwise. 429 432 */ 433 @Override 430 434 int getRolePermissions(Item itemType) 431 435 { … … 434 438 return systemPermissions; 435 439 } 436 else 437 { 438 return 0; 439 } 440 return 0; 440 441 } 441 442 … … 444 445 * Return 0. 445 446 */ 447 @Override 446 448 int getSharedPermissions(ShareableData sharableData) 447 449 { … … 453 455 * Return 0. 454 456 */ 457 @Override 455 458 int getAllPermissions(Item itemType, UserData owner, 456 459 ItemKeyData itemKey, ProjectKeyData projectKey) … … 463 466 * Return empty set. 464 467 */ 468 @Override 465 469 Set<Integer> getRoles() 466 470 { … … 472 476 * Return empty set. 473 477 */ 478 @Override 474 479 Set<Integer> getGroups() 475 480 { … … 481 486 * Return empty set. 482 487 */ 488 @Override 483 489 Set<Integer> getUsers() 484 490 { … … 490 496 * Return empty map. 491 497 */ 498 @Override 492 499 Map<Integer, Integer> getProjects() 493 500 { … … 499 506 * Return empty set. 500 507 */ 508 @Override 501 509 Set<Integer> getItemKeys() 502 510 { … … 508 516 * Return empty set. 509 517 */ 518 @Override 510 519 Set<Integer> getProjectKeys() 511 520 { -
trunk/api/core/src/org/proteios/core/SoftwareConfiguration.java
r1916 r2381 95 95 * </ul> 96 96 */ 97 @Override 97 98 public boolean isUsed() 98 99 throws BaseException -
trunk/api/core/src/org/proteios/core/SpectrumSearch.java
r1937 r2381 26 26 27 27 import org.proteios.core.data.DigestParameterData; 28 import org.proteios.core.data.PeakListSetData;29 28 import org.proteios.core.data.SearchDatabaseData; 30 29 import org.proteios.core.data.SearchModificationData; 31 30 import org.proteios.core.data.SearchResultData; 32 import org.proteios.core.data.SoftwareData;33 31 import org.proteios.core.data.SpectrumSearchData; 34 32 import java.util.Date; … … 106 104 * </ul> 107 105 */ 106 @Override 108 107 public boolean isUsed() 109 108 throws BaseException … … 136 135 throws BaseException 137 136 { 138 getData().setPeakListSet( (PeakListSetData)peakListSet.getData());137 getData().setPeakListSet(peakListSet.getData()); 139 138 } 140 139 … … 165 164 throws BaseException 166 165 { 167 getData().setSearchEngine( (SoftwareData)software.getData());166 getData().setSearchEngine(software.getData()); 168 167 } 169 168 -
trunk/api/core/src/org/proteios/core/StainingEvent.java
r2114 r2381 24 24 package org.proteios.core; 25 25 26 import org.proteios.core.data.GelElectrophoresisData;27 import org.proteios.core.data.HardwareConfigurationData;28 26 import org.proteios.core.data.StainingEventData; 29 27 … … 92 90 * ------------------------------------------- 93 91 */ 92 @Override 94 93 public Item getType() 95 94 { … … 119 118 * </ul> 120 119 */ 120 @Override 121 121 public boolean isUsed() 122 122 throws BaseException … … 149 149 throws BaseException 150 150 { 151 getData().setSeparationMethod( (GelElectrophoresisData)gelElectrophoresis.getData());151 getData().setSeparationMethod(gelElectrophoresis.getData()); 152 152 } 153 153 … … 188 188 throw new InvalidUseOfNullException("hardwareSettings"); 189 189 getData().setHardwareSettings( 190 (HardwareConfigurationData)hardwareSettings.getData());190 hardwareSettings.getData()); 191 191 } 192 192 } -
trunk/api/core/src/org/proteios/core/StringParameterType.java
r1916 r2381 75 75 ------------------------------------------- 76 76 */ 77 @Override 77 78 public String toString() 78 79 { … … 91 92 @throws InvalidDataException If the value is not a string or too long 92 93 */ 94 @Override 93 95 void validateValue(String name, String value) 94 96 throws InvalidDataException … … 109 111 return new TextParameterValueData(); 110 112 } 111 else 112 { 113 return new StringParameterValueData(); 114 } 113 return new StringParameterValueData(); 115 114 } 116 115 // ------------------------------------------- -
trunk/api/core/src/org/proteios/core/Type.java
r1916 r2381 56 56 INT(Hibernate.INTEGER, 1, Integer.class, "int", "Integer", true, true) 57 57 { 58 @Override 58 59 ParameterValueData<Integer> newParameterValueData() 59 60 { 60 61 return new IntegerParameterValueData(); 61 62 } 63 @Override 62 64 public int sizeOf(Object value) 63 65 { … … 71 73 LONG(Hibernate.LONG, 2, Long.class, "long", "Long", true, true) 72 74 { 75 @Override 73 76 ParameterValueData<Long> newParameterValueData() 74 77 { 75 78 return new LongParameterValueData(); 76 79 } 80 @Override 77 81 public int sizeOf(Object value) 78 82 { … … 86 90 FLOAT(Hibernate.FLOAT, 3, Float.class, "float", "Float", true, true) 87 91 { 92 @Override 88 93 ParameterValueData<Float> newParameterValueData() 89 94 { 90 95 return new FloatParameterValueData(); 91 96 } 97 @Override 92 98 public int sizeOf(Object value) 93 99 { … … 101 107 DOUBLE(Hibernate.DOUBLE, 4, Double.class, "double", "Double", true, true) 102 108 { 109 @Override 103 110 ParameterValueData<Double> newParameterValueData() 104 111 { 105 112 return new DoubleParameterValueData(); 106 113 } 114 @Override 107 115 public int sizeOf(Object value) 108 116 { … … 117 125 STRING(Hibernate.STRING, 5, String.class, "string", "String", true, false) 118 126 { 127 @Override 119 128 ParameterValueData<String> newParameterValueData() 120 129 { 121 130 return new StringParameterValueData(); 122 131 } 132 @Override 123 133 public int sizeOf(Object value) 124 134 { … … 133 143 TEXT(Hibernate.TEXT, 6, String.class, "text", "Text", false, false) 134 144 { 145 @Override 135 146 ParameterValueData<String> newParameterValueData() 136 147 { 137 148 return new TextParameterValueData(); 138 149 } 150 @Override 139 151 public int sizeOf(Object value) 140 152 { … … 148 160 BOOLEAN(Hibernate.BOOLEAN, 7, Boolean.class, "boolean", "Boolean", false, false) 149 161 { 162 @Override 150 163 ParameterValueData<Boolean> newParameterValueData() 151 164 { 152 165 return new BooleanParameterValueData(); 153 166 } 167 @Override 154 168 public int sizeOf(Object value) 155 169 { … … 163 177 DATE(Hibernate.DATE, 8, Date.class, "date", "Date", true, false) 164 178 { 179 @Override 165 180 ParameterValueData<Date> newParameterValueData() 166 181 { 167 182 return new DateParameterValueData(); 168 183 } 184 @Override 169 185 public Object parseString(String value) 170 186 throws InvalidDataException … … 172 188 return DateUtil.parseString(value); 173 189 } 190 @Override 174 191 public int sizeOf(Object value) 175 192 { … … 213 230 } 214 231 232 @Override 215 233 public String toString() 216 234 { … … 349 367 return null; 350 368 } 351 else 352 { 353 try 354 { 355 return getHibernateType().fromStringValue(value); 356 } 357 catch (HibernateException ex) 358 { 359 throw new InvalidDataException(ex); 360 } 369 try 370 { 371 return getHibernateType().fromStringValue(value); 372 } 373 catch (final HibernateException ex) 374 { 375 throw new InvalidDataException(ex); 361 376 } 362 377 } -
trunk/api/core/src/org/proteios/core/Update.java
r1916 r2381 150 150 * from one schemaVersion to the next. 151 151 */ 152 UpdateToSchemaVersionInterface updaterClass = (UpdateToSchemaVersionInterface)updaterList.get(i);152 UpdateToSchemaVersionInterface updaterClass = updaterList.get(i); 153 153 schemaVersion = updaterClass.update(session); 154 154 } … … 241 241 * of items from one schemaVersion to the next. 242 242 */ 243 UpdateToSchemaVersionInterface updaterClass = (UpdateToSchemaVersionInterface)updaterList.get(i);243 UpdateToSchemaVersionInterface updaterClass = updaterList.get(i); 244 244 numAffectedItems += updaterClass.adjustExistingItems(session); 245 245 schemaVersion++; -
trunk/api/core/src/org/proteios/core/UpdateToSchemaVersionTmpl.java
r1916 r2381 84 84 * @return int the update schema version. 85 85 */ 86 @Override 86 87 public int getUpdateSchemaVersion() 87 88 { … … 97 98 * @throws BaseException 98 99 */ 100 @Override 99 101 protected int updateToNewSchemaVersion(org.hibernate.Session session) 100 102 throws BaseException … … 143 145 * @throws BaseException 144 146 */ 147 @Override 145 148 protected int adjustItemsToNewSchemaVersion(org.hibernate.Session session) 146 149 throws BaseException -
trunk/api/core/src/org/proteios/core/User.java
r1916 r2381 27 27 import org.proteios.core.data.DirectoryData; 28 28 import org.proteios.core.data.OwnableData; 29 import org.proteios.core.data.QuotaData;30 29 import org.proteios.core.data.UserData; 31 30 import org.proteios.core.query.EntityQuery; … … 203 202 * the user is deleted and aren't inclued in this check. 204 203 */ 204 @Override 205 205 public boolean isUsed() 206 206 throws BaseException … … 225 225 * where the logged in user is also a member. 226 226 */ 227 @Override 227 228 void initPermissions(int granted, int denied) 228 229 throws BaseException -
trunk/api/core/src/org/proteios/core/Well.java
r1916 r2381 25 25 package org.proteios.core; 26 26 27 import org.proteios.core.data.AnnotationSetData;28 27 import org.proteios.core.data.SharedData; 29 28 import org.proteios.core.data.WellData; 30 29 import org.proteios.core.query.Hql; 31 30 import org.proteios.core.query.Restrictions; 32 import java.util.HashSet;33 import java.util.Set;34 31 35 32 /** … … 128 125 * </ul> 129 126 */ 127 @Override 130 128 public boolean isUsed() 131 129 throws BaseException … … 147 145 * From the ChildItem class ------------------------------------------- 148 146 */ 147 @Override 149 148 SharedData getSharedParent() 150 149 { -
trunk/api/core/src/org/proteios/core/data/BasicData.java
r1916 r2381 62 62 <code>ClassName[new]</code>. 63 63 */ 64 @Override 64 65 public String toString() 65 66 { … … 77 78 <b>Do not override this method in a subclass!</b> 78 79 */ 80 @Override 79 81 public boolean equals(Object other) 80 82 { … … 104 106 <b>Do not override this method in a subclass!</b> 105 107 */ 108 @Override 106 109 public int hashCode() 107 110 { -
trunk/api/core/src/org/proteios/core/data/BooleanParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="boolean" not-null="true" 55 55 */ 56 @Override 56 57 public List<Boolean> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<Boolean> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/ContextIndex.java
r1916 r2381 108 108 object. They are equal if both have the same client, item type and context type 109 109 */ 110 @Override 110 111 public boolean equals(Object o) 111 112 { … … 122 123 Calculate the hash code for the object. 123 124 */ 125 @Override 124 126 public int hashCode() 125 127 { 126 return ( int)(127 * client.getId() + 53 * itemType + 31 * subContext.hashCode() + 17 * name.hashCode());128 return (127 * client.getId() + 53 * itemType + 31 * subContext.hashCode() + 17 * name.hashCode()); 127 129 } 128 130 } -
trunk/api/core/src/org/proteios/core/data/DataProcessingStepData.java
r1916 r2381 88 88 @return the description string 89 89 */ 90 @Override 90 91 public String getDescription() 91 92 { … … 97 98 @param description The description string 98 99 */ 100 @Override 99 101 public void setDescription(String description) 100 102 { -
trunk/api/core/src/org/proteios/core/data/DateParameterValueData.java
r1916 r2381 55 55 @hibernate.collection-element column="`value`" type="timestamp" not-null="true" 56 56 */ 57 @Override 57 58 public List<Date> getValues() 58 59 { … … 63 64 return values; 64 65 } 66 @Override 65 67 void setValues(List<Date> values) 66 68 { … … 68 70 } 69 71 72 @Override 70 73 public String toString() 71 74 { -
trunk/api/core/src/org/proteios/core/data/DigestParameterData.java
r2270 r2381 75 75 * not-null="false" 76 76 */ 77 @Override 77 78 public String getName() 78 79 { … … 84 85 * @param name The name to set. 85 86 */ 87 @Override 86 88 public void setName(String name) 87 89 { -
trunk/api/core/src/org/proteios/core/data/DirectoryData.java
r1916 r2381 69 69 @hibernate.column name="`name`" length="255" not-null="true" index="name_idx" unique-key="uniquedirectory" 70 70 */ 71 @Override 71 72 public String getName() 72 73 { -
trunk/api/core/src/org/proteios/core/data/DoubleParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="double" not-null="true" 55 55 */ 56 @Override 56 57 public List<Double> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<Double> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/FileData.java
r2145 r2381 68 68 * index="name_idx" unique-key="uniquefile" 69 69 */ 70 @Override 70 71 public String getName() 71 72 { -
trunk/api/core/src/org/proteios/core/data/FileParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-many-to-many column="`value`" class="org.proteios.core.data.FileData" not-null="true" 55 55 */ 56 @Override 56 57 public List<FileData> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<FileData> values) 65 67 { -
trunk/api/core/src/org/proteios/core/data/FloatParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="float" not-null="true" 55 55 */ 56 @Override 56 57 public List<Float> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<Float> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/GuiContextData.java
r1916 r2381 81 81 object. They are equal if both have the same item type and context type 82 82 */ 83 @Override 83 84 public boolean equals(Object o) 84 85 { … … 94 95 Calculate the hash code for the object. 95 96 */ 97 @Override 96 98 public int hashCode() 97 99 { 98 return ( int) (53 * itemType + 17 * contextType);100 return (53 * itemType + 17 * contextType); 99 101 } 100 102 } -
trunk/api/core/src/org/proteios/core/data/IntegerParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="int" not-null="true" 55 55 */ 56 @Override 56 57 public List<Integer> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<Integer> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/ItemParameterValueData.java
r1916 r2381 58 58 @hibernate.many-to-any-column name="`data_class_id`" not-null="true" 59 59 */ 60 @Override 60 61 public List<BasicData> getValues() 61 62 { … … 66 67 return values; 67 68 } 69 @Override 68 70 void setValues(List<BasicData> values) 69 71 { -
trunk/api/core/src/org/proteios/core/data/LongParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="long" not-null="true" 55 55 */ 56 @Override 56 57 public List<Long> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<Long> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/MappingCoordinate.java
r1916 r2381 81 81 object. They are equal if both have the same plate, row and column. 82 82 */ 83 @Override 83 84 public final boolean equals(Object o) 84 85 { … … 94 95 Calculate the hash code for the object. 95 96 */ 97 @Override 96 98 public final int hashCode() 97 99 { 98 return ( int)(131*plate + 53*row + 17*column);100 return (131*plate + 53*row + 17*column); 99 101 } 100 102 /** 101 103 Get the coordinate as [plate, row, column] 102 104 */ 105 @Override 103 106 public final String toString() 104 107 { -
trunk/api/core/src/org/proteios/core/data/PeakListData.java
r1916 r2381 100 100 101 101 public static final int MAX_COMBINATIONMETHOD_LENGTH = 255; 102 private String combinationMethod = (String)null;102 private String combinationMethod = null; 103 103 104 104 … … 137 137 * @return the description string 138 138 */ 139 @Override 139 140 public String getDescription() 140 141 { … … 148 149 * @param description The description string 149 150 */ 151 @Override 150 152 public void setDescription(String description) 151 153 { -
trunk/api/core/src/org/proteios/core/data/PlateCoordinate.java
r1916 r2381 76 76 object. They are equal if both have the same plate, row and column. 77 77 */ 78 @Override 78 79 public final boolean equals(Object o) 79 80 { … … 88 89 Calculate the hash code for the object. 89 90 */ 91 @Override 90 92 public final int hashCode() 91 93 { 92 return ( int)(53*row + 17*column);94 return (53*row + 17*column); 93 95 } 94 96 /** 95 97 Get the coordinate as [row, column] 96 98 */ 99 @Override 97 100 public final String toString() 98 101 { -
trunk/api/core/src/org/proteios/core/data/QuotaIndex.java
r1916 r2381 86 86 object. They are equal if both have the same quotatype id and location. 87 87 */ 88 @Override 88 89 public boolean equals(Object o) 89 90 { … … 99 100 Calculate the hash code for the object. 100 101 */ 102 @Override 101 103 public int hashCode() 102 104 { 103 return ( int) (53 * quotaType.getId() + 17 * location);105 return (53 * quotaType.getId() + 17 * location); 104 106 } 105 107 } -
trunk/api/core/src/org/proteios/core/data/SearchDatabaseData.java
r2270 r2381 53 53 * length="255" not-null="false" 54 54 */ 55 @Override 55 56 public String getName() 56 57 { … … 60 61 @param name The name to set. 61 62 */ 63 @Override 62 64 public void setName(String name) 63 65 { -
trunk/api/core/src/org/proteios/core/data/StringParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="string" length="255" not-null="true" 55 55 */ 56 @Override 56 57 public List<String> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<String> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/TextParameterValueData.java
r1916 r2381 54 54 @hibernate.collection-element column="`value`" type="text" not-null="true" 55 55 */ 56 @Override 56 57 public List<String> getValues() 57 58 { … … 62 63 return values; 63 64 } 65 @Override 64 66 void setValues(List<String> values) 65 67 { … … 67 69 } 68 70 71 @Override 69 72 public String toString() 70 73 { -
trunk/api/core/src/org/proteios/core/data/UsedQuantity.java
r1916 r2381 91 91 non-null value. 92 92 */ 93 @Override 93 94 public boolean equals(Object o) 94 95 { … … 101 102 Calculate the hash code for the object. 102 103 */ 104 @Override 103 105 public int hashCode() 104 106 { … … 108 110 Convert the value to a string. 109 111 */ 112 @Override 110 113 public String toString() 111 114 { -
trunk/api/core/src/org/proteios/core/data/UserData.java
r1916 r2381 58 58 * @hibernate.generator-param name="property" value="password" 59 59 */ 60 @Override 60 61 public int getId() 61 62 { -
trunk/api/core/src/org/proteios/core/data/keyring/GroupGroups.java
r1916 r2381 81 81 child id are the same. 82 82 */ 83 @Override 83 84 public boolean equals(Object o) 84 85 { … … 91 92 Calculate the hash code for the object. 92 93 */ 94 @Override 93 95 public int hashCode() 94 96 { 95 return ( int)(31*parentId + 17*childId);97 return (31*parentId + 17*childId); 96 98 } 97 99 } -
trunk/api/core/src/org/proteios/core/data/keyring/GroupKeys.java
r1916 r2381 68 68 key id are the same. The permissions may be different. 69 69 */ 70 @Override 70 71 public boolean equals(Object o) 71 72 { … … 78 79 Calculate the hash code for the object. 79 80 */ 81 @Override 80 82 public int hashCode() 81 83 { 82 return ( int)(31*keyId + 17*groupId);84 return (31*keyId + 17*groupId); 83 85 } 84 86 } -
trunk/api/core/src/org/proteios/core/data/keyring/GroupProjects.java
r1916 r2381 68 68 project id are the same. The permission may be different. 69 69 */ 70 @Override 70 71 public boolean equals(Object o) 71 72 { … … 78 79 Calculate the hash code for the object. 79 80 */ 81 @Override 80 82 public int hashCode() 81 83 { 82 return ( int)(31*projectId + 17*groupId);84 return (31*projectId + 17*groupId); 83 85 } 84 86 } -
trunk/api/core/src/org/proteios/core/data/keyring/ProjectKeys.java
r1916 r2381 67 67 key id are the same. The permissions may be different. 68 68 */ 69 @Override 69 70 public boolean equals(Object o) 70 71 { … … 77 78 Calculate the hash code for the object. 78 79 */ 80 @Override 79 81 public int hashCode() 80 82 { 81 return ( int)(31*keyId + 17*projectId);83 return (31*keyId + 17*projectId); 82 84 } 83 85 } -
trunk/api/core/src/org/proteios/core/data/keyring/RoleKeys.java
r1916 r2381 68 68 key id are the same. The permissions may be different. 69 69 */ 70 @Override 70 71 public boolean equals(Object o) 71 72 { … … 78 79 Calculate the hash code for the object. 79 80 */ 81 @Override 80 82 public int hashCode() 81 83 { 82 return ( int)(31*keyId + 17*roleId);84 return (31*keyId + 17*roleId); 83 85 } 84 86 } -
trunk/api/core/src/org/proteios/core/data/keyring/UserGroups.java
r1916 r2381 80 80 group id are the same. 81 81 */ 82 @Override 82 83 public boolean equals(Object o) 83 84 { … … 90 91 Calculate the hash code for the object. 91 92 */ 93 @Override 92 94 public int hashCode() 93 95 { 94 return ( int)(31*userId + 17*groupId);96 return (31*userId + 17*groupId); 95 97 } 96 98 } -
trunk/api/core/src/org/proteios/core/data/keyring/UserKeys.java
r1916 r2381 68 68 key id are the same. The permissions may be different. 69 69 */ 70 @Override 70 71 public boolean equals(Object o) 71 72 { … … 78 79 Calculate the hash code for the object. 79 80 */ 81 @Override 80 82 public int hashCode() 81 83 { 82 return ( int)(31*keyId + 17*userId);84 return (31*keyId + 17*userId); 83 85 } 84 86 } -
trunk/api/core/src/org/proteios/core/data/keyring/UserProjects.java
r1916 r2381 68 68 project id are the same. The permission may be different. 69 69 */ 70 @Override 70 71 public boolean equals(Object o) 71 72 { … … 78 79 Calculate the hash code for the object. 79 80 */ 81 @Override 80 82 public int hashCode() 81 83 { 82 return ( int)(31*projectId + 17*userId);84 return (31*projectId + 17*userId); 83 85 } 84 86 } -
trunk/api/core/src/org/proteios/core/data/keyring/UserRoles.java
r1916 r2381 79 79 role id are the same. 80 80 */ 81 @Override 81 82 public boolean equals(Object o) 82 83 { … … 89 90 Calculate the hash code for the object. 90 91 */ 92 @Override 91 93 public int hashCode() 92 94 { 93 return ( int)(31*userId + 17*roleId);95 return (31*userId + 17*roleId); 94 96 } 95 97 } -
trunk/api/core/src/org/proteios/core/plugin/GuiContext.java
r1916 r2381 61 61 62 62 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/plugin/Plugin.java
r1955 r2381 159 159 } 160 160 161 @Override 161 162 public String toString() 162 163 { -
trunk/api/core/src/org/proteios/core/query/AddExpression.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/AndRestriction.java
r1916 r2381 70 70 ------------------------------------------- 71 71 */ 72 @Override 72 73 public String toString() 73 74 { -
trunk/api/core/src/org/proteios/core/query/AscOrder.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/CountExpression.java
r1916 r2381 62 62 ------------------------------------------- 63 63 */ 64 @Override 64 65 public String toString() 65 66 { -
trunk/api/core/src/org/proteios/core/query/DescOrder.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/DivideExpression.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/EqRestriction.java
r1916 r2381 61 61 return "(" + e1.toQl(query, dc) + " = " + e2.toQl(query, dc) + ")"; 62 62 } 63 else 64 { 65 return "(" + e1.toQl(query, dc) + " IS NULL)"; 66 } 63 return "(" + e1.toQl(query, dc) + " IS NULL)"; 67 64 } 68 65 // ------------------------------------------- … … 71 68 ------------------------------------------- 72 69 */ 70 @Override 73 71 public String toString() 74 72 { -
trunk/api/core/src/org/proteios/core/query/ExpressionSelect.java
r1916 r2381 86 86 ------------------------------------------- 87 87 */ 88 @Override 88 89 public String toString() 89 90 { -
trunk/api/core/src/org/proteios/core/query/FloatExpression.java
r1916 r2381 60 60 ------------------------------------------- 61 61 */ 62 @Override 62 63 public String toString() 63 64 { -
trunk/api/core/src/org/proteios/core/query/GtRestriction.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/GteqRestriction.java
r1916 r2381 65 65 ------------------------------------------- 66 66 */ 67 @Override 67 68 public String toString() 68 69 { -
trunk/api/core/src/org/proteios/core/query/HqlElementsExpression.java
r1916 r2381 65 65 return "elements("+(alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property)+")"; 66 66 } 67 else 68 { 69 throw new UnsupportedOperationException("'elements' operation not supported by "+query.getQueryType()+" query."); 70 } 67 throw new UnsupportedOperationException("'elements' operation not supported by "+query.getQueryType()+" query."); 71 68 } 72 69 // ------------------------------------------- … … 75 72 ------------------------------------------- 76 73 */ 74 @Override 77 75 public String toString() 78 76 { -
trunk/api/core/src/org/proteios/core/query/HqlEntityExpression.java
r1916 r2381 61 61 return Integer.toString(item.getId()); 62 62 } 63 else 64 { 65 throw new UnsupportedOperationException("'entity' operation not supported by "+query.getQueryType()+" query."); 66 } 63 throw new UnsupportedOperationException("'entity' operation not supported by "+query.getQueryType()+" query."); 67 64 } 68 65 // ------------------------------------------- … … 71 68 ------------------------------------------- 72 69 */ 70 @Override 73 71 public String toString() 74 72 { -
trunk/api/core/src/org/proteios/core/query/HqlIndexExpression.java
r1916 r2381 64 64 return "index("+(alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property)+")"; 65 65 } 66 else 67 { 68 throw new UnsupportedOperationException("'index' operation not supported by "+query.getQueryType()+" query."); 69 } 66 throw new UnsupportedOperationException("'index' operation not supported by "+query.getQueryType()+" query."); 70 67 } 71 68 // ------------------------------------------- … … 74 71 ------------------------------------------- 75 72 */ 73 @Override 76 74 public String toString() 77 75 { -
trunk/api/core/src/org/proteios/core/query/HqlInnerJoin.java
r1916 r2381 68 68 return "JOIN "+(alias == null ? query.getRootAlias() : alias) + "." + property + " " + joinedAlias; 69 69 } 70 else 71 { 72 throw new UnsupportedOperationException("'inner join' operation not supported by "+query.getQueryType()+" query."); 73 } 70 throw new UnsupportedOperationException("'inner join' operation not supported by "+query.getQueryType()+" query."); 74 71 } 75 72 // ------------------------------------------- … … 94 91 ------------------------------------------- 95 92 */ 93 @Override 96 94 public String toString() 97 95 { -
trunk/api/core/src/org/proteios/core/query/HqlLeftJoin.java
r1916 r2381 71 71 (on == null ? "" : " WITH " + on.toQl(query, dc)); 72 72 } 73 else 74 { 75 throw new UnsupportedOperationException("'left join' operation not supported by "+query.getQueryType()+" query."); 76 } 73 throw new UnsupportedOperationException("'left join' operation not supported by "+query.getQueryType()+" query."); 77 74 } 78 75 // ------------------------------------------- … … 97 94 ------------------------------------------- 98 95 */ 96 @Override 99 97 public String toString() 100 98 { -
trunk/api/core/src/org/proteios/core/query/HqlPropertyExpression.java
r1916 r2381 63 63 return (alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property); 64 64 } 65 else 66 { 67 throw new UnsupportedOperationException("'property' operation not supported by "+query.getQueryType()+" query."); 68 } 65 throw new UnsupportedOperationException("'property' operation not supported by "+query.getQueryType()+" query."); 69 66 } 70 67 // ------------------------------------------- … … 73 70 ------------------------------------------- 74 71 */ 72 @Override 75 73 public String toString() 76 74 { -
trunk/api/core/src/org/proteios/core/query/HqlRightJoin.java
r1916 r2381 71 71 (on == null ? "" : " WITH " + on.toQl(query, dc)); 72 72 } 73 else 74 { 75 throw new UnsupportedOperationException("'right join' operation not supported by "+query.getQueryType()+" query."); 76 } 73 throw new UnsupportedOperationException("'right join' operation not supported by "+query.getQueryType()+" query."); 77 74 } 78 75 // ------------------------------------------- … … 97 94 ------------------------------------------- 98 95 */ 96 @Override 99 97 public String toString() 100 98 { -
trunk/api/core/src/org/proteios/core/query/InRestriction.java
r1916 r2381 75 75 ------------------------------------------- 76 76 */ 77 @Override 77 78 public String toString() 78 79 { -
trunk/api/core/src/org/proteios/core/query/IntegerExpression.java
r1916 r2381 60 60 ------------------------------------------- 61 61 */ 62 @Override 62 63 public String toString() 63 64 { -
trunk/api/core/src/org/proteios/core/query/LikeRestriction.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/LogExpression.java
r1916 r2381 81 81 ------------------------------------------- 82 82 */ 83 @Override 83 84 public String toString() 84 85 { … … 87 88 return "LN(" + e1 + ")"; 88 89 } 89 else 90 { 91 return "LOG(" + base + ", " + e1 + ")"; 92 } 90 return "LOG(" + base + ", " + e1 + ")"; 93 91 } 94 92 // ------------------------------------------- -
trunk/api/core/src/org/proteios/core/query/LtRestriction.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/LteqRestriction.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/MaxExpression.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/MeanExpression.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/MinExpression.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/MultiplyExpression.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/NegateExpression.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/core/query/NeqRestriction.java
r1916 r2381 61 61 return "(" + e1.toQl(query, dc) + " <> " + e2.toQl(query, dc) + ")"; 62 62 } 63 else 64 { 65 return "(NOT " + e1.toQl(query, dc) + " IS NULL)"; 66 } 63 return "(NOT " + e1.toQl(query, dc) + " IS NULL)"; 67 64 } 68 65 // ------------------------------------------- … … 71 68 ------------------------------------------- 72 69 */ 70 @Override 73 71 public String toString() 74 72 { -
trunk/api/core/src/org/proteios/core/query/NotRestriction.java
r1916 r2381 59 59 ------------------------------------------- 60 60 */ 61 @Override 61 62 public String toString() 62 63 { -
trunk/api/core/src/org/proteios/core/query/OrRestriction.java
r1916 r2381 70 70 ------------------------------------------- 71 71 */ 72 @Override 72 73 public String toString() 73 74 { -
trunk/api/core/src/org/proteios/core/query/ParameterExpression.java
r1916 r2381 72 72 ------------------------------------------- 73 73 */ 74 @Override 74 75 public String toString() 75 76 { -
trunk/api/core/src/org/proteios/core/query/SelectedExpression.java
r1916 r2381 68 68 ------------------------------------------- 69 69 */ 70 @Override 70 71 public String toString() 71 72 { -
trunk/api/core/src/org/proteios/core/query/SubtractExpression.java
r1916 r2381 64 64 ------------------------------------------- 65 65 */ 66 @Override 66 67 public String toString() 67 68 { -
trunk/api/core/src/org/proteios/core/query/SumExpression.java
r1916 r2381 61 61 ------------------------------------------- 62 62 */ 63 @Override 63 64 public String toString() 64 65 { -
trunk/api/core/src/org/proteios/install/MaskingThread.java
r1916 r2381 53 53 * Begin masking until asked to stop. 54 54 */ 55 @Override 55 56 public void run() { 56 57 while(!stop) { -
trunk/api/core/src/org/proteios/install/PasswordField.java
r1916 r2381 1 1 package org.proteios.install; 2 2 3 /* 3 $Id$4 $Id$ 4 5 5 Copyright (C) 2006 Gregory Vincic, Olle Mansson6 Copyright (C) 2007 Gregory Vincic6 Copyright (C) 2006 Gregory Vincic, Olle Mansson 7 Copyright (C) 2007 Gregory Vincic 7 8 8 This file is part of Proteios.9 Available at http://www.proteios.org/9 This file is part of Proteios. 10 Available at http://www.proteios.org/ 10 11 11 Proteios is free software; you can redistribute it and/or modify it12 under the terms of the GNU General Public License as published by13 the Free Software Foundation; either version 2 of the License, or14 (at your option) any later version.12 Proteios is free software; you can redistribute it and/or modify it 13 under the terms of the GNU General Public License as published by 14 the Free Software Foundation; either version 2 of the License, or 15 (at your option) any later version. 15 16 16 Proteios is distributed in the hope that it will be useful, but17 WITHOUT ANY WARRANTY; without even the implied warranty of18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU19 General Public License for more details.17 Proteios is distributed in the hope that it will be useful, but 18 WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 General Public License for more details. 20 21 21 You should have received a copy of the GNU General Public License 22 along with this program; if not, write to the Free Software 23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 24 02111-1307, USA. 25 */ 26 22 You should have received a copy of the GNU General Public License 23 along with this program; if not, write to the Free Software 24 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 25 02111-1307, USA. 26 */ 27 27 import java.io.IOException; 28 28 29 29 /** 30 * This class prompts the user for a password 31 * and attempts to mask input with "". 32 * Based on code described at 33 * http://forum.java.sun.com/thread.jspa?forumID=9&threadID=490728 30 * This class prompts the user for a password and attempts to mask input with 31 * "". Based on code described at 32 * http://forum.java.sun.com/thread.jspa?forumID=9&threadID=490728 34 33 */ 35 public class PasswordField {36 34 public class PasswordField 35 { 37 36 /** 38 * String getPassword(String prompt) 39 * 40 * Uses class MaskingThread. 41 * Based on code described at 42 * http://forum.java.sun.com/thread.jspa?forumID=9&threadID=490728 43 * 44 * @param prompt The prompt to display to the user. 45 * @return The password as entered by the user. 37 * String getPassword(String prompt) Uses class MaskingThread. Based on code 38 * described at 39 * http://forum.java.sun.com/thread.jspa?forumID=9&threadID=490728 40 * 41 * @param prompt The prompt to display to the user. 42 * @return The password as entered by the user. 46 43 */ 47 String getPassword(String prompt) throws IOException { 44 String getPassword(String prompt) 45 throws IOException 46 { 48 47 // password holder 49 48 String password = ""; … … 52 51 thread.start(); 53 52 // block until enter is pressed 54 while (true) { 55 char c = (char)System.in.read(); 53 while (true) 54 { 55 char c = (char) System.in.read(); 56 56 // assume enter pressed, stop masking 57 57 maskingthread.stopMasking(); 58 59 if (c == '\r') { 60 c = (char)System.in.read(); 61 if (c == '\n') { 58 if (c == '\r') 59 { 60 c = (char) System.in.read(); 61 if (c == '\n') 62 { 62 63 break; 63 } else {64 continue;65 64 } 66 } else if (c == '\n') { 65 continue; 66 } 67 else if (c == '\n') 68 { 67 69 break; 68 } else { 70 } 71 else 72 { 69 73 // store the password 70 74 password += c; … … 74 78 } 75 79 } 76 -
trunk/api/core/src/org/proteios/io/FilenameParseUtil.java
r1916 r2381 95 95 return firstPartStr; 96 96 } 97 else 98 { 99 return lastPartStr; 100 } 97 return lastPartStr; 101 98 } 102 99 -
trunk/api/core/src/org/proteios/io/PeakListFileImpl.java
r1929 r2381 525 525 * Empty character data temporary string buffer 526 526 */ 527 if (tempStrBuf == (StringBuffer)null) {527 if (tempStrBuf == null) { 528 528 tempStrBuf = new StringBuffer(); 529 529 } … … 569 569 */ 570 570 String attrValue = XMLImportUtil.seekAttribute("id", parser); 571 if (attrValue != (String)null) {571 if (attrValue != null) { 572 572 String currentSpectrumIdStr = attrValue; 573 573 /* … … 611 611 */ 612 612 String attrValue = XMLImportUtil.seekAttribute("name", parser); 613 if (attrValue != (String)null) {613 if (attrValue != null) { 614 614 String currentCvParamNameStr = attrValue; 615 615 /* … … 620 620 String retentionTimeStr = null; 621 621 retentionTimeStr = XMLImportUtil.seekAttribute("value", parser); 622 if (retentionTimeStr != (String)null && !retentionTimeStr.equals(""))622 if (retentionTimeStr != null && !retentionTimeStr.equals("")) 623 623 { 624 624 Double retentionTime = Double.valueOf(retentionTimeStr); … … 667 667 String attrValue; 668 668 attrValue = XMLImportUtil.seekAttribute("precision", parser); 669 if (attrValue != (String)null) {669 if (attrValue != null) { 670 670 precision = attrValue; 671 671 } 672 672 attrValue = XMLImportUtil.seekAttribute("endian", parser); 673 if (attrValue != (String)null) {673 if (attrValue != null) { 674 674 endian = attrValue; 675 675 } 676 676 attrValue = XMLImportUtil.seekAttribute("length", parser); 677 if (attrValue != (String)null) {677 if (attrValue != null) { 678 678 //dataLength = Integer.parseInt(attrValue); 679 679 dataLength = Integer.valueOf(attrValue).intValue(); … … 773 773 double[] dataArray = new double[nPeaks]; 774 774 for (int i = 0; i < nPeaks; i++) { 775 dataArray[i] = (double)decodedBase64List.get(i);775 dataArray[i] = decodedBase64List.get(i); 776 776 } 777 777 … … 814 814 * buffer is emptied in this case. 815 815 */ 816 if (tempStrBuf == (StringBuffer)null)816 if (tempStrBuf == null) 817 817 { 818 818 tempStrBuf = new StringBuffer(); … … 849 849 int lineLength = 0; 850 850 boolean newLineFlag = true; 851 if (dataBase64Raw != (String)null) {851 if (dataBase64Raw != null) { 852 852 if (dataBase64Raw.length() > 0) { 853 853 for (int i = 0; i < dataBase64RawStrBuf.length(); i++) { … … 879 879 */ 880 880 List<Double> decodedBase64 = new ArrayList<Double>(0); 881 if (dataBase64 != (String)null) {881 if (dataBase64 != null) { 882 882 if (dataBase64.length() > 0) { 883 883 decodedBase64 = Base64Util.decode(doublePrecision, bigEndian, dataBase64); … … 917 917 * Return spectrum. 918 918 */ 919 return (SpectrumInterface)spectrumList.get(0);919 return spectrumList.get(0); 920 920 } 921 921 -
trunk/api/core/src/org/proteios/io/RobotFileImpl.java
r1989 r2381 215 215 private boolean inPlateBlockToProcess = false; 216 216 private boolean inWellBlockToProcess = false; 217 private boolean inTargetPlateBlockToProcess = false;218 217 private boolean inTargetPositionBlockToProcess = false; 219 218 … … 1326 1325 XMLStreamReader parser = xmlInFactory 1327 1326 .createXMLStreamReader(iStream); 1328 /*1329 * Parse the XML input stream using cursor-based XML parsing. Parse1330 * the document until end of document, or until the desired number1331 * of target plate and target position XML tags are found.1332 */1333 inTargetPlateBlockToProcess = false;1334 1327 inTargetPositionBlockToProcess = false; 1335 1328 searchElementsFound = 0; … … 1415 1408 XMLStreamReader parser = xmlInFactory 1416 1409 .createXMLStreamReader(iStream); 1417 /*1418 * Parse the XML input stream using cursor-based XML parsing. Parse1419 * the document until end of document, or until the desired number1420 * of target plate and target position XML tags are found.1421 */1422 inTargetPlateBlockToProcess = false;1423 1410 inTargetPositionBlockToProcess = false; 1424 1411 searchElementsFound = 0; … … 1504 1491 XMLStreamReader parser = xmlInFactory 1505 1492 .createXMLStreamReader(iStream); 1506 /*1507 * Parse the XML input stream using cursor-based XML parsing. Parse1508 * the document until end of document, or until the desired number1509 * of target plate and target position XML tags are found.1510 */1511 inTargetPlateBlockToProcess = false;1512 1493 inTargetPositionBlockToProcess = false; 1513 1494 searchElementsFound = 0; … … 1591 1572 XMLStreamReader parser = xmlInFactory 1592 1573 .createXMLStreamReader(iStream); 1593 /*1594 * Parse the XML input stream using cursor-based XML parsing. Parse1595 * the document until end of document, or until the desired number1596 * of plate and well XML tags are found.1597 */1598 inTargetPlateBlockToProcess = false;1599 1574 inTargetPositionBlockToProcess = false; 1600 1575 searchElementsFound = 0; … … 1685 1660 XMLStreamReader parser = xmlInFactory 1686 1661 .createXMLStreamReader(iStream); 1687 /*1688 * Parse the XML input stream using cursor-based XML parsing. Parse1689 * the document until end of document, or until the desired number1690 * of target plate and target position XML tags are found.1691 */1692 inTargetPlateBlockToProcess = false;1693 1662 inTargetPositionBlockToProcess = false; 1694 1663 searchElementsFound = 0; … … 1757 1726 XMLStreamReader parser = xmlInFactory 1758 1727 .createXMLStreamReader(iStream); 1759 /*1760 * Parse the XML input stream using cursor-based XML parsing. Parse1761 * the document until end of document.1762 */1763 inTargetPlateBlockToProcess = false;1764 1728 inTargetPositionBlockToProcess = false; 1765 1729 searchElementsFound = 0; … … 1835 1799 XMLStreamReader parser = xmlInFactory 1836 1800 .createXMLStreamReader(iStream); 1837 /*1838 * Parse the XML input stream using cursor-based XML parsing. Parse1839 * the document until end of document.1840 */1841 inTargetPlateBlockToProcess = false;1842 1801 inTargetPositionBlockToProcess = false; 1843 1802 searchElementsFound = 0; … … 1913 1872 XMLStreamReader parser = xmlInFactory 1914 1873 .createXMLStreamReader(iStream); 1915 /*1916 * Parse the XML input stream using cursor-based XML parsing. Parse1917 * the document until end of document.1918 */1919 inTargetPlateBlockToProcess = false;1920 1874 inTargetPositionBlockToProcess = false; 1921 1875 searchElementsFound = 0; … … 1998 1952 XMLStreamReader parser = xmlInFactory 1999 1953 .createXMLStreamReader(iStream); 2000 /*2001 * Parse the XML input stream using cursor-based XML parsing. Parse2002 * the document until end of document.2003 */2004 inTargetPlateBlockToProcess = false;2005 1954 inTargetPositionBlockToProcess = false; 2006 1955 searchElementsFound = 0; … … 2141 2090 XMLStreamReader parser = xmlInFactory 2142 2091 .createXMLStreamReader(iStream); 2143 /*2144 * Parse the XML input stream using cursor-based XML parsing. Parse2145 * the document until end of document, or until an non-empty target2146 * position is found.2147 */2148 inTargetPlateBlockToProcess = false;2149 2092 inTargetPositionBlockToProcess = false; 2150 2093 searchElementsFound = 0; … … 2201 2144 * Empty character data temporary string buffer 2202 2145 */ 2203 if (tempStrBuf == (StringBuffer)null)2146 if (tempStrBuf == null) 2204 2147 { 2205 2148 tempStrBuf = new StringBuffer(); … … 2244 2187 */ 2245 2188 String attrValue = XMLImportUtil.seekAttribute("gelId", parser); 2246 if (attrValue != (String)null)2189 if (attrValue != null) 2247 2190 { 2248 2191 String currentGelIdStr = attrValue; … … 2265 2208 */ 2266 2209 String attrValue = XMLImportUtil.seekAttribute("MPId", parser); 2267 if (attrValue != (String)null)2210 if (attrValue != null) 2268 2211 { 2269 2212 String currentPlateIdStr = attrValue; … … 2284 2227 String currentTransferPlateIdStr = new String(""); 2285 2228 attrValue = XMLImportUtil.seekAttribute("transferMPId", parser); 2286 if (attrValue != (String)null)2229 if (attrValue != null) 2287 2230 { 2288 2231 currentTransferPlateIdStr = attrValue; … … 2328 2271 */ 2329 2272 String attrValue = XMLImportUtil.seekAttribute("label", parser); 2330 if (attrValue != (String)null)2273 if (attrValue != null) 2331 2274 { 2332 2275 String currentWellIdStr = attrValue; … … 2370 2313 */ 2371 2314 String attrValue = XMLImportUtil.seekAttribute("targetId", parser); 2372 if (attrValue != (String)null)2315 if (attrValue != null) 2373 2316 { 2374 2317 String currentTargetIdStr = attrValue; … … 2392 2335 */ 2393 2336 String attrValue = XMLImportUtil.seekAttribute("label", parser); 2394 if (attrValue != (String)null)2337 if (attrValue != null) 2395 2338 { 2396 2339 String currentTargetPositionIdStr = attrValue; … … 2448 2391 String currentSpotIdStr = new String(""); 2449 2392 attrValue = XMLImportUtil.seekAttribute("spotId", parser); 2450 if (attrValue != (String)null)2393 if (attrValue != null) 2451 2394 { 2452 2395 currentSpotIdStr = attrValue; … … 2463 2406 String currentGelIdStr = new String(""); 2464 2407 attrValue = XMLImportUtil.seekAttribute("gelId", parser); 2465 if (attrValue != (String)null)2408 if (attrValue != null) 2466 2409 { 2467 2410 currentGelIdStr = attrValue; … … 2505 2448 */ 2506 2449 attrValue = XMLImportUtil.seekAttribute("spotId", parser); 2507 if (attrValue != (String)null)2450 if (attrValue != null) 2508 2451 { 2509 2452 currentTargetSpotIdStr = attrValue; … … 2523 2466 */ 2524 2467 attrValue = XMLImportUtil.seekAttribute("gelId", parser); 2525 if (attrValue != (String)null)2468 if (attrValue != null) 2526 2469 { 2527 2470 currentTargetGelIdStr = attrValue; … … 2550 2493 String attrValue; 2551 2494 attrValue = XMLImportUtil.seekAttribute("MPId", parser); 2552 if (attrValue != (String)null)2495 if (attrValue != null) 2553 2496 { 2554 2497 currentTargetPlateIdStr = attrValue; … … 2716 2659 * buffer is emptied in this case. 2717 2660 */ 2718 if (tempStrBuf == (StringBuffer)null)2661 if (tempStrBuf == null) 2719 2662 { 2720 2663 tempStrBuf = new StringBuffer(); … … 2794 2737 * Return spot id. 2795 2738 */ 2796 return (String)spotIdList.get(0);2739 return spotIdList.get(0); 2797 2740 } 2798 2741 … … 2845 2788 * Return gel id. 2846 2789 */ 2847 return (String)gelIdList.get(0);2790 return gelIdList.get(0); 2848 2791 } 2849 2792 … … 2896 2839 * Return well id. 2897 2840 */ 2898 return (String)wellIdList.get(0);2841 return wellIdList.get(0); 2899 2842 } 2900 2843 … … 2946 2889 * Return plate id. 2947 2890 */ 2948 return (String)plateIdList.get(0);2891 return plateIdList.get(0); 2949 2892 } 2950 2893 … … 3002 2945 return null; 3003 2946 } 3004 else 3005 { 3006 log 3007 .debug("RobotFileImpl::getSpotIdFromTargetPlate(String targetId, String positionId): targetSpotIdList.get(0) = \"" + targetSpotIdList 3008 .get(0) + "\""); 3009 return (String) targetSpotIdList.get(0); 3010 } 2947 log 2948 .debug("RobotFileImpl::getSpotIdFromTargetPlate(String targetId, String positionId): targetSpotIdList.get(0) = \"" + targetSpotIdList 2949 .get(0) + "\""); 2950 return targetSpotIdList.get(0); 3011 2951 } 3012 2952 … … 3066 3006 return null; 3067 3007 } 3068 else 3069 { 3070 log 3071 .debug("RobotFileImpl::getGelIdFromTargetPlate(String targetId, String positionId): targetGelIdList.get(0) = \"" + targetGelIdList 3072 .get(0) + "\""); 3073 return (String) targetGelIdList.get(0); 3074 } 3008 log 3009 .debug("RobotFileImpl::getGelIdFromTargetPlate(String targetId, String positionId): targetGelIdList.get(0) = \"" + targetGelIdList 3010 .get(0) + "\""); 3011 return targetGelIdList.get(0); 3075 3012 } 3076 3013 … … 3132 3069 return null; 3133 3070 } 3134 else 3135 { 3136 log 3137 .debug("RobotFileImpl::getPlateIdFromTargetPlate(String targetId, String positionId): targetPlateIdList.get(0) = \"" + targetPlateIdList 3138 .get(0) + "\""); 3139 return (String) targetPlateIdList.get(0); 3140 } 3071 log 3072 .debug("RobotFileImpl::getPlateIdFromTargetPlate(String targetId, String positionId): targetPlateIdList.get(0) = \"" + targetPlateIdList 3073 .get(0) + "\""); 3074 return targetPlateIdList.get(0); 3141 3075 } 3142 3076 … … 3191 3125 * Return target position id. 3192 3126 */ 3193 return (String)targetPositionIdList.get(0);3127 return targetPositionIdList.get(0); 3194 3128 } 3195 3129 … … 3244 3178 * Return target id. 3245 3179 */ 3246 return (String)targetIdList.get(0);3180 return targetIdList.get(0); 3247 3181 } 3248 3182 -
trunk/api/core/src/org/proteios/io/TandemFactory.java
r1916 r2381 98 98 99 99 100 @Override 100 101 public String attributes() 101 102 { … … 114 115 115 116 117 @Override 116 118 public String attributes() 117 119 { … … 155 157 156 158 159 @Override 157 160 public String attributes() 158 161 { -
trunk/api/core/src/org/proteios/io/XMLImportUtil.java
r1921 r2381 73 73 * Namespace data not found, return null 74 74 */ 75 return (String)null;75 return null; 76 76 } 77 77 … … 107 107 * String not found, return null 108 108 */ 109 return (String)null;109 return null; 110 110 } 111 111 … … 151 151 * Attribute not found, return null 152 152 */ 153 return (String)null;153 return null; 154 154 } 155 155 … … 190 190 * Attribute not found, return null 191 191 */ 192 return (String)null;192 return null; 193 193 } 194 194 -
trunk/api/core/src/org/proteios/io/XMLTag.java
r1919 r2381 176 176 * @return a string representation of this tag and its children 177 177 */ 178 @Override 178 179 public String toString() 179 180 { -
trunk/api/core/src/org/proteios/io/mzdata/MzDataExpActivationBlock.java
r1921 r2381 111 111 for (int i = 0; i < cvParamList.size(); i++) 112 112 { 113 CvParam cvParam = (CvParam)cvParamList.get(i);113 CvParam cvParam = cvParamList.get(i); 114 114 String cvLabel = cvParam.getCvLabel(); 115 115 String cvAccession = cvParam.getAccession(); … … 130 130 for (int i = 0; i < userParamList.size(); i++) 131 131 { 132 UserParam userParam = (UserParam)userParamList.get(i);132 UserParam userParam = userParamList.get(i); 133 133 String name = userParam.getName(); 134 134 String value = userParam.getValue(); -
trunk/api/core/src/org/proteios/io/mzdata/MzDataExpAnalyzerBlock.java
r1921 r2381