Class DownloadActivationType

java.lang.Object
uk.ac.starlink.topcat.activate.DownloadActivationType
All Implemented Interfaces:
ActivationType

public class DownloadActivationType extends Object implements ActivationType
Activation type that downloads a URL to local storage.
Since:
9 May 2018
Author:
Mark Taylor
  • Constructor Details

    • DownloadActivationType

      public DownloadActivationType()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ActivationType
      Name of this activation type.
      Specified by:
      getName in interface ActivationType
      Returns:
      type name
    • getDescription

      public String getDescription()
      Description copied from interface: ActivationType
      Description of this activation type.
      Specified by:
      getDescription in interface ActivationType
      Returns:
      type description
    • createConfigurator

      public ActivatorConfigurator createConfigurator(TopcatModelInfo tinfo)
      Description copied from interface: ActivationType
      Returns a component that can be used to configure activators of this type.
      Specified by:
      createConfigurator in interface ActivationType
      Parameters:
      tinfo - information about topcat model for which the activation will take place
      Returns:
      new configurator to produce compatible Activators
    • getSuitability

      public Suitability getSuitability(TopcatModelInfo tinfo)
      Description copied from interface: ActivationType
      Indicates the applicability of this activation type to a given table.
      Specified by:
      getSuitability in interface ActivationType
      Parameters:
      tinfo - information about topcat model
      Returns:
      suitability code
    • download

      public static void download(URL url, String filename, String dir) throws IOException
      Copies a remote resource to local storage.
      Parameters:
      url - remote resource
      filename - relative or absolute name of local file
      dir - directory context for filename; may be null
      Throws:
      IOException