1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.3.4.1'

This commit is contained in:
gnosygnu
2016-03-27 23:44:59 -04:00
parent de67253a9c
commit baaef32df2
903 changed files with 13339 additions and 8695 deletions

View File

@@ -23,8 +23,8 @@ import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.bldrs.*;
public class Xow_xwiki_itm_parser extends Dsv_wkr_base {
private Xow_domain_itm owner_domain_itm;
private int cur_tid = -1; private byte[] cur_fld1, cur_fld2, cur_fld3;
private final Gfo_url_parser url_parser = new Gfo_url_parser(); private final Gfo_url url = new Gfo_url();
public Ordered_hash Xwiki_list() {return xwiki_list;} private final Ordered_hash xwiki_list = Ordered_hash_.New();
private final Gfo_url_parser url_parser = new Gfo_url_parser(); private final Gfo_url url = new Gfo_url();
public Ordered_hash Xwiki_list() {return xwiki_list;} private final Ordered_hash xwiki_list = Ordered_hash_.New();
@Override public Dsv_fld_parser[] Fld_parsers() {return new Dsv_fld_parser[] {Dsv_fld_parser_.Bry_parser, Dsv_fld_parser_.Bry_parser, Dsv_fld_parser_.Bry_parser, Dsv_fld_parser_.Bry_parser};}
@Override public boolean Write_bry(Dsv_tbl_parser parser, int fld_idx, byte[] src, int bgn, int end) {
switch (fld_idx) {
@@ -52,10 +52,10 @@ public class Xow_xwiki_itm_parser extends Dsv_wkr_base {
domain_bry = cur_fld2;
break;
case Tid__wm_peer: // EX: "2|wikt|wikipedia"
domain_bry = Bry_.Add(owner_domain_itm.Lang_actl_key(), Byte_ascii.Dot_bry, cur_fld2, gplx.xowa.apps.urls.Xoa_url_parser.Bry_dot_org);
domain_bry = Bry_.Add(owner_domain_itm.Lang_actl_key(), Byte_ascii.Dot_bry, cur_fld2, gplx.xowa.apps.urls.Xow_url_parser.Bry_dot_org);
break;
case Tid__wm_lang: // EX: "3|en;english|en|English"
domain_bry = Bry_.Add(cur_fld2, Byte_ascii.Dot_bry, owner_domain_itm.Domain_type().Key_bry(), gplx.xowa.apps.urls.Xoa_url_parser.Bry_dot_org);
domain_bry = Bry_.Add(cur_fld2, Byte_ascii.Dot_bry, owner_domain_itm.Domain_type().Key_bry(), gplx.xowa.apps.urls.Xow_url_parser.Bry_dot_org);
break;
default: throw Err_.new_unhandled(cur_tid);
}

View File

@@ -43,7 +43,7 @@ public class Xow_xwiki_mgr_tst {
, "https://en.wiktionary.org/wiki/~{0}")
, fxt.xwiki_("s", "en.wikisource.org", "https://en.wikisource.org/wiki/~{0}"));
}
@Test public void Add_bulk_peers_skip_self() { // PURPOSE: skip "wikipedia" as alias since "Wikipedia" is namespace; needed for titles of "Wikipedia:Main page" (which would otherwise try to go to page "Main Page" in the main names of xwiki "Wikipedia"
@Test public void Add_bulk_peers_skip_self() { // PURPOSE: skip "wikipedia" as alias since "Wikipedia" is Srch_rslt_cbk; needed for titles of "Wikipedia:Main page" (which would otherwise try to go to page "Main Page" in the main names of xwiki "Wikipedia"
fxt.Init_peers();
fxt.Test_add_bulk_peers
( fxt.xwiki_null_("wikipedia")
@@ -66,8 +66,8 @@ class Xow_xwiki_mgr_fxt {
Xow_xwiki_mgr xwiki_mgr; Xoa_lang_mgr lang_mgr; String_bldr sb = String_bldr_.new_(); Xoae_app app; Xowe_wiki wiki;
public void Clear() {
if (xwiki_mgr == null) {
app = Xoa_app_fxt.app_();
wiki = Xoa_app_fxt.wiki_tst_(app);
app = Xoa_app_fxt.Make__app__edit();
wiki = Xoa_app_fxt.Make__wiki__edit(app);
xwiki_mgr = wiki.Xwiki_mgr();
lang_mgr = app.Lang_mgr();
}