package com.iplatform.reccommon;
|
|
/**
|
* 任务状态类型定义。
|
* @author 时克英
|
* @date 2022-09-27
|
*/
|
public enum TaskStatus {
|
|
/**
|
* 视频已被加载(解析)
|
*/
|
VideoLoad{
|
public String getIndex(){
|
return INDEX_VIDEO_LOAD;
|
}
|
},
|
|
/**
|
* 视频已成功检索并生成相似视频(完毕)
|
*/
|
VideoSearch{
|
public String getIndex(){
|
return INDEX_VIDEO_SEARCH;
|
}
|
};
|
|
public String getIndex(){
|
throw new AbstractMethodError();
|
}
|
|
public static final TaskStatus getType(String index){
|
if(index.equals(INDEX_VIDEO_LOAD)){
|
return VideoLoad;
|
} else if(index.equals(INDEX_VIDEO_SEARCH)){
|
return VideoSearch;
|
} else {
|
throw new UnsupportedOperationException("TaskStatus类型不支持: " + index);
|
}
|
}
|
|
public static final String INDEX_VIDEO_LOAD = "0";
|
public static final String INDEX_VIDEO_SEARCH = "1";
|
}
|