|
@@ -3,6 +3,9 @@ package cn.com.qmth.examcloud.support.handler.richText;
|
|
|
import cn.com.qmth.examcloud.support.handler.richText.bean.BlockBean;
|
|
|
import cn.com.qmth.examcloud.support.handler.richText.bean.SectionBean;
|
|
|
import cn.com.qmth.examcloud.support.handler.richText.bean.SectionCollectionBean;
|
|
|
+import com.mysql.cj.util.StringUtils;
|
|
|
+import org.apache.commons.logging.Log;
|
|
|
+import org.apache.commons.logging.LogFactory;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
@@ -18,8 +21,18 @@ import java.util.regex.Pattern;
|
|
|
* @Version 1.0
|
|
|
*/
|
|
|
public class ComplexTextHandler implements RichTextHandler {
|
|
|
+ private static Log logger = LogFactory.getLog(HtmlTextHandler.class);
|
|
|
+
|
|
|
@Override
|
|
|
public SectionCollectionBean handle(String richText) {
|
|
|
+ if (logger.isDebugEnabled()) {
|
|
|
+ logger.debug("[HTML-TEXT-HANDLER]--richText: " + richText);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNullOrEmpty(richText)) {
|
|
|
+ return new SectionCollectionBean();
|
|
|
+ }
|
|
|
+
|
|
|
SectionCollectionBean body = new SectionCollectionBean();
|
|
|
List<SectionBean> sections = new ArrayList<>();
|
|
|
// 得到小题题干或者答案行数
|