- Timestamp:
- 01/08/11 14:34:26 (14 years ago)
- Location:
- branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/impl/ECJ19ConnectorImpl.java
r5254 r5255 56 56 // TODO Auto-generated method stub 57 57 58 Set<String> missing ParamSet = algoParams.keySet();59 missing ParamSet.removeAll(okbClient.getAlgorithmParameterMap(state.getAlgorithmId()).keySet());58 Set<String> missingAlgoParamSet = algoParams.keySet(); 59 missingAlgoParamSet.removeAll(okbClient.getAlgorithmParameterMap(state.getAlgorithmId()).keySet()); 60 60 61 61 //fehlende Param Anlegen 62 if (missingAlgoParamSet.size()>0) 63 okbClient.createMissingAlgoParams(state.getAlgorithmId(), missingAlgoParamSet); 62 64 63 okbClient.createMissingAlgoParams(state.getAlgorithmId(), missingParamSet); 65 Set<String> missingProblemParamSet = problemParams.keySet(); 66 missingProblemParamSet.removeAll(okbClient.getProblemParameterMap(state.getProblemId()).keySet()); 64 67 65 68 //create Experiment if algoparams not exists in HL and problemparams not exits (in HL) -
branches/OKBJavaConnector/HLOKBWebClient/src/main/java/at/hl/okb/wsclient/OKBServiceClient.java
r5254 r5255 3 3 import static at.hl.okb.wsclient.Utilities.createNameFilter; 4 4 5 import java.util.ArrayList;6 5 import java.util.HashMap; 7 6 import java.util.Iterator; 8 import java.util.List;9 7 import java.util.Map; 10 8 import java.util.Set; 11 12 import javax.xml.bind.JAXBElement;13 9 14 10 import at.hl.wsclient.okb.Algorithm; … … 17 13 import at.hl.wsclient.okb.AlgorithmParameter; 18 14 import at.hl.wsclient.okb.ArrayOfAlgorithmParameter; 15 import at.hl.wsclient.okb.ArrayOfProblemParameter; 19 16 import at.hl.wsclient.okb.IOKBService; 20 17 import at.hl.wsclient.okb.NamedOKBItem; … … 24 21 import at.hl.wsclient.okb.Problem; 25 22 import at.hl.wsclient.okb.ProblemClass; 23 import at.hl.wsclient.okb.ProblemData; 24 import at.hl.wsclient.okb.ProblemParameter; 26 25 27 26 import com.google.common.collect.Iterables; … … 109 108 Map<String, Object> returnMap = new HashMap<String, Object>(); 110 109 111 AlgorithmData algoData = port.getAlgorithmData(algorithmId);112 113 110 ArrayOfAlgorithmParameter algoParamList = port 114 111 .getAlgorithmParameters(algorithmId); … … 117 114 .getAlgorithmParameter()) { 118 115 returnMap.put(algoParam.getName().getValue(), null); 119 // port.getDataType(algoParam.getDataTypeId()).getName().getValue());120 116 } 121 117 122 118 return returnMap; 123 119 } 120 121 public Map<String, Object> getProblemParameterMap(Long ProblemId) { 122 Map<String, Object> returnMap = new HashMap<String, Object>(); 123 124 ArrayOfProblemParameter algoParamList = port 125 .getProblemParameters(ProblemId); 126 127 for (ProblemParameter algoParam : algoParamList 128 .getProblemParameter()) { 129 returnMap.put(algoParam.getName().getValue(), null); 130 } 131 132 return returnMap; 133 } 134 135 124 136 125 137 private <T extends NamedOKBItem> T createNamedOKBItem(Class<T> clazz, … … 160 172 } 161 173 } 174 175 public void createMissingProblemParams(Long ProblemId, 176 Set<String> missingParamNames) { 177 178 //falls Werte auch verglichen werdne sollen 179 //Map<String, Object> ecjProblemParams 180 //Set<String> missingParamNames = ecjProblemParams.keySet(); 181 for (String paramname : missingParamNames) { 182 ProblemParameter newProblemParam = new ProblemParameter(); 183 newProblemParam.setProblemId(ProblemId); 184 newProblemParam.setDataTypeId(null);// TODO insert DatatypeId if not 185 // exists (mapping first); 186 newProblemParam.setDescription(factory 187 .createNamedOKBItemDescription("created from ECJ")); 188 newProblemParam.setName(factory 189 .createNamedOKBItemDescription(paramname)); 190 port.addProblemParameter(newProblemParam); 191 } 192 } 162 193 }
Note: See TracChangeset
for help on using the changeset viewer.