From fba00318b90d8612381c08f9b5fe91d64667a8f8 Mon Sep 17 00:00:00 2001 From: hxw Date: Tue, 5 Jun 2018 14:39:25 +0800 Subject: [PATCH] doc --- Doc/Summary.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/allclasses-frame.html | 31 +++++++++++++++++++++++++++++++ Doc/allclasses-noframe.html | 31 +++++++++++++++++++++++++++++++ Doc/constant-values.html | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/db/DB.html | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/db/DBCPUtils.html | 291 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/db/SqlHelper.html | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/db/package-frame.html | 22 ++++++++++++++++++++++ Doc/db/package-summary.html | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/db/package-tree.html | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/deprecated-list.html | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/AnswerNextStep.html | 351 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/Condition.html | 375 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/QuestionKeyWord.html | 335 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/UserInfo.html | 298 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/package-frame.html | 23 +++++++++++++++++++++++ Doc/entity/package-summary.html | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/entity/package-tree.html | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/help-doc.html | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-1.html | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-10.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-11.html | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-12.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-13.html | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-14.html | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-15.html | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-16.html | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-17.html | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-18.html | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-2.html | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-3.html | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-4.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-5.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-6.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-7.html | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-8.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index-files/index-9.html | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/index.html | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/overview-frame.html | 24 ++++++++++++++++++++++++ Doc/overview-summary.html | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/overview-tree.html | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/package-list | 4 ++++ Doc/processing/ChatCacheController.html | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/processing/MyFunc.html | 288 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/processing/ProcessQuestion.html | 500 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/processing/package-frame.html | 22 ++++++++++++++++++++++ Doc/processing/package-summary.html | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/processing/package-tree.html | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/script.js | 30 ++++++++++++++++++++++++++++++ Doc/serialized-form.html | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/GetAnswerServlet.html | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/ReloadConfig.html | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/ReloadConfigServlet.html | 338 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/UpdateServlet.html | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/package-frame.html | 22 ++++++++++++++++++++++ Doc/servlet/package-summary.html | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/servlet/package-tree.html | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doc/stylesheet.css | 574 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ out/production/webapp/processing/ProcessQuestion.class | Bin 9210 -> 0 bytes src/entity/AnswerNextStep.java | 4 ++++ src/entity/Condition.java | 4 ++++ src/entity/QuestionKeyWord.java | 5 +++++ src/entity/UserInfo.java | 3 +++ src/processing/ChatCacheController.java | 21 +++++++++++++-------- src/processing/MyFunc.java | 13 ++++++++----- src/processing/ProcessQuestion.java | 57 +++++++++++++++++++++++++++++++++++++++++++-------------- src/servlet/GetAnswerServlet.java | 8 ++++++-- src/servlet/ReloadConfigServlet.java | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/servlet/UpdateServlet.java | 4 +++- 69 files changed, 10291 insertions(+), 30 deletions(-) create mode 100644 Doc/Summary.md create mode 100644 Doc/allclasses-frame.html create mode 100644 Doc/allclasses-noframe.html create mode 100644 Doc/constant-values.html create mode 100644 Doc/db/DB.html create mode 100644 Doc/db/DBCPUtils.html create mode 100644 Doc/db/SqlHelper.html create mode 100644 Doc/db/package-frame.html create mode 100644 Doc/db/package-summary.html create mode 100644 Doc/db/package-tree.html create mode 100644 Doc/deprecated-list.html create mode 100644 Doc/entity/AnswerNextStep.html create mode 100644 Doc/entity/Condition.html create mode 100644 Doc/entity/QuestionKeyWord.html create mode 100644 Doc/entity/UserInfo.html create mode 100644 Doc/entity/package-frame.html create mode 100644 Doc/entity/package-summary.html create mode 100644 Doc/entity/package-tree.html create mode 100644 Doc/help-doc.html create mode 100644 Doc/index-files/index-1.html create mode 100644 Doc/index-files/index-10.html create mode 100644 Doc/index-files/index-11.html create mode 100644 Doc/index-files/index-12.html create mode 100644 Doc/index-files/index-13.html create mode 100644 Doc/index-files/index-14.html create mode 100644 Doc/index-files/index-15.html create mode 100644 Doc/index-files/index-16.html create mode 100644 Doc/index-files/index-17.html create mode 100644 Doc/index-files/index-18.html create mode 100644 Doc/index-files/index-2.html create mode 100644 Doc/index-files/index-3.html create mode 100644 Doc/index-files/index-4.html create mode 100644 Doc/index-files/index-5.html create mode 100644 Doc/index-files/index-6.html create mode 100644 Doc/index-files/index-7.html create mode 100644 Doc/index-files/index-8.html create mode 100644 Doc/index-files/index-9.html create mode 100644 Doc/index.html create mode 100644 Doc/overview-frame.html create mode 100644 Doc/overview-summary.html create mode 100644 Doc/overview-tree.html create mode 100644 Doc/package-list create mode 100644 Doc/processing/ChatCacheController.html create mode 100644 Doc/processing/MyFunc.html create mode 100644 Doc/processing/ProcessQuestion.html create mode 100644 Doc/processing/package-frame.html create mode 100644 Doc/processing/package-summary.html create mode 100644 Doc/processing/package-tree.html create mode 100644 Doc/script.js create mode 100644 Doc/serialized-form.html create mode 100644 Doc/servlet/GetAnswerServlet.html create mode 100644 Doc/servlet/ReloadConfig.html create mode 100644 Doc/servlet/ReloadConfigServlet.html create mode 100644 Doc/servlet/UpdateServlet.html create mode 100644 Doc/servlet/package-frame.html create mode 100644 Doc/servlet/package-summary.html create mode 100644 Doc/servlet/package-tree.html create mode 100644 Doc/stylesheet.css create mode 100644 src/servlet/ReloadConfigServlet.java diff --git a/Doc/Summary.md b/Doc/Summary.md new file mode 100644 index 0000000..2f5a428 --- /dev/null +++ b/Doc/Summary.md @@ -0,0 +1,71 @@ +#创建虚拟环境允许调用系统第三方包 +virtualenv --system-site-packages venv + + +#deb文件安装 +Sudo dpkg -i *.deb + + +#squad文件结构 +data +| ----paragraphs +| |----context +| |----qas +| | |---answers +| | | |----answer_start +| | | |----text +| | | |----answer_start +| | | |----text +| | | |----answer_start +| | | |----text +| | |---question +| | |---id + + + + + +#webqa文件结构 +Q_TRN_****** +|----question +|----ecidences +| |----Q_TRN_******#01 +| | |----answer +| | |----ecidence +| |----Q_TRN_******#02 +| | |----answer +| | |----ecidence + + + + +#用jq命令查看jsonl文件内容 +jq '.data[0]["paragraphs"][0]["qas"]' dev-v1.1.json + + + +#关于编辑器QA的问题 +你[NA]玩[1]多久[2]了[NA]~#visitorname,rule-youxi-wenti,[2] 没有出现疑问词,系统识别为陈述句,如果添加QA:会导致测试单元加了问号才能识别,不加问好不能识别。解决方法: +1. 去掉QA,当作陈述句处理,这样有没有问好都可以识别。 +2. 不去掉QA,关键词单元中添加^多久|w,将包含多久的句子都识别为疑问句,这是rule有些问号就只能推理有问号的句子,rule没有问好就只能推理没有问号的句子。 + + + +#linux下查看文件编码 +1. 查看:set fileencoding +2. enva -g filename +#修改编码: +1. set fileencoding=utf-8 +2. iconv -c –verbose -f gbk -t utf-8 filename >filename +##按字输出: +for z in zi.decode('utf-8'): + print(z.encode('utf-8')) + +#基本结构: +name=business +action=select/find +status = active/listening/waiting +condition=条件名|rule|machine_question|复述=+关键词 +process=条件名+=x|后续处理=active + + diff --git a/Doc/allclasses-frame.html b/Doc/allclasses-frame.html new file mode 100644 index 0000000..b94ced6 --- /dev/null +++ b/Doc/allclasses-frame.html @@ -0,0 +1,31 @@ + + + + + +所有类 + + + + + +

所有类

+
+ +
+ + diff --git a/Doc/allclasses-noframe.html b/Doc/allclasses-noframe.html new file mode 100644 index 0000000..49a1d02 --- /dev/null +++ b/Doc/allclasses-noframe.html @@ -0,0 +1,31 @@ + + + + + +所有类 + + + + + +

所有类

+
+ +
+ + diff --git a/Doc/constant-values.html b/Doc/constant-values.html new file mode 100644 index 0000000..67a01b5 --- /dev/null +++ b/Doc/constant-values.html @@ -0,0 +1,122 @@ + + + + + +常量字段值 + + + + + + + + +
+ + + + + + + +
+ + +
+

