Package uk.ac.starlink.topcat.activate
Class DownloadActivationType
java.lang.Object
uk.ac.starlink.topcat.activate.DownloadActivationType
- All Implemented Interfaces:
ActivationType
Activation type that downloads a URL to local storage.
- Since:
- 9 May 2018
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a component that can be used to configure activators of this type.static void
Copies a remote resource to local storage.Description of this activation type.getName()
Name of this activation type.getSuitability
(TopcatModelInfo tinfo) Indicates the applicability of this activation type to a given table.
-
Constructor Details
-
DownloadActivationType
public DownloadActivationType()
-
-
Method Details
-
getName
Description copied from interface:ActivationType
Name of this activation type.- Specified by:
getName
in interfaceActivationType
- Returns:
- type name
-
getDescription
Description copied from interface:ActivationType
Description of this activation type.- Specified by:
getDescription
in interfaceActivationType
- Returns:
- type description
-
createConfigurator
Description copied from interface:ActivationType
Returns a component that can be used to configure activators of this type.- Specified by:
createConfigurator
in interfaceActivationType
- Parameters:
tinfo
- information about topcat model for which the activation will take place- Returns:
- new configurator to produce compatible Activators
-
getSuitability
Description copied from interface:ActivationType
Indicates the applicability of this activation type to a given table.- Specified by:
getSuitability
in interfaceActivationType
- Parameters:
tinfo
- information about topcat model- Returns:
- suitability code
-
download
Copies a remote resource to local storage.- Parameters:
url
- remote resourcefilename
- relative or absolute name of local filedir
- directory context for filename; may be null- Throws:
IOException
-