Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/11 09:37:18 (14 years ago)
Author:
mholper
Message:

first Unit-Test build against new AdministrationService #1441

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKBJavaConnector/src/main/java/com/heuristiclab/okb/impl/ECJ19ConnectorImpl.java

    r5673 r5761  
    1010import com.heuristiclab.okb.ECJConnectorState;
    1111
    12 import at.hl.okb.IECJConnector;
    13 import at.hl.okb.wsclient.OKBServiceClient;
     12//import at.hl.okb.IECJConnector;
     13//import at.hl.okb.wsclient.OKBServiceClient;
    1414
    1515/**
     
    1717 *
    1818 */
    19 public class ECJ19ConnectorImpl implements IECJConnector {
     19public class ECJ19ConnectorImpl { //implements IECJConnector {
    2020
    21   private OKBServiceClient okbClient = null;
    22 
    23   /**
    24    *
    25    */
    26   public ECJ19ConnectorImpl() {
    27     this.okbClient = new OKBServiceClient();
    28   }
    29  
    30 
    31   @Override
    32   public ECJConnectorState initialize(String algorithmName, String platformName, String problemName) throws Exception {
    33 
    34     Long platformId = okbClient.getPlatformId(platformName);
    35     if (platformId == null)
    36       throw new Exception("Platform " + platformName + " not found!");
    37 
    38     Long algorithmId = okbClient.getAlgorithmId(algorithmName, platformId);
    39     if (algorithmId == null)
    40       throw new Exception("Algorithm " + algorithmName + " for Platform " + platformName + " not found!");
    41 
    42     Long problemId = okbClient.getProblemId(problemName);
    43     if (problemId == null)
    44       throw new Exception("Proble " + problemName + " not found!");
    45    
    46     return new ECJConnectorState(platformId,algorithmId,problemId);
    47   }
    48 
    49   @Override
    50   public void result(ECJConnectorState state, List<Object> resultList, Map<String, Object> algoParams, Map<String, Object> problemParams,
    51       Object paramFile) throws Exception {
    52     // TODO Auto-generated method stub
    53    
    54     Set<String> missingAlgoParamSet = algoParams.keySet();
    55     missingAlgoParamSet.removeAll(okbClient.getAlgorithmParameterMap(state.getAlgorithmId()).keySet());
    56    
    57     //fehlende Param Anlegen
    58     if (missingAlgoParamSet.size()>0)
    59       okbClient.createMissingAlgoParams(state.getAlgorithmId(), missingAlgoParamSet);   
    60    
    61     Set<String> missingProblemParamSet = problemParams.keySet();
    62     missingProblemParamSet.removeAll(okbClient.getProblemParameterMap(state.getProblemId()).keySet());   
    63 
    64     //create Experiment if algoparams not exists in HL and problemparams not exits (in HL)
    65     //create missing Params in Algo and Problem (if not exits for experiment)
    66     //create Datatype if missing
    67    
    68   }
     21//  private OKBServiceClient okbClient = null;
     22//
     23//  /**
     24//   *
     25//   */
     26//  public ECJ19ConnectorImpl() {
     27//    this.okbClient = new OKBServiceClient();
     28//  }
     29// 
     30//
     31//  @Override
     32//  public ECJConnectorState initialize(String algorithmName, String platformName, String problemName) throws Exception {
     33//
     34//    Long platformId = okbClient.getPlatformId(platformName);
     35//    if (platformId == null)
     36//      throw new Exception("Platform " + platformName + " not found!");
     37//
     38//    Long algorithmId = okbClient.getAlgorithmId(algorithmName, platformId);
     39//    if (algorithmId == null)
     40//      throw new Exception("Algorithm " + algorithmName + " for Platform " + platformName + " not found!");
     41//
     42//    Long problemId = okbClient.getProblemId(problemName);
     43//    if (problemId == null)
     44//      throw new Exception("Proble " + problemName + " not found!");
     45//   
     46//    return new ECJConnectorState(platformId,algorithmId,problemId);
     47//  }
     48//
     49//  @Override
     50//  public void result(ECJConnectorState state, List<Object> resultList, Map<String, Object> algoParams, Map<String, Object> problemParams,
     51//      Object paramFile) throws Exception {
     52//    // TODO Auto-generated method stub
     53//   
     54//    Set<String> missingAlgoParamSet = algoParams.keySet();
     55//    missingAlgoParamSet.removeAll(okbClient.getAlgorithmParameterMap(state.getAlgorithmId()).keySet());
     56//   
     57//    //fehlende Param Anlegen
     58//    if (missingAlgoParamSet.size()>0)
     59//      okbClient.createMissingAlgoParams(state.getAlgorithmId(), missingAlgoParamSet);   
     60//   
     61//    Set<String> missingProblemParamSet = problemParams.keySet();
     62//    missingProblemParamSet.removeAll(okbClient.getProblemParameterMap(state.getProblemId()).keySet());   
     63//
     64//    //create Experiment if algoparams not exists in HL and problemparams not exits (in HL)
     65//    //create missing Params in Algo and Problem (if not exits for experiment)
     66//    //create Datatype if missing
     67//   
     68//  }
    6969}
Note: See TracChangeset for help on using the changeset viewer.