亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sysconfig.java

?? 為了下東西 隨便發(fā)了個 datamining 的源代碼
?? JAVA
字號:
/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
package eti.bi.common.System;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import eti.bi.alphaminer.core.Plugin.Plugin;
import eti.bi.alphaminer.core.Plugin.PluginFactory;
import eti.bi.alphaminer.core.help.AlphaminerHelpHandler;
import eti.bi.alphaminer.operation.operator.INodeInfo;
import eti.bi.common.Constants;
import eti.bi.common.SystemAdapter;
import eti.bi.common.Locale.Resource;
import eti.bi.exception.BaseException;
import eti.bi.util.ResourceLoader;

/**
 * 
 * This is a class that manages the system configuration of the BI platform. The
 * location of the configuration file is stored in the Constants.CONFIG_FILE.
 * Other classes can just get the system config by calling the static method
 * getProperty of this class.
 * 
 * TODO: Implement dynamic loading of configuration file such that the new
 * modified value can be effected without restarting server.
 * 
 * @since 1.0
 * @version $Revision$ $Date$
 * @author $Author$
 */
public class SysConfig {
	private static String HOME = "";
	private static String CONFIG_HOME = "config";
	private static Properties exceptionMessage;
	public static Properties m_ConfigProp;
	private static String currentworkspacepath;
	
	/**
	 * Initialize this class by loading the values from the configuration the
	 * first time.
	 */
	public static void loadConfig(String aConfigFile) throws IOException {
		File file = new File(aConfigFile);
		InputStream is = new FileInputStream(file);
		m_ConfigProp = new Properties();
		m_ConfigProp.load(is);
		is.close();
	}

