Skip to content

Commit

Permalink
docs: TODO 데이터 적재시 regex 검사
Browse files Browse the repository at this point in the history
  • Loading branch information
wonslee committed Feb 10, 2024
1 parent f6beace commit 8e576e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/usw/suwiki/global/util/loadjson/USWTermResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

public final class USWTermResolver {
private static final String[] KEYWORDS_TO_REMOVE = {"재수강", "비대면수업", "대면수업", "혼합수업"};

// TODO refactor: REGEX 검사
// 변환에 필요한 최소한의 스트링 형식입니다.
// 해당 형식에 맞지 않는다면 수원대측에서 형식을 바꾼 것이므로 더 이상 호환되지 않기 때문에 예외를 발생시키고 적재를 중단해야 합니다.
// https://regexr.com/7rq1g
// pass : "강의실107-1(수6,7,8)" "강의실 B215(화5,6,7 수5,6,7)"
// pass : "(월1,2)" -> "미정(월1,2)"
// fail : "강의실(1,2)" "강의실 월1,2" "강의실107(요일아님6,7,8)" "요일없음(1,2)" "강의실103(화5,6),강의실103"
// private static final String PLACE_SCHEDULE_REGEX = "^([\\s가-힣A-Za-z\\d-]+\\([월화수목금토일]\\d+(?:,\\d+)*.*?\\))+$";

private static final String ESTABLISHED_YEAR = "subjtEstbYear";
private static final String ESTABLISHED_SEMESTER = "subjtEstbSmrCd";
private static final String PLACE_SCHEDULE = "timtSmryCn";
Expand Down

0 comments on commit 8e576e3

Please sign in to comment.