package com.rf.psychological.scalesJNI;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.rf.psychological.scale.resultBusiness.scaleResult.BaseScale;

public class XScale extends BaseScale {

    public XScale(JSONArray jsonArray, JSONObject resultJson) {
        super(jsonArray, resultJson);
    }

    public native String FESCVScale(String jsonArray, String resultJson);
    public native String AASScale(String jsonArray, String resultJson);
    public native String ASASScale(String jsonArray, String resultJson);
    public native String ASWSScale(String jsonArray, String resultJson);
    public native String DISCScale(String jsonArray, String resultJson);
    public native String DSIScale(String jsonArray, String resultJson);
    public native String DWTAScale(String jsonArray, String resultJson);

    public native String ADSScale(String jsonArray, String resultJson);
    public native String APIUSScale(String jsonArray, String resultJson);
    public native String ASScale(String jsonArray, String resultJson);
    public native String AUDITScale(String jsonArray, String resultJson);
    public native String ITTScale(String jsonArray, String resultJson);
    public native String MCSDScale(String jsonArray, String resultJson);
    public native String MMPIKScale(String jsonArray, String resultJson);
    public native String MMPILScale(String jsonArray, String resultJson);
    public native String MUNSHScale(String jsonArray, String resultJson);
    public native String NYLSScale(String jsonArray, String resultJson);
    public native String PHCSSScale(String jsonArray, String resultJson);
    public native String PHQScale(String jsonArray, String resultJson);
    public native String PRCAScale(String jsonArray, String resultJson);
    public native String PSSScale(String jsonArray, String resultJson);
    public native String QLSCAScale(String jsonArray, String resultJson);
    public native String QSAScale(String jsonArray, String resultJson);
    public native String RDScale(String jsonArray, String resultJson);
    public native String SCCSScale(String jsonArray, String resultJson);
    public native String SCL90Scale(String jsonArray, String resultJson);
    public native String SCSQScale(String jsonArray, String resultJson);
    public native String SDScale(String jsonArray, String resultJson);
    public native String SDSScale(String jsonArray, String resultJson);
    public native String SITScale(String jsonArray, String resultJson);

    /*public String readFile(String file) throws IOException {
        BufferedReader reader = new BufferedReader(new FileReader(file));

        String line = null;

        StringBuilder stringBuilder = new StringBuilder();

        String ls = System.getProperty("line.separator");

        try {
            while((line = reader.readLine()) != null) {
                stringBuilder.append(line);

                stringBuilder.append(ls);

            }

            return stringBuilder.toString();

        } finally {
            reader.close();

        }

    }

    public static void main(String[] args) {
        // 自定义路径使用
        // System.load("dll绝对路径，且必须加后缀.dll")
        System.loadLibrary("FESCVSCALE");
        XScale jni = new XScale();

        String s1 = null;
        String s2 = null;
        String s3 = null;
        try {
            s1 = jni.readFile("C://Users/Administrator/OneDrive/桌面/testd/ja_fescv.txt");
            //System.out.println(s1);
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            s2 = jni.readFile("C://Users/Administrator/OneDrive/桌面/testd/rj_fescv.txt");
            //System.out.println(s2);
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            s3 = jni.readFile("C://Users/Administrator/OneDrive/桌面/廖启华开发任务/test_data/fescv.txt");
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("res:" + jni.FESCVScale(s1, s2));
        //System.out.println("kk: " + jni.get2());
        //System.out.println("返回的结果：" + jni.commonScale(s1, s2));
    }*/

}
