Examples of InstanceQuery


Examples of weka.experiment.InstanceQuery

   */
  public void setInstancesFromDBQ(String url, String user,
                                  String pw, String query) {
    if (m_IOThread == null) {
      try {
  InstanceQuery InstQ = new InstanceQuery();
        InstQ.setDatabaseURL(url);
        InstQ.setUsername(user);
        InstQ.setPassword(pw);
        InstQ.setQuery(query);
 
        // we have to disconnect, otherwise we can't change the DB!
        if (InstQ.isConnected())
          InstQ.disconnectFromDatabase();

  InstQ.connectToDatabase();     
  try {
    addUndoPoint();
  } catch (Exception ignored) {}
  setInstancesFromDB(InstQ);
      } catch (Exception ex) {
View Full Code Here

Examples of weka.experiment.InstanceQuery

   */
  protected void setInstancesFromDBaseQuery() {

    try {
      if (m_InstanceQuery == null) {
  m_InstanceQuery = new InstanceQuery();
      }
      String dbaseURL = m_InstanceQuery.getDatabaseURL();
      String username = m_InstanceQuery.getUsername();
      String passwd = m_InstanceQuery.getPassword();
      /*dbaseURL = (String) JOptionPane.showInputDialog(this,
View Full Code Here

Examples of weka.experiment.InstanceQuery

    } else if (exp.getResultListener() instanceof DatabaseResultListener) {
      String dbaseURL = ((DatabaseResultListener) exp.getResultListener())
  .getDatabaseURL();
      try {
  if (m_InstanceQuery == null) {
    m_InstanceQuery = new InstanceQuery();
  }
  m_InstanceQuery.setDatabaseURL(dbaseURL);
  m_InstanceQuery.connectToDatabase();
  String tableName = m_InstanceQuery
    .getResultsTableName(exp.getResultProducer());
View Full Code Here

Examples of weka.experiment.InstanceQuery

  public void setInstancesFromDBQ(String url, String user,
                                  String pw, String query,
                                  boolean sparse) {
    if (m_IOThread == null) {
      try {
  InstanceQuery InstQ = new InstanceQuery();
        InstQ.setDatabaseURL(url);
        InstQ.setUsername(user);
        InstQ.setPassword(pw);
        InstQ.setQuery(query);
        InstQ.setSparseData(sparse);
 
        // we have to disconnect, otherwise we can't change the DB!
        if (InstQ.isConnected())
          InstQ.disconnectFromDatabase();

  InstQ.connectToDatabase();     
  try {
    addUndoPoint();
  } catch (Exception ignored) {}
  setInstancesFromDB(InstQ);
      } catch (Exception ex) {
View Full Code Here

Examples of weka.experiment.InstanceQuery

  
   
    Instances result = null;
    checkEnv();
    try {
      InstanceQuery iq = new InstanceQuery();
      iq.initialize(m_CustomPropsFile);
      String realURL = m_URL;
      try {
        realURL = m_env.substitute(realURL);
      } catch (Exception ex) { }
      iq.setDatabaseURL(realURL);
      String realUser = m_User;
      try {
        realUser = m_env.substitute(realUser);
      } catch (Exception ex) { }
      iq.setUsername(realUser);
      String realPass = m_Password;
      try {
        realPass = m_env.substitute(realPass);
      } catch (Exception ex) { }
      iq.setPassword(realPass);     
      String realQuery = m_query;
      try {
        realQuery = m_env.substitute(realQuery);
      } catch (Exception ex) { }
      iq.setQuery(realQuery);
      iq.setSparseData(m_CreateSparseData);
     
      result = iq.retrieveInstances();
     
      if(m_DataBaseConnection.getUpperCase()) {
        m_idColumn = m_idColumn.toUpperCase();
      }
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.