@Override
 public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
   if (ctx.Match(k, Invk_tier_id_bmk_)) tier_id_bmk = m.ReadInt("v");
   else if (ctx.Match(k, Invk_page_id_bmk_)) page_id_bmk = m.ReadInt("v");
   else if (ctx.Match(k, Invk_lnki_id_bmk_)) lnki_id_bmk = m.ReadInt("v");
   else if (ctx.Match(k, Invk_select_interval_)) select_interval = m.ReadInt("v");
   else if (ctx.Match(k, Invk_commit_interval_)) commit_interval = m.ReadInt("v");
   else if (ctx.Match(k, Invk_progress_interval_)) progress_interval = m.ReadInt("v");
   else if (ctx.Match(k, Invk_delete_interval_)) delete_interval = m.ReadInt("v");
   else if (ctx.Match(k, Invk_exec_count_max_)) exec_count_max = m.ReadInt("v");
   else if (ctx.Match(k, Invk_exec_fail_max_)) exec_fail_max = m.ReadInt("v");
   else if (ctx.Match(k, Invk_exit_after_commit_)) exit_after_commit = m.ReadYn("v");
   else if (ctx.Match(k, Invk_exit_now_)) exit_now = m.ReadYn("v");
   else if (ctx.Match(k, Invk_resume_enabled_)) resume_enabled = m.ReadYn("v");
   else if (ctx.Match(k, Invk_ns_ids_)) ns_ids = Int_.Ary_parse(m.ReadStr("v"), "|");
   else if (ctx.Match(k, Invk_src_bin_mgr__fsdb_version_))
     src_bin_mgr__fsdb_version = m.ReadStr("v");
   else if (ctx.Match(k, Invk_src_bin_mgr__fsdb_skip_wkrs_))
     src_bin_mgr__fsdb_skip_wkrs = m.ReadStrAry("v", "|");
   else if (ctx.Match(k, Invk_src_bin_mgr__wmf_enabled_)) src_bin_mgr__wmf_enabled = m.ReadYn("v");
   else if (ctx.Match(k, Invk_src_bin_mgr__cache_enabled_))
     src_bin_mgr__cache_enabled = m.ReadYn("v");
   else if (ctx.Match(k, Invk_trg_bin_mgr__fsdb_version_))
     trg_bin_mgr__fsdb_version = m.ReadStr("v");
   else if (ctx.Match(k, Invk_poll_mgr)) return poll_mgr;
   else if (ctx.Match(k, Invk_download_keep_tier_ids))
     download_keep_tier_ids = Int_.Ary_parse(m.ReadStr("v"), "|");
   else if (ctx.Match(k, Invk_download_size_max))
     download_size_max = Io_size_.To_long_by_msg_mb(m, download_size_max);
   else return Gfo_invk_.Rv_unhandled;
   return this;
 }
Exemplo n.º 2
0
 private static void New_subs(Io_url owner_dir, List_adp list, IoItmList subs, byte[] dir_cmd) {
   subs.Sort();
   int len = subs.Len();
   int list_total = list.Len();
   byte[] owner_dir_bry = owner_dir.RawBry();
   for (int i = 0; i < len; ++i) {
     IoItm_base src = (IoItm_base) subs.Get_at(i);
     Xow_import_doc trg = null;
     if (src.Type_dir()) {
       byte[] trg_url = src.Url().RawBry();
       trg =
           new Xow_import_doc(
               Bool_.Y,
               Bool_.N,
               list_total + i,
               owner_dir_bry,
               trg_url,
               Bry_.new_u8(src.Url().NameAndExt_noDirSpr()),
               Bry_.Empty,
               Bry_.Empty,
               dir_cmd,
               Ary_empty);
     } else {
       IoItmFil src_as_fil = (IoItmFil) src;
       String size_str = Io_size_.To_str(src_as_fil.Size(), "#,###");
       boolean is_xowa_core =
           gplx.xowa.wikis.data.Xow_db_file__core_.Is_core_fil_name(
               owner_dir.NameOnly(), src.Url().NameAndExt());
       trg =
           new Xow_import_doc(
               Bool_.N,
               is_xowa_core,
               list_total + i,
               owner_dir_bry,
               src.Url().RawBry(),
               Bry_.new_u8(src.Name()),
               Bry_.new_u8(src_as_fil.ModifiedTime().XtoStr_fmt("yyyy-MM-dd")),
               Bry_.new_u8(size_str),
               dir_cmd,
               Ary_empty);
     }
     list.Add(trg);
   }
 }