mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -21,7 +21,7 @@ import gplx.core.ios.*;
|
||||
import gplx.dbs.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.fsdb.*; import gplx.fsdb.meta.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.gui.*;
|
||||
public class Xof_fsdb_mgr__sql implements Xof_fsdb_mgr, GfoInvkAble {
|
||||
public class Xof_fsdb_mgr__sql implements Xof_fsdb_mgr, Gfo_invk {
|
||||
private boolean init = false; private boolean fsdb_enabled = false;
|
||||
private Xow_repo_mgr repo_mgr; private Xof_url_bldr url_bldr; private final Xof_img_size img_size = new Xof_img_size();
|
||||
public Xof_bin_mgr Bin_mgr() {return bin_mgr;} private Xof_bin_mgr bin_mgr;
|
||||
@@ -64,6 +64,6 @@ public class Xof_fsdb_mgr__sql implements Xof_fsdb_mgr, GfoInvkAble {
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_mnt_mgr)) return mnt_mgr;
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
} private static final String Invk_mnt_mgr = "mnt_mgr";
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import
|
||||
import gplx.core.ios.*; import gplx.core.brys.fmtrs.*; import gplx.core.envs.*;
|
||||
import gplx.fsdb.*; import gplx.fsdb.data.*; import gplx.fsdb.meta.*;
|
||||
import gplx.xowa.files.gui.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.caches.*;
|
||||
public class Fs_root_fsdb_mgr implements Xof_fsdb_mgr, GfoInvkAble { // read images from file-system dir
|
||||
public class Fs_root_fsdb_mgr implements Xof_fsdb_mgr, Gfo_invk { // read images from file-system dir
|
||||
private Xowe_wiki wiki; private Fs_root_wkr_fsdb fsdb_wkr;
|
||||
public Fs_root_fsdb_mgr(Xowe_wiki wiki) {this.Init_by_wiki(wiki); fsdb_wkr = new Fs_root_wkr_fsdb(wiki);}
|
||||
public void Init_by_wiki(Xow_wiki wiki) {this.wiki = (Xowe_wiki)wiki;}
|
||||
@@ -44,7 +44,7 @@ public class Fs_root_fsdb_mgr implements Xof_fsdb_mgr, GfoInvkAble { // read ima
|
||||
if (ctx.Match(k, Invk_root_dir_)) fsdb_wkr.Root_dir_(Xto_url(m.ReadBry("v")));
|
||||
else if (ctx.Match(k, Invk_orig_dir_)) fsdb_wkr.Orig_dir_(Xto_url(m.ReadBry("v")));
|
||||
else if (ctx.Match(k, Invk_thumb_dir_)) fsdb_wkr.Thumb_dir_(Xto_url(m.ReadBry("v")));
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_root_dir_ = "root_dir_", Invk_orig_dir_ = "orig_dir_", Invk_thumb_dir_ = "thumb_dir_";
|
||||
public Xof_bin_mgr Bin_mgr() {throw Err_.new_unimplemented();}
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*;
|
||||
import gplx.dbs.*;
|
||||
public class Orig_fil_tbl implements Rls_able {
|
||||
private String tbl_name = "orig_fil"; private final Dbmeta_fld_list flds = Dbmeta_fld_list.new_();
|
||||
private String tbl_name = "orig_fil"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list();
|
||||
private String fld_uid, fld_name, fld_ext_id, fld_w, fld_h, fld_dir_url;
|
||||
private Db_conn conn; private Db_stmt stmt_insert, stmt_select;
|
||||
public void Conn_(Db_conn new_conn, boolean created, boolean schema_is_1) {
|
||||
|
||||
@@ -37,7 +37,7 @@ class Xof_file_fxt {
|
||||
this.orig_mgr = wiki.File__orig_mgr();
|
||||
Xof_repo_fxt.Repos_init(app.File_mgr(), true, wiki);
|
||||
Xowe_wiki_.Create(wiki, 1, "dump.xml");
|
||||
Xowd_db_file text_db = wiki.Data__core_mgr().Dbs__make_by_tid(Xowd_db_file_.Tid_text); text_db.Tbl__text().Create_tbl();
|
||||
Xow_db_file text_db = wiki.Data__core_mgr().Dbs__make_by_tid(Xow_db_file_.Tid__text); text_db.Tbl__text().Create_tbl();
|
||||
Fsdb_db_mgr__v2 fsdb_core = Fsdb_db_mgr__v2_bldr.Get_or_make(wiki, Bool_.Y);
|
||||
fsdb_mgr.Mnt_mgr().Ctor_by_load(fsdb_core);
|
||||
fsdb_mgr.Mnt_mgr().Mnts__get_main().Bin_mgr().Dbs__make("temp.xowa");
|
||||
@@ -59,15 +59,15 @@ class Xof_file_fxt {
|
||||
Fsm_atr_fil atr_fil = mnt_itm.Atr_mgr().Db__core();
|
||||
Fsm_bin_fil bin_fil = mnt_itm.Bin_mgr().Dbs__get_nth();
|
||||
if (arg.Is_thumb())
|
||||
mnt_itm.Insert_thm(tmp_thm, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Time(), arg.Page(), arg.Bin().length, gplx.core.ios.Io_stream_rdr_.mem_(arg.Bin()));
|
||||
mnt_itm.Insert_thm(tmp_thm, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Time(), arg.Page(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.mem_(arg.Bin()));
|
||||
else
|
||||
mnt_itm.Insert_img(tmp_img, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Bin().length, gplx.core.ios.Io_stream_rdr_.mem_(arg.Bin()));
|
||||
mnt_itm.Insert_img(tmp_img, atr_fil, bin_fil, arg.Wiki(), arg.Ttl(), arg.Ext(), arg.W(), arg.H(), arg.Bin().length, gplx.core.ios.streams.Io_stream_rdr_.mem_(arg.Bin()));
|
||||
}
|
||||
public void Exec_get(Xof_exec_arg arg) {
|
||||
byte[] ttl_bry = arg.Ttl();
|
||||
Xof_fsdb_itm itm = new Xof_fsdb_itm();
|
||||
itm.Init_at_lnki(arg.Exec_tid(), wiki.Domain_itm().Abrv_xo(), ttl_bry, arg.Lnki_type(), arg.Lnki_upright(), arg.Lnki_w(), arg.Lnki_h(), arg.Lnki_time(), Xof_lnki_page.Null, Xof_patch_upright_tid_.Tid_all);
|
||||
List_adp itms_list = List_adp_.new_(); itms_list.Add(itm);
|
||||
List_adp itms_list = List_adp_.New(); itms_list.Add(itm);
|
||||
orig_mgr.Find_by_list(Ordered_hash_.New_bry(), itms_list, Xof_exec_tid.Tid_wiki_page);
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, Xow_ns_.Tid__main, ttl_bry);
|
||||
Xoae_page page = Xoae_page.New(wiki, ttl);
|
||||
|
||||
Reference in New Issue
Block a user