1
0
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:
gnosygnu
2016-06-19 23:58:10 -04:00
parent 96636f3161
commit d4e8590345
1960 changed files with 20790 additions and 9272 deletions

View File

@@ -16,7 +16,7 @@ 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.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*;
import gplx.core.ios.*; import gplx.core.envs.*;
import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.core.envs.*;
import gplx.xowa.wikis.ctgs.*; import gplx.xowa.wikis.tdbs.*;
public class Xob_import_cfg {
public Xob_import_cfg(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki; private boolean src_fil_is_bz2 = true;

View File

@@ -16,9 +16,9 @@ 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.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*;
import gplx.gfui.*; import gplx.xowa.bldrs.cmds.utils.*;
import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.xowa.bldrs.cmds.utils.*;
public class Xob_import_marker {
private final Hash_adp_bry in_progress_hash = Hash_adp_bry.cs();
private final Hash_adp_bry in_progress_hash = Hash_adp_bry.cs();
public void Bgn(Xowe_wiki wiki) {
in_progress_hash.Add_as_key_and_val(wiki.Domain_bry());
Io_mgr.Instance.SaveFilStr(url_(wiki), "XOWA has created this file to indicate that an import is in progress. This file will be deleted once the import is completed.");

View File

@@ -23,9 +23,9 @@ public class Xob_xml_page_bldr {
public Io_buffer_rdr XtoByteStreamRdr(int bfr_len) {
Io_url url = Io_url_.mem_fil_("mem/byteStreamRdr.txt");
Io_mgr.Instance.SaveFilBry(url, bfr.To_bry_and_clear());
return Io_buffer_rdr.new_(gplx.core.ios.Io_stream_rdr_.file_(url), bfr_len);
return Io_buffer_rdr.new_(gplx.core.ios.streams.Io_stream_rdr_.file_(url), bfr_len);
}
public Bry_bfr Bfr() {return bfr;} Bry_bfr bfr = Bry_bfr.new_();
public Bry_bfr Bfr() {return bfr;} Bry_bfr bfr = Bry_bfr_.New();
public Xob_xml_page_bldr Upd(String find, String repl) {
String all = bfr.To_str_and_clear();
all = String_.Replace(all, find, repl);
@@ -56,9 +56,9 @@ public class Xob_xml_page_bldr {
bfr.Add(Indent_2).Add(Xob_xml_parser_.Bry_page_end).Add_byte_nl();
return this;
}
private static final byte[] Nde_inline = Bry_.new_a7(" />"), Indent_2 = Bry_.Repeat_space(2), Indent_4 = Bry_.Repeat_space(4), Indent_6 = Bry_.Repeat_space(6), Indent_8 = Bry_.Repeat_space(8);
private static final int Revision_id = 1234, Contributor_id = 9876;
private static final byte[] Contributor_username = Bry_.new_a7("contributor_username"), Revision_comment = Bry_.new_a7("revision_comment");
private static final byte[] Nde_inline = Bry_.new_a7(" />"), Indent_2 = Bry_.Repeat_space(2), Indent_4 = Bry_.Repeat_space(4), Indent_6 = Bry_.Repeat_space(6), Indent_8 = Bry_.Repeat_space(8);
private static final int Revision_id = 1234, Contributor_id = 9876;
private static final byte[] Contributor_username = Bry_.new_a7("contributor_username"), Revision_comment = Bry_.new_a7("revision_comment");
}
/*
<page>

View File

@@ -19,7 +19,7 @@ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xow
import gplx.core.btries.*; import gplx.core.ios.*; import gplx.core.times.*;
import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.nss.*;
public class Xob_xml_parser {
Btrie_fast_mgr trie = Xob_xml_parser_.trie_(); Bry_bfr data_bfr = Bry_bfr.new_(); DateAdp_parser date_parser = DateAdp_parser.new_();
Btrie_fast_mgr trie = Xob_xml_parser_.trie_(); Bry_bfr data_bfr = Bry_bfr_.New(); DateAdp_parser date_parser = DateAdp_parser.new_();
public Xob_xml_parser Tag_len_max_(int v) {tag_len_max = v; return this;} private int tag_len_max = 255; // max size of any (a) xml tag, (b) int or (c) date; everything else goes into a data_bfr
public Xob_xml_parser Data_bfr_len_(int v) {data_bfr.Resize(v); return this;} // PERF: resize data_bfr once to large size, rather than grow incremently to it
public Xob_xml_parser Trie_tab_del_() {trie.Del(Xob_xml_parser_.Bry_tab); return this;}

View File

@@ -114,8 +114,8 @@ public class Xob_xml_parser_tst {
fil = page_bldr.XtoByteStreamRdr();
tst_parse(fil, doc, 0);
}
private static final String Date_1 = "2012-01-01T01:01:01Z", Date_2 = "2012-02-02T02:02:02Z"; DateAdp_parser dateParser = DateAdp_parser.new_();
Bry_bfr bfr = Bry_bfr.new_();
private static final String Date_1 = "2012-01-01T01:01:01Z", Date_2 = "2012-02-02T02:02:02Z"; DateAdp_parser dateParser = DateAdp_parser.new_();
Bry_bfr bfr = Bry_bfr_.New();
Xob_xml_page_bldr page_bldr = new Xob_xml_page_bldr(); Io_buffer_rdr fil; Xob_xml_parser page_parser = new Xob_xml_parser(); Xob_bldr bldr;
Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.Test();
int tst_parse(Io_buffer_rdr fil, Xowd_page_itm expd, int cur_pos) {