常量字段值

+

目录

+
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/db/DB.html b/Doc/db/DB.html new file mode 100644 index 0000000..dced64a --- /dev/null +++ b/Doc/db/DB.html @@ -0,0 +1,269 @@ + + + + + +DB + + + + + + + + +
+ + + + + + + +
+ + + +
+
db
+

类 DB

+
+
+ +
+
    +
  • +
    +
    +
    public class DB
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      DB() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + +
      所有方法 静态方法 具体方法 
      限定符和类型方法和说明
      static java.sql.ConnectiongetConnection() 
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        DB

        +
        public DB()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        getConnection

        +
        public static java.sql.Connection getConnection()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/db/DBCPUtils.html b/Doc/db/DBCPUtils.html new file mode 100644 index 0000000..dbd86b1 --- /dev/null +++ b/Doc/db/DBCPUtils.html @@ -0,0 +1,291 @@ + + + + + +DBCPUtils + + + + + + + + +
+ + + + + + + +
+ + + +
+
db
+

类 DBCPUtils

+
+
+ +
+
    +
  • +
    +
    +
    public class DBCPUtils
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      DBCPUtils() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 静态方法 具体方法 
      限定符和类型方法和说明
      static voidcloseAll(java.sql.ResultSet rs, + java.sql.Statement stmt, + java.sql.Connection conn) 
      static java.sql.ConnectiongetConnection() 
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        DBCPUtils

        +
        public DBCPUtils()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        getConnection

        +
        public static java.sql.Connection getConnection()
        +                                         throws java.sql.SQLException
        +
        +
        抛出:
        +
        java.sql.SQLException
        +
        +
      • +
      + + + +
        +
      • +

        closeAll

        +
        public static void closeAll(java.sql.ResultSet rs,
        +                            java.sql.Statement stmt,
        +                            java.sql.Connection conn)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/db/SqlHelper.html b/Doc/db/SqlHelper.html new file mode 100644 index 0000000..6fee303 --- /dev/null +++ b/Doc/db/SqlHelper.html @@ -0,0 +1,287 @@ + + + + + +SqlHelper + + + + + + + + +
+ + + + + + + +
+ + + +
+
db
+

类 SqlHelper

+
+
+ +
+
    +
  • +
    +
    +
    public class SqlHelper
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      SqlHelper() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      voiddestroy() 
      java.lang.StringqueryUsernameByKey(java.lang.String chat_key) 
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        SqlHelper

        +
        public SqlHelper()
        +          throws java.sql.SQLException
        +
        +
        抛出:
        +
        java.sql.SQLException
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        destroy

        +
        public void destroy()
        +
      • +
      + + + +
        +
      • +

        queryUsernameByKey

        +
        public java.lang.String queryUsernameByKey(java.lang.String chat_key)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/db/package-frame.html b/Doc/db/package-frame.html new file mode 100644 index 0000000..ecfeda4 --- /dev/null +++ b/Doc/db/package-frame.html @@ -0,0 +1,22 @@ + + + + + +db + + + + + +

db

+
+

类

+ +
+ + diff --git a/Doc/db/package-summary.html b/Doc/db/package-summary.html new file mode 100644 index 0000000..c31ba5c --- /dev/null +++ b/Doc/db/package-summary.html @@ -0,0 +1,148 @@ + + + + + +db + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包 db

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/db/package-tree.html b/Doc/db/package-tree.html new file mode 100644 index 0000000..a64d06e --- /dev/null +++ b/Doc/db/package-tree.html @@ -0,0 +1,137 @@ + + + + + +db 类分层结构 + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包db的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/deprecated-list.html b/Doc/deprecated-list.html new file mode 100644 index 0000000..d68f0d3 --- /dev/null +++ b/Doc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +已过时的列表 + + + + + + + + +
+ + + + + + + +
+ + +
+

已过时的 API

+

目录

+
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/AnswerNextStep.html b/Doc/entity/AnswerNextStep.html new file mode 100644 index 0000000..e1970a8 --- /dev/null +++ b/Doc/entity/AnswerNextStep.html @@ -0,0 +1,351 @@ + + + + + +AnswerNextStep + + + + + + + + +
+ + + + + + + +
+ + + +
+
entity
+

类 AnswerNextStep

+
+
+ +
+
    +
  • +
    +
    +
    public class AnswerNextStep
    +extends java.lang.Object
    +
    包含后台返回数据的实体类。
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + + + + +
      构造器 
      构造器和说明
      AnswerNextStep() 
      AnswerNextStep(int status, + java.lang.String answers, + java.lang.String next) 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      java.lang.StringgetAnswer() 
      java.lang.StringgetNext() 
      intgetStatus() 
      voidsetAnswer(java.lang.String answer) 
      voidsetNext(java.lang.String next) 
      voidsetStatus(int status) 
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        AnswerNextStep

        +
        public AnswerNextStep(int status,
        +                      java.lang.String answers,
        +                      java.lang.String next)
        +
      • +
      + + + +
        +
      • +

        AnswerNextStep

        +
        public AnswerNextStep()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        getAnswer

        +
        public java.lang.String getAnswer()
        +
      • +
      + + + +
        +
      • +

        getStatus

        +
        public int getStatus()
        +
      • +
      + + + +
        +
      • +

        setAnswer

        +
        public void setAnswer(java.lang.String answer)
        +
      • +
      + + + +
        +
      • +

        setStatus

        +
        public void setStatus(int status)
        +
      • +
      + + + +
        +
      • +

        getNext

        +
        public java.lang.String getNext()
        +
      • +
      + + + +
        +
      • +

        setNext

        +
        public void setNext(java.lang.String next)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/Condition.html b/Doc/entity/Condition.html new file mode 100644 index 0000000..52c1ff4 --- /dev/null +++ b/Doc/entity/Condition.html @@ -0,0 +1,375 @@ + + + + + +Condition + + + + + + + + +
+ + + + + + + +
+ + + +
+
entity
+

类 Condition

+
+
+ +
+
    +
  • +
    +
    +
    public class Condition
    +extends java.lang.Object
    +
    保存配置文件每一行(单行)解析后的信息的实体类。
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      字段概要

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      字段 
      限定符和类型字段和说明
      java.lang.StringAnswer 
      java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>>currentPremise 
      java.lang.Stringfeature 
      java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>>historyPremise 
      java.lang.StringindexName 
      java.util.HashSet<java.lang.String>keywordSet 
      java.lang.StringnextStep 
      intpriority 
      +
    • +
    + +
      +
    • + + +

      构造器概要

      + + + + + + + + + + + +
      构造器 
      构造器和说明
      Condition() 
      Condition(int priority) 
      +
    • +
    + +
      +
    • + + +

      方法概要

      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      字段详细资料

      + + + +
        +
      • +

        priority

        +
        public int priority
        +
      • +
      + + + +
        +
      • +

        keywordSet

        +
        public java.util.HashSet<java.lang.String> keywordSet
        +
      • +
      + + + +
        +
      • +

        historyPremise

        +
        public java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> historyPremise
        +
      • +
      + + + +
        +
      • +

        currentPremise

        +
        public java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> currentPremise
        +
      • +
      + + + +
        +
      • +

        Answer

        +
        public java.lang.String Answer
        +
      • +
      + + + +
        +
      • +

        nextStep

        +
        public java.lang.String nextStep
        +
      • +
      + + + +
        +
      • +

        feature

        +
        public java.lang.String feature
        +
      • +
      + + + +
        +
      • +

        indexName

        +
        public java.lang.String indexName
        +
      • +
      +
    • +
    + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        Condition

        +
        public Condition(int priority)
        +
      • +
      + + + +
        +
      • +

        Condition

        +
        public Condition()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/QuestionKeyWord.html b/Doc/entity/QuestionKeyWord.html new file mode 100644 index 0000000..7157665 --- /dev/null +++ b/Doc/entity/QuestionKeyWord.html @@ -0,0 +1,335 @@ + + + + + +QuestionKeyWord + + + + + + + + +
+ + + + + + + +
+ + + +
+
entity
+

类 QuestionKeyWord

