类 XRFFSaver

所有已实现的接口:
Serializable, CapabilitiesHandler, BatchConverter, FileSourcedConverter, Saver, EnvironmentHandler, OptionHandler, RevisionHandler

public class XRFFSaver extends AbstractFileSaver implements BatchConverter
Writes to a destination that is in the XML version of the ARFF format. The data can be compressed with gzip, in order to save space.

Valid options are:

 -i <the input file>
  The input file
 -o <the output file>
  The output file
 -C <class index>
  The class index (first and last are valid as well).
  (default: last)
 -compress
  Compresses the data (uses '.xrff.gz' as extension instead of '.xrff')
  (default: off)
版本:
$Revision: 1.5 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • XRFFSaver

      public XRFFSaver()
      Constructor
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this Saver
      返回:
      a description of the Saver suitable for displaying in the explorer/experimenter gui
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 AbstractFileSaver
      返回:
      an enumeration of all the available options.
    • getOptions

      public String[] getOptions()
      returns the options of the current setup
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 AbstractFileSaver
      返回:
      the current options
    • setOptions

      public void setOptions(String[] options) throws Exception
      Parses the options for this object.

      Valid options are:

       -i <the input file>
        The input file
       -o <the output file>
        The output file
       -C <class index>
        The class index (first and last are valid as well).
        (default: last)
       -compress
        Compresses the data (uses '.xrff.gz' as extension instead of '.xrff')
        (default: off)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 AbstractFileSaver
      参数:
      options - the options to use
      抛出:
      Exception - if setting of options fails
    • getFileDescription

      public String getFileDescription()
      Returns a description of the file type.
      指定者:
      getFileDescription 在接口中 FileSourcedConverter
      指定者:
      getFileDescription 在类中 AbstractFileSaver
      返回:
      a short file description
    • getFileExtensions

      public String[] getFileExtensions()
      Gets all the file extensions used for this type of file
      指定者:
      getFileExtensions 在接口中 FileSourcedConverter
      覆盖:
      getFileExtensions 在类中 AbstractFileSaver
      返回:
      the file extensions
    • setFile

      public void setFile(File outputFile) throws IOException
      Sets the destination file.
      指定者:
      setFile 在接口中 FileSourcedConverter
      指定者:
      setFile 在接口中 Saver
      覆盖:
      setFile 在类中 AbstractFileSaver
      参数:
      outputFile - the destination file.
      抛出:
      IOException - throws an IOException if file cannot be set
    • resetOptions

      public void resetOptions()
      Resets the Saver
      覆盖:
      resetOptions 在类中 AbstractFileSaver
    • classIndexTipText

      public String classIndexTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • getClassIndex

      public String getClassIndex()
      Get the index of the class attribute.
      返回:
      the index of the class attribute
    • setClassIndex

      public void setClassIndex(String value)
      Sets index of the class attribute.
      参数:
      value - the index of the class attribute
    • compressOutputTipText

      public String compressOutputTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • getCompressOutput

      public boolean getCompressOutput()
      Gets whether the output data is compressed.
      返回:
      true if the output data is compressed
    • setCompressOutput

      public void setCompressOutput(boolean value)
      Sets whether to compress the output.
      参数:
      value - if truee the output will be compressed
    • getCapabilities

      public Capabilities getCapabilities()
      Returns the Capabilities of this saver.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 AbstractSaver
      返回:
      the capabilities of this object
      另请参阅:
    • setInstances

      public void setInstances(Instances instances)
      Sets instances that should be stored.
      指定者:
      setInstances 在接口中 Saver
      覆盖:
      setInstances 在类中 AbstractSaver
      参数:
      instances - the instances
    • setDestination

      public void setDestination(OutputStream output) throws IOException
      Sets the destination output stream.
      指定者:
      setDestination 在接口中 Saver
      覆盖:
      setDestination 在类中 AbstractFileSaver
      参数:
      output - the output stream.
      抛出:
      IOException - throws an IOException if destination cannot be set
    • writeBatch

      public void writeBatch() throws IOException
      Writes a Batch of instances
      指定者:
      writeBatch 在接口中 Saver
      指定者:
      writeBatch 在类中 AbstractSaver
      抛出:
      IOException - throws IOException if saving in batch mode is not possible
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision
    • main

      public static void main(String[] args)
      Main method.
      参数:
      args - should contain the options of a Saver.