	public static void loadExceptionMessage(String exceptionMessageFile) {
		File exceptionFile = new File(exceptionMessageFile);
		if((!exceptionFile.exists())||(!exceptionFile.canRead())) {
			System.out.println("Can't load the exception message file: "+exceptionMessageFile);
			SysLog.error("Can't load the exception message file: "+exceptionMessageFile);
			return;
		}
		InputStream in=null;
		try {
			in = new FileInputStream(exceptionFile);
			exceptionMessage = new Properties();
			exceptionMessage.load(in);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		finally {
			if(in!=null) {
				try {
					in.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
		
	}
	
	public static void setHome(String a_Home_Path) {
		HOME = a_Home_Path;
		CONFIG_HOME = HOME + File.separator + "config";
	}

	public static String getHome() {
		return HOME;
	}

	public static String getOperatorImageHome() {
		return ResourceLoader.getPath() + File.separator + "images" + File.separator;
	}

	public static String getConfigHome() {
		return CONFIG_HOME;
	}

	public static String getSystemHome() {
		return HOME+File.separator+"System";
	}
	
	public static void setCurrentWorkSpacePath(String aPath) {
		currentworkspacepath = aPath;
	}
	
	public static String getLocaleHomen() {
		return CONFIG_HOME+File.separator+"Locale";
	}
	
	/**
	 * init Alphaminer help
	 * @throws MalformedURLException 
	 * */
	public static void initAlphaminerHelp() throws MalformedURLException {
		
		AlphaminerHelpHandler alphaminerhelp= AlphaminerHelpHandler.getInstance();
		
		alphaminerhelp.reset();
		
		//system help
		URL url = SystemAdapter.JarURL(Resource.getWholePath()+"!/AlphaminerHelp/"+"AlphaMiner.hs");
		ClassLoader classloader = SysConfig.class.getClassLoader();
		alphaminerhelp.addUrl(classloader, url);
		
		//plugin help
		List<Plugin> plugins = PluginFactory.getAllRegisteredPlugins();
		Iterator<Plugin> iterator = plugins.iterator();
		
		Plugin plugin;
		while(iterator.hasNext()) {
			plugin = iterator.next();
			classloader = plugin.getClassLoader();

			url = SystemAdapter.JarURL(plugin.getArchive().getName()+"!/"+Resource.getLocalePathinJar(plugin.getPluginLocalePath())+"AlphaminerHelp/AlphaMiner.hs");
			alphaminerhelp.addUrl(classloader, url);
		}
		
		AlphaminerHelpHandler.getInstance().create();
	}
	
	/**
	 * Gets a property with the key from the system configuration.
	 * 
	 * @param key
	 *            the key of the property
	 * @return String the value of the property. null if no such key.
	 */
	public static String getProperty(String key) {
		if (key == null || key.trim().length() <= 0) {
			return "";
		}
		//File aFile = new File(HOME);
		if(key.equals("temp")) {
			return HOME+File.separator+"temp";
		}
		else if(key.equals("SYSTEM_VARIABLE_HOME")) {
			return CONFIG_HOME+File.separator+"SystemVariable";
		}
		else if (key.equals("TEMP_CASES")) {
			return SystemTempFile.getCaseTempHome();
		} 
		else if(key.equals("TEMP_PLUGIN_LIB")) {
			return SystemTempFile.getTempLibHome();
		} else if (key.equals(Constants.BIML_REPOSITORY_KEY)) {
			return currentworkspacepath;
		} else if (key.equals("workspacesdefinition")) {
			return CONFIG_HOME + File.separator + "Workspace" + File.separator + "workspaces.xml";
		} else if(key.equals("localesdefinition")) {
			return CONFIG_HOME + File.separator + "Locale" + File.separator + "Locale.xml";
		}
		else if (key.equals("PLUGIN_HOME")) {
			return HOME + File.separator + m_ConfigProp.getProperty("PLUGIN_HOME");
		}else if(key.equals("ALPHAMINERHELP")) {
			return SystemAdapter.JarURLString("jar:file:/"+Resource.getWholePath()+"/AlphaminerHelp.jar!/"+"AlphaMiner.hs");
		}else {
			return escapeBackSlash(expandProperty(m_ConfigProp.getProperty(key)));
		}
	}

	public static String getExceptionMessage(String aMessage) throws BaseException{
		if(exceptionMessage==null) {
			throw new BaseException("Exception message hasn't been initialized!");
		}
		return exceptionMessage.getProperty(aMessage);
	}
	
	/**
	 * clear temp file when quit this application
	 * */
	public synchronized static void clearTempFile() {
		SystemTempFile.clear();
	}
	
	/**
	 * delete all files or all directory
	 * @return 
	 * */
	public synchronized static void deleteAllFile(File file) {
		if(file==null||!file.exists()) {
			return;
		}
		if(file.isDirectory()) {
			File[] files = file.listFiles();
			for(int i=0;i<files.length;i++) {
				deleteAllFile(files[i]);
			}
			file.delete();
		}
		else if(file.isFile()) {
			file.delete();
		}
	}
	
	/**
	 * Gets a property with the key from the system configuration. If no such
	 * key is found, then return the defaultValue specified by the user.
	 * 
	 * 
	 * @param key
	 *            the key of the property
	 * @return String the value of the property or defaultValue if no such key.
	 */
	public static String getProperty(String key, String defaultValue) {
		return escapeBackSlash(expandProperty(m_ConfigProp.getProperty(key, defaultValue)));
	}

	public static void loadConfig(InputStream inStream) throws IOException {
		m_ConfigProp.load(inStream);
	}

	public static void store(OutputStream out, String header) throws IOException {
		m_ConfigProp.store(out, header);
	}

	public static Enumeration propertyNames() {
		return m_ConfigProp.propertyNames();
	}

	public static Object setProperty(String key, String value) {
		return m_ConfigProp.setProperty(key, value);
	}

	public static String expandProperty(String s) {
		if (s == null)
			return null;
		int i = s.indexOf("${", 0);
		if (i == -1)
			return s;
		StringBuffer stringbuffer = new StringBuffer(s.length());
		int j = s.length();
		int k = 0;
		while (i < j) {
			if (i > k) {
				stringbuffer.append(s.substring(k, i));
				k = i;
			}
			int l;
			for (l = i + 2; l < j && s.charAt(l) != '}'; l++)
				;
			if (l == j) {
				stringbuffer.append(s.substring(i, l));
				break;
			}
			String s1 = s.substring(i + 2, l);
			if (s1.equals("/")) {
				stringbuffer.append(File.separatorChar);
			} else {
				String s2 = System.getProperty(s1);
				if (s2 != null)
					stringbuffer.append(s2);
				// else
				// throw new Exception("unable to expand property " + s1);
			}
			k = l + 1;
			i = s.indexOf("${", k);
			if (i == -1) {
				if (k < j)
					stringbuffer.append(s.substring(k, j));
				break;
			}
		}
		return stringbuffer.toString();
	}

	private static String escapeBackSlash(String aString) {
		if (aString == null)
			return null;
		StringBuffer sb = new StringBuffer();
		int i = aString.indexOf('\\');
		if (i < 0)
			return aString;
		sb.append(aString.substring(0, i)).append("\\\\").append(escapeBackSlash(aString.substring(i + 1)));
		return sb.toString();
	}

	public static String getAlphaminerVersion() {
		return "2.0";
	}

	public static URL getAlgorithmURL(INodeInfo nodeinfo) throws MalformedURLException {
		if(nodeinfo==null||nodeinfo.getJafFile()==null) {
			return new URL("file",null,getConfigHome()+File.separator+"Algorithms"+File.separator+"algorithms.xml");
		}
		else{
			return new URL("jar:file:/"+nodeinfo.getJafFile().getName()+"!/"+PluginFactory.getPlugin(nodeinfo.getPluginIdex()).getPluginConfigPath()+"/Algorithms/algorithms.xml");
		}
	}

	public static void exit() {
		clearTempFile();
		SystemVariable.Clean();
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美在线视频观看| 亚洲视频电影在线| 99久久er热在这里只有精品66| 亚洲视频电影在线| 日韩一区二区视频| 91免费视频网| 国产成人午夜片在线观看高清观看| 亚洲综合在线五月| 久久精品免费在线观看| 欧美一区二区在线不卡| 色综合色综合色综合 | 久久国产精品72免费观看| 中文字幕不卡一区| 日韩免费视频一区| 欧美日韩在线观看一区二区| 成人av小说网| 国产精品系列在线播放| 婷婷中文字幕综合| 一区二区欧美国产| 中文字幕视频一区二区三区久| 日韩免费视频一区二区| 制服丝袜亚洲精品中文字幕| 91久久精品网| 91蜜桃免费观看视频| 不卡区在线中文字幕| 国产精品自拍在线| 老司机免费视频一区二区三区| 亚洲一区二区三区四区不卡| 亚洲男人的天堂在线aⅴ视频 | 三级一区在线视频先锋 | 国产精品女上位| 久久久久国产一区二区三区四区| 日韩你懂的电影在线观看| 91精品国产综合久久香蕉麻豆| 欧美在线视频日韩| 欧美性生活大片视频| 欧美性高清videossexo| 欧亚洲嫩模精品一区三区| 91久久国产综合久久| 色乱码一区二区三区88| 91免费国产视频网站| 91麻豆免费看| 一本久久精品一区二区| 99精品视频在线播放观看| 成人a免费在线看| 99vv1com这只有精品| 91美女视频网站| 欧美系列亚洲系列| 欧美丰满美乳xxx高潮www| 欧美一区午夜视频在线观看| 欧美一三区三区四区免费在线看| 欧美xingq一区二区| 亚洲精品在线三区| 中文一区在线播放| 亚洲人精品一区| 亚洲国产成人高清精品| 日韩国产成人精品| 国产麻豆精品久久一二三| 成人av动漫在线| 欧美伊人精品成人久久综合97| 欧美精品乱码久久久久久| 日韩免费视频线观看| 国产片一区二区三区| 亚洲欧洲制服丝袜| 天堂午夜影视日韩欧美一区二区| 美女高潮久久久| 国产在线视视频有精品| 91在线播放网址| 欧美老女人在线| 精品国产乱子伦一区| 亚洲国产精品成人综合色在线婷婷| 中文字幕一区二区三区乱码在线| 久久久久久久久一| 一区二区三区欧美在线观看| 亚洲国产美国国产综合一区二区| 精品一区二区三区久久久| 99久久久无码国产精品| 欧美色手机在线观看| 久久亚洲欧美国产精品乐播| 综合激情网...| 美美哒免费高清在线观看视频一区二区 | 成人黄色免费短视频| 不卡的电影网站| 欧美疯狂做受xxxx富婆| 国产精品天干天干在线综合| 亚洲一区二区三区视频在线| 韩国av一区二区三区| 欧美无人高清视频在线观看| 欧美精品一区二区不卡| 亚洲激情图片小说视频| 国产一区二区调教| 欧美综合亚洲图片综合区| 久久久久88色偷偷免费| 亚洲一区二区三区视频在线播放 | 久久99精品久久久久久国产越南 | 国产伦精品一区二区三区免费 | 欧美亚洲国产怡红院影院| 日韩欧美中文字幕精品| 亚洲欧洲综合另类| 国产精品主播直播| 这里是久久伊人| 一区二区三区美女视频| 国产麻豆精品一区二区| 日韩一卡二卡三卡四卡| 亚洲欧美一区二区三区国产精品| 国内精品视频666| 欧美日韩国产高清一区二区 | 日日夜夜免费精品视频| 波多野结衣在线一区| 日韩视频永久免费| 亚洲自拍与偷拍| 国产不卡视频在线观看| 欧美mv日韩mv| 免费精品视频在线| 欧美日韩成人综合天天影院| 亚洲精品少妇30p| 成人免费视频播放| 久久免费看少妇高潮| 蜜桃精品在线观看| 欧美日韩精品专区| 亚洲午夜在线观看视频在线| 一本一道波多野结衣一区二区| 国产午夜亚洲精品不卡| 激情av综合网| 精品日韩成人av| 激情丁香综合五月| 久久综合九色综合97婷婷| 日本亚洲一区二区| 欧美三级日本三级少妇99| 亚洲午夜精品网| 欧美性高清videossexo| 亚洲国产毛片aaaaa无费看| 色狠狠综合天天综合综合| 亚洲欧美日韩国产中文在线| 色域天天综合网| 亚洲精品免费播放| 91久久精品一区二区三| 亚洲黄网站在线观看| 欧美午夜精品久久久久久超碰| 亚洲免费成人av| 日本精品一区二区三区四区的功能| 亚洲女与黑人做爰| 一本大道久久a久久精二百| 亚洲激情图片qvod| 欧美日韩视频在线第一区 | 偷拍自拍另类欧美| 欧美高清www午色夜在线视频| 首页欧美精品中文字幕| 日韩限制级电影在线观看| 国内精品免费**视频| 中文字幕国产一区二区| 色婷婷国产精品| 天堂一区二区在线免费观看| 精品久久久三级丝袜| 国产东北露脸精品视频| 国产精品国产三级国产三级人妇| 99re热视频精品| 亚洲v中文字幕| 日韩免费电影网站| 成人高清视频在线| 一区二区成人在线| 91麻豆精品国产91久久久久| 激情久久五月天| 最新国产成人在线观看| 5月丁香婷婷综合| 国产美女av一区二区三区| 国产精品成人在线观看| 欧美喷潮久久久xxxxx| 激情久久五月天| 亚洲免费观看高清完整版在线| 欧美一区二区在线免费播放| 高清久久久久久| 亚洲综合视频网| 久久久亚洲综合| 91久久一区二区| 国产一区二区三区在线观看精品 | 欧美中文字幕久久 | 欧美日韩在线电影| 国产一区二区在线视频| 亚洲国产美女搞黄色| 久久久噜噜噜久噜久久综合| 欧美综合色免费| 国产91丝袜在线播放0| 亚洲一区二区美女| 久久精品亚洲乱码伦伦中文| 欧美天堂亚洲电影院在线播放| 国产乱子伦一区二区三区国色天香| 一区二区三区美女视频| 久久精品人人做人人综合| 欧美日韩国产综合一区二区三区 | 一本色道久久综合精品竹菊| 精品综合久久久久久8888| 亚洲少妇最新在线视频| 久久久综合精品| 欧美一二三区在线| 91丝袜美腿高跟国产极品老师| 国产一区二区三区蝌蚪| 日韩精品免费专区| 亚洲激情在线播放| 欧美韩国一区二区|