+
+
+ +
+
    +
  • +
    +
    +
    public class QuestionKeyWord
    +extends java.lang.Object
    +
    暂时没用
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      java.lang.StringgetActionName() 
      java.lang.StringgetChatKey() 
      java.lang.StringgetKeyWord() 
      voidsetActionName(java.lang.String actionName) 
      voidsetChatKey(java.lang.String chatKey) 
      voidsetKeyWord(java.lang.String keyWord) 
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        QuestionKeyWord

        +
        public QuestionKeyWord()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        getActionName

        +
        public java.lang.String getActionName()
        +
      • +
      + + + +
        +
      • +

        getChatKey

        +
        public java.lang.String getChatKey()
        +
      • +
      + + + +
        +
      • +

        getKeyWord

        +
        public java.lang.String getKeyWord()
        +
      • +
      + + + +
        +
      • +

        setActionName

        +
        public void setActionName(java.lang.String actionName)
        +
      • +
      + + + +
        +
      • +

        setChatKey

        +
        public void setChatKey(java.lang.String chatKey)
        +
      • +
      + + + +
        +
      • +

        setKeyWord

        +
        public void setKeyWord(java.lang.String keyWord)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/UserInfo.html b/Doc/entity/UserInfo.html new file mode 100644 index 0000000..2210f02 --- /dev/null +++ b/Doc/entity/UserInfo.html @@ -0,0 +1,298 @@ + + + + + +UserInfo + + + + + + + + +
+ + + + + + + +
+ + + +
+
entity
+

类 UserInfo

+
+
+ +
+
    +
  • +
    +
    +
    public class UserInfo
    +extends java.lang.Object
    +
    本地读取的用户配置文件(整个)和提交的用户配置文件的信息经过解析后保存在这里
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      字段概要

      + + + + + + + + + + + + + + + + + + +
      字段 
      限定符和类型字段和说明
      java.util.HashMap<java.lang.String,java.util.List<Condition>>conditionTable 
      java.lang.StringconfigStr 
      java.lang.StringuserName 
      +
    • +
    + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      UserInfo(java.lang.String userName) 
      +
    • +
    + +
      +
    • + + +

      方法概要

      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      字段详细资料

      + + + +
        +
      • +

        conditionTable

        +
        public java.util.HashMap<java.lang.String,java.util.List<Condition>> conditionTable
        +
      • +
      + + + +
        +
      • +

        configStr

        +
        public java.lang.String configStr
        +
      • +
      + + + +
        +
      • +

        userName

        +
        public java.lang.String userName
        +
      • +
      +
    • +
    + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        UserInfo

        +
        public UserInfo(java.lang.String userName)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/package-frame.html b/Doc/entity/package-frame.html new file mode 100644 index 0000000..a6e46f4 --- /dev/null +++ b/Doc/entity/package-frame.html @@ -0,0 +1,23 @@ + + + + + +entity + + + + + +

entity

+
+

类

+ +
+ + diff --git a/Doc/entity/package-summary.html b/Doc/entity/package-summary.html new file mode 100644 index 0000000..937a783 --- /dev/null +++ b/Doc/entity/package-summary.html @@ -0,0 +1,160 @@ + + + + + +entity + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包 entity

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/entity/package-tree.html b/Doc/entity/package-tree.html new file mode 100644 index 0000000..5759749 --- /dev/null +++ b/Doc/entity/package-tree.html @@ -0,0 +1,138 @@ + + + + + +entity 类分层结构 + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包entity的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/help-doc.html b/Doc/help-doc.html new file mode 100644 index 0000000..1d7e63f --- /dev/null +++ b/Doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API 帮助 + + + + + + + + +
+ + + + + + + +
+ + +
+

此 API 文档的组织方式

+
此 API (应用程序编程接口) 文档包含对应于导航栏中的项目的页面, 如下所述。
+
+
+ +此帮助文件适用于使用标准 doclet 生成的 API 文档。
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-1.html b/Doc/index-files/index-1.html new file mode 100644 index 0000000..1317f1b --- /dev/null +++ b/Doc/index-files/index-1.html @@ -0,0 +1,135 @@ + + + + + +A - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

A

+
+
Answer - 类 中的变量entity.Condition
+
 
+
AnswerNextStep - entity中的类
+
+
包含后台返回数据的实体类。
+
+
AnswerNextStep(int, String, String) - 类 的构造器entity.AnswerNextStep
+
 
+
AnswerNextStep() - 类 的构造器entity.AnswerNextStep
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-10.html b/Doc/index-files/index-10.html new file mode 100644 index 0000000..a49f8ef --- /dev/null +++ b/Doc/index-files/index-10.html @@ -0,0 +1,127 @@ + + + + + +K - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

K

+
+
keywordSet - 类 中的变量entity.Condition
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-11.html b/Doc/index-files/index-11.html new file mode 100644 index 0000000..7eb6458 --- /dev/null +++ b/Doc/index-files/index-11.html @@ -0,0 +1,129 @@ + + + + + +M - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

M

+
+
MyFunc - processing中的类
+
 
+
MyFunc() - 类 的构造器processing.MyFunc
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-12.html b/Doc/index-files/index-12.html new file mode 100644 index 0000000..6dd9a1a --- /dev/null +++ b/Doc/index-files/index-12.html @@ -0,0 +1,127 @@ + + + + + +N - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

N

+
+
nextStep - 类 中的变量entity.Condition
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-13.html b/Doc/index-files/index-13.html new file mode 100644 index 0000000..0d8f235 --- /dev/null +++ b/Doc/index-files/index-13.html @@ -0,0 +1,137 @@ + + + + + +P - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

P

+
+
postToServer(AnswerNextStep, Condition, Map<String, String[]>, Map<String, String>) - 类 中的方法processing.ProcessQuestion
+
+
重新post到其他服务器读取数据,并根据这些数据修改返回给用户的信息,可能包括nextStep,和回答文本中的可变参数(用replace方法替换)
+
+
priority - 类 中的变量entity.Condition
+
 
+
processing - 程序包 processing
+
 
+
ProcessQuestion - processing中的类
+
 
+
ProcessQuestion() - 类 的构造器processing.ProcessQuestion
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-14.html b/Doc/index-files/index-14.html new file mode 100644 index 0000000..d2d14d6 --- /dev/null +++ b/Doc/index-files/index-14.html @@ -0,0 +1,133 @@ + + + + + +Q - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

Q

+
+
queryUsernameByKey(String) - 类 中的方法db.SqlHelper
+
 
+
QuestionKeyWord - entity中的类
+
+
暂时没用
+
+
QuestionKeyWord() - 类 的构造器entity.QuestionKeyWord
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-15.html b/Doc/index-files/index-15.html new file mode 100644 index 0000000..21879ca --- /dev/null +++ b/Doc/index-files/index-15.html @@ -0,0 +1,129 @@ + + + + + +R - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

R

+
+
ReloadConfigServlet - servlet中的类
+
 
+
ReloadConfigServlet() - 类 的构造器servlet.ReloadConfigServlet
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-16.html b/Doc/index-files/index-16.html new file mode 100644 index 0000000..f2435dd --- /dev/null +++ b/Doc/index-files/index-16.html @@ -0,0 +1,147 @@ + + + + + +S - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

S

+
+
satisfy(Map<String, String[]>, Map<String, String>, Condition) - 类 中的方法processing.ProcessQuestion
+
+
根据当前信息点,历史信息点,判断是否满足该condition的条件,match关键字指引擎识别的关键字包含在condition相应的关键词列表中,这里可以根据特征添加其他操作。
+
+
servlet - 程序包 servlet
+
 
+
setActionName(String) - 类 中的方法entity.QuestionKeyWord
+
 
+
setAnswer(String) - 类 中的方法entity.AnswerNextStep
+
 
+
setChatKey(String) - 类 中的方法entity.QuestionKeyWord
+
 
+
setKeyWord(String) - 类 中的方法entity.QuestionKeyWord
+
 
+
setNext(String) - 类 中的方法entity.AnswerNextStep
+
 
+
setStatus(int) - 类 中的方法entity.AnswerNextStep
+
 
+
SqlHelper - db中的类
+
 
+
SqlHelper() - 类 的构造器db.SqlHelper
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-17.html b/Doc/index-files/index-17.html new file mode 100644 index 0000000..63524b2 --- /dev/null +++ b/Doc/index-files/index-17.html @@ -0,0 +1,129 @@ + + + + + +T - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

T

+
+
toJson(AnswerNextStep) - 类 中的静态方法processing.MyFunc
+
+
将后台返回的数据转成json格式
+
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-18.html b/Doc/index-files/index-18.html new file mode 100644 index 0000000..2080925 --- /dev/null +++ b/Doc/index-files/index-18.html @@ -0,0 +1,160 @@ + + + + + +U - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

U

+
+
updateChatCache4Delete(ServletContext) - 类 中的静态方法processing.ChatCacheController
+
+
chatChche中每个chatkey都有对应的最后更新时间,如果最后更新时间已经是x分钟前(超时),就清除该chatKey的数据
+
+
updateChatCache4Insert(Map<String, String[]>, Map<String, String>, ServletContext) - 类 中的静态方法processing.ChatCacheController
+
+
根据chatKey更新chatCache的数据,并修改最后更新时间
+
+
updateInfoGetBestMatch(Condition, Map<String, String[]>, Map<String, String>, ServletContext, UserInfo) - 类 中的方法processing.ProcessQuestion
+
+
替换答案中相应的变量{xxx-1},并根据当前信息点更新历史信息点(当前在下一轮变成历史)。
+
+
UpdateServlet - servlet中的类
+
+
用户通过页面更新或提交配置文件,后台解析配置文件信息后保存至本地文件夹中,并更新contextServlet中的userinfo信息。
+
+
UpdateServlet() - 类 的构造器servlet.UpdateServlet
+
 
