Class Export


public final class Export extends Command
Evaluates the 'export' command and saves the currently opened database to disk.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Export

      public Export(String path)
      Default constructor, specifying a target path.
      Parameters:
      path - export path
  • Method Details

    • run

      protected boolean run()
      Description copied from class: Command
      Executes the command and serializes the result (internal call).
      Specified by:
      run in class Command
      Returns:
      success of operation
    • addLocks

      public void addLocks()
      Description copied from class: Job
      Adds the strings (databases, special identifiers) for which locks need to be acquired.
      Overrides:
      addLocks in class Job
    • export

      public static void export(Data data, String path, MainOptions options, Export export) throws IOException
      Exports the current database to the specified path. Files and directories in path will be possibly overwritten.
      Parameters:
      data - data reference
      path - directory
      options - main options
      export - calling instance
      Throws:
      IOException - I/O exception
    • export

      public static void export(Data data, String path, SerializerOptions sopts, Export export) throws IOException
      Exports the current database to the specified path. Files and directories in path will be possibly overwritten.
      Parameters:
      data - data reference
      path - directory
      sopts - serialization parameters
      export - calling instance
      Throws:
      IOException - I/O exception
    • progressInfo

      public double progressInfo()
      Description copied from class: Job
      Returns a progress value (0 - 1). Can be overwritten to give more specific feedback.
      Overrides:
      progressInfo in class Job
      Returns:
      header information
    • stoppable

      public boolean stoppable()
      Description copied from class: Command
      Returns true if this command can be stopped. This method is only required by the GUI.
      Overrides:
      stoppable in class Command
      Returns:
      result of check
    • supportsProg

      public boolean supportsProg()
      Description copied from class: Command
      Returns true if this command returns a progress value. This method is only required by the GUI.
      Overrides:
      supportsProg in class Command
      Returns:
      result of check
    • shortInfo

      public String shortInfo()
      Description copied from class: Job
      Returns short progress information. Can be overwritten to give more specific feedback.
      Overrides:
      shortInfo in class Job
      Returns:
      header information
    • detailedInfo

      public String detailedInfo()
      Description copied from class: Job
      Returns detailed progress information. Can be overwritten to give more specific feedback.
      Overrides:
      detailedInfo in class Job
      Returns:
      header information