This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,226 changed files
with
3,659 additions
and
444 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ src/test | |
target | ||
out | ||
latest | ||
geospider.iml | ||
*.iml | ||
META-INF | ||
vendor/.lock |
72 changes: 36 additions & 36 deletions
72
src/main/java/com/civitasv/spider/helper/Enum/BoundaryType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum BoundaryType { | ||
ADCODE(0, "行政区"), | ||
RECTANGLE(1, "矩形"), | ||
CUSTOM(2, "自定义"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static BoundaryType getBoundaryType(String description) { | ||
for (BoundaryType value : BoundaryType.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static BoundaryType getBoundaryType(Integer code) { | ||
for (BoundaryType value : BoundaryType.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum BoundaryType { | ||
ADCODE(0, "行政区"), | ||
RECTANGLE(1, "矩形"), | ||
CUSTOM(2, "自定义"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static BoundaryType getBoundaryType(String description) { | ||
for (BoundaryType value : BoundaryType.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static BoundaryType getBoundaryType(Integer code) { | ||
for (BoundaryType value : BoundaryType.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} |
76 changes: 38 additions & 38 deletions
76
src/main/java/com/civitasv/spider/helper/Enum/JobStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@ToString | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum JobStatus { | ||
UnStarted(0, "未开始"), | ||
SUCCESS(1, "成功"), | ||
Failed(2, "失败,但会尝试重新请求数据"), | ||
GIVE_UP(3, "放弃,不再尝试请求数据"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static JobStatus getJobStatus(String description) { | ||
for (JobStatus value : JobStatus.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static JobStatus getJobStatus(Integer code) { | ||
for (JobStatus value : JobStatus.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@ToString | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum JobStatus { | ||
UnStarted(0, "未开始"), | ||
SUCCESS(1, "成功"), | ||
Failed(2, "失败,但会尝试重新请求数据"), | ||
GIVE_UP(3, "放弃,不再尝试请求数据"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static JobStatus getJobStatus(String description) { | ||
for (JobStatus value : JobStatus.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static JobStatus getJobStatus(Integer code) { | ||
for (JobStatus value : JobStatus.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} |
82 changes: 41 additions & 41 deletions
82
src/main/java/com/civitasv/spider/helper/Enum/OutputType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum OutputType { | ||
CSV(0, "csv"), | ||
SHAPEFILE(1, "shp"), | ||
GEOJSON(2, "geojson"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static OutputType getOutputType(String description) { | ||
for (OutputType value : OutputType.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static OutputType getOutputType(Integer code) { | ||
for (OutputType value : OutputType.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return description; | ||
} | ||
} | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@RequiredArgsConstructor | ||
public enum OutputType { | ||
CSV(0, "csv"), | ||
SHAPEFILE(1, "shp"), | ||
GEOJSON(2, "geojson"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static OutputType getOutputType(String description) { | ||
for (OutputType value : OutputType.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static OutputType getOutputType(Integer code) { | ||
for (OutputType value : OutputType.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return description; | ||
} | ||
} |
82 changes: 41 additions & 41 deletions
82
src/main/java/com/civitasv/spider/helper/Enum/TaskStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@ToString | ||
@RequiredArgsConstructor | ||
public enum TaskStatus { | ||
UnStarted(0, "未开始"), | ||
Preprocessing(1, "预处理"), | ||
Processing(2, "处理中"), | ||
Pause(3, "暂停"), | ||
Success(4, "成功"), | ||
Some_Failed(5, "部分任务失败,可以重试"), | ||
Give_Up(6, "用户确认放弃任务,导出错误文件"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static TaskStatus getTaskStatus(String description) { | ||
for (TaskStatus value : TaskStatus.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static TaskStatus getTaskStatus(Integer code) { | ||
for (TaskStatus value : TaskStatus.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} | ||
package com.civitasv.spider.helper.Enum; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
@Getter | ||
@Accessors(fluent = true) | ||
@ToString | ||
@RequiredArgsConstructor | ||
public enum TaskStatus { | ||
UnStarted(0, "未开始"), | ||
Preprocessing(1, "预处理"), | ||
Processing(2, "处理中"), | ||
Pause(3, "暂停"), | ||
Success(4, "成功"), | ||
Some_Failed(5, "部分任务失败,可以重试"), | ||
Give_Up(6, "用户确认放弃任务,导出错误文件"); | ||
|
||
private final Integer code; | ||
private final String description; | ||
|
||
public static TaskStatus getTaskStatus(String description) { | ||
for (TaskStatus value : TaskStatus.values()) { | ||
if (value.description.equals(description)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
|
||
public static TaskStatus getTaskStatus(Integer code) { | ||
for (TaskStatus value : TaskStatus.values()) { | ||
if (value.code.equals(code)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException("没有符合该描述的枚举值"); | ||
} | ||
} |
Oops, something went wrong.