+
UserInfo - entity中的类
+
+
本地读取的用户配置文件(整个)和提交的用户配置文件的信息经过解析后保存在这里
+
+
UserInfo(String) - 类 的构造器entity.UserInfo
+
 
+
userInfoQuery(String, ServletContext) - 类 中的方法processing.ProcessQuestion
+
+
原为通过用户chat_key从数据库中获得用户名 + 根据用户名从servletContext中获得用户的数据userinfo(配置文件及相应的状态表) + 如果context中没有,就重新加载本地配置文件(即初始化) + 初始化后还是没有就创建一个userinfo + ------------- + 修改后直接从request获得用户名,并从context根据用户名获得userinfo
+
+
userName - 类 中的变量entity.UserInfo
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-2.html b/Doc/index-files/index-2.html new file mode 100644 index 0000000..ce86f76 --- /dev/null +++ b/Doc/index-files/index-2.html @@ -0,0 +1,131 @@ + + + + + +B - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

B

+
+
buildCondition(Condition, String) - 类 中的静态方法processing.ProcessQuestion
+
 
+
buildUserInfo(BufferedReader, UserInfo) - 类 中的静态方法processing.ProcessQuestion
+
+
逐行读取用户配置文件,并保存在userinfo.conditionTable中
+
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-3.html b/Doc/index-files/index-3.html new file mode 100644 index 0000000..90b3f86 --- /dev/null +++ b/Doc/index-files/index-3.html @@ -0,0 +1,153 @@ + + + + + +C - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

C

+
+
ChatCacheController - processing中的类
+
 
+
ChatCacheController() - 类 的构造器processing.ChatCacheController
+
 
+
closeAll(ResultSet, Statement, Connection) - 类 中的静态方法db.DBCPUtils
+
 
+
Condition - entity中的类
+
+
保存配置文件每一行(单行)解析后的信息的实体类。
+
+
Condition(int) - 类 的构造器entity.Condition
+
 
+
Condition() - 类 的构造器entity.Condition
+
 
+
conditionTable - 类 中的变量entity.UserInfo
+
 
+
configInit(ServletContext) - 类 中的静态方法processing.ProcessQuestion
+
+
根据本地配置文件生成用户信息
+
+
configStr - 类 中的变量entity.UserInfo
+
 
+
convert2Utf8(String) - 类 中的静态方法processing.MyFunc
+
+
通过get方法传递参数时需要对参数的编码进行转换
+
+
currentPremise - 类 中的变量entity.Condition
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-4.html b/Doc/index-files/index-4.html new file mode 100644 index 0000000..196ba33 --- /dev/null +++ b/Doc/index-files/index-4.html @@ -0,0 +1,149 @@ + + + + + +D - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

D

+
+
db - 程序包 db
+
 
+
DB - db中的类
+
 
+
DB() - 类 的构造器db.DB
+
 
+
DBCPUtils - db中的类
+
 
+
DBCPUtils() - 类 的构造器db.DBCPUtils
+
 
+
destroy() - 类 中的方法db.SqlHelper
+
 
