Package weka.core.converters

Examples of weka.core.converters.DatabaseSaver


    buffer.append("Global Info: " + saver.globalInfo() + "\n");
       
    String className = saver.getSaver().getClass().getName();
     
    if(className.equalsIgnoreCase(DatabaseSaver.class.getName())) {
      DatabaseSaver databaseSaver = (DatabaseSaver)saver.getSaver();
                   
      buffer.append("Saver type: DatabaseSaver" + "\n");       
      buffer.append("Options: ");
      String[] options = databaseSaver.getOptions();   
      for(int i = 0; i < options.length; i++) {
        buffer.append(options[i] + "; ");
      }
      buffer.append("\n");
      buffer.append("URL: " + databaseSaver.getUrl() + "\n");
      buffer.append("User: " + databaseSaver.getUser() + "\n");
      buffer.append("Password: " + "?" + "\n");
      buffer.append("Table Name: " + databaseSaver.getTableName() + "\n");
      buffer.append("Relation For Table Name: " + databaseSaver.getRelationForTableName() + "\n");
      buffer.append("Auto Key Generation: " + databaseSaver.getAutoKeyGeneration() + "\n");       
    }     
    else if(className.equalsIgnoreCase(ArffSaver.class.getName())) {
      ArffSaver arffSaver = (ArffSaver)saver.getSaver();
      buffer.append("  Loader type: ArffSaver" + "\n");       
    }
View Full Code Here


    for(int i = 0; i < savers.size(); i++) {
      Saver saver = (Saver)savers.get(i);
     
      String className = saver.getSaver().getClass().getName();
      if(className.equalsIgnoreCase(DatabaseSaver.class.getName())) {
        DatabaseSaver databaseSaver = (DatabaseSaver)saver.getSaver();
       
        databaseSaver.setDbWriteMode(env.getWriteMode());
        databaseSaver.setKeyColumnNames(env.getKeyColumnNames());
       
        if( env.isVersioningEnabled() ) {
          databaseSaver.setVersioning(true);
          databaseSaver.setVersionColumnName( env.getVersionColumnName());
          databaseSaver.setVersion( env.getVersion());
        }
       
        if( env.getOutConnection() != null ) {
          databaseSaver.setDestination(env.getOutConnection());
        }
      } else if(className.equalsIgnoreCase(ArffSaver.class.getName())) {
        ArffSaver arffSaver = (ArffSaver)saver.getSaver();       
        // setup operation goes here     
      }
View Full Code Here

TOP

Related Classes of weka.core.converters.DatabaseSaver

Copyright © 2018 www.massapicom. 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.