package com.xagis.model;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class Utils {
public static String BLANK= "";
public static String ZERO= "0";
private static double EARTH_RADIUS = 6378.137;
/**
* VincentyConstants
* Constants for Vincenty functions.
*/
public static double vincentyConstantA = 6378137;
public static double vincentyConstantB = 6356752.3142;
public static double vincentyConstantF = 1/298.257223563;
public static void writeTextFile(String content, String path)
throws IOException {
BufferedWriter bw = new BufferedWriter(new FileWriter(path));
bw.write(content);
bw.flush();
bw.close();
System.out.println("文件生成成功,生成目录:"+path);
}
public static String getASType(String javaType) {
if (javaType.equals("List")) {
return "ArrayCollection";
}
if (javaType.equals("boolean")) {
return "Boolean";
}
return javaType;