Changeset 4108


Ignore:
Timestamp:
Jan 30, 2008, 11:13:22 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

References #894: Support for array designs with other feature identification methods than coordinates

Do not verify the reporter if null is passed as external ID. Pick the reporter automatically from the array design instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/RawDataBatcher.java

    r4097 r4108  
    384384
    385385  /**
     386    @deprecated Use {@link #insert(RawData, String, String)} instead
     387  */
     388  public void insert(RawData data, String externalReporterId)
     389    throws BaseException
     390  {
     391    doInsert(data, externalReporterId, null, externalReporterId != null);
     392  }
     393
     394  /**
    386395    Insert a raw data spot and verify the external id of the
    387     reporter. The external id is only verified if the raw bioassay
    388     is connected to an array design with features. The external id
     396    reporter. The external id is only verified if it is not null and
     397    the raw bioassay is connected to an array design with features. The external id
    389398    is verified to match the external id of the reporter attached to
    390     feature of the spot's position. If you use this method you don't have
     399    feature of the spot's position. If the raw bioassay isn't connected to an
     400    array design, the batcher will automatically try to load the reporter
     401    with the given external ID. If you use this method you don't have
    391402    the set the reporter with the {@link RawData#setReporter(ReporterData)}
    392403    method.
     404    <p>
     405    The <code>externalFeatureId</code> is only needed if the
     406    {@link FeatureIdentificationMethod#FEATURE_ID} identification method is used.
     407    The other methods will use properties on the <code>RawData</code>
     408    object (postion or the coordinates) to find the feature. Feature
     409    identification is of course needed when the raw bioassay is connected
     410    to an array design but is also used when there is no array design to
     411    validate that duplicate spots are not inserted.
    393412   
    394413    @param data The raw data to insert
    395414    @param externalReporterId The external id of the reporter expected to
    396       be found at the feature of this spot
    397     @throws BaseException If the insertion failed.
    398     @deprecated
    399   */
    400   public void insert(RawData data, String externalReporterId)
    401     throws BaseException
    402   {
    403     doInsert(data, externalReporterId, null, true);
    404   }
    405 
     415      be found at the feature of this spot, or null to use the reporter
     416      attached to the feature
     417    @param externalFeatureId The feature ID of the feature if the
     418      {@link FeatureIdentificationMethod#FEATURE_ID} identification method is used
     419    @throws BaseException If the insertion failed
     420    @since 2.6
     421  */
    406422  public void insert(RawData data, String externalReporterId, String externalFeatureId)
    407423  {
    408     doInsert(data, externalReporterId, externalFeatureId, true);
     424    doInsert(data, externalReporterId, externalFeatureId, externalReporterId != null);
    409425  }
    410426 
     
    412428    Do the actual insert.
    413429  */
    414   void doInsert(RawData data, String externalReporterId, String externalFeatureId, boolean validateReporterId)
     430  private void doInsert(RawData data, String externalReporterId, String externalFeatureId, boolean validateReporterId)
    415431    throws BaseException
    416432  {
Note: See TracChangeset for help on using the changeset viewer.