+
doGet(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.GetAnswerServlet
+
 
+
doGet(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.ReloadConfigServlet
+
 
+
doGet(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.UpdateServlet
+
 
+
doPost(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.GetAnswerServlet
+
 
+
doPost(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.ReloadConfigServlet
+
 
+
doPost(HttpServletRequest, HttpServletResponse) - 类 中的方法servlet.UpdateServlet
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-5.html b/Doc/index-files/index-5.html new file mode 100644 index 0000000..4635512 --- /dev/null +++ b/Doc/index-files/index-5.html @@ -0,0 +1,127 @@ + + + + + +E - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

E

+
+
entity - 程序包 entity
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-6.html b/Doc/index-files/index-6.html new file mode 100644 index 0000000..9e61861 --- /dev/null +++ b/Doc/index-files/index-6.html @@ -0,0 +1,127 @@ + + + + + +F - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

F

+
+
feature - 类 中的变量entity.Condition
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-7.html b/Doc/index-files/index-7.html new file mode 100644 index 0000000..ab123bb --- /dev/null +++ b/Doc/index-files/index-7.html @@ -0,0 +1,156 @@ + + + + + +G - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

G

+
+
getActionName() - 类 中的方法entity.QuestionKeyWord
+
 
+
getAnswer() - 类 中的方法entity.AnswerNextStep
+
 
+
getAnswer(Map<String, String[]>, Map<String, String>, HashMap<String, List<Condition>>) - 类 中的方法processing.ProcessQuestion
+
+
用迭代器迭代当前信息点中的非空关键字,由conditionName索引到状态表中保存包含conditionName这个条件的列表,并查询状态表中的条件是否满足及其优先级,满足条件且优先级更高就设为bestMatch
+
+
GetAnswerServlet - servlet中的类
+
+
GetAnswerServlet就是处理post请求并返回答案的入口
+
+
GetAnswerServlet() - 类 的构造器servlet.GetAnswerServlet
+
 
+
getChatCache(String, ServletContext) - 类 中的静态方法processing.ChatCacheController
+
+
通过chat_key获得后台保存的历史信息点 + chatCache:存储了chatKye相对应的对话记录(历史信息点)
+
+
getChatKey() - 类 中的方法entity.QuestionKeyWord
+
 
+
getConnection() - 类 中的静态方法db.DB
+
 
+
getConnection() - 类 中的静态方法db.DBCPUtils
+
 
+
getKeyWord() - 类 中的方法entity.QuestionKeyWord
+
 
+
getNext() - 类 中的方法entity.AnswerNextStep
+
 
+
getStatus() - 类 中的方法entity.AnswerNextStep
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-8.html b/Doc/index-files/index-8.html new file mode 100644 index 0000000..474b384 --- /dev/null +++ b/Doc/index-files/index-8.html @@ -0,0 +1,127 @@ + + + + + +H - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

H

+
+
historyPremise - 类 中的变量entity.Condition
+
 
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index-files/index-9.html b/Doc/index-files/index-9.html new file mode 100644 index 0000000..ceab6fa --- /dev/null +++ b/Doc/index-files/index-9.html @@ -0,0 +1,131 @@ + + + + + +I - 索引 + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K M N P Q R S T U  + + +

I

+
+
indexName - 类 中的变量entity.Condition
+
 
+
insertPremise(HashMap<String, HashSet<String>>, String[]) - 类 中的静态方法processing.ProcessQuestion
+
+
通过split方法解析配置文件中的条件部分(如:xihuan=+dota+英雄联盟)
+
+
+A B C D E F G H I K M N P Q R S T U 
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/index.html b/Doc/index.html new file mode 100644 index 0000000..fb7799c --- /dev/null +++ b/Doc/index.html @@ -0,0 +1,75 @@ + + + + + +生成的文档 (无标题) + + + + + + + + + +<noscript> +<div>您的浏览器已禁用 JavaScript。</div> +</noscript> +<h2>框架预警</h2> +<p>请使用框架功能查看此文档。如果看到此消息, 则表明您使用的是不支持框架的 Web 客户机。链接到<a href="overview-summary.html">非框架版本</a>。</p> + + + diff --git a/Doc/overview-frame.html b/Doc/overview-frame.html new file mode 100644 index 0000000..e90021c --- /dev/null +++ b/Doc/overview-frame.html @@ -0,0 +1,24 @@ + + + + + +概览列表 + + + + + +
所有类
+
+

程序包

+ +
+

 

+ + diff --git a/Doc/overview-summary.html b/Doc/overview-summary.html new file mode 100644 index 0000000..a6febb1 --- /dev/null +++ b/Doc/overview-summary.html @@ -0,0 +1,145 @@ + + + + + +概览 + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
程序包 
程序包说明
db 
entity 
processing 
servlet 
+
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/overview-tree.html b/Doc/overview-tree.html new file mode 100644 index 0000000..24fb3b1 --- /dev/null +++ b/Doc/overview-tree.html @@ -0,0 +1,158 @@ + + + + + +类分层结构 + + + + + + + + +
+ + + + + + + +
+ + +
+

所有程序包的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/package-list b/Doc/package-list new file mode 100644 index 0000000..848693f --- /dev/null +++ b/Doc/package-list @@ -0,0 +1,4 @@ +db +entity +processing +servlet diff --git a/Doc/processing/ChatCacheController.html b/Doc/processing/ChatCacheController.html new file mode 100644 index 0000000..cf5ac02 --- /dev/null +++ b/Doc/processing/ChatCacheController.html @@ -0,0 +1,316 @@ + + + + + +ChatCacheController + + + + + + + + +
+ + + + + + + +
+ + + +
+
processing
+

类 ChatCacheController

+
+
+ +
+
    +
  • +
    +
    +
    public class ChatCacheController
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + + + + + +
      所有方法 静态方法 具体方法 
      限定符和类型方法和说明
      static java.util.Map<java.lang.String,java.lang.String>getChatCache(java.lang.String chatKey, + javax.servlet.ServletContext context) +
      通过chat_key获得后台保存的历史信息点 + chatCache:存储了chatKye相对应的对话记录(历史信息点)
      +
      static voidupdateChatCache4Delete(javax.servlet.ServletContext context) +
      chatChche中每个chatkey都有对应的最后更新时间,如果最后更新时间已经是x分钟前(超时),就清除该chatKey的数据
      +
      static voidupdateChatCache4Insert(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint, + java.util.Map<java.lang.String,java.lang.String> historyInfoPoint, + javax.servlet.ServletContext context) +
      根据chatKey更新chatCache的数据,并修改最后更新时间
      +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        ChatCacheController

        +
        public ChatCacheController()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        getChatCache

        +
        public static java.util.Map<java.lang.String,java.lang.String> getChatCache(java.lang.String chatKey,
        +                                                                            javax.servlet.ServletContext context)
        +
        通过chat_key获得后台保存的历史信息点 + chatCache:存储了chatKye相对应的对话记录(历史信息点)
        +
        +
        返回:
        +
        历史信息点,引擎在上一轮(多轮)识别的关键字
        +
        +
      • +
      + + + +
        +
      • +

        updateChatCache4Delete

        +
        public static void updateChatCache4Delete(javax.servlet.ServletContext context)
        +
        chatChche中每个chatkey都有对应的最后更新时间,如果最后更新时间已经是x分钟前(超时),就清除该chatKey的数据
        +
      • +
      + + + +
        +
      • +

        updateChatCache4Insert

        +
        public static void updateChatCache4Insert(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint,
        +                                          java.util.Map<java.lang.String,java.lang.String> historyInfoPoint,
        +                                          javax.servlet.ServletContext context)
        +
        根据chatKey更新chatCache的数据,并修改最后更新时间
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/processing/MyFunc.html b/Doc/processing/MyFunc.html new file mode 100644 index 0000000..1e89f2a --- /dev/null +++ b/Doc/processing/MyFunc.html @@ -0,0 +1,288 @@ + + + + + +MyFunc + + + + + + + + +
+ + + + + + + +
+ + + +
+
processing
+

类 MyFunc

+
+
+ +
+
    +
  • +
    +
    +
    public class MyFunc
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      MyFunc() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 静态方法 具体方法 
      限定符和类型方法和说明
      static java.lang.Stringconvert2Utf8(java.lang.String s) +
      通过get方法传递参数时需要对参数的编码进行转换
      +
      static java.lang.StringtoJson(AnswerNextStep ans) +
      将后台返回的数据转成json格式
      +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        MyFunc

        +
        public MyFunc()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        toJson

        +
        public static java.lang.String toJson(AnswerNextStep ans)
        +
        将后台返回的数据转成json格式
        +
      • +
      + + + +
        +
      • +

        convert2Utf8

        +
        public static java.lang.String convert2Utf8(java.lang.String s)
        +
        通过get方法传递参数时需要对参数的编码进行转换
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/processing/ProcessQuestion.html b/Doc/processing/ProcessQuestion.html new file mode 100644 index 0000000..82a5d8d --- /dev/null +++ b/Doc/processing/ProcessQuestion.html @@ -0,0 +1,500 @@ + + + + + +ProcessQuestion + + + + + + + + +
+ + + + + + + +
+ + + +
+
processing
+

类 ProcessQuestion

+
+
+ +
+
    +
  • +
    +
    +
    public class ProcessQuestion
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      所有方法 静态方法 实例方法 具体方法 
      限定符和类型方法和说明
      static ConditionbuildCondition(Condition condition, + java.lang.String line) 
      static UserInfobuildUserInfo(java.io.BufferedReader br, + UserInfo userinfo) +
      逐行读取用户配置文件,并保存在userinfo.conditionTable中
      +
      static voidconfigInit(javax.servlet.ServletContext context) +
      根据本地配置文件生成用户信息
      +
      ConditiongetAnswer(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint, + java.util.Map<java.lang.String,java.lang.String> historyInfoPoint, + java.util.HashMap<java.lang.String,java.util.List<Condition>> conditionTable) +
      用迭代器迭代当前信息点中的非空关键字,由conditionName索引到状态表中保存包含conditionName这个条件的列表,并查询状态表中的条件是否满足及其优先级,满足条件且优先级更高就设为bestMatch
      +
      static voidinsertPremise(java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> premiseMap, + java.lang.String[] premisesString) +
      通过split方法解析配置文件中的条件部分(如:xihuan=+dota+英雄联盟)
      +
      AnswerNextSteppostToServer(AnswerNextStep ans, + Condition ansCondition, + java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint, + java.util.Map<java.lang.String,java.lang.String> historyInfoPoint) +
      重新post到其他服务器读取数据,并根据这些数据修改返回给用户的信息,可能包括nextStep,和回答文本中的可变参数(用replace方法替换)
      +
      booleansatisfy(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint, + java.util.Map<java.lang.String,java.lang.String> historyInfoPoint, + Condition condition) +
      根据当前信息点,历史信息点,判断是否满足该condition的条件,match关键字指引擎识别的关键字包含在condition相应的关键词列表中,这里可以根据特征添加其他操作。
      +
      AnswerNextStepupdateInfoGetBestMatch(Condition ansCondition, + java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint, + java.util.Map<java.lang.String,java.lang.String> historyInfoPoint, + javax.servlet.ServletContext context, + UserInfo userinfo) +
      替换答案中相应的变量{xxx-1},并根据当前信息点更新历史信息点(当前在下一轮变成历史)。
      +
      UserInfouserInfoQuery(java.lang.String bot_name, + javax.servlet.ServletContext context) +
      原为通过用户chat_key从数据库中获得用户名 + 根据用户名从servletContext中获得用户的数据userinfo(配置文件及相应的状态表) + 如果context中没有,就重新加载本地配置文件(即初始化) + 初始化后还是没有就创建一个userinfo + ------------- + 修改后直接从request获得用户名,并从context根据用户名获得userinfo
      +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        ProcessQuestion

        +
        public ProcessQuestion()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        configInit

        +
        public static void configInit(javax.servlet.ServletContext context)
        +                       throws java.io.IOException
        +
        根据本地配置文件生成用户信息
        +
        +
        抛出:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        buildCondition

        +
        public static Condition buildCondition(Condition condition,
        +                                       java.lang.String line)
        +
      • +
      + + + +
        +
      • +

        buildUserInfo

        +
        public static UserInfo buildUserInfo(java.io.BufferedReader br,
        +                                     UserInfo userinfo)
        +                              throws java.io.IOException
        +
        逐行读取用户配置文件,并保存在userinfo.conditionTable中
        +
        +
        抛出:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        insertPremise

        +
        public static void insertPremise(java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> premiseMap,
        +                                 java.lang.String[] premisesString)
        +
        通过split方法解析配置文件中的条件部分(如:xihuan=+dota+英雄联盟)
        +
        +
        参数:
        +
        premiseMap - 前提条件哈希表
        +
        +
      • +
      + + + +
        +
      • +

        userInfoQuery

        +
        public UserInfo userInfoQuery(java.lang.String bot_name,
        +                              javax.servlet.ServletContext context)
        +                       throws java.io.IOException,
        +                              java.sql.SQLException
        +
        原为通过用户chat_key从数据库中获得用户名 + 根据用户名从servletContext中获得用户的数据userinfo(配置文件及相应的状态表) + 如果context中没有,就重新加载本地配置文件(即初始化) + 初始化后还是没有就创建一个userinfo + ------------- + 修改后直接从request获得用户名,并从context根据用户名获得userinfo
        +
        +
        参数:
        +
        bot_name - 用户名
        +
        返回:
        +
        用户信息
        +
        抛出:
        +
        java.io.IOException
        +
        java.sql.SQLException
        +
        +
      • +
      + + + +
        +
      • +

        getAnswer

        +
        public Condition getAnswer(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint,
        +                           java.util.Map<java.lang.String,java.lang.String> historyInfoPoint,
        +                           java.util.HashMap<java.lang.String,java.util.List<Condition>> conditionTable)
        +                    throws java.io.IOException
        +
        用迭代器迭代当前信息点中的非空关键字,由conditionName索引到状态表中保存包含conditionName这个条件的列表,并查询状态表中的条件是否满足及其优先级,满足条件且优先级更高就设为bestMatch
        +
        +
        参数:
        +
        curInfoPoint - 当前信息点,即引擎识别的conditionName和关键字
        +
        historyInfoPoint - 历史信息点,即引擎前几轮识别的conditionName和关键字
        +
        conditionTable - 满足什么条件,就回答什么,下一步跳什么
        +
        返回:
        +
        bestMatch 状态表中满足条件最多的一条
        +
        抛出:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        satisfy

        +
        public boolean satisfy(java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint,
        +                       java.util.Map<java.lang.String,java.lang.String> historyInfoPoint,
        +                       Condition condition)
        +
        根据当前信息点,历史信息点,判断是否满足该condition的条件,match关键字指引擎识别的关键字包含在condition相应的关键词列表中,这里可以根据特征添加其他操作。 + currentPremise是当前信息点需要满足的条件,historyPremise是历史信息点需要满足的条件
        +
        +
        参数:
        +
        curInfoPoint - 当前信息点,即引擎识别的conditionName和关键字
        +
        historyInfoPoint - 历史信息点,即引擎前几轮识别的conditionName和关键字
        +
        condition - 配置文件(状态表)的一行
        +
        返回:
        +
        满足条件就为True,不满足就为False
        +
        +
      • +
      + + + +
        +
      • +

        updateInfoGetBestMatch

        +
        public AnswerNextStep updateInfoGetBestMatch(Condition ansCondition,
        +                                             java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint,
        +                                             java.util.Map<java.lang.String,java.lang.String> historyInfoPoint,
        +                                             javax.servlet.ServletContext context,
        +                                             UserInfo userinfo)
        +                                      throws java.io.IOException
        +
        替换答案中相应的变量{xxx-1},并根据当前信息点更新历史信息点(当前在下一轮变成历史)。
        +
        +
        参数:
        +
        curInfoPoint - 当前信息点,即引擎识别的conditionName和关键字
        +
        historyInfoPoint - 历史信息点,即引擎前几轮识别的conditionName和关键字
        +
        返回:
        +
        返回给引擎的数据
        +
        抛出:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        postToServer

        +
        public AnswerNextStep postToServer(AnswerNextStep ans,
        +                                   Condition ansCondition,
        +                                   java.util.Map<java.lang.String,java.lang.String[]> curInfoPoint,
        +                                   java.util.Map<java.lang.String,java.lang.String> historyInfoPoint)
        +                            throws java.io.IOException
        +
        重新post到其他服务器读取数据,并根据这些数据修改返回给用户的信息,可能包括nextStep,和回答文本中的可变参数(用replace方法替换)
        +
        +
        参数:
        +
        ans - 返回给用户的数据
        +
        ansCondition - 满足条件最多的condition(配置文件的某一行)
        +
        抛出:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/processing/package-frame.html b/Doc/processing/package-frame.html new file mode 100644 index 0000000..c16e527 --- /dev/null +++ b/Doc/processing/package-frame.html @@ -0,0 +1,22 @@ + + + + + +processing + + + + + +

processing

+
+

类

+ +
+ + diff --git a/Doc/processing/package-summary.html b/Doc/processing/package-summary.html new file mode 100644 index 0000000..562e148 --- /dev/null +++ b/Doc/processing/package-summary.html @@ -0,0 +1,148 @@ + + + + + +processing + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包 processing

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/processing/package-tree.html b/Doc/processing/package-tree.html new file mode 100644 index 0000000..ff04065 --- /dev/null +++ b/Doc/processing/package-tree.html @@ -0,0 +1,137 @@ + + + + + +processing 类分层结构 + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包processing的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/script.js b/Doc/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/Doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/Doc/serialized-form.html b/Doc/serialized-form.html new file mode 100644 index 0000000..be5365b --- /dev/null +++ b/Doc/serialized-form.html @@ -0,0 +1,145 @@ + + + + + +序列化表格 + + + + + + + + +
+ + + + + + + +
+ + +
+

序列化表格

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/GetAnswerServlet.html b/Doc/servlet/GetAnswerServlet.html new file mode 100644 index 0000000..f41b446 --- /dev/null +++ b/Doc/servlet/GetAnswerServlet.html @@ -0,0 +1,339 @@ + + + + + +GetAnswerServlet + + + + + + + + +
+ + + + + + + +
+ + + +
+
servlet
+

类 GetAnswerServlet

+
+
+ +
+
    +
  • +
    +
    所有已实现的接口:
    +
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    +
    +
    +
    +
    @WebServlet(name="GetAnswerServlet",
    +            urlPatterns={"/test","/test/"})
    +public class GetAnswerServlet
    +extends javax.servlet.http.HttpServlet
    +
    GetAnswerServlet就是处理post请求并返回答案的入口
    +
    +
    另请参阅:
    +
    序列化表格
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      protected voiddoGet(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      protected voiddoPost(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      +
        +
      • + + +

        从类继承的方法 javax.servlet.http.HttpServlet

        +doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • +
      +
        +
      • + + +

        从类继承的方法 javax.servlet.GenericServlet

        +destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        GetAnswerServlet

        +
        public GetAnswerServlet()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        doPost

        +
        protected void doPost(javax.servlet.http.HttpServletRequest request,
        +                      javax.servlet.http.HttpServletResponse response)
        +               throws javax.servlet.ServletException,
        +                      java.io.IOException
        +
        +
        覆盖:
        +
        doPost 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        doGet

        +
        protected void doGet(javax.servlet.http.HttpServletRequest request,
        +                     javax.servlet.http.HttpServletResponse response)
        +              throws javax.servlet.ServletException,
        +                     java.io.IOException
        +
        +
        覆盖:
        +
        doGet 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/ReloadConfig.html b/Doc/servlet/ReloadConfig.html new file mode 100644 index 0000000..74604a9 --- /dev/null +++ b/Doc/servlet/ReloadConfig.html @@ -0,0 +1,337 @@ + + + + + +ReloadConfig + + + + + + + + +
+ + + + + + + +
+ + + +
+
servlet
+

类 ReloadConfig

+
+
+ +
+
    +
  • +
    +
    所有已实现的接口:
    +
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    +
    +
    +
    +
    @WebServlet(name="ReloadConfig")
    +public class ReloadConfig
    +extends javax.servlet.http.HttpServlet
    +
    +
    另请参阅:
    +
    序列化表格
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      ReloadConfig() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      protected voiddoGet(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      protected voiddoPost(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      +
        +
      • + + +

        从类继承的方法 javax.servlet.http.HttpServlet

        +doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • +
      +
        +
      • + + +

        从类继承的方法 javax.servlet.GenericServlet

        +destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        ReloadConfig

        +
        public ReloadConfig()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        doPost

        +
        protected void doPost(javax.servlet.http.HttpServletRequest request,
        +                      javax.servlet.http.HttpServletResponse response)
        +               throws javax.servlet.ServletException,
        +                      java.io.IOException
        +
        +
        覆盖:
        +
        doPost 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        doGet

        +
        protected void doGet(javax.servlet.http.HttpServletRequest request,
        +                     javax.servlet.http.HttpServletResponse response)
        +              throws javax.servlet.ServletException,
        +                     java.io.IOException
        +
        +
        覆盖:
        +
        doGet 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/ReloadConfigServlet.html b/Doc/servlet/ReloadConfigServlet.html new file mode 100644 index 0000000..c3d4810 --- /dev/null +++ b/Doc/servlet/ReloadConfigServlet.html @@ -0,0 +1,338 @@ + + + + + +ReloadConfigServlet + + + + + + + + +
+ + + + + + + +
+ + + +
+
servlet
+

类 ReloadConfigServlet

+
+
+ +
+
    +
  • +
    +
    所有已实现的接口:
    +
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    +
    +
    +
    +
    @WebServlet(name="ReloadConfigServlet",
    +            urlPatterns={"/reload","/reload/"})
    +public class ReloadConfigServlet
    +extends javax.servlet.http.HttpServlet
    +
    +
    另请参阅:
    +
    序列化表格
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      protected voiddoGet(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      protected voiddoPost(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      +
        +
      • + + +

        从类继承的方法 javax.servlet.http.HttpServlet

        +doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • +
      +
        +
      • + + +

        从类继承的方法 javax.servlet.GenericServlet

        +destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        ReloadConfigServlet

        +
        public ReloadConfigServlet()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        doPost

        +
        protected void doPost(javax.servlet.http.HttpServletRequest request,
        +                      javax.servlet.http.HttpServletResponse response)
        +               throws javax.servlet.ServletException,
        +                      java.io.IOException
        +
        +
        覆盖:
        +
        doPost 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        doGet

        +
        protected void doGet(javax.servlet.http.HttpServletRequest request,
        +                     javax.servlet.http.HttpServletResponse response)
        +              throws javax.servlet.ServletException,
        +                     java.io.IOException
        +
        +
        覆盖:
        +
        doGet 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/UpdateServlet.html b/Doc/servlet/UpdateServlet.html new file mode 100644 index 0000000..0b04668 --- /dev/null +++ b/Doc/servlet/UpdateServlet.html @@ -0,0 +1,339 @@ + + + + + +UpdateServlet + + + + + + + + +
+ + + + + + + +
+ + + +
+
servlet
+

类 UpdateServlet

+
+
+ +
+
    +
  • +
    +
    所有已实现的接口:
    +
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    +
    +
    +
    +
    @WebServlet(name="UpdateServlet",
    +            urlPatterns="/update")
    +public class UpdateServlet
    +extends javax.servlet.http.HttpServlet
    +
    用户通过页面更新或提交配置文件,后台解析配置文件信息后保存至本地文件夹中,并更新contextServlet中的userinfo信息。
    +
    +
    另请参阅:
    +
    序列化表格
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器概要

      + + + + + + + + +
      构造器 
      构造器和说明
      UpdateServlet() 
      +
    • +
    + +
      +
    • + + +

      方法概要

      + + + + + + + + + + + + + + +
      所有方法 实例方法 具体方法 
      限定符和类型方法和说明
      protected voiddoGet(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      protected voiddoPost(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) 
      +
        +
      • + + +

        从类继承的方法 javax.servlet.http.HttpServlet

        +doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • +
      +
        +
      • + + +

        从类继承的方法 javax.servlet.GenericServlet

        +destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
      • +
      +
        +
      • + + +

        从类继承的方法 java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      构造器详细资料

      + + + +
        +
      • +

        UpdateServlet

        +
        public UpdateServlet()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      方法详细资料

      + + + +
        +
      • +

        doPost

        +
        protected void doPost(javax.servlet.http.HttpServletRequest request,
        +                      javax.servlet.http.HttpServletResponse response)
        +               throws javax.servlet.ServletException,
        +                      java.io.IOException
        +
        +
        覆盖:
        +
        doPost 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        doGet

        +
        protected void doGet(javax.servlet.http.HttpServletRequest request,
        +                     javax.servlet.http.HttpServletResponse response)
        +              throws javax.servlet.ServletException,
        +                     java.io.IOException
        +
        +
        覆盖:
        +
        doGet 在类中 javax.servlet.http.HttpServlet
        +
        抛出:
        +
        javax.servlet.ServletException
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/package-frame.html b/Doc/servlet/package-frame.html new file mode 100644 index 0000000..727e973 --- /dev/null +++ b/Doc/servlet/package-frame.html @@ -0,0 +1,22 @@ + + + + + +servlet + + + + + +

servlet

+
+

类

+ +
+ + diff --git a/Doc/servlet/package-summary.html b/Doc/servlet/package-summary.html new file mode 100644 index 0000000..8156f17 --- /dev/null +++ b/Doc/servlet/package-summary.html @@ -0,0 +1,152 @@ + + + + + +servlet + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包 servlet

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/servlet/package-tree.html b/Doc/servlet/package-tree.html new file mode 100644 index 0000000..f02ae80 --- /dev/null +++ b/Doc/servlet/package-tree.html @@ -0,0 +1,145 @@ + + + + + +servlet 类分层结构 + + + + + + + + +
+ + + + + + + +
+ + +
+

程序包servlet的分层结构

+程序包分层结构: + +
+
+

类分层结构

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/Doc/stylesheet.css b/Doc/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/Doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/out/production/webapp/processing/ProcessQuestion.class b/out/production/webapp/processing/ProcessQuestion.class index c83a9c2..d5ad605 100644 Binary files a/out/production/webapp/processing/ProcessQuestion.class and b/out/production/webapp/processing/ProcessQuestion.class differ diff --git a/src/entity/AnswerNextStep.java b/src/entity/AnswerNextStep.java index 39b26fe..ecc898d 100644 --- a/src/entity/AnswerNextStep.java +++ b/src/entity/AnswerNextStep.java @@ -1,5 +1,9 @@ package entity; + +/** + * 包含后台返回数据的实体类。 + */ public class AnswerNextStep { int status = 0; String answer; diff --git a/src/entity/Condition.java b/src/entity/Condition.java index 6e118d9..4c3e055 100644 --- a/src/entity/Condition.java +++ b/src/entity/Condition.java @@ -4,6 +4,10 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; + +/** + * 保存配置文件每一行(单行)解析后的信息的实体类。 + */ public class Condition { public int priority = 1; public HashSet keywordSet = new HashSet(); diff --git a/src/entity/QuestionKeyWord.java b/src/entity/QuestionKeyWord.java index a7962b5..35e6529 100644 --- a/src/entity/QuestionKeyWord.java +++ b/src/entity/QuestionKeyWord.java @@ -1,5 +1,10 @@ package entity; + + +/** + * 暂时没用 + */ public class QuestionKeyWord { String actionName; String chatKey; diff --git a/src/entity/UserInfo.java b/src/entity/UserInfo.java index 06bf0e4..7b50a5c 100644 --- a/src/entity/UserInfo.java +++ b/src/entity/UserInfo.java @@ -3,6 +3,9 @@ package entity; import java.util.HashMap; import java.util.List; +/** + * 本地读取的用户配置文件(整个)和提交的用户配置文件的信息经过解析后保存在这里 + */ public class UserInfo { public UserInfo(String userName){ this.conditionTable = new HashMap>(); diff --git a/src/processing/ChatCacheController.java b/src/processing/ChatCacheController.java index cad49f7..d87f238 100644 --- a/src/processing/ChatCacheController.java +++ b/src/processing/ChatCacheController.java @@ -7,7 +7,11 @@ import java.util.Map; import java.util.Set; public class ChatCacheController { - + /** + * 通过chat_key获得后台保存的历史信息点 + * chatCache:存储了chatKye相对应的对话记录(历史信息点) + * @return 历史信息点,引擎在上一轮(多轮)识别的关键字 + */ public static synchronized Map getChatCache(String chatKey, ServletContext context){ Map historyInfoPoint = null; Map> chatCache = null; @@ -19,13 +23,6 @@ public class ChatCacheController { } String chatkey; - /* - Iterator it = chatCache.keySet().iterator(); - while(it.hasNext()){ - chatkey = it.next(); - System.out.println("chatkey:"+chatkey); - } - */ try{ historyInfoPoint = chatCache.get(chatKey); @@ -40,6 +37,10 @@ public class ChatCacheController { return historyInfoPoint; } + + /** + * chatChche中每个chatkey都有对应的最后更新时间,如果最后更新时间已经是x分钟前(超时),就清除该chatKey的数据 + */ public static synchronized void updateChatCache4Delete(ServletContext context){ String chatKey; long lastChatTime,now; @@ -59,6 +60,10 @@ public class ChatCacheController { } context.setAttribute("chatCache", chatCache); } + + /** + * 根据chatKey更新chatCache的数据,并修改最后更新时间 + */ public static synchronized void updateChatCache4Insert(Map curInfoPoint,Map historyInfoPoint,ServletContext context){ historyInfoPoint.put("lastUpdateTime",String.valueOf(System.currentTimeMillis())); Map> keyCache = (Map>) context.getAttribute("chatCache"); diff --git a/src/processing/MyFunc.java b/src/processing/MyFunc.java index ba8ed64..c583abe 100644 --- a/src/processing/MyFunc.java +++ b/src/processing/MyFunc.java @@ -5,7 +5,11 @@ import net.sf.json.JSONObject; import java.io.UnsupportedEncodingException; + public class MyFunc { + /** + * 将后台返回的数据转成json格式 + */ public static String toJson(AnswerNextStep ans) { JSONObject jobj = new JSONObject(); jobj.put("solution", ans.getAnswer()); @@ -13,11 +17,10 @@ public class MyFunc { jobj.put("process", ans.getNext()); return jobj.toString(); } - public static String toJson(String returnStr){ - JSONObject jobj = new JSONObject(); - jobj.put("returnString",returnStr); - return jobj.toString(); - } + + /** + * 通过get方法传递参数时需要对参数的编码进行转换 + */ public static String convert2Utf8(String s){ if(s==null)return null; try { diff --git a/src/processing/ProcessQuestion.java b/src/processing/ProcessQuestion.java index b4e68ea..7801a86 100644 --- a/src/processing/ProcessQuestion.java +++ b/src/processing/ProcessQuestion.java @@ -39,7 +39,7 @@ public class ProcessQuestion { /** - * 根据本地配置文件生成状态表 + * 根据本地配置文件生成用户信息 */ public static void configInit(ServletContext context) throws IOException { @@ -100,7 +100,9 @@ public class ProcessQuestion { return condition; } - + /** + * 逐行读取用户配置文件,并保存在userinfo.conditionTable中 + */ public static UserInfo buildUserInfo(BufferedReader br, UserInfo userinfo) throws IOException { String line; HashMap> conditionTable = new HashMap>(); @@ -125,6 +127,10 @@ public class ProcessQuestion { return userinfo; } + /** + * 通过split方法解析配置文件中的条件部分(如:xihuan=+dota+英雄联盟) + * @param premiseMap 前提条件哈希表 + */ public static void insertPremise(HashMap> premiseMap,String[] premisesString){ String pair[]; HashSet keyWordSet = null; @@ -149,7 +155,7 @@ public class ProcessQuestion { * 如果context中没有,就重新加载本地配置文件(即初始化) * 初始化后还是没有就创建一个userinfo * ------------- - * 修改后直接通过request获得用户名,并从context获得userinfo + * 修改后直接从request获得用户名,并从context根据用户名获得userinfo * * @param bot_name 用户名 * @return 用户信息 @@ -266,24 +272,25 @@ public class ProcessQuestion { } /** - * 替换答案中相应的变量{xxx-1},并将当前信息点更新为历史信息点。 + * 替换答案中相应的变量{xxx-1},并根据当前信息点更新历史信息点(当前在下一轮变成历史)。 * @param curInfoPoint 当前信息点,即引擎识别的conditionName和关键字 * @param historyInfoPoint 历史信息点,即引擎前几轮识别的conditionName和关键字 * @return 返回给引擎的数据 */ - public AnswerNextStep updateInfoGetBestMatch(Condition ansCondition,Map curInfoPoint,Map historyInfoPoint,ServletContext context,UserInfo userinfo){ + public AnswerNextStep updateInfoGetBestMatch(Condition ansCondition,Map curInfoPoint,Map historyInfoPoint,ServletContext context,UserInfo userinfo) throws IOException { Iterator it = curInfoPoint.keySet().iterator(); String actionName; AnswerNextStep ans = new AnswerNextStep(); ans.setAnswer(ansCondition.Answer); //System.out.println(ans.getAnswer()); - + System.out.println("feature="+ansCondition.feature); if(ansCondition.feature.indexOf("post") != -1){ - //ans = postToServer(ans,ansCondition,curInfoPoint,historyInfoPoint); + postToServer(ans,ansCondition,curInfoPoint,historyInfoPoint); } try { + String keyword1, keyword2; if (historyInfoPoint == null) historyInfoPoint = new HashMap(); @@ -315,21 +322,28 @@ public class ProcessQuestion { return ans; } - /* + /** + * 重新post到其他服务器读取数据,并根据这些数据修改返回给用户的信息,可能包括nextStep,和回答文本中的可变参数(用replace方法替换) + * @param ans 返回给用户的数据 + * @param ansCondition 满足条件最多的condition(配置文件的某一行) + */ public AnswerNextStep postToServer(AnswerNextStep ans, Condition ansCondition, Map curInfoPoint,Map historyInfoPoint) throws IOException { String url = null,features[] = ansCondition.feature.trim().split(","),elem[]; + System.out.println("there"); for(String feature:features){ - elem = feature.split(":"); + elem = feature.split("\\("); if(elem[0].equals("post")){ - url = elem[elem.length-1]; + url = "http://"+elem[elem.length-1]; + url = url.substring(0,url.length()-1); break; } } HttpPost httpPost = new HttpPost(url); CloseableHttpClient client = HttpClients.createDefault(); String respContent = null; + String keyName = null; + -// json方式 JSONObject jsonParam = new JSONObject(); jsonParam.put("curInfoPoint", curInfoPoint); jsonParam.put("historyInfoPoint", historyInfoPoint); @@ -337,16 +351,31 @@ public class ProcessQuestion { entity.setContentEncoding("UTF-8"); entity.setContentType("application/json"); httpPost.setEntity(entity); - System.out.println(); HttpResponse resp = client.execute(httpPost); if(resp.getStatusLine().getStatusCode() == 200) { HttpEntity he = resp.getEntity(); respContent = EntityUtils.toString(he,"UTF-8"); + JSONObject jobj = JSONObject.fromString(respContent); + Iterator kit = jobj.keys(); + while(kit.hasNext()){ + keyName = kit.next(); + if(keyName.equals("process")){ + ans.setNext("nextStep="+jobj.get(keyName)); + }else{ + ans.setAnswer(ans.getAnswer().replace("{"+keyName+"}",jobj.getString(keyName))); + } + } + }else{ + ans.setAnswer("api有误!"); } - return respContent; + + return ans; + } - */ + + + } diff --git a/src/servlet/GetAnswerServlet.java b/src/servlet/GetAnswerServlet.java index 3644131..eb3f58d 100644 --- a/src/servlet/GetAnswerServlet.java +++ b/src/servlet/GetAnswerServlet.java @@ -18,7 +18,9 @@ import java.io.OutputStream; import java.sql.SQLException; import java.util.*; - +/** + * GetAnswerServlet就是处理post请求并返回答案的入口 + */ @WebServlet(name = "GetAnswerServlet",urlPatterns = {"/test","/test/"}) public class GetAnswerServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { @@ -37,10 +39,12 @@ public class GetAnswerServlet extends HttpServlet { UserInfo userinfo = null; try { //userinfo = process.userInfoQuery(chatKey,context); + //从servlet根据用户名查询用户信息 userinfo = process.userInfoQuery(request.getParameter("bot_name"),context); } catch (SQLException e) { e.printStackTrace(); } + //获得用户历史信息 historyInfoPoint = ChatCacheController.getChatCache(chatKey,context); @@ -74,7 +78,7 @@ public class GetAnswerServlet extends HttpServlet { - /*得到答案,清楚超时chatkey_key,更新历史信息点&生成答案,生成更新数据库,转成json,输出*/ + /*得到答案更新历史信息点&生成答案,,清楚超时chatkey_key,生成更新数据库,转成json,输出*/ //process.removeTimeoutChatkey(context); //System.out.println(userinfo.conditionTable); //测试 ansCondition = process.getAnswer(curInfoPoint,historyInfoPoint,userinfo.conditionTable); diff --git a/src/servlet/ReloadConfigServlet.java b/src/servlet/ReloadConfigServlet.java new file mode 100644 index 0000000..7c3e473 --- /dev/null +++ b/src/servlet/ReloadConfigServlet.java @@ -0,0 +1,76 @@ +package servlet; + +import entity.UserInfo; +import processing.MyFunc; +import processing.ProcessQuestion; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; + +@WebServlet(name = "ReloadConfigServlet",urlPatterns = {"/reload","/reload/"}) +public class ReloadConfigServlet extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String userName = request.getParameter("userName"); + boolean flag = true; + UserInfo userinfo = new UserInfo(userName); + File configFile = new File(System.getProperty("user.dir")+"/config/"+userName+".txt"); + ServletContext context = this.getServletContext(); + if(!configFile.exists()) { + response.setCharacterEncoding("utf-8"); + response.setContentType("text/plain"); + PrintWriter out = response.getWriter(); + out.println("文件不存在: "+userName); + + }else{ + + FileReader reader = new FileReader(configFile); + BufferedReader br = new BufferedReader(reader); + + try { + userinfo = ProcessQuestion.buildUserInfo(br, userinfo); + context.setAttribute(userinfo.userName,userinfo); + }catch(Exception e){ + flag = false; + System.out.println(userinfo.userName + ".txt 有误"); + e.printStackTrace(); + } + + reader.close(); + br.close(); + + if(!flag) { + //request.setAttribute("returnMessage","更新失败,以下行有误:
" + errorStr +"
"+ "返回重新输入。"); + response.setCharacterEncoding("utf-8"); + response.setContentType("text/plain"); + PrintWriter out = response.getWriter(); + out.println("更新失败配置文件有误:" + userName +".txt\\\n"); + + } + else{ + response.setCharacterEncoding("utf-8"); + response.setContentType( "text/plain"); + PrintWriter out = response.getWriter(); + out.println("更新成功+ “ "); + out.flush(); + out.close(); + + //request.setAttribute("returnMessage","更新成功"+userinfo.configStr); + + + } + + } + + + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + } +} diff --git a/src/servlet/UpdateServlet.java b/src/servlet/UpdateServlet.java index 81b341f..e10265c 100644 --- a/src/servlet/UpdateServlet.java +++ b/src/servlet/UpdateServlet.java @@ -17,7 +17,9 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; - +/** + * 用户通过页面更新或提交配置文件,后台解析配置文件信息后保存至本地文件夹中,并更新contextServlet中的userinfo信息。 + */ @WebServlet(name = "UpdateServlet",urlPatterns = {"/update"}) public class UpdateServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { -- libgit2 0.27.1