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

Refactor: Clean up Int_ classes

This commit is contained in:
gnosygnu
2017-10-22 08:07:00 -04:00
parent d270cce881
commit 3157551d1d
154 changed files with 609 additions and 577 deletions

View File

@@ -75,7 +75,7 @@ class Dpl_itm {
}
}
else { // known key; set pos to val_bgn
fld_bgn = pos + Int_.Const_dlm_len;
fld_bgn = pos + Byte_ascii.Len_1;
}
ws_bgn_chk = true; ws_bgn_idx = ws_end_idx = -1;
break;
@@ -87,7 +87,7 @@ class Dpl_itm {
byte[] val = Bry_.Mid(src, fld_bgn, fld_end);
Parse_cmd(wiki, key_id, val);
}
fld_bgn = pos + Int_.Const_dlm_len;
fld_bgn = pos + Byte_ascii.Len_1;
ws_bgn_chk = true; ws_bgn_idx = ws_end_idx = -1;
break;
}

View File

@@ -15,8 +15,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_regy_tkn {
private int[] ary = Int_.Ary_empty; private int ary_max; private int itms_len;
private final Texvc_root root; private Texvc_tkn_mkr tkn_mkr;
private int[] ary = Int_ary_.Empty; private int ary_max; private int itms_len;
private final Texvc_root root; private Texvc_tkn_mkr tkn_mkr;
public int Len() {return itms_len;}
public Texvc_regy_tkn(Texvc_root root) {
this.root = root;

View File

@@ -26,13 +26,13 @@ public class Pgbnr_xtn_mgr extends Xox_mgr_base implements Bfr_arg {
@Override public void Xtn_init_by_wiki(Xowe_wiki wiki) {
// load config; TODO_OLD: load by file
boolean enabled = false, enable_heading_override = true, enable_default_banner = false;
int[] ns_ary = Int_.Ary(Xow_ns_.Tid__main, Xow_ns_.Tid__user);
int[] ns_ary = Int_ary_.New(Xow_ns_.Tid__main, Xow_ns_.Tid__user);
int[] standard_sizes = new int[] {640, 1280, 2560};
int dflt_img_wdata_prop = 948; byte[] dflt_img_title = Bry_.new_a7("Pagebanner_default.jpg"); // www.wikidata.org/wiki/Property:P948
switch (wiki.Domain_tid()) {
case Xow_domain_tid_.Tid__home:
enabled = true;
ns_ary = Int_.Ary(Xow_ns_.Tid__main);
ns_ary = Int_ary_.New(Xow_ns_.Tid__main);
break;
case Xow_domain_tid_.Tid__wikivoyage:
switch (wiki.Lang().Lang_id()) {
@@ -42,11 +42,11 @@ public class Pgbnr_xtn_mgr extends Xox_mgr_base implements Bfr_arg {
enabled = true;
break;
case Xol_lang_stub_.Id_ru:
ns_ary = Int_.Ary(0, 1, 10, 11, 12, 13, 14, 15, 2, 2300, 2301, 2302, 2303, 2600, 3, 4, 5, 6, 7, 8, 828, 829, 9);
ns_ary = Int_ary_.New(0, 1, 10, 11, 12, 13, 14, 15, 2, 2300, 2301, 2302, 2303, 2600, 3, 4, 5, 6, 7, 8, 828, 829, 9);
enabled = true;
break;
case Xol_lang_stub_.Id_uk:
ns_ary = Int_.Ary(Xow_ns_.Tid__main, Xow_ns_.Tid__user, Xow_ns_.Tid__project);
ns_ary = Int_ary_.New(Xow_ns_.Tid__main, Xow_ns_.Tid__user, Xow_ns_.Tid__project);
enabled = true;
break;
}
@@ -55,7 +55,7 @@ public class Pgbnr_xtn_mgr extends Xox_mgr_base implements Bfr_arg {
switch (wiki.Lang().Lang_id()) {
case Xol_lang_stub_.Id_ca:
// enabled = enable_default_banner = true;
ns_ary = Int_.Ary(102, Xow_ns_.Tid__user);
ns_ary = Int_ary_.New(102, Xow_ns_.Tid__user);
break;
case Xol_lang_stub_.Id_en:
// enabled = enable_default_banner = true;

View File

@@ -216,7 +216,7 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
}
private List_adp Get_ttls_from_xnde_args__include(List_adp list) {
if (Bry_.Len_eq_0(include)) return list; // include is blank; exit early;
int[] include_pages = Int_ary_.Parse_list_or(include, null);
int[] include_pages = Int_ary_.Parse_or(include, null);
if (include_pages == null) return list; // ignore invalid include; DATE:2014-02-22
int include_pages_len = include_pages.length;
for (int i = 0; i < include_pages_len; i++)
@@ -272,7 +272,7 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
} private static Xowd_page_itm tmp_page = new Xowd_page_itm(); // tmp_page passed to Load_ttls_for_all_pages; values are never looked at, so use static instance
private List_adp Get_ttls_from_xnde_args__exclude(List_adp list) {
if (Bry_.Len_eq_0(exclude)) return list; // exclude is blank; exit early;
int[] exclude_pages = Int_ary_.Parse_list_or(exclude, null);
int[] exclude_pages = Int_ary_.Parse_or(exclude, null);
if (exclude_pages == null) return list; // ignore invalid exclude; DATE:2014-02-22
Hash_adp exclude_pages_hash = Hash_adp_.New();
int exclude_pages_len = exclude_pages.length;

View File

@@ -210,7 +210,7 @@ class Scrib_lua_rsp_bldr {
}
private void Bld_obj(Bry_bfr bfr, Object v) {
Class<?> v_type = v.getClass();
if (Object_.Eq(v_type, Int_.Cls_ref_type)) Bld_int(bfr, Int_.cast(v));
if (Object_.Eq(v_type, Int_.Cls_ref_type)) Bld_int(bfr, Int_.Cast(v));
else if (Object_.Eq(v_type, String_.Cls_ref_type)) Bld_str(bfr, String_.cast(v));
else if (Object_.Eq(v_type, Bool_.Cls_ref_type)) Bld_bool(bfr, Bool_.Cast(v));
else if (Object_.Eq(v_type, Double_.Cls_ref_type)) Bld_double(bfr, Double_.cast(v));

View File

@@ -51,7 +51,7 @@ class Luaj_value_ {
// val is function
if (itm_val.type() == LuaValue.TFUNCTION) {
String func_key = itm_key.tojstring();
int func_id = Int_.cast(itm_val_obj);
int func_id = Int_.Cast(itm_val_obj);
Scrib_lua_proc lua_func = new Scrib_lua_proc(func_key, func_id);
if (itm_key.type() == LuaValue.TSTRING) // most functions are named
kv = Keyval_.new_(func_key, lua_func);
@@ -140,7 +140,7 @@ class Luaj_value_ {
LuaValue itm_val = Obj_to_lua_val(server, itm.Val());
switch (itm.Key_tid()) {
case Type_ids_.Id__int:
rv.set(Int_.cast(itm.Key_as_obj()), itm_val);
rv.set(Int_.Cast(itm.Key_as_obj()), itm_val);
break;
case Type_ids_.Id__str:
case Type_ids_.Id__obj:

View File

@@ -30,7 +30,7 @@ public class Process_engine implements Scrib_engine {
public Scrib_server Server() {return server;} public void Server_(Scrib_server v) {server = v;} Scrib_server server;
public Scrib_lua_proc LoadString(String name, String text) {
Keyval[] rslt = this.Dispatch("op", "loadString", "text", text, "chunkName", name);
return new Scrib_lua_proc(name, Int_.cast(rslt[0].Val()));
return new Scrib_lua_proc(name, Int_.Cast(rslt[0].Val()));
}
public Keyval[] CallFunction(int id, Keyval[] args) {
return this.Dispatch("op", "call", "id", id, "nargs", args.length, "args", args);

View File

@@ -81,7 +81,7 @@ public class Process_send_wtr {
if (o == null) {bfr.Add(CONST_nil); return true;}
Class<?> c = Type_.Type_by_obj(o);
if (Object_.Eq(c, Bool_.Cls_ref_type)) Encode_bool(bfr, Bool_.Cast(o));
else if (Object_.Eq(c, Int_.Cls_ref_type)) Encode_int(bfr, Int_.cast(o));
else if (Object_.Eq(c, Int_.Cls_ref_type)) Encode_int(bfr, Int_.Cast(o));
else if (Object_.Eq(c, Long_.Cls_ref_type)) bfr.Add_long_variable(Long_.cast(o));
else if (Object_.Eq(c, Double_.Cls_ref_type)) {if (!Encode_double(bfr, Double_.cast(o))) return false;}
else if (Object_.Eq(c, String.class)) {if (!Encode_str(bfr, (String)o)) return false;}

View File

@@ -110,7 +110,7 @@ public class Scrib_lib_mw implements Scrib_lib {
Xot_invk frame = Scrib_frame_.Get_frame(core, frame_id);
int frame_arg_adj = Scrib_frame_.Get_arg_adj(frame.Frame_tid());
String idx_str = args.Pull_str(1);
int idx_int = Int_.parse_or(idx_str, Int_.Min_value); // NOTE: should not receive int value < -1; idx >= 0
int idx_int = Int_.Parse_or(idx_str, Int_.Min_value); // NOTE: should not receive int value < -1; idx >= 0
Bry_bfr tmp_bfr = Bry_bfr_.New(); // NOTE: do not make modular level variable, else random failures; DATE:2013-10-14
if (idx_int != Int_.Min_value) { // idx is integer
Arg_nde_tkn nde = Get_arg(frame, idx_int, frame_arg_adj);
@@ -389,12 +389,12 @@ class Scrib_lib_mw_callParserFunction_sorter implements gplx.core.lists.Comparer
Keyval rhs = (Keyval)rhsObj;
Object lhs_key = lhs.Key_as_obj();
Object rhs_key = rhs.Key_as_obj();
boolean lhs_is_int = Int_.TypeMatch(lhs_key.getClass());
boolean rhs_is_int = Int_.TypeMatch(rhs_key.getClass());
boolean lhs_is_int = Type_.Eq(lhs_key.getClass(), Int_.Cls_ref_type);
boolean rhs_is_int = Type_.Eq(rhs_key.getClass(), Int_.Cls_ref_type);
if (lhs_is_int != rhs_is_int) // different types (int vs String or String vs int)
return lhs_is_int ? CompareAble_.Less : CompareAble_.More; // sort ints before strings
if (lhs_is_int) // both are ints
return Int_.Compare(Int_.cast(lhs_key), Int_.cast(rhs_key));
return Int_.Compare(Int_.Cast(lhs_key), Int_.Cast(rhs_key));
else // both are strings
return String_.Compare(String_.cast(lhs_key), String_.cast(rhs_key));
}

View File

@@ -35,7 +35,7 @@ class Scrib_lib_text__json_util {
}
if (is_sequence) {
if (kv.Key_tid() == Type_ids_.Id__int) {
int kv_key_as_int = Int_.cast(kv.Key_as_obj());
int kv_key_as_int = Int_.Cast(kv.Key_as_obj());
is_sequence = next++ == kv_key_as_int;
}
else {
@@ -93,7 +93,7 @@ class Scrib_lib_text__json_util {
Json_kv json_kv = root.Get_at_as_kv(i);
String kv_str = json_kv.Key_as_str();
Object kv_val = Decode_obj(json_kv.Val());
int kv_int = Int_.parse_or(kv_str, Int_.Min_value);
int kv_int = Int_.Parse_or(kv_str, Int_.Min_value);
decode_rslt_as_nde[i] = kv_int == Int_.Min_value ? Keyval_.new_(kv_str, kv_val) : Keyval_.int_(kv_int, kv_val); // use int_key if applicable; PAGE:it.s:Il_Re_Cervo; DATE:2015-12-06
}
return Bool_.Y_byte;
@@ -132,7 +132,7 @@ class Scrib_lib_text__json_util {
for (int i = 0; i < len; ++i) {
Json_kv itm = nde.Get_at_as_kv(i);
String kv_str = itm.Key_as_str();
int kv_int = Int_.parse_or(kv_str, Int_.Min_value);
int kv_int = Int_.Parse_or(kv_str, Int_.Min_value);
Object kv_val = Decode_obj(itm.Val());
rv[i] = kv_int == Int_.Min_value ? Keyval_.new_(kv_str, kv_val) : Keyval_.int_(kv_int, kv_val); // use int_key if applicable; PAGE:it.s:Il_Re_Cervo; DATE:2015-12-06
}
@@ -172,7 +172,7 @@ class Scrib_lib_text__json_util {
Encode_ary(kv_val);
wtr.Ary_end();
}
else if (Type_.Eq(type, Int_.Cls_ref_type)) wtr.Kv_int(kv.Key(), Int_.cast(kv_val));
else if (Type_.Eq(type, Int_.Cls_ref_type)) wtr.Kv_int(kv.Key(), Int_.Cast(kv_val));
else if (Type_.Eq(type, Long_.Cls_ref_type)) wtr.Kv_long(kv.Key(), Long_.cast(kv_val));
else if (Type_.Eq(type, Float_.Cls_ref_type)) wtr.Kv_float(kv.Key(), Float_.cast(kv_val));
else if (Type_.Eq(type, Double_.Cls_ref_type)) wtr.Kv_double(kv.Key(), Double_.cast(kv_val));
@@ -203,8 +203,8 @@ class KeyVal__sorter__key_is_numeric implements gplx.core.lists.ComparerAble {
public int compare(Object lhsObj, Object rhsObj) {
Keyval lhs_itm = (Keyval)lhsObj;
Keyval rhs_itm = (Keyval)rhsObj;
int lhs_int = Int_.parse_or(lhs_itm.Key(), Int_.Min_value);
int rhs_int = Int_.parse_or(rhs_itm.Key(), Int_.Min_value);
int lhs_int = Int_.Parse_or(lhs_itm.Key(), Int_.Min_value);
int rhs_int = Int_.Parse_or(rhs_itm.Key(), Int_.Min_value);
return CompareAble_.Compare(lhs_int, rhs_int);
}
public static final KeyVal__sorter__key_is_numeric Instance = new KeyVal__sorter__key_is_numeric(); KeyVal__sorter__key_is_numeric() {}

View File

@@ -108,7 +108,7 @@ public class Scrib_lib_title implements Scrib_lib {
if (Type_.Eq_by_obj(ns_obj, String.class))
return Bry_.new_u8(String_.cast(ns_obj));
else {
int ns_id = Int_.cast(ns_obj);
int ns_id = Int_.Cast(ns_obj);
Xow_ns ns = wiki.Ns_mgr().Ids_get_or_null(ns_id);
if (ns != null)
return ns.Name_db();

View File

@@ -219,7 +219,7 @@ class Scrib_lib_ustring_gsub_mgr {
}
else if (Object_.Eq(repl_type, Int_.Cls_ref_type)) { // NOTE:@replace sometimes int; PAGE:en.d:λύω; DATE:2014-09-02
tmp_repl_tid = Repl_tid_string;
tmp_repl_bry = Bry_.new_u8(Int_.To_str(Int_.cast(repl_obj)));
tmp_repl_bry = Bry_.new_u8(Int_.To_str(Int_.Cast(repl_obj)));
}
else if (Object_.Eq(repl_type, Keyval[].class)) {
tmp_repl_tid = Repl_tid_table;

View File

@@ -154,7 +154,7 @@ public class Scrib_regx_converter {
}
}
}
if (grps_open.Count() > 0) throw Err_.new_wo_type("Unclosed capture beginning at pattern character " + Int_.cast(grps_open.Get_at(0)));
if (grps_open.Count() > 0) throw Err_.new_wo_type("Unclosed capture beginning at pattern character " + Int_.Cast(grps_open.Get_at(0)));
// bfr.Add(Bry_regx_end); // NOTE: do not add PHP /us at end; u=PCRE_UTF8 which is not needed for Java; s=PCRE_DOTALL which will be specified elsewhere
regx = bfr.To_str_and_clear();
return regx;
@@ -227,7 +227,7 @@ public class Scrib_regx_converter {
int len = list.Count();
for (int i = 0; i < len; i++) {
Object o = list.Get_at(i);
if (Int_.cast(o) == v) return true;
if (Int_.Cast(o) == v) return true;
}
return false;
}

View File

@@ -29,7 +29,7 @@ public class Scrib_proc_args {
int v_max = -1;
for (int i = 0; i < v_len; ++i) {
Keyval kv = v[i];
int idx = Int_.cast(kv.Key_as_obj());
int idx = Int_.Cast(kv.Key_as_obj());
if (v_max < idx) v_max = idx;
}
this.ary_len = v_max;
@@ -42,7 +42,7 @@ public class Scrib_proc_args {
ary = new Keyval[ary_len];
for (int i = 0; i < v_len; i++) {
Keyval kv = v[i];
int idx = Int_.cast(kv.Key_as_obj());
int idx = Int_.Cast(kv.Key_as_obj());
ary[idx - List_adp_.Base1] = kv;
}
}
@@ -54,7 +54,7 @@ public class Scrib_proc_args {
public String Pull_str(int i) {return String_.cast(Get_or_fail(i));}
public byte[] Pull_bry(int i) {return Bry_.new_u8(String_.cast(Get_or_fail(i)));}
public int Pull_int(int i) {
try {return Int_.coerce_(Get_or_fail(i));} // coerce to handle "1" and 1; will still fail if "abc" is passed
try {return Int_.Coerce(Get_or_fail(i));} // coerce to handle "1" and 1; will still fail if "abc" is passed
catch (Exception e) {
Err_.Noop(e);
throw Err_.new_wo_type("bad argument; int expected", "idx", i, "len", ary_len);
@@ -63,7 +63,7 @@ public class Scrib_proc_args {
public long Pull_long(int i) {return (long)Pull_double(i);}
public double Pull_double(int i) {
Object rv = Get_or_fail(i);
try {return Int_.coerce_(rv);} // coerce to handle "1" and 1; will still fail if "abc" is passed
try {return Int_.Coerce(rv);} // coerce to handle "1" and 1; will still fail if "abc" is passed
catch (Exception e) {
Err_.Noop(e);
try {return Double_.coerce_(rv);} // coerce to handle "1" and 1; will still fail if "abc" is passed
@@ -92,7 +92,7 @@ public class Scrib_proc_args {
Object key_obj = kv.Key_as_obj();
if (key_obj.getClass() == Int_.Cls_ref_type) { // key is int; cast it
int expd_key = i + List_adp_.Base1; // EX: i=1; expd_key=2
int actl_key = Int_.cast(kv.Key_as_obj()); // EX: i=1; actl_key=3
int actl_key = Int_.Cast(kv.Key_as_obj()); // EX: i=1; actl_key=3
if (actl_key != expd_key) { // mismatch; gaps exist; EX:[1:a,3:c]
// 1st mismatch; create list, and add everything before itm in array to list;
if (list == null) {
@@ -122,7 +122,7 @@ public class Scrib_proc_args {
public Object Cast_obj_or_null(int i) {return Get_or_null(i);}
public boolean Cast_bool_or_y(int i) {Object rv = Get_or_null(i); return rv == null ? Bool_.Y : Bool_.Cast(rv);}
public boolean Cast_bool_or_n(int i) {Object rv = Get_or_null(i); return rv == null ? Bool_.N : Bool_.Cast(rv);}
public int Cast_int_or(int i, int or) {Object rv = Get_or_null(i); return rv == null ? or : Int_.coerce_(rv);} // coerce to handle "1" and 1;
public int Cast_int_or(int i, int or) {Object rv = Get_or_null(i); return rv == null ? or : Int_.Coerce(rv);} // coerce to handle "1" and 1;
public Keyval[] Cast_kv_ary_or_null(int i) {Object rv = Get_or_null(i); return rv == null ? null : (Keyval[])rv;}
public byte[][] Cast_params_as_bry_ary_or_rest_of_ary(int params_idx) { // PAGE:ru.w:Ленин,_Владимир_Ильич; DATE:2014-07-01 MW:LanguageLibrary.php|ConvertPlural: if (is_array($args[0])) $args = $args[0]; $forms = array_values(array_map('strval', $args));
if (params_idx < 0 || params_idx >= ary_len) return Bry_.Ary_empty;

View File

@@ -25,12 +25,12 @@ public class Xop_tvar_lxr implements Xop_lxr {
public int Make_tkn(Xop_ctx ctx, Xop_tkn_mkr tkn_mkr, Xop_root_tkn root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int rhs_end = Bry_find_.Find_fwd(src, Byte_ascii.Gt, cur_pos); if (rhs_end == Bry_find_.Not_found) return ctx.Lxr_make_txt_(cur_pos);
int lhs_bgn = Bry_find_.Find_fwd(src, Close_nde , rhs_end); if (lhs_bgn == Bry_find_.Not_found) return ctx.Lxr_make_txt_(cur_pos);
byte[] body = Bry_.Mid(src, rhs_end + Int_.Const_position_after_char, lhs_bgn);
byte[] body = Bry_.Mid(src, rhs_end + Int_.Offset_1, lhs_bgn);
Xop_ctx sub_ctx = Xop_ctx.New__sub__reuse_page(ctx);
Xop_root_tkn sub_root = tkn_mkr.Root(body);
body = ctx.Wiki().Parser_mgr().Main().Expand_tmpl(sub_root, sub_ctx, tkn_mkr, body); // NOTE: must parse inner text for templates; EX:<tvar|a>{{B}}</>; PAGE:mw:Download; DATE:2014-04-27
int end_pos = lhs_bgn + Close_nde.length;
ctx.Subs_add(root, tkn_mkr.Tvar(bgn_pos, end_pos, cur_pos, rhs_end, rhs_end + Int_.Const_position_after_char, lhs_bgn, body));
ctx.Subs_add(root, tkn_mkr.Tvar(bgn_pos, end_pos, cur_pos, rhs_end, rhs_end + Int_.Offset_1, lhs_bgn, body));
return end_pos;
}
public static final Xop_tvar_lxr Instance = new Xop_tvar_lxr(); Xop_tvar_lxr() {}

View File

@@ -113,9 +113,9 @@ public class Wdata_prop_val_visitor_ {
byte val_tid = Wbase_claim_time_.Reg.Get_tid_or_max_and_log(page_url, kv.Key()); if (val_tid == Byte_.Max_value_127) continue;
switch (val_tid) {
case Wbase_claim_time_.Tid__time: time = To_bry_by_str(kv.Val()); break;
case Wbase_claim_time_.Tid__before: before = Int_.cast(kv.Val()); break;
case Wbase_claim_time_.Tid__after: after = Int_.cast(kv.Val()); break;
case Wbase_claim_time_.Tid__precision: precision = Int_.cast(kv.Val()); break;
case Wbase_claim_time_.Tid__before: before = Int_.Cast(kv.Val()); break;
case Wbase_claim_time_.Tid__after: after = Int_.Cast(kv.Val()); break;
case Wbase_claim_time_.Tid__precision: precision = Int_.Cast(kv.Val()); break;
case Wbase_claim_time_.Tid__calendarmodel: calendar = To_bry_by_str(kv.Val()); break;
case Wbase_claim_time_.Tid__timezone: break;
}

View File

@@ -23,7 +23,7 @@ public class Wbase_date_tst {
fxt.Test_parse("-98765432109-02-03T04:05:06Z", -98765432109L, 2, 3, 4, 5, 6);
}
@Test public void Julian() {
fxt.Test_julian(Int_.Ary(1600, 1, 2), Int_.Ary(1600, 1, 18));
fxt.Test_julian(Int_ary_.New(1600, 1, 2), Int_ary_.New(1600, 1, 18));
}
@Test public void Xto_str() {
String date = "+00000002001-02-03T04:05:06Z";

View File

@@ -28,7 +28,7 @@ public class Xob_wdata_db_cmd extends Xob_dump_mgr_base implements Xob_cmd {
public Xob_wdata_db_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);}
@Override public String Cmd_key() {return Xob_cmd_keys.Key_wbase_db;}
@Override public byte Init_redirect() {return Bool_.N_byte;} // json will never be found in a redirect
@Override public int[] Init_ns_ary() {return Int_.Ary(Xow_ns_.Tid__main, Wdata_wiki_mgr.Ns_property);}
@Override public int[] Init_ns_ary() {return Int_ary_.New(Xow_ns_.Tid__main, Wdata_wiki_mgr.Ns_property);}
@Override protected void Init_reset(Db_conn conn) {
Db_cfg_tbl cfg_tbl = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(conn);
cfg_tbl.Delete_all();

View File

@@ -163,7 +163,7 @@ public class Wdata_doc_parser_v1 implements Wdata_doc_parser {
rv.Wguid_(kv.Data_bry());
break;
case Prop_tid_rank:
rv.Rank_tid_((byte)Int_.cast(((Json_itm_int)kv.Val()).Data_as_int()));
rv.Rank_tid_((byte)Int_.Cast(((Json_itm_int)kv.Val()).Data_as_int()));
break;
case Prop_tid_q:
break;

View File

@@ -239,7 +239,7 @@ public class Wdata_doc_parser_v2__basic__tst {
, " }"
, " ]"
, "}"
), Int_.Ary(2, 3), fxt.Make_claim_entity_qid(2, 21), fxt.Make_claim_entity_qid(3, 31))
), Int_ary_.New(2, 3), fxt.Make_claim_entity_qid(2, 21), fxt.Make_claim_entity_qid(3, 31))
;
}
@Test public void References_empty() { // PURPOSE:sometimes references can have 0 snaks; return back an empty Wbase_claim_grp_list, not null; PAGE:Птичкин,_Евгений_Николаевич; DATE:2015-02-16
@@ -252,7 +252,7 @@ public class Wdata_doc_parser_v2__basic__tst {
, " }"
, " ]"
, "}"
), Int_.Ary_empty)
), Int_ary_.Empty)
;
}
}