📄 yale.java
字号:
/* * YALE - Yet Another Learning Environment * Copyright (C) 2002, 2003 * Simon Fischer, Ralf Klinkenberg, Ingo Mierswa, * Katharina Morik, Oliver Ritthoff * Artificial Intelligence Unit * Computer Science Department * University of Dortmund * 44221 Dortmund, Germany * email: yale@ls8.cs.uni-dortmund.de * web: http://yale.cs.uni-dortmund.de/ * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA. */package edu.udo.cs.yale;import edu.udo.cs.yale.gui.SplashScreen;import edu.udo.cs.yale.operator.IllegalInputException;import edu.udo.cs.yale.operator.IllegalNumberOfInnerOperatorsException;import edu.udo.cs.yale.operator.IOContainer;import edu.udo.cs.yale.operator.IOObject;import edu.udo.cs.yale.operator.Operator;import edu.udo.cs.yale.operator.OperatorChain;import edu.udo.cs.yale.operator.SimpleOperatorChain;import edu.udo.cs.yale.operator.OperatorException;import edu.udo.cs.yale.tools.Tools;import edu.udo.cs.yale.tools.LogService;import edu.udo.cs.yale.tools.ParameterService;import edu.udo.cs.yale.tools.RandomGenerator;import edu.udo.cs.yale.tools.ResultService;import edu.udo.cs.yale.tools.TempFileService;import edu.udo.cs.yale.tools.plugin.Plugin;import edu.udo.cs.yale.tools.xml.XMLException;import java.io.IOException;import java.io.File;import java.io.Reader;import java.io.FileReader;import java.util.Map;import javax.imageio.ImageIO;/** * Main program. Entry point for command line programm, GUI and wrappers. * @author Simon, Ingo * @version $Id: Yale.java,v 2.10 2003/07/24 15:40:59 fischer Exp $ */public class Yale { public static final String YALE_VERSION = "2.0beta2"; static { System.setProperty("yale.version", YALE_VERSION); } public static final String LICENSE = "Yale version 2.0 beta 2, Copyright (C) 2002,2003\n"+ "Yale comes with ABSOLUTELY NO WARRANTY; This is free software,\n" + "and you are welcome to redistribute it under certain conditions;\n"+ "see license information in the file named LICENSE."; private static Experiment experiment; private static InputHandler inputHandler = new ConsoleInputHandler(); private SplashScreen splashScreen; private static Yale theInstance; public Yale() { Yale.theInstance = this; } public static Yale getInstance() { return theInstance; } public static void readExperimentFile(File experimentfile) throws XMLException, IOException, InstantiationException, IllegalAccessException { try { LogService.logMessage("Reading experiment file '" + experimentfile+"'.", LogService.STATUS); if (!experimentfile.exists() || !experimentfile.canRead()) { LogService.logMessage("Cannot read config file '"+experimentfile+"'!", LogService.FATAL); } Yale.experiment = new Experiment(experimentfile); } catch (XMLException e) { throw new XMLException(experimentfile.getName()+":"+e.getMessage()); } } public static Experiment getExperiment() { return experiment; } public static void setExperiment(Experiment experiment) { Yale.experiment = experiment; } public static void init() throws IOException { ParameterService.init(); Plugin.registerAllPlugins(); } public SplashScreen showLogo() { try { splashScreen = new SplashScreen("YALE", ImageIO.read(Tools.getResource("yale_logo_java.gif"))); splashScreen.showSplashScreen(); return splashScreen; } catch (Exception e) { e.printStackTrace(); return null; } } public void hideLogo() { try { splashScreen.dispose(); } catch (Exception e) {} } public void splashMessage(String message) { if (splashScreen != null) { splashScreen.setMessage(message); } } public static void setInputHandler(InputHandler inputHandler) { Yale.inputHandler = inputHandler; } public static InputHandler getInputHandler() { return inputHandler; } public static void quit(int errorcode) { Runtime runtime = Runtime.getRuntime(); runtime.gc(); runtime.runFinalization(); System.exit(errorcode); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -