mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.9.2.1
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.xowa.langs.cases.*;
|
||||
import gplx.xowa.bldrs.installs.*;
|
||||
import gplx.xowa.xtns.scribunto.*;
|
||||
public class Xow_ns_mgr implements GfoInvkAble, gplx.lists.ComparerAble {
|
||||
private Ordered_hash id_hash = Ordered_hash_.new_(); // hash for retrieval by id
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
import gplx.xowa.parsers.apos.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.parsers.lnkes.*; import gplx.xowa.parsers.paras.*;
|
||||
public class Xow_utl_mgr {
|
||||
public Xow_utl_mgr(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki;
|
||||
public Xop_parser Anchor_encode_parser() {
|
||||
if (anchor_encode_parser == null) {
|
||||
anchor_encode_parser = new Xop_parser(wiki, wiki.Parser().Tmpl_lxr_mgr(), Anchor_encode_lxr_mgr);
|
||||
anchor_encode_parser.Init_by_wiki(wiki);
|
||||
anchor_encode_parser.Init_by_lang(wiki.Lang());
|
||||
}
|
||||
return anchor_encode_parser;
|
||||
} private Xop_parser anchor_encode_parser;
|
||||
private static final Xop_lxr_mgr Anchor_encode_lxr_mgr
|
||||
= new Xop_lxr_mgr(new Xop_lxr[]
|
||||
{ Xop_pipe_lxr._, new Xop_eq_lxr(false), Xop_space_lxr._, Xop_tab_lxr._, Xop_nl_lxr._
|
||||
, Xop_curly_bgn_lxr._, Xop_curly_end_lxr._
|
||||
, Xop_amp_lxr._, Xop_colon_lxr._
|
||||
, Xop_apos_lxr._
|
||||
, Xop_lnki_lxr_bgn._, Xop_lnki_lxr_end._
|
||||
, Xop_lnke_lxr._, Xop_lnke_end_lxr._
|
||||
, Xop_xnde_lxr._
|
||||
});
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import gplx.core.primitives.*;
|
||||
import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.xwikis.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.fsdb.meta.*; import gplx.fsdb.*;
|
||||
import gplx.xowa.html.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.bridges.dbuis.tbls.*;
|
||||
import gplx.xowa.parsers.*;
|
||||
import gplx.xowa.urls.*;
|
||||
public interface Xow_wiki extends Xow_ttl_parser {
|
||||
boolean Type_is_edit();
|
||||
@@ -29,7 +30,7 @@ public interface Xow_wiki extends Xow_ttl_parser {
|
||||
String Domain_str();
|
||||
int Domain_tid(); // Xow_domain_type_.Int__wikipedia
|
||||
byte[] Domain_abrv(); // enwiki
|
||||
Xow_domain_itm Domain_itm();
|
||||
Xow_domain_itm Domain_itm();
|
||||
Xow_fsys_mgr Fsys_mgr();
|
||||
Xowd_db_mgr Data__core_mgr();
|
||||
Xof_fsdb_mode File__fsdb_mode();
|
||||
@@ -43,6 +44,7 @@ public interface Xow_wiki extends Xow_ttl_parser {
|
||||
Xohd_hdump_rdr Html__hdump_rdr();
|
||||
Xoh_page_wtr_mgr_base Html__page_wtr_mgr();
|
||||
boolean Html__css_installing(); void Html__css_installing_(boolean v);
|
||||
Xow_mw_parser_mgr Mw_parser_mgr();
|
||||
Xow_xwiki_mgr Xwiki_mgr();
|
||||
Xow_wiki_props Props();
|
||||
void Init_by_wiki();
|
||||
|
||||
25
400_xowa/src_120_wiki/gplx/xowa/Xow_wiki_.java
Normal file
25
400_xowa/src_120_wiki/gplx/xowa/Xow_wiki_.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa; import gplx.*;
|
||||
public class Xow_wiki_ {
|
||||
public static void Rls_mem(Xowe_wiki wiki, boolean clear_ctx) {
|
||||
wiki.Appe().Free_mem(clear_ctx);
|
||||
wiki.Cache_mgr().Free_mem_all();
|
||||
gplx.xowa.xtns.scribunto.Scrib_core.Core_invalidate();
|
||||
}
|
||||
}
|
||||
@@ -24,9 +24,11 @@ import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files
|
||||
import gplx.xowa.langs.vnts.*; import gplx.xowa.gui.views.*; import gplx.xowa.wikis.xwikis.*;
|
||||
import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.css.*; import gplx.xowa.html.ns_files.*; import gplx.xowa.html.bridges.dbuis.tbls.*;
|
||||
import gplx.xowa.setup.maints.*; import gplx.xowa.wikis.caches.*;
|
||||
import gplx.xowa.bldrs.xmls.*; import gplx.xowa.xtns.pfuncs.*;
|
||||
import gplx.xowa.tdbs.*;
|
||||
import gplx.xowa.bldrs.xmls.*; import gplx.xowa.bldrs.installs.*; import gplx.xowa.xtns.pfuncs.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.utils.*;
|
||||
import gplx.xowa.urls.*;
|
||||
import gplx.xowa.xtns.gallery.*;
|
||||
import gplx.xowa.tdbs.*; import gplx.xowa.tdbs.hives.*;
|
||||
public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj {
|
||||
public Xowe_wiki(Xoae_app app, Xol_lang lang, Xow_ns_mgr ns_mgr, Xow_domain_itm domain_itm, Io_url wiki_dir) {
|
||||
this.ev_mgr = GfoEvMgr.new_(this);
|
||||
@@ -87,7 +89,7 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj {
|
||||
public String Domain_str() {return domain_str;} private final String domain_str;
|
||||
public int Domain_tid() {return domain_tid;} private final int domain_tid;
|
||||
public byte[] Domain_abrv() {return domain_abrv;} private final byte[] domain_abrv;
|
||||
public Xow_domain_itm Domain_itm() {return domain_itm;} private final Xow_domain_itm domain_itm;
|
||||
public Xow_domain_itm Domain_itm() {return domain_itm;} private final Xow_domain_itm domain_itm;
|
||||
public Xow_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xow_fsys_mgr fsys_mgr;
|
||||
public Xowd_db_mgr Data__core_mgr() {return db_mgr.Tid() == Xodb_mgr_txt.Tid_txt ? null : this.Db_mgr_as_sql().Core_data_mgr();} // TEST:
|
||||
public Xof_fsdb_mode File__fsdb_mode() {return file_mgr.Fsdb_mode();}
|
||||
@@ -102,6 +104,7 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj {
|
||||
public Xoh_page_wtr_mgr_base Html__page_wtr_mgr() {return html_mgr.Page_wtr_mgr();}
|
||||
public boolean Html__css_installing() {return html__css_installing;} public void Html__css_installing_(boolean v) {html__css_installing = v;} private boolean html__css_installing;
|
||||
public Xoa_url_parser Utl__url_parser() {return url__parser;} private final Xoa_url_parser url__parser;
|
||||
public Xow_mw_parser_mgr Mw_parser_mgr() {return mw_parser_mgr;} private final Xow_mw_parser_mgr mw_parser_mgr = new Xow_mw_parser_mgr();
|
||||
public Xow_xwiki_mgr Xwiki_mgr() {return xwiki_mgr;} private final Xow_xwiki_mgr xwiki_mgr;
|
||||
public Xow_wiki_props Props() {return props;} private final Xow_wiki_props props = new Xow_wiki_props();
|
||||
|
||||
@@ -264,6 +267,7 @@ public class Xowe_wiki implements Xow_wiki, GfoInvkAble, GfoEvObj {
|
||||
app.Log_wtr().Log_to_session_direct(log_bfr.Xto_str());
|
||||
init_in_process = false;
|
||||
app.Api_root().Wikis().Get(domain_bry).Subscribe(this);
|
||||
app.Meta_mgr().Init_by_wiki(this);
|
||||
}
|
||||
private void Html__hdump_enabled_(boolean v) {
|
||||
this.html_mgr__hdump_enabled = v;
|
||||
|
||||
Reference in New Issue
Block a user