For IntelliJ IDEA and
Android Studio


/** * Opens a connection to the database */ public void connectToDatabase() { try { if (!m_DataBaseConnection.isConnected()) { m_DataBaseConnection.connectToDatabase(); } } catch (Exception ex) { printException(ex); } }
/** * Sets the database url using the DatabaseUtils file * * @throws Exception if something goes wrong */ public void setSource() throws Exception { m_DataBaseConnection = newDatabaseConnection(); m_URL = m_DataBaseConnection.getDatabaseURL(); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); }
/** * Gets all the file extensions used for this type of file. * * @return the file extensions */ @Override public String[] getFileExtensions() { return new String[] { getFileExtension() }; }
/** * Main method. * * @param args should contain the name of an input file. */ public static void main(String[] args) { runFileLoader(new SerializedInstancesLoader(), args); } }
/** * Constructor. */ public CSVSaver() { resetOptions(); }
/** * Gets token. * * @param tokenizer the stream tokenizer * @throws IOException if reading the next token fails */ public static void getToken(StreamTokenizer tokenizer) throws IOException { StreamTokenizerUtils.getToken(tokenizer); }
/** * Gets all the file extensions used for this type of file. * * @return the file extensions */ public String[] getFileExtensions() { return new String[]{getFileExtension()}; }
/** * Gets all the file extensions used for this type of file. * * @return the file extensions */ public String[] getFileExtensions() { return new String[]{getFileExtension()}; }
/** * Constructor. */ public JSONSaver() { resetOptions(); }
/** * Main method. * * @param args should contain the options of a Saver. */ public static void main(String[] args) { runFileSaver(new JSONSaver(), args); } }
/** * Main method. * * @param args should contain the options of a Saver. */ public static void main(String[] args) { runFileSaver(new LibSVMSaver(), args); } }
/** * returns a vector with the classnames of all the file loaders. * * @return the classnames of the loaders */ public static Vector<String> getFileLoaders() { return getConverters(m_FileLoaders); }
/** * writes the data to the given file. * * @param filename the file to write the data to * @param data the data to store * @throws Exception if writing fails */ public static void write(String filename, Instances data) throws Exception { DataSink sink; sink = new DataSink(filename); sink.write(data); }
/** * Sets the database url using the DatabaseUtils file * * @throws Exception if something goes wrong */ public void setSource() throws Exception { m_DataBaseConnection = newDatabaseConnection(); m_URL = m_DataBaseConnection.getDatabaseURL(); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); }
/** * Opens a connection to the database */ public void connectToDatabase() { try { if (!m_DataBaseConnection.isConnected()) { m_DataBaseConnection.connectToDatabase(); } } catch (Exception ex) { printException(ex); } }