You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package com.htfp.weather.download ;
import lombok.Data ;
import lombok.ToString ;
import java.io.IOException ;
import java.time.LocalDateTime ;
import java.time.OffsetDateTime ;
import java.util.List ;
/**
* @author shiyi
*/
@Data
@ToString
public abstract class BaseDataDownloader {
/**起始时间, 北京时UTC+8, 格式示例: 20230901T08:00*/
private String startTimeStr ;
private LocalDateTime startTime ;
private String refTimeStr ;
/** 数据的实际起报UTC时间 */
private OffsetDateTime refTime ;
/**
* 获取所有下载文件的相关信息
*/
public abstract List < FileInfo > getFilesInfo ( ) ;
/**
* 单个文件下载
* @param fileInfo: 目标文件的下载信息
* @return 下载成功/失败
* @throws IOException
*/
public abstract FileInfo download ( FileInfo fileInfo ) throws IOException ;
/**
* 下载所有目标文件
*
* @param filesInfo
* @return
*/
public abstract List < FileInfo > downloadAll ( List < FileInfo > fileInfoList ) ;
public BaseDataDownloader ( ) {
}
}