Changeset 3816


Ignore:
Timestamp:
Oct 10, 2007, 4:48:17 PM (15 years ago)
Author:
Martin Svensson
Message:

References #492 Start working on services for BioAssaySets? and added a service to get bioassayset in an
experiment.

Location:
branches/webservices/src/webservices
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/webservices/src/webservices/client/java/net/sf/basedb/ws/info/ItemInfo.java

    r3039 r3816  
    2626import net.sf.basedb.core.Nameable;
    2727
     28/**
     29  Class that holds information about a Nameable item sent through web services
     30    @author Nicklas, Martin
     31    @version 2.5
     32 */
    2833public class ItemInfo
    2934{
  • branches/webservices/src/webservices/server/META-INF/services.xml

    r3039 r3816  
    3636    <parameter name="ServiceClass" locked="false">net.sf.basedb.ws.server.ExperimentService</parameter>
    3737  </service>
     38  <service name="BioAssaySet" scope="application">
     39    <description>
     40      This service handles bioassaysets
     41    </description>
     42    <messageReceivers>
     43      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
     44        class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
     45      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
     46        class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
     47    </messageReceivers>
     48    <parameter name="ServiceClass" locked="false">net.sf.basedb.ws.server.BioAssaySetService</parameter>
     49  </service>
    3850</serviceGroup>
  • branches/webservices/src/webservices/server/net/sf/basedb/ws/server/AbstractRPCService.java

    r3813 r3816  
    7575  {   
    7676    List<Include> includes = new ArrayList<Include>();
    77    
     77    qOpt = qOpt == null ? new QueryOptions() : qOpt;
    7878    if (qOpt.getIncludeMine()) includes.add(Include.MINE);
    7979    if (qOpt.getIncludeShared()) includes.add(Include.SHARED);
  • branches/webservices/src/webservices/server/net/sf/basedb/ws/server/ExperimentService.java

    r3813 r3816  
    2626import net.sf.basedb.core.Affymetrix;
    2727import net.sf.basedb.core.ArrayDesign;
     28import net.sf.basedb.core.BioAssaySet;
    2829import net.sf.basedb.core.DbControl;
    2930import net.sf.basedb.core.Experiment;
     
    8081  }
    8182 
     83  /**
     84   
     85      @param ID
     86      @param experimentId
     87      @param qOpt
     88      @return
     89   */
     90  public ItemInfo[] getBioAssaySet(String ID, int experimentId, QueryOptions qOpt)
     91  {
     92    List<ItemInfo> bioAssaySetsInfo = new LinkedList<ItemInfo>();
     93    SessionControl sc = getSessionControl(ID);
     94    DbControl dc = sc.newDbControl();
     95   
     96    try
     97    {
     98      Experiment experiment = Experiment.getById(dc, experimentId);
     99      ItemQuery<BioAssaySet> query = experiment.getBioAssaySets();
     100      query = qOpt != null ? getConfiguredItemQuery(query, qOpt) : query;
     101     
     102      for (BioAssaySet bas : query.list(dc))
     103      {
     104        ItemInfo info = new ItemInfo(bas);
     105        bioAssaySetsInfo.add(info);
     106      }
     107    }
     108    finally
     109    {
     110      if (dc != null) dc.close();
     111    }
     112   
     113    ItemInfo[] ii = new ItemInfo[bioAssaySetsInfo.size()];
     114    return bioAssaySetsInfo.toArray(ii);
     115  }
     116 
    82117  public RawBioAssayInfo[] getRawBioAssays(String ID, int experimentId, QueryOptions qOpt)
    83118  {
Note: See TracChangeset for help on using the changeset viewer.