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

'v3.4.4.1'

This commit is contained in:
gnosygnu
2016-04-24 22:05:38 -04:00
parent ad140a93fe
commit 5ce4ea2a08
103 changed files with 1767 additions and 340 deletions

View File

@@ -29,7 +29,7 @@ public class Xow_file_mgr implements GfoInvkAble {
wkr_mgr = new Xof_wkr_mgr(this);
}
public Fsdb_db_mgr Db_core() {return db_core;} private Fsdb_db_mgr db_core;
public Xof_orig_mgr Orig_mgr() {return orig_mgr;} private final Xof_orig_mgr orig_mgr = new Xof_orig_mgr();
public Xof_orig_mgr Orig_mgr() {return orig_mgr;} private final Xof_orig_mgr orig_mgr = new Xof_orig_mgr();
public Xof_fsdb_mode Fsdb_mode() {
if (fsdb_mode == null) {
Version();
@@ -125,7 +125,7 @@ public class Xow_file_mgr implements GfoInvkAble {
if ( db_core == null // "-file-core.xowa" not found
&& !wiki.Data__core_mgr().Props().Layout_file().Tid_is_all() // DATE:2015-08-10
)
db_core = Fsdb_db_mgr__v2_bldr.Instance.Get_or_make(wiki, false); // make it
db_core = Fsdb_db_mgr__v2_bldr.Get_or_make(wiki, false); // make it
this.version = Version_2;
this.fsdb_mode = Xof_fsdb_mode.new_v2_gui();
orig_mgr.Init_by_wiki(wiki, fsdb_mode, db_core.File__orig_tbl_ary(), Xof_url_bldr.new_v2());

View File

@@ -21,12 +21,12 @@ import gplx.fsdb.meta.*;
import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.cnvs.*; import gplx.xowa.files.caches.*;
import gplx.xowa.bldrs.wms.*;
public class Xof_bin_mgr {
private final Fsm_mnt_mgr mnt_mgr;
private final Gfo_usr_dlg usr_dlg; private final Xow_repo_mgr repo_mgr; private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2();
private final Fsm_mnt_mgr mnt_mgr;
private final Gfo_usr_dlg usr_dlg; private final Xow_repo_mgr repo_mgr; private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2();
private Xof_bin_wkr[] wkrs = Xof_bin_wkr_.Ary_empty; private int wkrs_len;
private final String_obj_ref resize_warning = String_obj_ref.null_(); private final Xof_img_size tmp_size = new Xof_img_size();
private final Io_download_fmt download_fmt;
private final Io_stream_rdr_wrapper rdr_wrapper = new Io_stream_rdr_wrapper();
private final String_obj_ref resize_warning = String_obj_ref.null_(); private final Xof_img_size tmp_size = new Xof_img_size();
private final Io_download_fmt download_fmt;
private final Io_stream_rdr_wrapper rdr_wrapper = new Io_stream_rdr_wrapper();
public Xof_bin_mgr(Fsm_mnt_mgr mnt_mgr, Xow_repo_mgr repo_mgr, Xof_img_wkr_resize_img resize_wkr, Io_download_fmt download_fmt) {
this.mnt_mgr = mnt_mgr; this.repo_mgr = repo_mgr; this.download_fmt = download_fmt;
this.usr_dlg = Gfo_usr_dlg_.Instance;

View File

@@ -24,7 +24,7 @@ import gplx.xowa.wikis.nss.*;
import gplx.xowa.parsers.lnkis.*;
class Xof_file_fxt {
private Xoae_app app; private Xof_fsdb_mgr__sql fsdb_mgr; private Xowe_wiki wiki; private Xof_orig_mgr orig_mgr;
private final Fsd_thm_itm tmp_thm = Fsd_thm_itm.new_(); private final Fsd_img_itm tmp_img = new Fsd_img_itm();
private final Fsd_thm_itm tmp_thm = Fsd_thm_itm.new_(); private final Fsd_img_itm tmp_img = new Fsd_img_itm();
public void Rls() {}
public void Reset() {
Io_mgr.Instance.InitEngine_mem(); // NOTE: files are downloaded to mem_engine, regardless of Db being mem or sqlite; always reset
@@ -38,7 +38,7 @@ class Xof_file_fxt {
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();
Fsdb_db_mgr__v2 fsdb_core = Fsdb_db_mgr__v2_bldr.Instance.Get_or_make(wiki, Bool_.Y);
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");
wiki.File_mgr().Init_file_mgr_by_load(wiki);
@@ -107,11 +107,11 @@ class Xof_repo_fxt {
}
class Xof_orig_arg {
Xof_orig_arg(byte repo, byte[] page, int w, int h, byte[] redirect) {this.repo = repo; this.page = page; this.w = w; this.h = h; this.redirect = redirect;}
public byte Repo() {return repo;} private final byte repo;
public byte[] Page() {return page;} private final byte[] page;
public int W() {return w;} private final int w;
public int H() {return h;} private final int h;
public byte[] Redirect() {return redirect;} private final byte[] redirect;
public byte Repo() {return repo;} private final byte repo;
public byte[] Page() {return page;} private final byte[] page;
public int W() {return w;} private final int w;
public int H() {return h;} private final int h;
public byte[] Redirect() {return redirect;} private final byte[] redirect;
public static Xof_orig_arg new_comm_file(String page) {return new_(Bool_.Y, page, Xof_img_size.Size_null, Xof_img_size.Size_null);}
public static Xof_orig_arg new_comm(String page, int w, int h) {return new_(Bool_.Y, page, w, h);}
public static Xof_orig_arg new_wiki(String page, int w, int h) {return new_(Bool_.N, page, w, h);}
@@ -128,17 +128,17 @@ class Xof_fsdb_arg {
Xof_fsdb_arg(byte[] wiki, byte[] ttl, boolean is_thumb, int ext, int w, int h, int time, byte[] bin) {
this.wiki = wiki; this.ttl = ttl; this.is_thumb = is_thumb; this.w = w; this.h = h; this.time = time; this.ext = ext; this.bin = bin;
}
public byte[] Wiki() {return wiki;} private final byte[] wiki;
public byte[] Ttl() {return ttl;} private final byte[] ttl;
public int Ext() {return ext;} private final int ext;
public boolean Is_thumb() {return is_thumb;} private final boolean is_thumb;
public int W() {return w;} private final int w;
public int H() {return h;} private final int h;
public double Time() {return time;} private final double time;
public int Page() {return page;} private final int page = Xof_lnki_page.Null;
public byte[] Bin() {return bin;} private final byte[] bin;
public DateAdp Modified() {return modified;} private final DateAdp modified = Fsd_thm_tbl.Modified_null;
public String Hash() {return hash;} private final String hash = Fsd_thm_tbl.Hash_null;
public byte[] Wiki() {return wiki;} private final byte[] wiki;
public byte[] Ttl() {return ttl;} private final byte[] ttl;
public int Ext() {return ext;} private final int ext;
public boolean Is_thumb() {return is_thumb;} private final boolean is_thumb;
public int W() {return w;} private final int w;
public int H() {return h;} private final int h;
public double Time() {return time;} private final double time;
public int Page() {return page;} private final int page = Xof_lnki_page.Null;
public byte[] Bin() {return bin;} private final byte[] bin;
public DateAdp Modified() {return modified;} private final DateAdp modified = Fsd_thm_tbl.Modified_null;
public String Hash() {return hash;} private final String hash = Fsd_thm_tbl.Hash_null;
public static Xof_fsdb_arg new_comm_file(String ttl) {return new_(Xow_domain_itm_.Bry__commons, Bool_.N, ttl, Xof_img_size.Null, Xof_img_size.Null, Xof_lnki_time.Null_as_int);}
public static Xof_fsdb_arg new_comm_thumb(String ttl) {return new_(Xow_domain_itm_.Bry__commons, Bool_.Y, ttl, W_default, H_default, Xof_lnki_time.Null_as_int);}
public static Xof_fsdb_arg new_comm_thumb(String ttl, int w, int h) {return new_(Xow_domain_itm_.Bry__commons, Bool_.Y, ttl, w, h, Xof_lnki_time.Null_as_int);}

View File

@@ -18,10 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
import gplx.dbs.*;
public class Xof_orig_wkr__orig_db implements Xof_orig_wkr {
private final boolean addable;
private final boolean addable;
public Xof_orig_wkr__orig_db(Xof_orig_tbl tbl, boolean addable) {this.tbl = tbl; this.addable = addable;}
public byte Tid() {return Xof_orig_wkr_.Tid_xowa_db;}
public Xof_orig_tbl Tbl() {return tbl;} private final Xof_orig_tbl tbl;
public Xof_orig_tbl Tbl() {return tbl;} private final Xof_orig_tbl tbl;
public void Find_by_list(Ordered_hash rv, List_adp itms) {tbl.Select_by_list(rv, itms);}
public Xof_orig_itm Find_as_itm(byte[] ttl, int list_idx, int list_len) {return tbl.Select_itm(ttl);}
public boolean Add_orig(byte repo, byte[] page, int ext_id, int w, int h, byte[] redirect) {