diff --git a/appointment-import/src/main/java/smash/appointment/parse/LihControlParser.java b/appointment-import/src/main/java/smash/appointment/parse/LihControlParser.java index eb16daa56b8bf656faa206113d5fdd2d4ea5c64b..fe44bb6fc33c679718a54aa51af1443565341be6 100644 --- a/appointment-import/src/main/java/smash/appointment/parse/LihControlParser.java +++ b/appointment-import/src/main/java/smash/appointment/parse/LihControlParser.java @@ -165,7 +165,7 @@ public class LihControlParser extends SubjectParser { return result; } - private String getMappedLanguage(String abbreviation) { + protected String getMappedLanguage(String abbreviation) { switch (abbreviation.toUpperCase()) { case ("F"): return "French"; @@ -179,6 +179,8 @@ public class LihControlParser extends SubjectParser { return "Portuguese"; case ("ENG"): return "English"; + case ("EN"): + return "English"; case ("FR"): return "French"; case ("L"): diff --git a/appointment-import/src/main/java/smash/appointment/parse/Subject.java b/appointment-import/src/main/java/smash/appointment/parse/Subject.java index e41fd63dfab9ca5398214deead0760f8787bc400..7843080d337c81d3f7d9b906d9f2c141a94873b6 100644 --- a/appointment-import/src/main/java/smash/appointment/parse/Subject.java +++ b/appointment-import/src/main/java/smash/appointment/parse/Subject.java @@ -480,6 +480,7 @@ public class Subject { if (subject.getToBeSeenAt().equals("F")) { setToBeSeenAt(subject.getToBeSeenAt()); } + addLanguages(subject.getLanguages()); } private SubjectType getMergedValue(String string, SubjectType existingValue, SubjectType newValue, String errorPrefix) { diff --git a/appointment-import/src/main/resources/log4j.properties b/appointment-import/src/main/resources/log4j.properties index e108a78cf8570a6f5bfc3e00dfaee3c45a1e829e..c3a78a9276a81dd3ed72637dae8f44705769a156 100644 --- a/appointment-import/src/main/resources/log4j.properties +++ b/appointment-import/src/main/resources/log4j.properties @@ -1,5 +1,5 @@ #Set root logger 's level and its appender to an appender called CONSOLE which is defined below. -log4j.rootLogger=debug, CONSOLE +log4j.rootLogger=fatal, CONSOLE #Set the behavior of the CONSOLE appender log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender diff --git a/appointment-import/src/test/java/smash/appointment/parse/LihControlParserTest.java b/appointment-import/src/test/java/smash/appointment/parse/LihControlParserTest.java index 589da1718c9c17ec1f3360bce75ec1dfbbcccc3b..bce5ee61b716e85c661cbae9db0ff0c792362469 100644 --- a/appointment-import/src/test/java/smash/appointment/parse/LihControlParserTest.java +++ b/appointment-import/src/test/java/smash/appointment/parse/LihControlParserTest.java @@ -29,6 +29,10 @@ public class LihControlParserTest extends TestBase { public void tearDown() throws Exception { } + @Test + public void testParseLang() throws Exception { + assertEquals("English",processor.getMappedLanguage("EN")); + } @Test public void test() throws Exception { List<Subject> entries = processor.processExcel("testFiles/lihControlExample.xlsx");