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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user