Skip to content

Commit

Permalink
fix commonPreProcessing
Browse files Browse the repository at this point in the history
Signed-off-by: kaideng <[email protected]>
  • Loading branch information
forgivedengkai committed Apr 16, 2020
1 parent a22a4bc commit f5a1080
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.webank.ai.fate.serving.adapter.processing;


import com.alibaba.fastjson.JSON;
import com.google.gson.annotations.JsonAdapter;
import com.webank.ai.fate.serving.bean.PreProcessingResult;
import com.webank.ai.fate.serving.core.bean.Context;
import jdk.nashorn.internal.runtime.ParserException;
Expand All @@ -13,19 +15,9 @@ public class CommonPreProcessing implements PreProcessing {
@Override
public PreProcessingResult getResult(Context context , String paras) {
PreProcessingResult preProcessingResult = new PreProcessingResult();
preProcessingResult.setProcessingResult(preProcessing(paras));
Map<String, Object> featureIds = new HashMap<>();
JSONObject paraObj = new JSONObject(paras);
preProcessingResult.setFeatureIds(featureIds);
preProcessingResult.setProcessingResult(JSON.parseObject(paras, HashMap.class));
preProcessingResult.setFeatureIds(preProcessingResult.getProcessingResult());
return preProcessingResult;
}

private Map<String, Object> preProcessing(String paras) throws ClassCastException, ParserException {
Map<String, Object> feature = new HashMap<>();

return feature;
}

public static void main(String[] args){
}
}

0 comments on commit f5a1080

Please sign in to comment.