mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.2.4.1
This commit is contained in:
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
import gplx.core.flds.*;
|
||||
import gplx.xowa.files.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.repos.*;
|
||||
public class Xof_meta_itm {
|
||||
public Xof_meta_itm(Xof_meta_fil owner_fil, byte[] ttl) {this.owner_fil = owner_fil; this.ttl = ttl;}
|
||||
public Xof_meta_fil Owner_fil() {return owner_fil;} private Xof_meta_fil owner_fil;
|
||||
@@ -32,11 +32,11 @@ public class Xof_meta_itm {
|
||||
Dirty();
|
||||
// }
|
||||
}
|
||||
public Xof_repo_itm Repo_itm(Xow_wiki wiki) {
|
||||
public Xof_repo_itm Repo_itm(Xowe_wiki wiki) {
|
||||
switch (vrtl_repo) {
|
||||
case Xof_meta_itm.Repo_missing : //return null; // DELETE: used to return null, but this caused Redownload_missing to fail; no reason why missing shouldn't return a default repo; DATE:2013-01-26
|
||||
case Xof_meta_itm.Repo_unknown :
|
||||
case Xof_meta_itm.Repo_same : return wiki.App().File_mgr().Repo_mgr().Get_primary(wiki.Domain_bry());
|
||||
case Xof_meta_itm.Repo_same : return wiki.Appe().File_mgr().Repo_mgr().Get_by_primary(wiki.Domain_bry());
|
||||
default : return wiki.File_mgr().Repo_mgr().Repos_get_at(vrtl_repo).Trg();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ package gplx.xowa; import gplx.*;
|
||||
import gplx.core.flds.*;
|
||||
public class Xof_meta_mgr implements GfoInvkAble {
|
||||
Object[] root = new Object[16]; OrderedHash dirty_fils = OrderedHash_.new_bry_();
|
||||
public Xof_meta_mgr(Xow_wiki wiki) {this.wiki = wiki; this.root_dir = wiki.App().Fsys_mgr().File_dir().GenSubDir_nest("#meta", wiki.Domain_str());}
|
||||
public Xow_wiki Wiki() {return wiki;} private Xow_wiki wiki;
|
||||
public Xof_meta_mgr(Xowe_wiki wiki) {this.wiki = wiki; this.root_dir = wiki.Appe().Fsys_mgr().File_dir().GenSubDir_nest("#meta", wiki.Domain_str());}
|
||||
public Xowe_wiki Wiki() {return wiki;} private Xowe_wiki wiki;
|
||||
public Io_url Root_dir() {return root_dir;} Io_url root_dir;
|
||||
public int Depth() {return depth;} public Xof_meta_mgr Depth_(int v) {depth = v; return this;} private int depth = 3; // allows a full english wikipedia to have meta files of approximately 32 kb; otherwise would be 480 kb; most wikis will not get to this size, but worst case is wasting 16 kb in (16 * 16) files which is less than 4 mb
|
||||
public boolean Append_only() {return append_only;} public Xof_meta_mgr Append_only_(boolean v) {append_only = v; return this;} private boolean append_only;
|
||||
|
||||
@@ -62,8 +62,8 @@ class Xof_file_regy_fxt {
|
||||
byte[] md5_(byte[] name) {return Xof_xfer_itm_.Md5_(name);}
|
||||
public void Ini() {
|
||||
Io_mgr._.InitEngine_mem();
|
||||
Xoa_app app = Xoa_app_fxt.app_();
|
||||
Xow_wiki wiki = Xoa_app_fxt.wiki_tst_(app);
|
||||
Xoae_app app = Xoa_app_fxt.app_();
|
||||
Xowe_wiki wiki = Xoa_app_fxt.wiki_tst_(app);
|
||||
regy_mgr = new Xof_meta_mgr(wiki);
|
||||
regy_mgr.Clear();
|
||||
regy_mgr.Depth_(2);
|
||||
|
||||
Reference in New Issue
Block a user