Changeset 2381


Ignore:
Timestamp:
Nov 14, 2007, 11:40:46 AM (16 years ago)
Author:
Gregory Vincic
Message:

Refs #327. Used the clean up wizzard in eclipse to add

  • @Override statements where necessary


  • Remove unnecessary 'else' statements


  • Remove unused imports


  • Remove unused private variables
Location:
trunk
Files:
303 edited

Legend:

Unmodified
Added
Removed
  • trunk/api/core/src/org/proteios/core/AbstractEntityQuery.java

    r1916 r2381  
    161161    @throws UnsupportedOperationException Always
    162162  */
     163  @Override
    163164  public void select(Select select)
    164165  {
     
    169170    @throws UnsupportedOperationException Always
    170171  */
     172  @Override
    171173  public void selectPermanent(Select select)
    172174  {
     
    178180    @throws UnsupportedOperationException Always
    179181  */
     182  @Override
    180183  public void group(Expression expression)
    181184  {
     
    186189    @throws UnsupportedOperationException Always
    187190  */
     191  @Override
    188192  public void groupPermanent(Expression expression)
    189193  {
     
    195199    @throws UnsupportedOperationException Always
    196200  */
     201  @Override
    197202  public void having(Restriction restriction)
    198203  {
     
    203208    @throws UnsupportedOperationException Always
    204209  */
     210  @Override
    205211  public void havingPermanent(Restriction restriction)
    206212  {
     
    234240    clear cached queries.
    235241  */
     242  @Override
    236243  public void reset()
    237244  {
  • trunk/api/core/src/org/proteios/core/Acquisition.java

    r1916 r2381  
    2727import org.proteios.core.data.AcquisitionData;
    2828import org.proteios.core.data.InstrumentConfigurationData;
    29 import org.proteios.core.data.PeakListData;
    3029
    3130/**
     
    8988   * </ul>
    9089   */
     90  @Override
    9191  public boolean isUsed()
    9292      throws BaseException
     
    182182  public void setPeakList(PeakList peakList)
    183183  {
    184     getData().setPeakList((PeakListData) peakList.getData());
     184    getData().setPeakList(peakList.getData());
    185185  }
    186186}
  • trunk/api/core/src/org/proteios/core/Annotation.java

    r1916 r2381  
    9898   * Always return FALSE.
    9999   */
     100  @Override
    100101  public boolean isUsed()
    101102      throws BaseException
     
    110111   * the logged in user has WRITE permission on the associated item.
    111112   */
     113  @Override
    112114  void initPermissions(int granted, int denied)
    113115      throws BaseException
     
    143145        getData().getAnnotationSet());
    144146    }
    145     else
    146     {
    147       return annotationSet;
    148     }
     147    return annotationSet;
    149148  }
    150149
  • trunk/api/core/src/org/proteios/core/AnnotationBetweenRestriction.java

    r1916 r2381  
    8282    -------------------------------------------
    8383  */
     84  @Override
    8485  String getRestrictionSql(Query query, DbControl dc)
    8586    throws BaseException
     
    8990  }
    9091 
     92  @Override
    9193  void setRestrictionParameters(SQLQuery query)
    9294  {
  • trunk/api/core/src/org/proteios/core/AnnotationInRestriction.java

    r1916 r2381  
    7777    -------------------------------------------
    7878  */
     79  @Override
    7980  String getRestrictionSql(Query query, DbControl dc)
    8081    throws BaseException
     
    8485  }
    8586 
     87  @Override
    8688  void setRestrictionParameters(SQLQuery query)
    8789  {
  • trunk/api/core/src/org/proteios/core/AnnotationSet.java

    r1916 r2381  
    124124   * deleted.
    125125   */
     126  @Override
    126127  public boolean isUsed()
    127128      throws BaseException
     
    136137   * the logged in user has WRITE permission on the associated item.
    137138   */
     139  @Override
    138140  void initPermissions(int granted, int denied)
    139141      throws BaseException
  • trunk/api/core/src/org/proteios/core/AnnotationSimpleRestriction.java

    r1916 r2381  
    100100    -------------------------------------------
    101101  */
     102  @Override
    102103  String getRestrictionSql(Query query, DbControl dc)
    103104    throws BaseException
     
    107108  }
    108109 
     110  @Override
    109111  void setRestrictionParameters(SQLQuery query)
    110112  {
  • trunk/api/core/src/org/proteios/core/AnnotationType.java

    r1916 r2381  
    109109   * </ul>
    110110   */
     111  @Override
    111112  public boolean isUsed()
    112113      throws BaseException
  • trunk/api/core/src/org/proteios/core/Application.java

    r2351 r2381  
    664664     * From the TimerTask class -------------------------------------------
    665665     */
     666    @Override
    666667    public void run()
    667668    {
  • trunk/api/core/src/org/proteios/core/BasicBatcher.java

    r1916 r2381  
    203203    Close all open SQL statements.
    204204  */
     205  @Override
    205206  void onBeforeClose()
    206207    throws BaseException
  • trunk/api/core/src/org/proteios/core/BasicItem.java

    r1916 r2381  
    130130    -------------------------------------------
    131131  */
     132  @Override
    132133  public String toString()
    133134  {
     
    145146    @see BasicData#equals(Object)
    146147  */
     148  @Override
    147149  public final boolean equals(Object o)
    148150  {
     
    159161    @see BasicData#hashCode()
    160162  */
     163  @Override
    161164  public final int hashCode()
    162165  {
  • trunk/api/core/src/org/proteios/core/BioMaterial.java

    r2145 r2381  
    9191  public void addFile(File file)
    9292  {
    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());
    9595  }
    9696
     
    135135    while (it.hasNext())
    136136    {
    137       fileDataSet.add((FileData) it.next().getData());
     137      fileDataSet.add(it.next().getData());
    138138    }
    139139    getData().setFiles(fileDataSet);
  • trunk/api/core/src/org/proteios/core/BioMaterialEvent.java

    r2287 r2381  
    3131import org.proteios.core.query.Hql;
    3232import org.proteios.core.query.Restrictions;
    33 
    3433import java.util.Date;
    3534import java.util.HashMap;
     
    116115   * @return Always false
    117116   */
     117  @Override
    118118  public boolean isUsed()
    119119      throws BaseException
     
    126126   * Return used guantity to biomaterials on delete action.
    127127   */
     128  @Override
    128129  void onBeforeCommit(Transactional.Action action)
    129130      throws BaseException
     
    142143   * biomaterial.
    143144   */
     145  @Override
    144146  void initPermissions(int granted, int denied)
    145147      throws BaseException
     
    164166   * first of multiple sources
    165167   */
     168  @Override
    166169  SharedData getSharedParent()
    167170  {
     
    287290    // userData.checkPermission(Permission.USE);
    288291    // getData().setUser((UserData) user.getData());
    289     getData().setUser((UserData) userData);
     292    getData().setUser(userData);
    290293  }
    291294
     
    366369      return getUsedQuantity();
    367370    }
    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();
    374374  }
    375375
     
    677677  }
    678678
    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
    682684   *
    683685   * @return Returns the previousBioMaterialEvent.
     
    685687  public BioMaterialEvent<?> getPreviousBioMaterialEvent()
    686688  {
    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
    695698   *
    696699   * @param previousBioMaterialEvent The previousBioMaterialEvent to set.
     
    702705      previousBioMaterialEvent.getData());
    703706  }
    704  
     707
    705708  /**
    706709   * The type of the event.
     
    761764
    762765
     766    @Override
    763767    public String toString()
    764768    {
  • trunk/api/core/src/org/proteios/core/BioSource.java

    r1916 r2381  
    9999   * </ul>
    100100   */
     101  @Override
    101102  public boolean isUsed()
    102103      throws BaseException
  • trunk/api/core/src/org/proteios/core/BooleanParameterType.java

    r1916 r2381  
    5858    -------------------------------------------
    5959  */
     60  @Override
    6061  public String toString()
    6162  {
  • trunk/api/core/src/org/proteios/core/ChildItem.java

    r1916 r2381  
    6969    is granted.
    7070  */
     71  @Override
    7172  void initPermissions(int granted, int denied)
    7273    throws BaseException
  • trunk/api/core/src/org/proteios/core/Client.java

    r1916 r2381  
    2626
    2727import 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;
    3128
    3229/**
     
    129126   * deleted and aren't inclued in this check.
    130127   */
     128  @Override
    131129  public boolean isUsed()
    132130      throws BaseException
  • trunk/api/core/src/org/proteios/core/ContextKey.java

    r1916 r2381  
    5858    object. They are equal if both have the same item and subcontext.
    5959  */
     60  @Override
    6061  public boolean equals(Object o)
    6162  {
     
    7172    Calculate the hash code for the object.
    7273  */
     74  @Override
    7375  public int hashCode()
    7476  {
    75     return (int)53 * item.getValue() + 17 * subContext.hashCode();
     77    return 53 * item.getValue() + 17 * subContext.hashCode();
    7678  }
    7779}
  • trunk/api/core/src/org/proteios/core/CreationEvent.java

    r2116 r2381  
    110110   * biomaterial is set.
    111111   */
     112  @Override
    112113  SharedData getSharedParent()
    113114  {
     
    191192   * biomaterial.
    192193   */
     194  @Override
    193195  void initPermissions(int granted, int denied)
    194196      throws BaseException
  • trunk/api/core/src/org/proteios/core/DataProcessingStep.java

    r2032 r2381  
    2626
    2727import org.proteios.core.data.DataProcessingStepData;
    28 import org.proteios.core.data.SoftwareData;
    2928import java.util.Date;
    3029import java.util.Set;
     
    9594   * </ul>
    9695   */
     96  @Override
    9797  public boolean isUsed()
    9898      throws BaseException
     
    141141   * @return the description of this data processing step
    142142   */
     143  @Override
    143144  public String getDescription()
    144145  {
     
    158159   *         {@link #MAX_DESCRIPTION_LENGTH}
    159160   */
     161  @Override
    160162  public void setDescription(String description)
    161163      throws PermissionDeniedException, InvalidDataException
     
    201203    if (software == null)
    202204      throw new InvalidUseOfNullException("software");
    203     getData().setSoftware((SoftwareData) software.getData());
     205    getData().setSoftware(software.getData());
    204206  }
    205207}
  • trunk/api/core/src/org/proteios/core/DataResultIterator.java

    r1916 r2381  
    6363
    6464  /**
    65     The class of the data objects returned by the query (and this object).
    66   */
    67   private final Class<I> dataClass;
    68 
    69   /**
    7065    The type of items returned by the query.
    7166  */
     
    7873    this.dc = dc;
    7974    this.sc = dc.getSessionControl();
    80     this.dataClass = dataClass;
    8175    this.itemType = Item.fromDataClass(dataClass);
    8276    this.totalCount = totalCount;
  • trunk/api/core/src/org/proteios/core/DatabaseException.java

    r1977 r2381  
    2424 */
    2525package org.proteios.core;
    26 
    27 import org.hibernate.metadata.ClassMetadata;
    28 import org.proteios.core.data.BasicData;
    2926
    3027/**
  • trunk/api/core/src/org/proteios/core/DateParameterType.java

    r1916 r2381  
    6666    -------------------------------------------
    6767  */
     68  @Override
    6869  public String toString()
    6970  {
  • trunk/api/core/src/org/proteios/core/DbControl.java

    r2036 r2381  
    727727        // To get the real instance we...
    728728        // 1. Find out the real data-layer class
    729         realDataClass = (Class<? extends BasicData>) org.hibernate.proxy.HibernateProxyHelper
     729        realDataClass = org.hibernate.proxy.HibernateProxyHelper
    730730          .getClassWithoutInitializingProxy(data);
    731731        // 2. Initialise the proxy using the stateful session (the proxy
     
    754754      else
    755755      {
    756         realDataClass = (Class<? extends BasicData>) data.getClass();
     756        realDataClass = data.getClass();
    757757      }
    758758      // Check if the item is in the cache.
     
    10101010   * Clean up if a bad client application forgot to close the connection.
    10111011   */
     1012  @Override
    10121013  protected void finalize()
    10131014      throws Throwable
  • trunk/api/core/src/org/proteios/core/DigestParameter.java

    r1937 r2381  
    2626
    2727import org.proteios.core.data.DigestParameterData;
    28 import org.proteios.core.data.SpectrumSearchData;
    29 
    3028import java.util.Set;
    3129
     
    9593   * </ul>
    9694   */
     95  @Override
    9796  public boolean isUsed()
    9897      throws BaseException
     
    125124  {
    126125    getData().setSpectrumSearch(
    127       (SpectrumSearchData) spectrumSearch.getData());
     126      spectrumSearch.getData());
    128127  }
    129128
     
    159158   * @return the name of this digest parameter
    160159   */
     160  @Override
    161161  public String getName()
    162162  {
     
    174174   *         {@link #MAX_NAME_LENGTH}
    175175   */
     176  @Override
    176177  public void setName(String name)
    177178      throws InvalidDataException
  • trunk/api/core/src/org/proteios/core/DoubleParameterType.java

    r1916 r2381  
    8585    -------------------------------------------
    8686  */
     87  @Override
    8788  public String toString()
    8889  {
  • trunk/api/core/src/org/proteios/core/Experiment.java

    r1916 r2381  
    168168
    169169
     170  @Override
    170171  void onBeforeCommit(Transactional.Action action)
    171172      throws BaseException
  • trunk/api/core/src/org/proteios/core/ExtendedProperties.java

    r1916 r2381  
    165165      className = className.substring(index+1);
    166166    }
    167     List<ExtendedProperty> l = (List<ExtendedProperty>)properties.get(className);
     167    List<ExtendedProperty> l = properties.get(className);
    168168    return l;
    169169  }
     
    176176  private static void loadClasses(Document dom)
    177177  {
    178     List<Element> classTags = (List<Element>)dom.getRootElement().getChildren("class");
     178    List<Element> classTags = dom.getRootElement().getChildren("class");
    179179    for (Element el : classTags)
    180180    {
     
    193193  {
    194194    List<ExtendedProperty> properties = new ArrayList<ExtendedProperty>();
    195     List<Element> children = (List<Element>)classElement.getChildren("property");
     195    List<Element> children = classElement.getChildren("property");
    196196    for (Element property : children)
    197197    {
  • trunk/api/core/src/org/proteios/core/ExtendedPropertyAccessor.java

    r1916 r2381  
    4444 * <code>Setter</code> objects for each extended property of an
    4545 * <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.
    4948 *
    5049 * @author Nicklas, Samuel
     
    5251 * @see org.proteios.core.data.ExtendableData
    5352 * @see ExtendedProperty
    54  * @see ExtendedProperties 
     53 * @see ExtendedProperties
    5554 */
    5655public final class ExtendedPropertyAccessor
     
    7776      return new GetterSetter(clazz, property);
    7877    }
    79     else
    80     {
    81       throw new PropertyNotFoundException(
    82         clazz.getName() + " is not Extendable");
    83     }
     78    throw new PropertyNotFoundException(
     79      clazz.getName() + " is not Extendable");
    8480  }
    8581
     
    10197      return new GetterSetter(clazz, property);
    10298    }
    103     else
    104     {
    105       throw new PropertyNotFoundException(
    106         clazz.getName() + " is not Extendable");
    107     }
     99    throw new PropertyNotFoundException(
     100      clazz.getName() + " is not Extendable");
    108101  }
    109102
     
    118111      implements Getter, Setter
    119112  {
    120     private final Class clazz;
    121113    private final String property;
    122114
     
    130122    private GetterSetter(Class clazz, String property)
    131123    {
    132       this.clazz = clazz;
    133124      this.property = property;
    134125    }
  • trunk/api/core/src/org/proteios/core/Extract.java

    r2260 r2381  
    120120   * </ul>
    121121   */
     122  @Override
    122123  public boolean isUsed()
    123124      throws BaseException
  • trunk/api/core/src/org/proteios/core/File.java

    r2313 r2381  
    193193   * From the Nameable interface -------------------------------------------
    194194   */
     195  @Override
    195196  public void setName(String name)
    196197      throws PermissionDeniedException, InvalidDataException
  • trunk/api/core/src/org/proteios/core/FileMap.java

    r1916 r2381  
    6161        // We use a stack to temporary store filenodes
    6262        Stack<FileNode> stack = new Stack<FileNode>();
    63         int level = 0;
    6463        for (String line : text.split("\n"))
    6564        {
     
    141140      if (node.getFileId() == fileId)
    142141        return node;
    143       else
    144         return findFileNodeById(node.getChildren(), fileId);
     142      return findFileNodeById(node.getChildren(), fileId);
    145143    }
    146144    return null;
  • trunk/api/core/src/org/proteios/core/FileNode.java

    r1916 r2381  
    161161
    162162
     163  @Override
    163164  public String toString()
    164165  {
  • trunk/api/core/src/org/proteios/core/FileParameterType.java

    r1916 r2381  
    5959    -------------------------------------------
    6060  */
     61  @Override
    6162  public String toString()
    6263  {
  • trunk/api/core/src/org/proteios/core/FileType.java

    r1916 r2381  
    202202
    203203
     204  @Override
    204205  void initPermissions(int granted, int denied)
    205206      throws BaseException
  • trunk/api/core/src/org/proteios/core/FloatParameterType.java

    r1916 r2381  
    8686    -------------------------------------------
    8787  */
     88  @Override
    8889  public String toString()
    8990  {
  • trunk/api/core/src/org/proteios/core/GelElectrophoresis.java

    r2203 r2381  
    7272   * -------------------------------------------
    7373   */
     74  @Override
    7475  public Item getType()
    7576  {
     
    9798   * </ul>
    9899   */
     100  @Override
    99101  public boolean isUsed()
    100102      throws BaseException
  • trunk/api/core/src/org/proteios/core/GelImageAnalysisEvent.java

    r1982 r2381  
    2525
    2626import org.proteios.core.data.GelImageAnalysisEventData;
    27 import org.proteios.core.data.HardwareConfigurationData;
    28 import org.proteios.core.data.SoftwareConfigurationData;
    2927import org.proteios.core.data.UserData;
    3028import java.util.Date;
     
    9997   * -------------------------------------------
    10098   */
     99  @Override
    101100  public Item getType()
    102101  {
     
    126125   * </ul>
    127126   */
     127  @Override
    128128  public boolean isUsed()
    129129      throws BaseException
     
    191191      throw new InvalidUseOfNullException("hardwareSettings");
    192192    getData().setHardwareSettings(
    193       (HardwareConfigurationData) hardwareSettings.getData());
     193      hardwareSettings.getData());
    194194  }
    195195
     
    213213      throw new InvalidUseOfNullException("softwareSettings");
    214214    getData().setSoftwareSettings(
    215       (SoftwareConfigurationData) softwareSettings.getData());
     215      softwareSettings.getData());
    216216  }
    217217}
  • trunk/api/core/src/org/proteios/core/GelScanEvent.java

    r2114 r2381  
    2424package org.proteios.core;
    2525
    26 import org.proteios.core.data.GelElectrophoresisData;
    2726import org.proteios.core.data.GelScanEventData;
    28 import org.proteios.core.data.HardwareConfigurationData;
    29 
    3027import java.util.Set;
    3128
     
    7370   * -------------------------------------------
    7471   */
     72  @Override
    7573  public Item getType()
    7674  {
     
    10098   * </ul>
    10199   */
     100  @Override
    102101  public boolean isUsed()
    103102      throws BaseException
     
    131130  {
    132131    getData().setSeparationMethod(
    133       (GelElectrophoresisData) gelElectrophoresis.getData());
     132      gelElectrophoresis.getData());
    134133  }
    135134
     
    173172      throw new InvalidUseOfNullException("hardwareSettings");
    174173    getData().setHardwareSettings(
    175       (HardwareConfigurationData) hardwareSettings.getData());
     174      hardwareSettings.getData());
    176175  }
    177176}
  • trunk/api/core/src/org/proteios/core/GlobalDefaultSetting.java

    r1916 r2381  
    8888   * READ permission is always granted.
    8989   */
     90  @Override
    9091  void initPermissions(int granted, int denied)
    9192      throws BaseException
  • trunk/api/core/src/org/proteios/core/Group.java

    r1916 r2381  
    189189   * deleted and aren't included in this check.
    190190   */
     191  @Override
    191192  public boolean isUsed()
    192193      throws BaseException
     
    208209   * revoked.
    209210   */
     211  @Override
    210212  void initPermissions(int granted, int denied)
    211213      throws BaseException
  • trunk/api/core/src/org/proteios/core/HardwareConfiguration.java

    r1916 r2381  
    9595   * </ul>
    9696   */
     97  @Override
    9798  public boolean isUsed()
    9899      throws BaseException
  • trunk/api/core/src/org/proteios/core/HardwareType.java

    r1916 r2381  
    116116   * revoked.
    117117   */
     118  @Override
    118119  void initPermissions(int granted, int denied)
    119120      throws BaseException
  • trunk/api/core/src/org/proteios/core/HibernateUtil.java

    r1977 r2381  
    11141114    try
    11151115    {
    1116       return (List<T>) query.list();
     1116      return query.list();
    11171117    }
    11181118    catch (Throwable ex)
  • trunk/api/core/src/org/proteios/core/IPG.java

    r2146 r2381  
    6868   * -------------------------------------------
    6969   */
     70  @Override
    7071  public Item getType()
    7172  {
     
    9596   * </ul>
    9697   */
     98  @Override
    9799  public boolean isUsed()
    98100      throws BaseException
  • trunk/api/core/src/org/proteios/core/Install.java

    r2326 r2381  
    9797      timer = new TimerTask()
    9898      {
     99        @Override
    99100        public void run()
    100101        {
     
    217218
    218219
     220          @Override
    219221          public String toString()
    220222          {
  • trunk/api/core/src/org/proteios/core/IntegerParameterType.java

    r1916 r2381  
    8686    -------------------------------------------
    8787  */
     88  @Override
    8889  public String toString()
    8990  {
  • trunk/api/core/src/org/proteios/core/InternalJobQueue.java

    r1916 r2381  
    211211   * in it's own thread.
    212212   */
     213  @Override
    213214  public void run()
    214215  {
     
    517518     * Never reload since everyting is static.
    518519     */
     520    @Override
    519521    boolean getReload()
    520522    {
     
    527529     * <code>itemType</code> = {@link Item#SYSTEM}, 0 otherwise.
    528530     */
     531    @Override
    529532    int getRolePermissions(Item itemType)
    530533    {
     
    533536        return systemPermissions;
    534537      }
    535       else
    536       {
    537         return 0;
    538       }
     538      return 0;
    539539    }
    540540
     
    543543     * Return 0.
    544544     */
     545    @Override
    545546    int getSharedPermissions(ShareableData sharableData)
    546547    {
     
    552553     * Return 0.
    553554     */
     555    @Override
    554556    int getAllPermissions(Item itemType, UserData owner,
    555557        ItemKeyData itemKey, ProjectKeyData projectKey)
     
    562564     * Return empty set.
    563565     */
     566    @Override
    564567    Set<Integer> getRoles()
    565568    {
     
    571574     * Return empty set.
    572575     */
     576    @Override
    573577    Set<Integer> getGroups()
    574578    {
     
    580584     * Return empty set.
    581585     */
     586    @Override
    582587    Set<Integer> getUsers()
    583588    {
     
    589594     * Return empty map.
    590595     */
     596    @Override
    591597    Map<Integer, Integer> getProjects()
    592598    {
     
    598604     * Return empty set.
    599605     */
     606    @Override
    600607    Set<Integer> getItemKeys()
    601608    {
     
    607614     * Return empty set.
    608615     */
     616    @Override
    609617    Set<Integer> getProjectKeys()
    610618    {
  • trunk/api/core/src/org/proteios/core/Item.java

    r2378 r2381  
    622622
    623623
     624  @Override
    624625  public String toString()
    625626  {
     
    706707      throw new ItemNotFoundException(itemClass + "[id=" + id + "]");
    707708    }
    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)
    711717      {
    712         return (BasicItem) getById.invoke(null, dc, id);
     718        throw (BaseException) cause;
    713719      }
    714       catch (Throwable ex)
     720      else if (cause != null)
    715721      {
    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);
    729727      }
    730728    }
     
    819817    if (data instanceof org.hibernate.proxy.HibernateProxy)
    820818    {
    821       dataClass = (Class<? extends BasicData>) org.hibernate.proxy.HibernateProxyHelper
     819      dataClass = org.hibernate.proxy.HibernateProxyHelper
    822820        .getClassWithoutInitializingProxy(data);
    823821    }
  • trunk/api/core/src/org/proteios/core/ItemContext.java

    r1916 r2381  
    750750    }
    751751   
     752    @Override
    752753    public String toString()
    753754    {
  • trunk/api/core/src/org/proteios/core/ItemFactory.java

    r2162 r2381  
    142142      return item;
    143143    }
    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;
    149146  }
    150147
     
    596593        throw new ItemNotFoundException("File[path=" + path + "]");
    597594      }
    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());
    605599    }
    606600    else
  • trunk/api/core/src/org/proteios/core/ItemKey.java

    r1916 r2381  
    206206    </ul>
    207207  */
     208  @Override
    208209  public boolean isUsed()
    209210    throws BaseException
     
    223224    permission is always granted.
    224225  */
     226  @Override
    225227  void initPermissions(int granted, int denied)
    226228    throws BaseException
     
    373375        return data.getId();
    374376      }
    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);
    380380    }
    381381    catch (BaseException ex)
  • trunk/api/core/src/org/proteios/core/ItemParameterType.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/ItemResultList.java

    r1916 r2381  
    8383      return data.contains(((BasicItem)o).getData());
    8484    }
    85     else
    86     {
    87       return false;
    88     }
     85    return false;
    8986  }
    9087  /**
     
    103100      return data.indexOf(((BasicItem)o).getData());
    104101    }
    105     else
    106     {
    107       return -1;
    108     }
     102    return -1;
    109103  }
    110104  public int lastIndexOf(Object o)
     
    114108      return data.lastIndexOf(((BasicItem)o).getData());
    115109    }
    116     else
    117     {
    118       return -1;
    119     }
     110    return -1;
    120111  }
    121112  public boolean isEmpty()
     
    179170    -------------------------------------------
    180171  */
     172  @Override
    181173  public boolean equals(Object o)
    182174  {
     
    185177      return data.equals(((ItemResultList)o).data);
    186178    }
    187     else
    188     {
    189       return false;
    190     }
     179    return false;
    191180  }
    192181 
     182  @Override
    193183  public int hashCode()
    194184  {
  • trunk/api/core/src/org/proteios/core/Job.java

    r1916 r2381  
    191191   * Return TRUE if the status is EXECUTING, FALSE otherwise.
    192192   */
     193  @Override
    193194  public boolean isUsed()
    194195      throws BaseException
     
    961962
    962963
     964    @Override
    963965    public String toString()
    964966    {
     
    10441046
    10451047
     1048    @Override
    10461049    public String toString()
    10471050    {
     
    11281131
    11291132
     1133    @Override
    11301134    public String toString()
    11311135    {
  • trunk/api/core/src/org/proteios/core/Keyring.java

    r1916 r2381  
    754754    extends TimerTask
    755755  {
     756    @Override
    756757    public void run()
    757758    {
  • trunk/api/core/src/org/proteios/core/Label.java

    r1916 r2381  
    110110   * </ul>
    111111   */
     112  @Override
    112113  public boolean isUsed()
    113114      throws BaseException
  • trunk/api/core/src/org/proteios/core/LabeledExtract.java

    r2260 r2381  
    112112    </ul>
    113113  */
     114  @Override
    114115  public boolean isUsed()
    115116    throws BaseException
  • trunk/api/core/src/org/proteios/core/Location.java

    r1916 r2381  
    8686  }
    8787 
     88  @Override
    8889  public String toString()
    8990  {
  • trunk/api/core/src/org/proteios/core/LongParameterType.java

    r1916 r2381  
    8686    -------------------------------------------
    8787  */
     88  @Override
    8889  public String toString()
    8990  {
  • trunk/api/core/src/org/proteios/core/LsidElement.java

    r1916 r2381  
    3838 * were added, method setAccession_number(String acc) was changed from
    3939 * private to public, and CoreException was exchanged for BaseException.
    40  * (2007-04-12/Olle Månsson)
     40 * (2007-04-12/Olle Mnsson)
    4141 */
    4242import java.net.URL;
     
    224224        {
    225225          throw new BaseException();
    226         }
    227         else
    228         {
    229           BufferedReader in = new BufferedReader(
    230               new InputStreamReader(resolver.getData(dataport)));
    231           retval = in.readLine();
    232           in.close();
    233226        }
     227        BufferedReader in = new BufferedReader(
     228            new InputStreamReader(resolver.getData(dataport)));
     229        retval = in.readLine();
     230        in.close();
    234231      }
    235232      catch (LSIDException e)
  • trunk/api/core/src/org/proteios/core/MeasuredArea.java

    r1954 r2381  
    2424package org.proteios.core;
    2525
    26 import org.proteios.core.data.ExtractData;
    2726import org.proteios.core.data.MeasuredAreaData;
    2827
     
    8483   * </ul>
    8584   */
     85  @Override
    8686  public boolean isUsed()
    8787      throws BaseException
  • trunk/api/core/src/org/proteios/core/MeasuredBioMaterial.java

    r2057 r2381  
    2626
    2727import org.proteios.core.data.BioMaterialEventData;
    28 import org.proteios.core.data.CreationEventData;
    2928import org.proteios.core.data.MeasuredBioMaterialData;
    3029
     
    6867   * </ul>
    6968   */
     69  @Override
    7070  public boolean isUsed()
    7171      throws BaseException
     
    8989   * Hibernate.
    9090   */
     91  @Override
    9192  void onBeforeCommit(Transactional.Action action)
    9293      throws BaseException
     
    121122  public void setCreationEvent(CreationEvent creationEvent)
    122123  {
    123     getData().setCreationEvent((CreationEventData) creationEvent.getData());
     124    getData().setCreationEvent(creationEvent.getData());
    124125  }
    125126
     
    202203        return;
    203204      }
    204       else
    205       {
    206         remain = bioMaterial.getRemainingQuantity();
    207       }
     205      remain = bioMaterial.getRemainingQuantity();
    208206    }
    209207    bioMaterial.setRemainingQuantity(remain - usedQuantity);
  • trunk/api/core/src/org/proteios/core/Message.java

    r1916 r2381  
    197197    A message is not used by other items.
    198198  */
     199  @Override
    199200  public boolean isUsed()
    200201    throws BaseException
     
    206207    is the same as the user the message is to.
    207208  */
     209  @Override
    208210  void initPermissions(int granted, int denied)
    209211    throws BaseException
  • trunk/api/core/src/org/proteios/core/Metadata.java

    r1916 r2381  
    331331  }
    332332
     333  @Override
    333334  public String toString()
    334335  {
  • trunk/api/core/src/org/proteios/core/News.java

    r1916 r2381  
    165165   * Always return FALSE. A News item is not used by other items.
    166166   */
     167  @Override
    167168  public boolean isUsed()
    168169      throws BaseException
     
    175176   * Check that startDate is before newsDate is before endDate.
    176177   */
     178  @Override
    177179  void validate()
    178180      throws InvalidDataException, BaseException
     
    200202   * Read permission is granted if today is between the start and end date.
    201203   */
     204  @Override
    202205  void initPermissions(int granted, int denied)
    203206      throws BaseException
  • trunk/api/core/src/org/proteios/core/ObservedModification.java

    r1539 r2381  
    9898   * </ul>
    9999   */
     100  @Override
    100101  public boolean isUsed()
    101102      throws BaseException
  • trunk/api/core/src/org/proteios/core/Operator.java

    r1916 r2381  
    3939  AND(1, "AND", "AND", false)
    4040  {
     41    @Override
    4142    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    4243      throws InvalidDataException
     
    4849  OR(2, "OR", "OR", false)
    4950  {
     51    @Override
    5052    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    5153      throws InvalidDataException
     
    5759  NOT(3, "NOT", "NOT", false)
    5860  {
     61    @Override
    5962    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    6063      throws InvalidDataException
     
    6669  EQ(4, "=", "=", true)
    6770  {
     71    @Override
    6872    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    6973      throws InvalidDataException
     
    7579  NEQ(5, "!=", "!=", true)
    7680  {
     81    @Override
    7782    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    7883      throws InvalidDataException
     
    8489  LT(6, "<", "<", true)
    8590  {
     91    @Override
    8692    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    8793      throws InvalidDataException
     
    9399  LTEQ(7, "<=", "<=", true)
    94100  {
     101    @Override
    95102    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    96103      throws InvalidDataException
     
    102109  GT(8, ">", ">", true)
    103110  {
     111    @Override
    104112    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    105113      throws InvalidDataException
     
    111119  GTEQ(9, ">=", ">=", true)
    112120  {
     121    @Override
    113122    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    114123      throws InvalidDataException
     
    120129  LIKE(10, "LIKE", "LIKE", true)
    121130  {
     131    @Override
    122132    public Restriction getRestriction(Expression lvalue, Expression rvalue)
    123133      throws InvalidDataException
  • trunk/api/core/src/org/proteios/core/OwnedItem.java

    r1916 r2381  
    7777    @throws BaseException If there is another error
    7878  */
     79  @Override
    7980  void onBeforeCommit(Transactional.Action action)
    8081    throws NotLoggedInException, BaseException
     
    9495    SET_OWNER and SET_PERMISSION permission is granted.
    9596  */
     97  @Override
    9698  void initPermissions(int granted, int denied)
    9799    throws BaseException
  • trunk/api/core/src/org/proteios/core/ParameterValuesImpl.java

    r1916 r2381  
    117117      return values.get(0);
    118118    }
    119     else
    120     {
    121       return null;
    122     }
     119    return null;
    123120  }
    124121   
  • trunk/api/core/src/org/proteios/core/Peak.java

    r1916 r2381  
    2626
    2727import org.proteios.core.data.PeakData;
    28 import org.proteios.core.data.PeakListData;
    2928
    3029/**
     
    113112   * </ul>
    114113   */
     114  @Override
    115115  public boolean isUsed()
    116116      throws BaseException
     
    203203  public void setPeakList(PeakList peakList)
    204204  {
    205     getData().setPeakList((PeakListData) peakList.getData());
     205    getData().setPeakList(peakList.getData());
    206206  }
    207207}
  • trunk/api/core/src/org/proteios/core/PeakList.java

    r1916 r2381  
    2828import org.proteios.core.data.PeakData;
    2929import org.proteios.core.data.PeakListData;
    30 import org.proteios.core.data.PeakListSetData;
    3130import org.proteios.core.data.PrecursorData;
    3231import org.proteios.core.query.Hql;
     
    136135   * </ul>
    137136   */
     137  @Override
    138138  public boolean isUsed()
    139139      throws BaseException
     
    166166      throws BaseException
    167167  {
    168     getData().setPeakListSet((PeakListSetData) peakListSet.getData());
     168    getData().setPeakListSet(peakListSet.getData());
    169169  }
    170170
     
    220220   * @return the description of this peak list
    221221   */
     222  @Override
    222223  public String getDescription()
    223224  {
     
    235236   *         {@link #MAX_DESCRIPTION_LENGTH}
    236237   */
     238  @Override
    237239  public void setDescription(String description)
    238240      throws InvalidDataException
     
    667669    for (int i = 0; i < arraySize; i++)
    668670    {
    669       acquisitionDataList.add(i, (AcquisitionData) acquisitionList.get(i)
     671      acquisitionDataList.add(i, acquisitionList.get(i)
    670672        .getData());
    671673    }
    672674    getData().setAcquisitionList(
    673       (List<AcquisitionData>) acquisitionDataList);
     675      acquisitionDataList);
    674676  }
    675677
     
    744746    for (int i = 0; i < arraySize; i++)
    745747    {
    746       precursorDataList.add(i, (PrecursorData) precursorList.get(i)
     748      precursorDataList.add(i, precursorList.get(i)
    747749        .getData());
    748750    }
    749     getData().setPrecursorList((List<PrecursorData>) precursorDataList);
     751    getData().setPrecursorList(precursorDataList);
    750752  }
    751753
  • trunk/api/core/src/org/proteios/core/PeakListSet.java

    r1916 r2381  
    2727import org.proteios.core.data.DataProcessingStepData;
    2828import org.proteios.core.data.HardwareConfigurationData;
    29 import org.proteios.core.data.HardwareData;
    3029import org.proteios.core.data.InstrumentConfigurationData;
    3130import org.proteios.core.data.PeakListData;
     
    278277      analyzersData.add(i, analyzers.get(i).getData());
    279278    }
    280     getData().setAnalyzers((List<HardwareConfigurationData>) analyzersData);
     279    getData().setAnalyzers(analyzersData);
    281280  }
    282281
     
    314313      throw new InvalidDataException(
    315314        "detector hardware not equal to instrument hardware");
    316     getData().setDetector((HardwareConfigurationData) detector.getData());
     315    getData().setDetector(detector.getData());
    317316  }
    318317
     
    348347    if (instrument == null)
    349348      throw new InvalidUseOfNullException("instrument");
    350     getData().setInstrument((HardwareData) instrument.getData());
     349    getData().setInstrument(instrument.getData());
    351350  }
    352351
     
    385384        "ionisationSource hardware not equal to instrument hardware");
    386385    getData().setIonisationSource(
    387       (HardwareConfigurationData) ionisationSource.getData());
     386      ionisationSource.getData());
    388387  }
    389388
     
    477476    {
    478477      dataProcessingStepDataList.add(i,
    479         (DataProcessingStepData) dataProcessingStepList.get(i)
     478        dataProcessingStepList.get(i)
    480479          .getData());
    481480    }
    482481    getData().setDataProcessingStepList(
    483       (List<DataProcessingStepData>) dataProcessingStepDataList);
     482      dataProcessingStepDataList);
    484483  }
    485484
     
    493492  {
    494493    getData().getDataProcessingStepList().add(
    495       (DataProcessingStepData) dp.getData());
     494      dp.getData());
    496495  }
    497496
     
    594593    while (peakListIterator.hasNext())
    595594    {
    596       peakLists.add((PeakListData) peakListIterator.next().getData());
     595      peakLists.add(peakListIterator.next().getData());
    597596    }
    598597    getData().setPeakLists(peakLists);
  • trunk/api/core/src/org/proteios/core/Peptide.java

    r1547 r2381  
    9797   * </ul>
    9898   */
     99  @Override
    99100  public boolean isUsed()
    100101      throws BaseException
  • trunk/api/core/src/org/proteios/core/Permission.java

    r1916 r2381  
    149149  }
    150150
     151  @Override
    151152  public String toString()
    152153  {
  • trunk/api/core/src/org/proteios/core/Plate.java

    r1916 r2381  
    149149    Wells are deleted automatically.
    150150  */
     151  @Override
    151152  public boolean isUsed()
    152153    throws BaseException
  • trunk/api/core/src/org/proteios/core/PlateEvent.java

    r1916 r2381  
    2626import org.proteios.core.data.PlateEventData;
    2727import org.proteios.core.data.SharedData;
    28 import org.proteios.core.data.UserData;
    2928import org.proteios.core.query.Hql;
    3029import org.proteios.core.query.Restrictions;
     
    138137    Always false.
    139138  */
     139  @Override
    140140  public boolean isUsed()
    141141    throws BaseException
     
    148148    -------------------------------------------
    149149  */
     150  @Override
    150151  SharedData getSharedParent()
    151152  {
  • trunk/api/core/src/org/proteios/core/PlateEventType.java

    r1916 r2381  
    198198    </ul>
    199199  */
     200  @Override
    200201  public boolean isUsed()
    201202    throws BaseException
     
    215216    -------------------------------------------
    216217  */
     218  @Override
    217219  SharedData getSharedParent()
    218220  {
  • trunk/api/core/src/org/proteios/core/PlateGeometry.java

    r1916 r2381  
    174174    </ul>
    175175  */
     176  @Override
    176177  public boolean isUsed()
    177178    throws BaseException
  • trunk/api/core/src/org/proteios/core/PlateMapping.java

    r1916 r2381  
    153153    </ul>
    154154  */
     155  @Override
    155156  public boolean isUsed()
    156157    throws BaseException
  • trunk/api/core/src/org/proteios/core/PlateType.java

    r1916 r2381  
    107107    </ul>
    108108  */
     109  @Override
    109110  public boolean isUsed()
    110111    throws BaseException
  • trunk/api/core/src/org/proteios/core/PluginConfiguration.java

    r1916 r2381  
    188188   * </ul>
    189189   */
     190  @Override
    190191  public boolean isUsed()
    191192      throws BaseException
  • trunk/api/core/src/org/proteios/core/PluginConfigurationRequest.java

    r1916 r2381  
    9696    -------------------------------------------
    9797  */
     98  @Override
    9899  public PluginResponse invoke()
    99100  {
  • trunk/api/core/src/org/proteios/core/PluginDefinition.java

    r1916 r2381  
    322322   * Check if a {@link PluginConfiguration} is using this definition.
    323323   */
     324  @Override
    324325  public boolean isUsed()
    325326      throws BaseException
  • trunk/api/core/src/org/proteios/core/PluginExecutionRequest.java

    r1916 r2381  
    7474    -------------------------------------------
    7575  */
     76  @Override
    7677  public PluginResponse invoke()
    7778  {
  • trunk/api/core/src/org/proteios/core/PluginRequest.java

    r1916 r2381  
    5252{
    5353
    54   private final SessionControl sc;
    55 
    5654  private String command;
    5755 
     
    7270    Job job, ParameterValuesImpl jobParameters)
    7371  {
    74     this.sc = sc;
    7572    this.plugin = plugin;
    7673    this.command = command;
  • trunk/api/core/src/org/proteios/core/PluginType.java

    r1916 r2381  
    203203    All users get READ access.
    204204  */
     205  @Override
    205206  void initPermissions(int granted, int denied)
    206207    throws BaseException
  • trunk/api/core/src/org/proteios/core/PolyPeptide.java

    r1916 r2381  
    2626import org.proteios.core.data.ObservedModificationData;
    2727import org.proteios.core.data.PolyPeptideData;
    28 import org.proteios.core.data.SearchResultData;
    2928import java.util.HashSet;
    3029import java.util.Iterator;
     
    183182      throws BaseException
    184183  {
    185     getData().setSearchResult((SearchResultData) searchResult.getData());
     184    getData().setSearchResult(searchResult.getData());
    186185  }
    187186
     
    227226    while (it.hasNext())
    228227    {
    229       dpData.add((ObservedModificationData) it.next().getData());
     228      dpData.add(it.next().getData());
    230229    }
    231230    getData().setObservedModifications(dpData);
     
    241240  {
    242241    getData().getObservedModifications().add(
    243       (ObservedModificationData) modification.getData());
     242      modification.getData());
    244243  }
    245244}
  • trunk/api/core/src/org/proteios/core/Precursor.java

    r1916 r2381  
    2626
    2727import org.proteios.core.data.InstrumentConfigurationData;
    28 import org.proteios.core.data.PeakListData;
    2928import org.proteios.core.data.PrecursorData;
    3029import java.util.Set;
     
    118117   * </ul>
    119118   */
     119  @Override
    120120  public boolean isUsed()
    121121      throws BaseException
     
    345345  public void setPeakList(PeakList peakList)
    346346  {
    347     getData().setPeakList((PeakListData) peakList.getData());
     347    getData().setPeakList(peakList.getData());
    348348  }
    349349
  • trunk/api/core/src/org/proteios/core/Project.java

    r1916 r2381  
    222222   * project is deleted and aren't inclued in this check.
    223223   */
     224  @Override
    224225  public boolean isUsed()
    225226      throws BaseException
     
    233234   * is granted.
    234235   */
     236  @Override
    235237  void initPermissions(int granted, int denied)
    236238      throws BaseException
  • trunk/api/core/src/org/proteios/core/ProjectKey.java

    r1916 r2381  
    191191    </ul>
    192192  */
     193  @Override
    193194  public boolean isUsed()
    194195    throws BaseException
     
    208209    permission is always granted.
    209210  */
     211  @Override
    210212  void initPermissions(int granted, int denied)
    211213    throws BaseException
     
    293295        return data.getId();
    294296      }
    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);
    300299    }
    301300    catch (BaseException ex)
  • trunk/api/core/src/org/proteios/core/Protein.java

    r1556 r2381  
    9898   * </ul>
    9999   */
     100  @Override
    100101  public boolean isUsed()
    101102      throws BaseException
  • trunk/api/core/src/org/proteios/core/Protocol.java

    r1916 r2381  
    137137   * </ul>
    138138   */
     139  @Override
    139140  public boolean isUsed()
    140141      throws BaseException
  • trunk/api/core/src/org/proteios/core/ProtocolType.java

    r2108 r2381  
    227227   * </ul>
    228228   */
     229  @Override
    229230  public boolean isUsed()
    230231      throws BaseException
     
    258259   * revoked.
    259260   */
     261  @Override
    260262  void initPermissions(int granted, int denied)
    261263      throws BaseException
  • trunk/api/core/src/org/proteios/core/QueryFactory.java

    r1916 r2381  
    8080      return query;
    8181    }
    82     else
    83     {
    84       return null;
    85     }
     82    return null;
    8683  }
    8784
  • trunk/api/core/src/org/proteios/core/Role.java

    r1916 r2381  
    228228   * aren't inclued in this check.
    229229   */
     230  @Override
    230231  public boolean isUsed()
    231232      throws BaseException
     
    240241   * revoked.
    241242   */
     243  @Override
    242244  void initPermissions(int granted, int denied)
    243245      throws BaseException
  • trunk/api/core/src/org/proteios/core/RoleKey.java

    r1916 r2381  
    173173    All role keys are system items and cannot be deleted.
    174174  */
     175  @Override
    175176  public boolean isUsed()
    176177    throws BaseException
     
    182183    Other permissions are inherited from the {@link Role}.
    183184  */
     185  @Override
    184186  void initPermissions(int granted, int denied)
    185187    throws BaseException
  • trunk/api/core/src/org/proteios/core/Sample.java

    r2260 r2381  
    146146   * </ul>
    147147   */
     148  @Override
    148149  public boolean isUsed()
    149150      throws BaseException
  • trunk/api/core/src/org/proteios/core/SearchDatabase.java

    r1937 r2381  
    2626
    2727import org.proteios.core.data.SearchDatabaseData;
    28 import org.proteios.core.data.SpectrumSearchData;
    29 
    3028import java.util.Date;
    3129import java.util.Set;
     
    9896   * </ul>
    9997   */
     98  @Override
    10099  public boolean isUsed()
    101100      throws BaseException
     
    129128  {
    130129    getData().setSpectrumSearch(
    131       (SpectrumSearchData) spectrumSearch.getData());
     130      spectrumSearch.getData());
    132131  }
    133132
     
    199198   * @return the name of this digest parameter
    200199   */
     200  @Override
    201201  public String getName()
    202202  {
     
    214214   *         {@link #MAX_NAME_LENGTH}
    215215   */
     216  @Override
    216217  public void setName(String name)
    217218      throws InvalidDataException
  • trunk/api/core/src/org/proteios/core/SearchModification.java

    r1937 r2381  
    66
    77import org.proteios.core.data.SearchModificationData;
    8 import org.proteios.core.data.SpectrumSearchData;
    9 
    108import java.util.Set;
    119
     
    7573   * </ul>
    7674   */
     75  @Override
    7776  public boolean isUsed()
    7877      throws BaseException
     
    105104  {
    106105    getData().setSpectrumSearch(
    107       (SpectrumSearchData) spectrumSearch.getData());
     106      spectrumSearch.getData());
    108107  }
    109108
  • trunk/api/core/src/org/proteios/core/SearchResult.java

    r1994 r2381  
    2525package org.proteios.core;
    2626
    27 import org.proteios.core.data.PeakListData;
    2827import org.proteios.core.data.PolyPeptideData;
    2928import org.proteios.core.data.SearchResultData;
    30 import org.proteios.core.data.SpectrumSearchData;
    3129import java.util.ArrayList;
    3230import java.util.HashSet;
     
    109107   * </ul>
    110108   */
     109  @Override
    111110  public boolean isUsed()
    112111      throws BaseException
     
    138137      throws BaseException
    139138  {
    140     getData().setPeakList((PeakListData) peakList.getData());
     139    getData().setPeakList(peakList.getData());
    141140  }
    142141
     
    166165  {
    167166    getData().setSpectrumSearch(
    168       (SpectrumSearchData) spectrumSearch.getData());
     167      spectrumSearch.getData());
    169168  }
    170169
  • trunk/api/core/src/org/proteios/core/SeparationEvent.java

    r2114 r2381  
    2424package org.proteios.core;
    2525
    26 import org.proteios.core.data.HardwareConfigurationData;
    2726import org.proteios.core.data.SeparationEventData;
    2827import org.proteios.core.data.SeparationMethodData;
     
    6160   * -------------------------------------------
    6261   */
     62  @Override
    6363  public Item getType()
    6464  {
     
    8888   * </ul>
    8989   */
     90  @Override
    9091  public boolean isUsed()
    9192      throws BaseException
     
    133134      throw new InvalidUseOfNullException("hardwareSettings");
    134135    getData().setHardwareSettings(
    135       (HardwareConfigurationData) hardwareSettings.getData());
     136      hardwareSettings.getData());
    136137  }
    137138
  • trunk/api/core/src/org/proteios/core/SeparationMethod.java

    r2287 r2381  
    129129   * the separation method is deleted and aren't included in this check.
    130130   */
     131  @Override
    131132  public boolean isUsed()
    132133      throws BaseException
  • trunk/api/core/src/org/proteios/core/Session.java

    r1916 r2381  
    123123    A session is not referenced from other items.
    124124  */
     125  @Override
    125126  public boolean isUsed()
    126127    throws BaseException
     
    132133    session. All other permissions are denied.
    133134  */
     135  @Override
    134136  void initPermissions(int granted, int denied)
    135137    throws BaseException
  • trunk/api/core/src/org/proteios/core/SessionControl.java

    r1916 r2381  
    14971497      return loginInfo.sessionSettings.remove(name);
    14981498    }
    1499     else
    1500     {
    1501       return loginInfo.sessionSettings.put(name, value);
    1502     }
     1499    return loginInfo.sessionSettings.put(name, value);
    15031500  }
    15041501
     
    17141711    Clean up if a bad client application forgets to logout.
    17151712  */
     1713  @Override
    17161714  protected void finalize()
    17171715    throws Throwable
  • trunk/api/core/src/org/proteios/core/Setting.java

    r1916 r2381  
    102102    @return FALSE
    103103  */
     104  @Override
    104105  public boolean isUsed()
    105106    throws BaseException
     
    110111    Add permissions granted to {@link Item#SETTING}.
    111112  */
     113  @Override
    112114  void initPermissions(int granted, int denied)
    113115    throws BaseException
  • trunk/api/core/src/org/proteios/core/SharedItem.java

    r1916 r2381  
    9393    @throws BaseException If there is another error
    9494  */
     95  @Override
    9596  void onBeforeCommit(Transactional.Action action)
    9697    throws NotLoggedInException, BaseException
     
    111112    Grant permissions according to the item and project keys.
    112113  */
     114  @Override
    113115  void initPermissions(int granted, int denied)
    114116    throws BaseException
  • trunk/api/core/src/org/proteios/core/SimpleJobQueue.java

    r1916 r2381  
    7575
    7676
     77  @Override
    7778  public String toString()
    7879  {
     
    9192   * in it's own thread. Lists jobs in database and adds them to the queue.
    9293   */
     94  @Override
    9395  public void run()
    9496  {
     
    418420     * Never reload since everyting is static.
    419421     */
     422    @Override
    420423    boolean getReload()
    421424    {
     
    428431     * <code>itemType</code> = {@link Item#SYSTEM}, 0 otherwise.
    429432     */
     433    @Override
    430434    int getRolePermissions(Item itemType)
    431435    {
     
    434438        return systemPermissions;
    435439      }
    436       else
    437       {
    438         return 0;
    439       }
     440      return 0;
    440441    }
    441442
     
    444445     * Return 0.
    445446     */
     447    @Override
    446448    int getSharedPermissions(ShareableData sharableData)
    447449    {
     
    453455     * Return 0.
    454456     */
     457    @Override
    455458    int getAllPermissions(Item itemType, UserData owner,
    456459        ItemKeyData itemKey, ProjectKeyData projectKey)
     
    463466     * Return empty set.
    464467     */
     468    @Override
    465469    Set<Integer> getRoles()
    466470    {
     
    472476     * Return empty set.
    473477     */
     478    @Override
    474479    Set<Integer> getGroups()
    475480    {
     
    481486     * Return empty set.
    482487     */
     488    @Override
    483489    Set<Integer> getUsers()
    484490    {
     
    490496     * Return empty map.
    491497     */
     498    @Override
    492499    Map<Integer, Integer> getProjects()
    493500    {
     
    499506     * Return empty set.
    500507     */
     508    @Override
    501509    Set<Integer> getItemKeys()
    502510    {
     
    508516     * Return empty set.
    509517     */
     518    @Override
    510519    Set<Integer> getProjectKeys()
    511520    {
  • trunk/api/core/src/org/proteios/core/SoftwareConfiguration.java

    r1916 r2381  
    9595   * </ul>
    9696   */
     97  @Override
    9798  public boolean isUsed()
    9899      throws BaseException
  • trunk/api/core/src/org/proteios/core/SpectrumSearch.java

    r1937 r2381  
    2626
    2727import org.proteios.core.data.DigestParameterData;
    28 import org.proteios.core.data.PeakListSetData;
    2928import org.proteios.core.data.SearchDatabaseData;
    3029import org.proteios.core.data.SearchModificationData;
    3130import org.proteios.core.data.SearchResultData;
    32 import org.proteios.core.data.SoftwareData;
    3331import org.proteios.core.data.SpectrumSearchData;
    3432import java.util.Date;
     
    106104   * </ul>
    107105   */
     106  @Override
    108107  public boolean isUsed()
    109108      throws BaseException
     
    136135      throws BaseException
    137136  {
    138     getData().setPeakListSet((PeakListSetData) peakListSet.getData());
     137    getData().setPeakListSet(peakListSet.getData());
    139138  }
    140139
     
    165164      throws BaseException
    166165  {
    167     getData().setSearchEngine((SoftwareData) software.getData());
     166    getData().setSearchEngine(software.getData());
    168167  }
    169168
  • trunk/api/core/src/org/proteios/core/StainingEvent.java

    r2114 r2381  
    2424package org.proteios.core;
    2525
    26 import org.proteios.core.data.GelElectrophoresisData;
    27 import org.proteios.core.data.HardwareConfigurationData;
    2826import org.proteios.core.data.StainingEventData;
    2927
     
    9290   * -------------------------------------------
    9391   */
     92  @Override
    9493  public Item getType()
    9594  {
     
    119118   * </ul>
    120119   */
     120  @Override
    121121  public boolean isUsed()
    122122      throws BaseException
     
    149149      throws BaseException
    150150  {
    151     getData().setSeparationMethod((GelElectrophoresisData) gelElectrophoresis.getData());
     151    getData().setSeparationMethod(gelElectrophoresis.getData());
    152152  }
    153153
     
    188188      throw new InvalidUseOfNullException("hardwareSettings");
    189189    getData().setHardwareSettings(
    190       (HardwareConfigurationData) hardwareSettings.getData());
     190      hardwareSettings.getData());
    191191  }
    192192}
  • trunk/api/core/src/org/proteios/core/StringParameterType.java

    r1916 r2381  
    7575    -------------------------------------------
    7676  */
     77  @Override
    7778  public String toString()
    7879  {
     
    9192    @throws InvalidDataException If the value is not a string or too long
    9293  */
     94  @Override
    9395  void validateValue(String name, String value)
    9496    throws InvalidDataException
     
    109111      return new TextParameterValueData();
    110112    }
    111     else
    112     {
    113       return new StringParameterValueData();
    114     }
     113    return new StringParameterValueData();
    115114  }
    116115  // -------------------------------------------
  • trunk/api/core/src/org/proteios/core/Type.java

    r1916 r2381  
    5656  INT(Hibernate.INTEGER, 1, Integer.class, "int", "Integer", true, true)
    5757  {
     58    @Override
    5859    ParameterValueData<Integer> newParameterValueData()
    5960    {
    6061      return new IntegerParameterValueData();
    6162    }
     63    @Override
    6264    public int sizeOf(Object value)
    6365    {
     
    7173  LONG(Hibernate.LONG, 2, Long.class, "long", "Long", true, true)
    7274  {
     75    @Override
    7376    ParameterValueData<Long> newParameterValueData()
    7477    {
    7578      return new LongParameterValueData();
    7679    }
     80    @Override
    7781    public int sizeOf(Object value)
    7882    {
     
    8690  FLOAT(Hibernate.FLOAT, 3, Float.class, "float", "Float", true, true)
    8791  {
     92    @Override
    8893    ParameterValueData<Float> newParameterValueData()
    8994    {
    9095      return new FloatParameterValueData();
    9196    }
     97    @Override
    9298    public int sizeOf(Object value)
    9399    {
     
    101107  DOUBLE(Hibernate.DOUBLE, 4, Double.class, "double", "Double", true, true)
    102108  {
     109    @Override
    103110    ParameterValueData<Double> newParameterValueData()
    104111    {
    105112      return new DoubleParameterValueData();
    106113    }
     114    @Override
    107115    public int sizeOf(Object value)
    108116    {
     
    117125  STRING(Hibernate.STRING, 5, String.class, "string", "String", true, false)
    118126  {
     127    @Override
    119128    ParameterValueData<String> newParameterValueData()
    120129    {
    121130      return new StringParameterValueData();
    122131    }
     132    @Override
    123133    public int sizeOf(Object value)
    124134    {
     
    133143  TEXT(Hibernate.TEXT, 6, String.class, "text", "Text", false, false)
    134144  {
     145    @Override
    135146    ParameterValueData<String> newParameterValueData()
    136147    {
    137148      return new TextParameterValueData();
    138149    }
     150    @Override
    139151    public int sizeOf(Object value)
    140152    {
     
    148160  BOOLEAN(Hibernate.BOOLEAN, 7, Boolean.class, "boolean", "Boolean", false, false)
    149161  {
     162    @Override
    150163    ParameterValueData<Boolean> newParameterValueData()
    151164    {
    152165      return new BooleanParameterValueData();
    153166    }
     167    @Override
    154168    public int sizeOf(Object value)
    155169    {
     
    163177  DATE(Hibernate.DATE, 8, Date.class, "date", "Date", true, false)
    164178  {
     179    @Override
    165180    ParameterValueData<Date> newParameterValueData()
    166181    {
    167182      return new DateParameterValueData();
    168183    }
     184    @Override
    169185    public Object parseString(String value)
    170186      throws InvalidDataException
     
    172188      return DateUtil.parseString(value);
    173189    }
     190    @Override
    174191    public int sizeOf(Object value)
    175192    {
     
    213230  }
    214231
     232  @Override
    215233  public String toString()
    216234  {
     
    349367      return null;
    350368    }
    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);
    361376    }
    362377  }
  • trunk/api/core/src/org/proteios/core/Update.java

    r1916 r2381  
    150150         * from one schemaVersion to the next.
    151151         */
    152         UpdateToSchemaVersionInterface updaterClass = (UpdateToSchemaVersionInterface) updaterList.get(i);
     152        UpdateToSchemaVersionInterface updaterClass = updaterList.get(i);
    153153        schemaVersion = updaterClass.update(session);
    154154      }
     
    241241           * of items from one schemaVersion to the next.
    242242           */
    243           UpdateToSchemaVersionInterface updaterClass = (UpdateToSchemaVersionInterface) updaterList.get(i);
     243          UpdateToSchemaVersionInterface updaterClass = updaterList.get(i);
    244244          numAffectedItems += updaterClass.adjustExistingItems(session);
    245245          schemaVersion++;
  • trunk/api/core/src/org/proteios/core/UpdateToSchemaVersionTmpl.java

    r1916 r2381  
    8484   * @return int the update schema version.
    8585   */
     86  @Override
    8687  public int getUpdateSchemaVersion()
    8788  {
     
    9798   * @throws BaseException
    9899   */
     100  @Override
    99101  protected int updateToNewSchemaVersion(org.hibernate.Session session)
    100102      throws BaseException
     
    143145   * @throws BaseException
    144146   */
     147  @Override
    145148  protected int adjustItemsToNewSchemaVersion(org.hibernate.Session session)
    146149      throws BaseException
  • trunk/api/core/src/org/proteios/core/User.java

    r1916 r2381  
    2727import org.proteios.core.data.DirectoryData;
    2828import org.proteios.core.data.OwnableData;
    29 import org.proteios.core.data.QuotaData;
    3029import org.proteios.core.data.UserData;
    3130import org.proteios.core.query.EntityQuery;
     
    203202   * the user is deleted and aren't inclued in this check.
    204203   */
     204  @Override
    205205  public boolean isUsed()
    206206      throws BaseException
     
    225225   * where the logged in user is also a member.
    226226   */
     227  @Override
    227228  void initPermissions(int granted, int denied)
    228229      throws BaseException
  • trunk/api/core/src/org/proteios/core/Well.java

    r1916 r2381  
    2525package org.proteios.core;
    2626
    27 import org.proteios.core.data.AnnotationSetData;
    2827import org.proteios.core.data.SharedData;
    2928import org.proteios.core.data.WellData;
    3029import org.proteios.core.query.Hql;
    3130import org.proteios.core.query.Restrictions;
    32 import java.util.HashSet;
    33 import java.util.Set;
    3431
    3532/**
     
    128125   * </ul>
    129126   */
     127  @Override
    130128  public boolean isUsed()
    131129      throws BaseException
     
    147145   * From the ChildItem class -------------------------------------------
    148146   */
     147  @Override
    149148  SharedData getSharedParent()
    150149  {
  • trunk/api/core/src/org/proteios/core/data/BasicData.java

    r1916 r2381  
    6262    <code>ClassName[new]</code>.
    6363  */
     64  @Override
    6465  public String toString()
    6566  {
     
    7778    <b>Do not override this method in a subclass!</b>
    7879  */
     80  @Override
    7981  public boolean equals(Object other)
    8082  {
     
    104106    <b>Do not override this method in a subclass!</b>
    105107  */
     108  @Override
    106109  public int hashCode()
    107110  {
  • trunk/api/core/src/org/proteios/core/data/BooleanParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="boolean" not-null="true"
    5555  */
     56  @Override
    5657  public List<Boolean> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<Boolean> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/ContextIndex.java

    r1916 r2381  
    108108    object. They are equal if both have the same client, item type and context type
    109109  */
     110  @Override
    110111  public boolean equals(Object o)
    111112  {
     
    122123    Calculate the hash code for the object.
    123124  */
     125  @Override
    124126  public int hashCode()
    125127  {
    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());
    127129  }
    128130}
  • trunk/api/core/src/org/proteios/core/data/DataProcessingStepData.java

    r1916 r2381  
    8888    @return the description string
    8989  */
     90  @Override
    9091  public String getDescription()
    9192  {
     
    9798    @param description The description string
    9899  */
     100  @Override
    99101  public void setDescription(String description)
    100102  {
  • trunk/api/core/src/org/proteios/core/data/DateParameterValueData.java

    r1916 r2381  
    5555    @hibernate.collection-element column="`value`" type="timestamp" not-null="true"
    5656  */
     57  @Override
    5758  public List<Date> getValues()
    5859  {
     
    6364    return values;
    6465  }
     66  @Override
    6567  void setValues(List<Date> values)
    6668  {
     
    6870  }
    6971
     72  @Override
    7073  public String toString()
    7174  {
  • trunk/api/core/src/org/proteios/core/data/DigestParameterData.java

    r2270 r2381  
    7575   *                     not-null="false"
    7676   */
     77  @Override
    7778  public String getName()
    7879  {
     
    8485   * @param name The name to set.
    8586   */
     87  @Override
    8688  public void setName(String name)
    8789  {
  • trunk/api/core/src/org/proteios/core/data/DirectoryData.java

    r1916 r2381  
    6969    @hibernate.column name="`name`" length="255" not-null="true" index="name_idx" unique-key="uniquedirectory"
    7070  */
     71  @Override
    7172  public String getName()
    7273  {
  • trunk/api/core/src/org/proteios/core/data/DoubleParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="double" not-null="true"
    5555  */
     56  @Override
    5657  public List<Double> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<Double> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/FileData.java

    r2145 r2381  
    6868   *                   index="name_idx" unique-key="uniquefile"
    6969   */
     70  @Override
    7071  public String getName()
    7172  {
  • trunk/api/core/src/org/proteios/core/data/FileParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-many-to-many column="`value`" class="org.proteios.core.data.FileData" not-null="true"
    5555  */
     56  @Override
    5657  public List<FileData> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<FileData> values)
    6567  {
  • trunk/api/core/src/org/proteios/core/data/FloatParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="float" not-null="true"
    5555  */
     56  @Override
    5657  public List<Float> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<Float> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/GuiContextData.java

    r1916 r2381  
    8181    object. They are equal if both have the same item type and context type
    8282  */
     83  @Override
    8384  public boolean equals(Object o)
    8485  {
     
    9495    Calculate the hash code for the object.
    9596  */
     97  @Override
    9698  public int hashCode()
    9799  {
    98     return (int) (53 * itemType + 17 * contextType);
     100    return (53 * itemType + 17 * contextType);
    99101  }
    100102}
  • trunk/api/core/src/org/proteios/core/data/IntegerParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="int" not-null="true"
    5555  */
     56  @Override
    5657  public List<Integer> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<Integer> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/ItemParameterValueData.java

    r1916 r2381  
    5858    @hibernate.many-to-any-column name="`data_class_id`" not-null="true"
    5959  */
     60  @Override
    6061  public List<BasicData> getValues()
    6162  {
     
    6667    return values;
    6768  }
     69  @Override
    6870  void setValues(List<BasicData> values)
    6971  {
  • trunk/api/core/src/org/proteios/core/data/LongParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="long" not-null="true"
    5555  */
     56  @Override
    5657  public List<Long> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<Long> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/MappingCoordinate.java

    r1916 r2381  
    8181    object. They are equal if both have the same plate, row and column.
    8282  */
     83  @Override
    8384  public final boolean equals(Object o)
    8485  {
     
    9495    Calculate the hash code for the object.
    9596  */
     97  @Override
    9698  public final int hashCode()
    9799  {
    98     return (int)(131*plate + 53*row + 17*column);
     100    return (131*plate + 53*row + 17*column);
    99101  }
    100102  /**
    101103    Get the coordinate as [plate, row, column]
    102104  */
     105  @Override
    103106  public final String toString()
    104107  {
  • trunk/api/core/src/org/proteios/core/data/PeakListData.java

    r1916 r2381  
    100100
    101101  public static final int MAX_COMBINATIONMETHOD_LENGTH = 255;
    102   private String combinationMethod = (String) null;
     102  private String combinationMethod = null;
    103103
    104104
     
    137137   * @return the description string
    138138   */
     139  @Override
    139140  public String getDescription()
    140141  {
     
    148149   * @param description The description string
    149150   */
     151  @Override
    150152  public void setDescription(String description)
    151153  {
  • trunk/api/core/src/org/proteios/core/data/PlateCoordinate.java

    r1916 r2381  
    7676    object. They are equal if both have the same plate, row and column.
    7777  */
     78  @Override
    7879  public final boolean equals(Object o)
    7980  {
     
    8889    Calculate the hash code for the object.
    8990  */
     91  @Override
    9092  public final int hashCode()
    9193  {
    92     return (int)(53*row + 17*column);
     94    return (53*row + 17*column);
    9395  }
    9496  /**
    9597    Get the coordinate as [row, column]
    9698  */
     99  @Override
    97100  public final String toString()
    98101  {
  • trunk/api/core/src/org/proteios/core/data/QuotaIndex.java

    r1916 r2381  
    8686    object. They are equal if both have the same quotatype id and location.
    8787  */
     88  @Override
    8889  public boolean equals(Object o)
    8990  {
     
    99100    Calculate the hash code for the object.
    100101  */
     102  @Override
    101103  public int hashCode()
    102104  {
    103     return (int) (53 * quotaType.getId() + 17 * location);
     105    return (53 * quotaType.getId() + 17 * location);
    104106  }
    105107}
  • trunk/api/core/src/org/proteios/core/data/SearchDatabaseData.java

    r2270 r2381  
    5353   *                     length="255" not-null="false"
    5454   */
     55  @Override
    5556  public String getName()
    5657  {
     
    6061   @param name The name to set.
    6162   */
     63  @Override
    6264  public void setName(String name)
    6365  {
  • trunk/api/core/src/org/proteios/core/data/StringParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="string" length="255" not-null="true"
    5555  */
     56  @Override
    5657  public List<String> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<String> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/TextParameterValueData.java

    r1916 r2381  
    5454    @hibernate.collection-element column="`value`" type="text" not-null="true"
    5555  */
     56  @Override
    5657  public List<String> getValues()
    5758  {
     
    6263    return values;
    6364  }
     65  @Override
    6466  void setValues(List<String> values)
    6567  {
     
    6769  }
    6870
     71  @Override
    6972  public String toString()
    7073  {
  • trunk/api/core/src/org/proteios/core/data/UsedQuantity.java

    r1916 r2381  
    9191    non-null value.
    9292  */
     93  @Override
    9394  public boolean equals(Object o)
    9495  {
     
    101102    Calculate the hash code for the object.
    102103  */
     104  @Override
    103105  public int hashCode()
    104106  {
     
    108110    Convert the value to a string.
    109111  */
     112  @Override
    110113  public String toString()
    111114  {
  • trunk/api/core/src/org/proteios/core/data/UserData.java

    r1916 r2381  
    5858   * @hibernate.generator-param name="property" value="password"
    5959   */
     60  @Override
    6061  public int getId()
    6162  {
  • trunk/api/core/src/org/proteios/core/data/keyring/GroupGroups.java

    r1916 r2381  
    8181    child id are the same.
    8282  */
     83  @Override
    8384  public boolean equals(Object o)
    8485  {
     
    9192    Calculate the hash code for the object.
    9293  */
     94  @Override
    9395  public int hashCode()
    9496  {
    95     return (int)(31*parentId + 17*childId);
     97    return (31*parentId + 17*childId);
    9698  }
    9799}
  • trunk/api/core/src/org/proteios/core/data/keyring/GroupKeys.java

    r1916 r2381  
    6868    key id are the same. The permissions may be different.
    6969  */
     70  @Override
    7071  public boolean equals(Object o)
    7172  {
     
    7879    Calculate the hash code for the object.
    7980  */
     81  @Override
    8082  public int hashCode()
    8183  {
    82     return (int)(31*keyId + 17*groupId);
     84    return (31*keyId + 17*groupId);
    8385  }
    8486}
  • trunk/api/core/src/org/proteios/core/data/keyring/GroupProjects.java

    r1916 r2381  
    6868    project id are the same. The permission may be different.
    6969  */
     70  @Override
    7071  public boolean equals(Object o)
    7172  {
     
    7879    Calculate the hash code for the object.
    7980  */
     81  @Override
    8082  public int hashCode()
    8183  {
    82     return (int)(31*projectId + 17*groupId);
     84    return (31*projectId + 17*groupId);
    8385  }
    8486}
  • trunk/api/core/src/org/proteios/core/data/keyring/ProjectKeys.java

    r1916 r2381  
    6767    key id are the same. The permissions may be different.
    6868  */
     69  @Override
    6970  public boolean equals(Object o)
    7071  {
     
    7778    Calculate the hash code for the object.
    7879  */
     80  @Override
    7981  public int hashCode()
    8082  {
    81     return (int)(31*keyId + 17*projectId);
     83    return (31*keyId + 17*projectId);
    8284  }
    8385}
  • trunk/api/core/src/org/proteios/core/data/keyring/RoleKeys.java

    r1916 r2381  
    6868    key id are the same. The permissions may be different.
    6969  */
     70  @Override
    7071  public boolean equals(Object o)
    7172  {
     
    7879    Calculate the hash code for the object.
    7980  */
     81  @Override
    8082  public int hashCode()
    8183  {
    82     return (int)(31*keyId + 17*roleId);
     84    return (31*keyId + 17*roleId);
    8385  }
    8486}
  • trunk/api/core/src/org/proteios/core/data/keyring/UserGroups.java

    r1916 r2381  
    8080    group id are the same.
    8181  */
     82  @Override
    8283  public boolean equals(Object o)
    8384  {
     
    9091    Calculate the hash code for the object.
    9192  */
     93  @Override
    9294  public int hashCode()
    9395  {
    94     return (int)(31*userId + 17*groupId);
     96    return (31*userId + 17*groupId);
    9597  }
    9698}
  • trunk/api/core/src/org/proteios/core/data/keyring/UserKeys.java

    r1916 r2381  
    6868    key id are the same. The permissions may be different.
    6969  */
     70  @Override
    7071  public boolean equals(Object o)
    7172  {
     
    7879    Calculate the hash code for the object.
    7980  */
     81  @Override
    8082  public int hashCode()
    8183  {
    82     return (int)(31*keyId + 17*userId);
     84    return (31*keyId + 17*userId);
    8385  }
    8486}
  • trunk/api/core/src/org/proteios/core/data/keyring/UserProjects.java

    r1916 r2381  
    6868    project id are the same. The permission may be different.
    6969  */
     70  @Override
    7071  public boolean equals(Object o)
    7172  {
     
    7879    Calculate the hash code for the object.
    7980  */
     81  @Override
    8082  public int hashCode()
    8183  {
    82     return (int)(31*projectId + 17*userId);
     84    return (31*projectId + 17*userId);
    8385  }
    8486}
  • trunk/api/core/src/org/proteios/core/data/keyring/UserRoles.java

    r1916 r2381  
    7979    role id are the same.
    8080  */
     81  @Override
    8182  public boolean equals(Object o)
    8283  {
     
    8990    Calculate the hash code for the object.
    9091  */
     92  @Override
    9193  public int hashCode()
    9294  {
    93     return (int)(31*userId + 17*roleId);
     95    return (31*userId + 17*roleId);
    9496  }
    9597}
  • trunk/api/core/src/org/proteios/core/plugin/GuiContext.java

    r1916 r2381  
    6161
    6262 
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/plugin/Plugin.java

    r1955 r2381  
    159159    }
    160160
     161    @Override
    161162    public String toString()
    162163    {
  • trunk/api/core/src/org/proteios/core/query/AddExpression.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/AndRestriction.java

    r1916 r2381  
    7070    -------------------------------------------
    7171  */
     72  @Override
    7273  public String toString()
    7374  {
  • trunk/api/core/src/org/proteios/core/query/AscOrder.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/CountExpression.java

    r1916 r2381  
    6262    -------------------------------------------
    6363  */
     64  @Override
    6465  public String toString()
    6566  {
  • trunk/api/core/src/org/proteios/core/query/DescOrder.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/DivideExpression.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/EqRestriction.java

    r1916 r2381  
    6161      return "(" + e1.toQl(query, dc) + " = " + e2.toQl(query, dc) + ")";
    6262    }
    63     else
    64     {
    65       return "(" + e1.toQl(query, dc) + " IS NULL)";
    66     }
     63    return "(" + e1.toQl(query, dc) + " IS NULL)";
    6764  }
    6865  // -------------------------------------------
     
    7168    -------------------------------------------
    7269  */
     70  @Override
    7371  public String toString()
    7472  {
  • trunk/api/core/src/org/proteios/core/query/ExpressionSelect.java

    r1916 r2381  
    8686    -------------------------------------------
    8787  */
     88  @Override
    8889  public String toString()
    8990  {
  • trunk/api/core/src/org/proteios/core/query/FloatExpression.java

    r1916 r2381  
    6060    -------------------------------------------
    6161  */
     62  @Override
    6263  public String toString()
    6364  {
  • trunk/api/core/src/org/proteios/core/query/GtRestriction.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/GteqRestriction.java

    r1916 r2381  
    6565    -------------------------------------------
    6666  */
     67  @Override
    6768  public String toString()
    6869  {
  • trunk/api/core/src/org/proteios/core/query/HqlElementsExpression.java

    r1916 r2381  
    6565      return "elements("+(alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property)+")";
    6666    }
    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.");
    7168  }
    7269  // -------------------------------------------
     
    7572    -------------------------------------------
    7673  */
     74  @Override
    7775  public String toString()
    7876  {
  • trunk/api/core/src/org/proteios/core/query/HqlEntityExpression.java

    r1916 r2381  
    6161      return Integer.toString(item.getId());
    6262    }
    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.");
    6764  }
    6865  // -------------------------------------------
     
    7168    -------------------------------------------
    7269  */
     70  @Override
    7371  public String toString()
    7472  {
  • trunk/api/core/src/org/proteios/core/query/HqlIndexExpression.java

    r1916 r2381  
    6464      return "index("+(alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property)+")";
    6565    }
    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.");
    7067  }
    7168  // -------------------------------------------
     
    7471    -------------------------------------------
    7572  */
     73  @Override
    7674  public String toString()
    7775  {
  • trunk/api/core/src/org/proteios/core/query/HqlInnerJoin.java

    r1916 r2381  
    6868      return "JOIN "+(alias == null ? query.getRootAlias() : alias) + "." + property + " " + joinedAlias;
    6969    }
    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.");
    7471  }
    7572  // -------------------------------------------
     
    9491    -------------------------------------------
    9592  */
     93  @Override
    9694  public String toString()
    9795  {
  • trunk/api/core/src/org/proteios/core/query/HqlLeftJoin.java

    r1916 r2381  
    7171        (on == null ? "" : " WITH " + on.toQl(query, dc));
    7272    }
    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.");
    7774  }
    7875  // -------------------------------------------
     
    9794    -------------------------------------------
    9895  */
     96  @Override
    9997  public String toString()
    10098  {
  • trunk/api/core/src/org/proteios/core/query/HqlPropertyExpression.java

    r1916 r2381  
    6363      return (alias == null ? query.getRootAlias() : alias) + (property == null ? "" : "." +property);
    6464    }
    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.");
    6966  }
    7067  // -------------------------------------------
     
    7370    -------------------------------------------
    7471  */
     72  @Override
    7573  public String toString()
    7674  {
  • trunk/api/core/src/org/proteios/core/query/HqlRightJoin.java

    r1916 r2381  
    7171        (on == null ? "" : " WITH " + on.toQl(query, dc));
    7272    }
    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.");
    7774  }
    7875  // -------------------------------------------
     
    9794    -------------------------------------------
    9895  */
     96  @Override
    9997  public String toString()
    10098  {
  • trunk/api/core/src/org/proteios/core/query/InRestriction.java

    r1916 r2381  
    7575    -------------------------------------------
    7676  */
     77  @Override
    7778  public String toString()
    7879  {
  • trunk/api/core/src/org/proteios/core/query/IntegerExpression.java

    r1916 r2381  
    6060    -------------------------------------------
    6161  */
     62  @Override
    6263  public String toString()
    6364  {
  • trunk/api/core/src/org/proteios/core/query/LikeRestriction.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/LogExpression.java

    r1916 r2381  
    8181    -------------------------------------------
    8282  */
     83  @Override
    8384  public String toString()
    8485  {
     
    8788      return "LN(" + e1 + ")";
    8889    }
    89     else
    90     {
    91       return "LOG(" + base + ", " + e1 + ")";
    92     }
     90    return "LOG(" + base + ", " + e1 + ")";
    9391  }
    9492  // -------------------------------------------
  • trunk/api/core/src/org/proteios/core/query/LtRestriction.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/LteqRestriction.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/MaxExpression.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/MeanExpression.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/MinExpression.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/MultiplyExpression.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/NegateExpression.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/core/query/NeqRestriction.java

    r1916 r2381  
    6161      return "(" + e1.toQl(query, dc) + " <> " + e2.toQl(query, dc) + ")";
    6262    }
    63     else
    64     {
    65       return "(NOT " + e1.toQl(query, dc) + " IS NULL)";
    66     }
     63    return "(NOT " + e1.toQl(query, dc) + " IS NULL)";
    6764  }
    6865  // -------------------------------------------
     
    7168    -------------------------------------------
    7269  */
     70  @Override
    7371  public String toString()
    7472  {
  • trunk/api/core/src/org/proteios/core/query/NotRestriction.java

    r1916 r2381  
    5959    -------------------------------------------
    6060  */
     61  @Override
    6162  public String toString()
    6263  {
  • trunk/api/core/src/org/proteios/core/query/OrRestriction.java

    r1916 r2381  
    7070    -------------------------------------------
    7171  */
     72  @Override
    7273  public String toString()
    7374  {
  • trunk/api/core/src/org/proteios/core/query/ParameterExpression.java

    r1916 r2381  
    7272    -------------------------------------------
    7373  */
     74  @Override
    7475  public String toString()
    7576  {
  • trunk/api/core/src/org/proteios/core/query/SelectedExpression.java

    r1916 r2381  
    6868    -------------------------------------------
    6969  */
     70  @Override
    7071  public String toString()
    7172  {
  • trunk/api/core/src/org/proteios/core/query/SubtractExpression.java

    r1916 r2381  
    6464    -------------------------------------------
    6565  */
     66  @Override
    6667  public String toString()
    6768  {
  • trunk/api/core/src/org/proteios/core/query/SumExpression.java

    r1916 r2381  
    6161    -------------------------------------------
    6262  */
     63  @Override
    6364  public String toString()
    6465  {
  • trunk/api/core/src/org/proteios/install/MaskingThread.java

    r1916 r2381  
    5353   *  Begin masking until asked to stop.
    5454   */
     55  @Override
    5556  public void run() {
    5657    while(!stop) {
  • trunk/api/core/src/org/proteios/install/PasswordField.java

    r1916 r2381  
    11package org.proteios.install;
     2
    23/*
    3 $Id$
     4 $Id$
    45
    5 Copyright (C) 2006 Gregory Vincic, Olle Mansson
    6 Copyright (C) 2007 Gregory Vincic
     6 Copyright (C) 2006 Gregory Vincic, Olle Mansson
     7 Copyright (C) 2007 Gregory Vincic
    78
    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/
    1011
    11 Proteios is free software; you can redistribute it and/or modify it
    12 under the terms of the GNU General Public License as published by
    13 the Free Software Foundation; either version 2 of the License, or
    14 (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.
    1516
    16 Proteios is distributed in the hope that it will be useful, but
    17 WITHOUT ANY WARRANTY; without even the implied warranty of
    18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    19 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.
    2021
    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 */
    2727import java.io.IOException;
    2828
    2929/**
    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
    3433 */
    35 public class PasswordField {
    36 
     34public class PasswordField
     35{
    3736  /**
    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.
    4643   */
    47   String getPassword(String prompt) throws IOException {
     44  String getPassword(String prompt)
     45      throws IOException
     46  {
    4847    // password holder
    4948    String password = "";
     
    5251    thread.start();
    5352    // 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();
    5656      // assume enter pressed, stop masking
    5757      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        {
    6263          break;
    63         } else {
    64           continue;
    6564        }
    66       } else if (c == '\n') {
     65        continue;
     66      }
     67      else if (c == '\n')
     68      {
    6769        break;
    68       } else {
     70      }
     71      else
     72      {
    6973        // store the password
    7074        password += c;
     
    7478  }
    7579}
    76 
  • trunk/api/core/src/org/proteios/io/FilenameParseUtil.java

    r1916 r2381  
    9595      return firstPartStr;
    9696    }
    97     else
    98     {
    99       return lastPartStr;
    100     }
     97    return lastPartStr;
    10198  }
    10299
  • trunk/api/core/src/org/proteios/io/PeakListFileImpl.java

    r1929 r2381  
    525525         * Empty character data temporary string buffer
    526526         */
    527         if (tempStrBuf == (StringBuffer)null) {
     527        if (tempStrBuf == null) {
    528528          tempStrBuf = new StringBuffer();
    529529        }
     
    569569       */
    570570      String attrValue = XMLImportUtil.seekAttribute("id", parser);
    571       if (attrValue != (String)null) {
     571      if (attrValue != null) {
    572572        String currentSpectrumIdStr = attrValue;
    573573        /*
     
    611611         */
    612612        String attrValue = XMLImportUtil.seekAttribute("name", parser);
    613         if (attrValue != (String)null) {
     613        if (attrValue != null) {
    614614          String currentCvParamNameStr = attrValue;
    615615          /*
     
    620620            String retentionTimeStr = null;
    621621            retentionTimeStr = XMLImportUtil.seekAttribute("value", parser);
    622             if (retentionTimeStr != (String)null && !retentionTimeStr.equals(""))
     622            if (retentionTimeStr != null && !retentionTimeStr.equals(""))
    623623            {
    624624              Double retentionTime = Double.valueOf(retentionTimeStr);
     
    667667        String attrValue;
    668668        attrValue = XMLImportUtil.seekAttribute("precision", parser);
    669         if (attrValue != (String)null) {
     669        if (attrValue != null) {
    670670          precision = attrValue;
    671671        }
    672672        attrValue = XMLImportUtil.seekAttribute("endian", parser);
    673         if (attrValue != (String)null) {
     673        if (attrValue != null) {
    674674          endian = attrValue;
    675675        }
    676676        attrValue = XMLImportUtil.seekAttribute("length", parser);
    677         if (attrValue != (String)null) {
     677        if (attrValue != null) {
    678678          //dataLength = Integer.parseInt(attrValue);
    679679          dataLength = Integer.valueOf(attrValue).intValue();
     
    773773        double[] dataArray = new double[nPeaks];
    774774        for (int i = 0; i < nPeaks; i++) {
    775           dataArray[i] = (double) decodedBase64List.get(i);
     775          dataArray[i] = decodedBase64List.get(i);
    776776        }
    777777
     
    814814     * buffer is emptied in this case.
    815815     */
    816     if (tempStrBuf == (StringBuffer) null)
     816    if (tempStrBuf == null)
    817817    {
    818818      tempStrBuf = new StringBuffer();
     
    849849    int lineLength = 0;
    850850    boolean newLineFlag = true;
    851     if (dataBase64Raw != (String)null) {
     851    if (dataBase64Raw != null) {
    852852      if (dataBase64Raw.length() > 0) {
    853853        for (int i = 0; i < dataBase64RawStrBuf.length(); i++) {
     
    879879     */
    880880    List<Double> decodedBase64 = new ArrayList<Double>(0);
    881     if (dataBase64 != (String)null) {
     881    if (dataBase64 != null) {
    882882      if (dataBase64.length() > 0) {
    883883        decodedBase64 = Base64Util.decode(doublePrecision, bigEndian, dataBase64);
     
    917917     * Return spectrum.
    918918     */
    919     return (SpectrumInterface) spectrumList.get(0);
     919    return spectrumList.get(0);
    920920  }
    921921
  • trunk/api/core/src/org/proteios/io/RobotFileImpl.java

    r1989 r2381  
    215215  private boolean inPlateBlockToProcess = false;
    216216  private boolean inWellBlockToProcess = false;
    217   private boolean inTargetPlateBlockToProcess = false;
    218217  private boolean inTargetPositionBlockToProcess = false;
    219218
     
    13261325      XMLStreamReader parser = xmlInFactory
    13271326        .createXMLStreamReader(iStream);
    1328       /*
    1329        * Parse the XML input stream using cursor-based XML parsing. Parse
    1330        * the document until end of document, or until the desired number
    1331        * of target plate and target position XML tags are found.
    1332        */
    1333       inTargetPlateBlockToProcess = false;
    13341327      inTargetPositionBlockToProcess = false;
    13351328      searchElementsFound = 0;
     
    14151408      XMLStreamReader parser = xmlInFactory
    14161409        .createXMLStreamReader(iStream);
    1417       /*
    1418        * Parse the XML input stream using cursor-based XML parsing. Parse
    1419        * the document until end of document, or until the desired number
    1420        * of target plate and target position XML tags are found.
    1421        */
    1422       inTargetPlateBlockToProcess = false;
    14231410      inTargetPositionBlockToProcess = false;
    14241411      searchElementsFound = 0;
     
    15041491      XMLStreamReader parser = xmlInFactory
    15051492        .createXMLStreamReader(iStream);
    1506       /*
    1507        * Parse the XML input stream using cursor-based XML parsing. Parse
    1508        * the document until end of document, or until the desired number
    1509        * of target plate and target position XML tags are found.
    1510        */
    1511       inTargetPlateBlockToProcess = false;
    15121493      inTargetPositionBlockToProcess = false;
    15131494      searchElementsFound = 0;
     
    15911572      XMLStreamReader parser = xmlInFactory
    15921573        .createXMLStreamReader(iStream);
    1593       /*
    1594        * Parse the XML input stream using cursor-based XML parsing. Parse
    1595        * the document until end of document, or until the desired number
    1596        * of plate and well XML tags are found.
    1597        */
    1598       inTargetPlateBlockToProcess = false;
    15991574      inTargetPositionBlockToProcess = false;
    16001575      searchElementsFound = 0;
     
    16851660      XMLStreamReader parser = xmlInFactory
    16861661        .createXMLStreamReader(iStream);
    1687       /*
    1688        * Parse the XML input stream using cursor-based XML parsing. Parse
    1689        * the document until end of document, or until the desired number
    1690        * of target plate and target position XML tags are found.
    1691        */
    1692       inTargetPlateBlockToProcess = false;
    16931662      inTargetPositionBlockToProcess = false;
    16941663      searchElementsFound = 0;
     
    17571726      XMLStreamReader parser = xmlInFactory
    17581727        .createXMLStreamReader(iStream);
    1759       /*
    1760        * Parse the XML input stream using cursor-based XML parsing. Parse
    1761        * the document until end of document.
    1762        */
    1763       inTargetPlateBlockToProcess = false;
    17641728      inTargetPositionBlockToProcess = false;
    17651729      searchElementsFound = 0;
     
    18351799      XMLStreamReader parser = xmlInFactory
    18361800        .createXMLStreamReader(iStream);
    1837       /*
    1838        * Parse the XML input stream using cursor-based XML parsing. Parse
    1839        * the document until end of document.
    1840        */
    1841       inTargetPlateBlockToProcess = false;
    18421801      inTargetPositionBlockToProcess = false;
    18431802      searchElementsFound = 0;
     
    19131872      XMLStreamReader parser = xmlInFactory
    19141873        .createXMLStreamReader(iStream);
    1915       /*
    1916        * Parse the XML input stream using cursor-based XML parsing. Parse
    1917        * the document until end of document.
    1918        */
    1919       inTargetPlateBlockToProcess = false;
    19201874      inTargetPositionBlockToProcess = false;
    19211875      searchElementsFound = 0;
     
    19981952      XMLStreamReader parser = xmlInFactory
    19991953        .createXMLStreamReader(iStream);
    2000       /*
    2001        * Parse the XML input stream using cursor-based XML parsing. Parse
    2002        * the document until end of document.
    2003        */
    2004       inTargetPlateBlockToProcess = false;
    20051954      inTargetPositionBlockToProcess = false;
    20061955      searchElementsFound = 0;
     
    21412090      XMLStreamReader parser = xmlInFactory
    21422091        .createXMLStreamReader(iStream);
    2143       /*
    2144        * Parse the XML input stream using cursor-based XML parsing. Parse
    2145        * the document until end of document, or until an non-empty target
    2146        * position is found.
    2147        */
    2148       inTargetPlateBlockToProcess = false;
    21492092      inTargetPositionBlockToProcess = false;
    21502093      searchElementsFound = 0;
     
    22012144         * Empty character data temporary string buffer
    22022145         */
    2203         if (tempStrBuf == (StringBuffer) null)
     2146        if (tempStrBuf == null)
    22042147        {
    22052148          tempStrBuf = new StringBuffer();
     
    22442187       */
    22452188      String attrValue = XMLImportUtil.seekAttribute("gelId", parser);
    2246       if (attrValue != (String) null)
     2189      if (attrValue != null)
    22472190      {
    22482191        String currentGelIdStr = attrValue;
     
    22652208       */
    22662209      String attrValue = XMLImportUtil.seekAttribute("MPId", parser);
    2267       if (attrValue != (String) null)
     2210      if (attrValue != null)
    22682211      {
    22692212        String currentPlateIdStr = attrValue;
     
    22842227        String currentTransferPlateIdStr = new String("");
    22852228        attrValue = XMLImportUtil.seekAttribute("transferMPId", parser);
    2286         if (attrValue != (String) null)
     2229        if (attrValue != null)
    22872230        {
    22882231          currentTransferPlateIdStr = attrValue;
     
    23282271         */
    23292272        String attrValue = XMLImportUtil.seekAttribute("label", parser);
    2330         if (attrValue != (String) null)
     2273        if (attrValue != null)
    23312274        {
    23322275          String currentWellIdStr = attrValue;
     
    23702313       */
    23712314      String attrValue = XMLImportUtil.seekAttribute("targetId", parser);
    2372       if (attrValue != (String) null)
     2315      if (attrValue != null)
    23732316      {
    23742317        String currentTargetIdStr = attrValue;
     
    23922335       */
    23932336      String attrValue = XMLImportUtil.seekAttribute("label", parser);
    2394       if (attrValue != (String) null)
     2337      if (attrValue != null)
    23952338      {
    23962339        String currentTargetPositionIdStr = attrValue;
     
    24482391        String currentSpotIdStr = new String("");
    24492392        attrValue = XMLImportUtil.seekAttribute("spotId", parser);
    2450         if (attrValue != (String) null)
     2393        if (attrValue != null)
    24512394        {
    24522395          currentSpotIdStr = attrValue;
     
    24632406        String currentGelIdStr = new String("");
    24642407        attrValue = XMLImportUtil.seekAttribute("gelId", parser);
    2465         if (attrValue != (String) null)
     2408        if (attrValue != null)
    24662409        {
    24672410          currentGelIdStr = attrValue;
     
    25052448         */
    25062449        attrValue = XMLImportUtil.seekAttribute("spotId", parser);
    2507         if (attrValue != (String) null)
     2450        if (attrValue != null)
    25082451        {
    25092452          currentTargetSpotIdStr = attrValue;
     
    25232466         */
    25242467        attrValue = XMLImportUtil.seekAttribute("gelId", parser);
    2525         if (attrValue != (String) null)
     2468        if (attrValue != null)
    25262469        {
    25272470          currentTargetGelIdStr = attrValue;
     
    25502493        String attrValue;
    25512494        attrValue = XMLImportUtil.seekAttribute("MPId", parser);
    2552         if (attrValue != (String) null)
     2495        if (attrValue != null)
    25532496        {
    25542497          currentTargetPlateIdStr = attrValue;
     
    27162659     * buffer is emptied in this case.
    27172660     */
    2718     if (tempStrBuf == (StringBuffer) null)
     2661    if (tempStrBuf == null)
    27192662    {
    27202663      tempStrBuf = new StringBuffer();
     
    27942737     * Return spot id.
    27952738     */
    2796     return (String) spotIdList.get(0);
     2739    return spotIdList.get(0);
    27972740  }
    27982741
     
    28452788     * Return gel id.
    28462789     */
    2847     return (String) gelIdList.get(0);
     2790    return gelIdList.get(0);
    28482791  }
    28492792
     
    28962839     * Return well id.
    28972840     */
    2898     return (String) wellIdList.get(0);
     2841    return wellIdList.get(0);
    28992842  }
    29002843
     
    29462889     * Return plate id.
    29472890     */
    2948     return (String) plateIdList.get(0);
     2891    return plateIdList.get(0);
    29492892  }
    29502893
     
    30022945      return null;
    30032946    }
    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);
    30112951  }
    30122952
     
    30663006      return null;
    30673007    }
    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);
    30753012  }
    30763013
     
    31323069      return null;
    31333070    }
    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);
    31413075  }
    31423076
     
    31913125     * Return target position id.
    31923126     */
    3193     return (String) targetPositionIdList.get(0);
     3127    return targetPositionIdList.get(0);
    31943128  }
    31953129
     
    32443178     * Return target id.
    32453179     */
    3246     return (String) targetIdList.get(0);
     3180    return targetIdList.get(0);
    32473181  }
    32483182
  • trunk/api/core/src/org/proteios/io/TandemFactory.java

    r1916 r2381  
    9898
    9999
     100    @Override
    100101    public String attributes()
    101102    {
     
    114115
    115116
     117    @Override
    116118    public String attributes()
    117119    {
     
    155157
    156158
     159    @Override
    157160    public String attributes()
    158161    {
  • trunk/api/core/src/org/proteios/io/XMLImportUtil.java

    r1921 r2381  
    7373     * Namespace data not found, return null
    7474     */
    75     return (String)null;
     75    return null;
    7676  }
    7777
     
    107107     * String not found, return null
    108108     */
    109     return (String)null;
     109    return null;
    110110  }
    111111
     
    151151     * Attribute not found, return null
    152152     */
    153     return (String)null;
     153    return null;
    154154  }
    155155
     
    190190     * Attribute not found, return null
    191191     */
    192     return (String)null;
     192    return null;
    193193  }
    194194
  • trunk/api/core/src/org/proteios/io/XMLTag.java

    r1919 r2381  
    176176   * @return a string representation of this tag and its children
    177177   */
     178  @Override
    178179  public String toString()
    179180  {
  • trunk/api/core/src/org/proteios/io/mzdata/MzDataExpActivationBlock.java

    r1921 r2381  
    111111      for (int i = 0; i < cvParamList.size(); i++)
    112112      {
    113         CvParam cvParam = (CvParam) cvParamList.get(i);
     113        CvParam cvParam = cvParamList.get(i);
    114114        String cvLabel = cvParam.getCvLabel();
    115115        String cvAccession = cvParam.getAccession();
     
    130130      for (int i = 0; i < userParamList.size(); i++)
    131131      {
    132         UserParam userParam = (UserParam) userParamList.get(i);
     132        UserParam userParam = userParamList.get(i);
    133133        String name = userParam.getName();
    134134        String value = userParam.getValue();
  • trunk/api/core/src/org/proteios/io/mzdata/MzDataExpAnalyzerBlock.java

    r1921 r2381