Package weka.core.converters

Examples of weka.core.converters.AbstractSaver


   */
  protected Vector<ExtensionFileFilter> filterNonCoreSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter> result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (!getCoreConvertersOnly()) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (ConverterUtils.isCoreFileSaver(saver.getClass().getName()))
    result.add(filter);
      }
    }
   
    return result;
View Full Code Here


   */
  protected Vector<ExtensionFileFilter> filterSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter>  result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (m_CapabilitiesFilter == null) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
     
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver  = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (saver.getCapabilities().supports(m_CapabilitiesFilter))
    result.add(filter);
      }
    }

    return result;
View Full Code Here

   * saves the current data into a file
   */
  public void saveFile() {
    ArffPanel           panel;
    String              filename;
    AbstractSaver       saver;
   
    // no panel? -> exit
    panel = getCurrentPanel();
    if (panel == null)
      return;
   
    filename = panel.getFilename();
    if (filename.equals(ArffPanel.TAB_INSTANCES)) {
      saveFileAs();
    }
    else {
      saver = fileChooser.getSaver();
      try {
  saver.setInstances(panel.getInstances());
  saver.writeBatch();
  panel.setChanged(false);
  setCurrentFilename(filename);
      }
      catch (Exception e) {
  e.printStackTrace();
View Full Code Here

   */
  protected Vector<ExtensionFileFilter> filterNonCoreSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter> result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (!getCoreConvertersOnly()) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (ConverterUtils.isCoreFileSaver(saver.getClass().getName()))
    result.add(filter);
      }
    }
   
    return result;
View Full Code Here

   */
  protected Vector<ExtensionFileFilter> filterSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter>  result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (m_CapabilitiesFilter == null) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
     
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver  = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (saver.getCapabilities().supports(m_CapabilitiesFilter))
    result.add(filter);
      }
    }

    return result;
View Full Code Here

   * saves the current data into a file
   */
  public void saveFile() {
    ArffPanel           panel;
    String              filename;
    AbstractSaver       saver;
   
    // no panel? -> exit
    panel = getCurrentPanel();
    if (panel == null)
      return;
   
    filename = panel.getFilename();
    if (filename.equals(ArffPanel.TAB_INSTANCES)) {
      saveFileAs();
    }
    else {
      saver = fileChooser.getSaver();
      try {
  saver.setInstances(panel.getInstances());
  saver.writeBatch();
  panel.setChanged(false);
  setCurrentFilename(filename);
      }
      catch (Exception e) {
  e.printStackTrace();
View Full Code Here

   */
  protected Vector<ExtensionFileFilter> filterNonCoreSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter> result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (!getCoreConvertersOnly()) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (ConverterUtils.isCoreFileSaver(saver.getClass().getName()))
    result.add(filter);
      }
    }
   
    return result;
View Full Code Here

   */
  protected Vector<ExtensionFileFilter> filterSaverFileFilters(Vector<ExtensionFileFilter> list) {
    Vector<ExtensionFileFilter>  result;
    int        i;
    ExtensionFileFilter    filter;
    AbstractSaver    saver;
   
    if (m_CapabilitiesFilter == null) {
      result = list;
    }
    else {
      result = new Vector<ExtensionFileFilter>();
     
      for (i = 0; i < list.size(); i++) {
  filter = list.get(i);
  saver  = ConverterUtils.getSaverForExtension(filter.getExtensions()[0]);
  if (saver.getCapabilities().supports(m_CapabilitiesFilter))
    result.add(filter);
      }
    }

    return result;
View Full Code Here

TOP

Related Classes of weka.core.converters.AbstractSaver

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.