• R/O
  • SSH

JinArchiver: Commit

JinArchiverは、人狼BBSの過去ログを独自のXML形式でローカルディスクに保存するためのツールです。


Commit MetaInfo

Revisiond5eb0062e01c02c0ffebe867a61c6d1ba35367c3 (tree)
Time2018-03-27 12:08:28
Author <olyutorskii@user...>

Log Message

use JioCema

Change Summary

Incremental Difference

diff -r 6b2ccee25c8a -r d5eb0062e01c pom.xml
--- a/pom.xml Tue Apr 11 00:10:16 2017 +0900
+++ b/pom.xml Tue Mar 27 12:08:28 2018 +0900
@@ -125,9 +125,9 @@
125125 </dependency>
126126
127127 <dependency>
128- <groupId>jp.sourceforge.jindolf</groupId>
128+ <groupId>jp.osdn.jindolf</groupId>
129129 <artifactId>jinparser</artifactId>
130- <version>1.409.4</version>
130+ <version>2.101.1-SNAPSHOT</version>
131131 <scope>compile</scope>
132132 </dependency>
133133
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/Builder.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/Builder.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/Builder.java Tue Mar 27 12:08:28 2018 +0900
@@ -7,20 +7,19 @@
77
88 package jp.sourceforge.jindolf.archiver;
99
10+import io.bitbucket.olyutorskii.jiocema.DecodeBreakException;
11+import io.bitbucket.olyutorskii.jiocema.DecodeNotifier;
1012 import java.io.IOException;
1113 import java.io.InputStream;
1214 import java.net.URL;
1315 import java.net.URLConnection;
1416 import java.nio.charset.Charset;
15-import jp.sourceforge.jindolf.parser.ContentBuilder;
16-import jp.sourceforge.jindolf.parser.ContentBuilderSJ;
17-import jp.sourceforge.jindolf.parser.ContentBuilderUCS2;
18-import jp.sourceforge.jindolf.parser.DecodeException;
19-import jp.sourceforge.jindolf.parser.DecodedContent;
20-import jp.sourceforge.jindolf.parser.HtmlParseException;
21-import jp.sourceforge.jindolf.parser.HtmlParser;
22-import jp.sourceforge.jindolf.parser.SjisDecoder;
23-import jp.sourceforge.jindolf.parser.StreamDecoder;
17+import jp.osdn.jindolf.parser.HtmlParseException;
18+import jp.osdn.jindolf.parser.HtmlParser;
19+import jp.osdn.jindolf.parser.content.ContentBuilder;
20+import jp.osdn.jindolf.parser.content.ContentBuilderSJ;
21+import jp.osdn.jindolf.parser.content.DecodedContent;
22+import jp.osdn.jindolf.parser.content.SjisNotifier;
2423
2524 /**
2625 * 入力から内部構造を生成する。
@@ -45,27 +44,27 @@
4544 * @param istream 入力ストリーム
4645 * @return デコード結果
4746 * @throws IOException 入力エラー
48- * @throws DecodeException デコードエラー
47+ * @throws DecodeBreakException デコードエラー
4948 */
5049 public static DecodedContent contentFromStream(Charset charset,
5150 InputStream istream)
52- throws IOException, DecodeException{
53- StreamDecoder decoder;
51+ throws IOException, DecodeBreakException{
52+ DecodeNotifier decoder;
5453 ContentBuilder builder;
5554
5655 String name = charset.name();
5756 if("Shift_JIS".equalsIgnoreCase(name)){
58- decoder = new SjisDecoder();
57+ decoder = new SjisNotifier();
5958 builder = new ContentBuilderSJ(BUF_SZ);
6059 }else if("UTF-8".equalsIgnoreCase(name)){
61- decoder = new StreamDecoder(charset.newDecoder());
62- builder = new ContentBuilderUCS2(BUF_SZ);
60+ decoder = new DecodeNotifier(charset.newDecoder());
61+ builder = new ContentBuilder(BUF_SZ);
6362 }else{
6463 assert false;
6564 return null;
6665 }
6766
68- decoder.setDecodeHandler(builder);
67+ decoder.setCharDecodeListener(builder);
6968
7069 decoder.decode(istream);
7170
@@ -78,11 +77,11 @@
7877 * 村の各日々をロードしパースする。
7978 * @param villageData 村情報
8079 * @throws IOException 入力エラー
81- * @throws DecodeException デコードエラー
80+ * @throws DecodeBreakException デコードエラー
8281 * @throws HtmlParseException パースエラー
8382 */
8483 public static void fillVillageData(VillageData villageData)
85- throws IOException, DecodeException, HtmlParseException {
84+ throws IOException, DecodeBreakException, HtmlParseException {
8685 HtmlParser parser = new HtmlParser();
8786 Handler handler = new Handler();
8887 parser.setBasicHandler (handler);
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/EventData.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/EventData.java Tue Mar 27 12:08:28 2018 +0900
@@ -10,9 +10,9 @@
1010 import java.io.IOException;
1111 import java.util.LinkedList;
1212 import java.util.List;
13+import jp.osdn.jindolf.parser.content.DecodedContent;
1314 import jp.sourceforge.jindolf.corelib.GameRole;
1415 import jp.sourceforge.jindolf.corelib.SysEventType;
15-import jp.sourceforge.jindolf.parser.DecodedContent;
1616
1717 /**
1818 * システムイベント モデル。
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/Handler.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/Handler.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/Handler.java Tue Mar 27 12:08:28 2018 +0900
@@ -9,6 +9,12 @@
99
1010 import java.util.regex.Matcher;
1111 import java.util.regex.Pattern;
12+import jp.osdn.jindolf.parser.EntityConverter;
13+import jp.osdn.jindolf.parser.HtmlAdapter;
14+import jp.osdn.jindolf.parser.HtmlParseException;
15+import jp.osdn.jindolf.parser.PageType;
16+import jp.osdn.jindolf.parser.SeqRange;
17+import jp.osdn.jindolf.parser.content.DecodedContent;
1218 import jp.sourceforge.jindolf.corelib.DisclosureType;
1319 import jp.sourceforge.jindolf.corelib.EventFamily;
1420 import jp.sourceforge.jindolf.corelib.GameRole;
@@ -18,12 +24,6 @@
1824 import jp.sourceforge.jindolf.corelib.TalkType;
1925 import jp.sourceforge.jindolf.corelib.Team;
2026 import jp.sourceforge.jindolf.corelib.VillageTag;
21-import jp.sourceforge.jindolf.parser.DecodedContent;
22-import jp.sourceforge.jindolf.parser.EntityConverter;
23-import jp.sourceforge.jindolf.parser.HtmlAdapter;
24-import jp.sourceforge.jindolf.parser.HtmlParseException;
25-import jp.sourceforge.jindolf.parser.PageType;
26-import jp.sourceforge.jindolf.parser.SeqRange;
2727
2828 /**
2929 * パーサ用ハンドラ。
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/HttpAccess.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/HttpAccess.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/HttpAccess.java Tue Mar 27 12:08:28 2018 +0900
@@ -7,22 +7,22 @@
77
88 package jp.sourceforge.jindolf.archiver;
99
10+import io.bitbucket.olyutorskii.jiocema.DecodeBreakException;
1011 import java.io.IOException;
1112 import java.io.InputStream;
1213 import java.net.URL;
1314 import java.nio.charset.Charset;
1415 import java.util.LinkedList;
1516 import java.util.List;
17+import jp.osdn.jindolf.parser.HtmlAdapter;
18+import jp.osdn.jindolf.parser.HtmlParseException;
19+import jp.osdn.jindolf.parser.HtmlParser;
20+import jp.osdn.jindolf.parser.PageType;
21+import jp.osdn.jindolf.parser.SeqRange;
22+import jp.osdn.jindolf.parser.content.DecodedContent;
1623 import jp.sourceforge.jindolf.corelib.LandDef;
1724 import jp.sourceforge.jindolf.corelib.LandState;
1825 import jp.sourceforge.jindolf.corelib.PeriodType;
19-import jp.sourceforge.jindolf.parser.DecodeException;
20-import jp.sourceforge.jindolf.parser.DecodedContent;
21-import jp.sourceforge.jindolf.parser.HtmlAdapter;
22-import jp.sourceforge.jindolf.parser.HtmlParseException;
23-import jp.sourceforge.jindolf.parser.HtmlParser;
24-import jp.sourceforge.jindolf.parser.PageType;
25-import jp.sourceforge.jindolf.parser.SeqRange;
2626
2727 /**
2828 * 人狼HTTPサーバ内のリソース情報を展開する。
@@ -65,13 +65,13 @@
6565 * @param landDef 国指定
6666 * @param vid 村番号
6767 * @return ロード元情報一覧
68- * @throws DecodeException デコードエラー
68+ * @throws DecodeBreakException デコードエラー
6969 * @throws HtmlParseException パースエラー
7070 * @throws IOException 入力エラー
7171 */
7272 public static List<PeriodResource> loadResourceList(LandDef landDef,
7373 int vid)
74- throws DecodeException,
74+ throws DecodeBreakException,
7575 HtmlParseException,
7676 IOException {
7777 URL url = getPeriodListURL(landDef, vid);
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/JinArchiver.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/JinArchiver.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/JinArchiver.java Tue Mar 27 12:08:28 2018 +0900
@@ -7,6 +7,7 @@
77
88 package jp.sourceforge.jindolf.archiver;
99
10+import io.bitbucket.olyutorskii.jiocema.DecodeBreakException;
1011 import java.io.BufferedOutputStream;
1112 import java.io.BufferedReader;
1213 import java.io.BufferedWriter;
@@ -24,9 +25,8 @@
2425 import java.util.List;
2526 import java.util.Properties;
2627 import javax.xml.validation.Validator;
28+import jp.osdn.jindolf.parser.HtmlParseException;
2729 import jp.sourceforge.jindolf.corelib.LandDef;
28-import jp.sourceforge.jindolf.parser.DecodeException;
29-import jp.sourceforge.jindolf.parser.HtmlParseException;
3030 import org.xml.sax.SAXException;
3131
3232 /**
@@ -185,7 +185,7 @@
185185 }catch(IOException e){
186186 abortWithException(e);
187187 return;
188- }catch(DecodeException e){
188+ }catch(DecodeBreakException e){
189189 abortWithException(e);
190190 return;
191191 }catch(HtmlParseException e){
@@ -251,11 +251,11 @@
251251 * @param vid 村番号
252252 * @return 村情報
253253 * @throws IOException 入出力エラー
254- * @throws DecodeException デコードエラー
254+ * @throws DecodeBreakException デコードエラー
255255 * @throws HtmlParseException パースエラー
256256 */
257257 public static VillageData load(LandDef landDef, int vid)
258- throws IOException, DecodeException, HtmlParseException{
258+ throws IOException, DecodeBreakException, HtmlParseException{
259259 List<PeriodResource> resourceList =
260260 HttpAccess.loadResourceList(landDef, vid);
261261 VillageData villageData = new VillageData(resourceList);
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/PeriodData.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/PeriodData.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/PeriodData.java Tue Mar 27 12:08:28 2018 +0900
@@ -11,9 +11,9 @@
1111 import java.net.URI;
1212 import java.util.LinkedList;
1313 import java.util.List;
14+import jp.osdn.jindolf.parser.content.DecodedContent;
1415 import jp.sourceforge.jindolf.corelib.DisclosureType;
1516 import jp.sourceforge.jindolf.corelib.SysEventType;
16-import jp.sourceforge.jindolf.parser.DecodedContent;
1717
1818 /**
1919 * Periodモデル。
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/TopicData.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/TopicData.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/TopicData.java Tue Mar 27 12:08:28 2018 +0900
@@ -10,7 +10,7 @@
1010 import java.io.IOException;
1111 import java.util.LinkedList;
1212 import java.util.List;
13-import jp.sourceforge.jindolf.parser.DecodedContent;
13+import jp.osdn.jindolf.parser.content.DecodedContent;
1414
1515 /**
1616 * テキスト行の集合。
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/Win31j.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/Win31j.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/Win31j.java Tue Mar 27 12:08:28 2018 +0900
@@ -12,8 +12,8 @@
1212 import java.nio.charset.Charset;
1313 import java.nio.charset.CharsetDecoder;
1414 import java.nio.charset.CodingErrorAction;
15-import jp.sourceforge.jindolf.parser.DecodeErrorInfo;
16-import jp.sourceforge.jindolf.parser.DecodedContent;
15+import jp.osdn.jindolf.parser.content.DecodeErrorInfo;
16+import jp.osdn.jindolf.parser.content.DecodedContent;
1717
1818 /**
1919 * windows-31jエンコーディング(機種依存文字)に関する諸々。
diff -r 6b2ccee25c8a -r d5eb0062e01c src/main/java/jp/sourceforge/jindolf/archiver/XmlOut.java
--- a/src/main/java/jp/sourceforge/jindolf/archiver/XmlOut.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/main/java/jp/sourceforge/jindolf/archiver/XmlOut.java Tue Mar 27 12:08:28 2018 +0900
@@ -17,8 +17,8 @@
1717 import java.util.GregorianCalendar;
1818 import java.util.List;
1919 import java.util.TimeZone;
20-import jp.sourceforge.jindolf.parser.DecodeErrorInfo;
21-import jp.sourceforge.jindolf.parser.DecodedContent;
20+import jp.osdn.jindolf.parser.content.DecodeErrorInfo;
21+import jp.osdn.jindolf.parser.content.DecodedContent;
2222
2323
2424 /**
diff -r 6b2ccee25c8a -r d5eb0062e01c src/test/java/jp/sourceforge/jindolf/archiver/XmlOutTest.java
--- a/src/test/java/jp/sourceforge/jindolf/archiver/XmlOutTest.java Tue Apr 11 00:10:16 2017 +0900
+++ b/src/test/java/jp/sourceforge/jindolf/archiver/XmlOutTest.java Tue Mar 27 12:08:28 2018 +0900
@@ -5,8 +5,8 @@
55
66 import java.io.StringWriter;
77 import java.io.Writer;
8-import jp.sourceforge.jindolf.parser.DecodeErrorInfo;
9-import jp.sourceforge.jindolf.parser.DecodedContent;
8+import jp.osdn.jindolf.parser.content.DecodeErrorInfo;
9+import jp.osdn.jindolf.parser.content.DecodedContent;
1010 import org.junit.After;
1111 import org.junit.AfterClass;
1212 import org.junit.Before;
Show on old repository browser