Java 类weka.core.converters.Loader 实例源码

项目:repo.kmeanspp.silhouette_score    文件:PreprocessPanel.java   
/**
  * Applies the selected converter
  *
  * @param cnv the converter to apply to the input file
  * @param f the input file
  */
 private void tryConverter(final Loader cnv, final File f) {

   if (m_IOThread == null) {
     m_IOThread = new Thread() {
  @Override
  public void run() {
    try {
      cnv.setSource(f);
      Instances inst = cnv.getDataSet();
      setInstances(inst);
    } catch (Exception ex) {
      m_Log.statusMessage(cnv.getClass().getName()+" failed to load "
             +f.getName());
      JOptionPane.showMessageDialog(PreprocessPanel.this,
                    cnv.getClass().getName()+" failed to load '"
                    + f.getName() + "'.\n"
                    + "Reason:\n" + ex.getMessage(),
                    "Convert File",
                    JOptionPane.ERROR_MESSAGE);
      m_IOThread = null;
      converterQuery(f);
    }
    m_IOThread = null;
  }
};
     m_IOThread.setPriority(Thread.MIN_PRIORITY); // UI has most priority
     m_IOThread.start();
   }
 }
项目:autoweka    文件:PreprocessPanel.java   
/**
  * Applies the selected converter
  *
  * @param cnv the converter to apply to the input file
  * @param f the input file
  */
 private void tryConverter(final Loader cnv, final File f) {

   if (m_IOThread == null) {
     m_IOThread = new Thread() {
  public void run() {
    try {
      cnv.setSource(f);
      Instances inst = cnv.getDataSet();
      setInstances(inst);
    } catch (Exception ex) {
      m_Log.statusMessage(cnv.getClass().getName()+" failed to load "
             +f.getName());
      JOptionPane.showMessageDialog(PreprocessPanel.this,
                    cnv.getClass().getName()+" failed to load '"
                    + f.getName() + "'.\n"
                    + "Reason:\n" + ex.getMessage(),
                    "Convert File",
                    JOptionPane.ERROR_MESSAGE);
      m_IOThread = null;
      converterQuery(f);
    }
    m_IOThread = null;
  }
};
     m_IOThread.setPriority(Thread.MIN_PRIORITY); // UI has most priority
     m_IOThread.start();
   }
 }
项目:umple    文件:PreprocessPanel.java   
/**
  * Applies the selected converter
  *
  * @param cnv the converter to apply to the input file
  * @param f the input file
  */
 private void tryConverter(final Loader cnv, final File f) {

   if (m_IOThread == null) {
     m_IOThread = new Thread() {
  @Override
  public void run() {
    try {
      cnv.setSource(f);
      Instances inst = cnv.getDataSet();
      setInstances(inst);
    } catch (Exception ex) {
      m_Log.statusMessage(cnv.getClass().getName()+" failed to load "
             +f.getName());
      JOptionPane.showMessageDialog(PreprocessPanel.this,
                    cnv.getClass().getName()+" failed to load '"
                    + f.getName() + "'.\n"
                    + "Reason:\n" + ex.getMessage(),
                    "Convert File",
                    JOptionPane.ERROR_MESSAGE);
      m_IOThread = null;
      converterQuery(f);
    }
    m_IOThread = null;
  }
};
     m_IOThread.setPriority(Thread.MIN_PRIORITY); // UI has most priority
     m_IOThread.start();
   }
 }
项目:jbossBA    文件:PreprocessPanel.java   
/**
  * Applies the selected converter
  *
  * @param cnv the converter to apply to the input file
  * @param f the input file
  */
 private void tryConverter(final Loader cnv, final File f) {

   if (m_IOThread == null) {
     m_IOThread = new Thread() {
  public void run() {
    try {
      cnv.setSource(f);
      Instances inst = cnv.getDataSet();
      setInstances(inst);
    } catch (Exception ex) {
      m_Log.statusMessage(cnv.getClass().getName()+Messages.getInstance().getString("PreprocessPanel_TryConverter_Log_StatusMessage_Text")
             +f.getName());
      JOptionPane.showMessageDialog(PreprocessPanel.this,
                    cnv.getClass().getName()+Messages.getInstance().getString("PreprocessPanel_TryConverter_JOptionPaneShowMessageDialog_Text_First")
                    + f.getName() + Messages.getInstance().getString("PreprocessPanel_TryConverter_JOptionPaneShowMessageDialog_Text_Second")
                    + Messages.getInstance().getString("PreprocessPanel_TryConverter_JOptionPaneShowMessageDialog_Text_Third") + ex.getMessage(),
                    Messages.getInstance().getString("PreprocessPanel_TryConverter_JOptionPaneShowMessageDialog_Text_Fourth"),
                    JOptionPane.ERROR_MESSAGE);
      m_IOThread = null;
      converterQuery(f);
    }
    m_IOThread = null;
  }
};
     m_IOThread.setPriority(Thread.MIN_PRIORITY); // UI has most priority
     m_IOThread.start();
   }
 }