diff --git a/100_core/src/gplx/Bool_.java b/100_core/src/gplx/Bool_.java index b1cdde9da..6e39508f3 100644 --- a/100_core/src/gplx/Bool_.java +++ b/100_core/src/gplx/Bool_.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Bool_ {//RF:2017-10-08 public static final String Cls_val_name = "bool"; - public static final Class Cls_ref_type = Boolean.class; + public static final Class Cls_ref_type = Boolean.class; public static final boolean N = false , Y = true; public static final byte N_byte = 0 , Y_byte = 1 , __byte = 127; public static final int N_int = 0 , Y_int = 1 , __int = -1; - public static final byte[] N_bry = new byte[] {Byte_ascii.Ltr_n}, Y_bry = new byte[] {Byte_ascii.Ltr_y}; + public static final byte[] N_bry = new byte[] {Byte_ascii.Ltr_n}, Y_bry = new byte[] {Byte_ascii.Ltr_y}; public static final String True_str = "true", False_str = "false"; - public static final byte[] True_bry = Bry_.new_a7(True_str), False_bry = Bry_.new_a7(False_str); + public static final byte[] True_bry = Bry_.new_a7(True_str), False_bry = Bry_.new_a7(False_str); public static boolean By_int(int v) {return v == Y_int;} public static int To_int(boolean v) {return v ? Y_int : N_int;} diff --git a/100_core/src/gplx/Bry_.java b/100_core/src/gplx/Bry_.java index d9f7743c8..a77a695c6 100644 --- a/100_core/src/gplx/Bry_.java +++ b/100_core/src/gplx/Bry_.java @@ -1,1245 +1,1245 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2020 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx; - -import gplx.core.primitives.Int_obj_ref; -import gplx.langs.htmls.entitys.Gfh_entity_; - -public class Bry_ { - public static final String Cls_val_name = "byte[]"; - public static final byte[] Empty = new byte[0]; - public static final byte[][] Ary_empty = new byte[0][]; - public static final Class Cls_ref_type = byte[].class; - public static byte[] cast(Object val) {return (byte[])val;} - public static byte[] New_by_byte(byte b) {return new byte[] {b};} - public static byte[] New_by_ints(int... ary) { - int len = ary.length; - byte[] rv = new byte[len]; - for (int i = 0; i < len; i++) - rv[i] = (byte)ary[i]; - return rv; - } - public static byte[] New_by_objs(Bry_bfr bfr, Object... ary) { - int len = ary.length; - for (int i = 0; i < len; ++i) { - Object itm = ary[i]; - Class type = Type_.Type_by_obj(itm); - if (Type_.Eq(type, int.class)) bfr.Add_byte((byte)Int_.Cast(itm)); - else if (Type_.Eq(type, String.class)) bfr.Add_str_u8((String)itm); - else if (Type_.Eq(type, byte[].class)) bfr.Add((byte[])itm); - else throw Err_.new_unhandled(Type_.Canonical_name(type)); - } - return bfr.To_bry_and_clear(); - } - public static byte[] Coalesce_to_empty(byte[] v) {return v == null ? Bry_.Empty : v;} - public static byte[] Coalesce(byte[] v, byte[] or) {return v == null ? or : v;} - public static byte[] new_a7(String str) { - if (str == null) return null; - int str_len = str.length(); - if (str_len == 0) return Bry_.Empty; - byte[] rv = new byte[str_len]; - for (int i = 0; i < str_len; ++i) { - char c = str.charAt(i); - if (c > 128) c = '?'; - rv[i] = (byte)c; - } - return rv; - } - public static byte[] new_u8_safe(String str) {return str == null ? null : new_u8(str);} - public static byte[] new_u8(String str) { - try { - int str_len = str.length(); - if (str_len == 0) return Bry_.Empty; - int bry_len = new_u8__by_len(str, str_len); - byte[] rv = new byte[bry_len]; - new_u8__write(str, str_len, rv, 0); - return rv; - } - catch (Exception e) {throw Err_.new_exc(e, "core", "invalid UTF-8 sequence", "s", str);} - } - public static int new_u8__by_len(String s, int s_len) { - int rv = 0; - for (int i = 0; i < s_len; ++i) { - char c = s.charAt(i); - int c_len = 0; - if ( c < 128) c_len = 1; // 1 << 7 - else if ( c < 2048) c_len = 2; // 1 << 11 - else if ( (c > 55295) // 0xD800 - && (c < 56320)) c_len = 4; // 0xDFFF - else c_len = 3; // 1 << 16 - if (c_len == 4) ++i; // surrogate is 2 wide, not 1 - rv += c_len; - } - return rv; - } - public static byte[] New_u8_nl_apos(String... lines) { - Bry_bfr bfr = Bry_bfr_.Get(); - try { - New_u8_nl_apos(bfr, lines); - return bfr.To_bry_and_clear(); - } - finally {bfr.Mkr_rls();} - } - public static void New_u8_nl_apos(Bry_bfr bfr, String... lines) { - int lines_len = lines.length; - for (int i = 0; i < lines_len; ++i) { - if (i != 0) bfr.Add_byte_nl(); - byte[] line = Bry_.new_u8(lines[i]); - boolean dirty = false; - int prv = 0; - int line_len = line.length; - for (int j = 0; j < line_len; ++j) { - byte b = line[j]; - if (b == Byte_ascii.Apos) { - bfr.Add_mid(line, prv, j); - bfr.Add_byte(Byte_ascii.Quote); - dirty = true; - prv = j + 1; - } - } - if (dirty) - bfr.Add_mid(line, prv, line_len); - else - bfr.Add(line); - } - } - public static void new_u8__write(String str, int str_len, byte[] bry, int bry_pos) { - for (int i = 0; i < str_len; ++i) { - char c = str.charAt(i); - if ( c < 128) { - bry[bry_pos++] = (byte)c; - } - else if ( c < 2048) { - bry[bry_pos++] = (byte)(0xC0 | (c >> 6)); - bry[bry_pos++] = (byte)(0x80 | (c & 0x3F)); - } - else if ( (c > 55295) // 0xD800 - && (c < 56320)) { // 0xDFFF - if (i >= str_len) throw Err_.new_wo_type("incomplete surrogate pair at end of String", "char", c); - char nxt_char = str.charAt(i + 1); - int v = 0x10000 + (c - 0xD800) * 0x400 + (nxt_char - 0xDC00); - bry[bry_pos++] = (byte)(0xF0 | (v >> 18)); - bry[bry_pos++] = (byte)(0x80 | (v >> 12) & 0x3F); - bry[bry_pos++] = (byte)(0x80 | (v >> 6) & 0x3F); - bry[bry_pos++] = (byte)(0x80 | (v & 0x3F)); - ++i; - } - else { - bry[bry_pos++] = (byte)(0xE0 | (c >> 12)); - bry[bry_pos++] = (byte)(0x80 | (c >> 6) & 0x3F); - bry[bry_pos++] = (byte)(0x80 | (c & 0x3F)); - } - } - } - public static byte[] Copy(byte[] src) { - int src_len = src.length; - byte[] trg = new byte[src_len]; - for (int i = 0; i < src_len; ++i) - trg[i] = src[i]; - return trg; - } - public static byte[] Resize(byte[] src, int trg_len) {return Resize(src, 0, trg_len);} - public static byte[] Resize(byte[] src, int src_bgn, int trg_len) { - byte[] trg = new byte[trg_len]; - int src_len = src.length; if (src_len > trg_len) src_len = trg_len; // trg_len can be less than src_len - Copy_to(src, src_bgn, src_len, trg, 0); - return trg; - } - public static byte[] Repeat_space(int len) {return Repeat(Byte_ascii.Space, len);} - public static byte[] Repeat(byte b, int len) { - byte[] rv = new byte[len]; - for (int i = 0; i < len; i++) - rv[i] = b; - return rv; - } - public static byte[] Repeat_bry(byte[] bry, int len) { - int bry_len = bry.length; - int rv_len = len * bry_len; - byte[] rv = new byte[rv_len]; - for (int i = 0; i < len; i++) { - for (int j = 0; j < bry_len; j++) { - rv[(i * bry_len) + j] = bry[j]; - } - } - return rv; - } - public static byte[] Add(byte[] src, byte b) { - int src_len = src.length; - byte[] rv = new byte[src_len + 1]; - Copy_to(src, 0, src_len, rv, 0); - rv[src_len] = b; - return rv; - } - public static byte[] Add(byte b, byte[] src) { - int src_len = src.length; - byte[] rv = new byte[src_len + 1]; - Copy_to(src, 0, src_len, rv, 1); - rv[0] = b; - return rv; - } - public static byte[] Add(byte[]... all) { - int all_len = all.length, rv_len = 0; - for (int i = 0; i < all_len; ++i) { - byte[] cur = all[i]; if (cur == null) continue; - rv_len += cur.length; - } - byte[] rv = new byte[rv_len]; - int rv_idx = 0; - for (int i = 0; i < all_len; ++i) { - byte[] cur = all[i]; if (cur == null) continue; - int cur_len = cur.length; - for (int j = 0; j < cur_len; ++j) - rv[rv_idx++] = cur[j]; - } - return rv; - } - public static byte[] Add_w_dlm(byte[] dlm, byte[]... ary) { - int ary_len = ary.length; - if (ary_len == 0) return Bry_.Empty; - int dlm_len = dlm.length; - int rv_len = dlm_len * (ary_len - 1); // rv will have at least as many dlms as itms - 1 - for (int i = 0; i < ary_len; i++) { - byte[] itm = ary[i]; - if (itm != null) rv_len += itm.length; - } - int rv_pos = 0; - byte[] rv = new byte[rv_len]; - for (int i = 0; i < ary_len; i++) { - byte[] itm = ary[i]; - if (i != 0) { - for (int j = 0; j < dlm_len; j++) { - rv[rv_pos++] = dlm[j]; - } - } - if (itm == null) continue; - int itm_len = itm.length; - for (int j = 0; j < itm_len; j++) { - rv[rv_pos++] = itm[j]; - } - } - return rv; - } - public static byte[] Add_w_dlm(byte dlm, byte[]... ary) { - int ary_len = ary.length; - if (ary_len == 0) return Bry_.Empty; - int rv_len = ary_len - 1; // rv will have at least as many dlms as itms - 1 - for (int i = 0; i < ary_len; i++) { - byte[] itm = ary[i]; - if (itm != null) rv_len += itm.length; - } - int rv_pos = 0; - byte[] rv = new byte[rv_len]; - for (int i = 0; i < ary_len; i++) { - byte[] itm = ary[i]; - if (i != 0) rv[rv_pos++] = dlm; - if (itm == null) continue; - int itm_len = itm.length; - for (int j = 0; j < itm_len; j++) { - rv[rv_pos++] = itm[j]; - } - } - return rv; - } - public static int Len(byte[] v) {return v == null ? 0 : v.length;} - public static boolean Len_gt_0(byte[] v) {return v != null && v.length > 0;} - public static boolean Len_eq_0(byte[] v) {return v == null || v.length == 0;} - public static byte Get_at_end(byte[] bry) {return bry[bry.length - 1];} // don't bother checking for errors; depend on error trace - public static boolean Has_at(byte[] src, int src_len, int pos, byte b) {return (pos < src_len) && (src[pos] == b);} - public static boolean Has(byte[] src, byte[] lkp) {return Bry_find_.Find_fwd(src, lkp) != Bry_find_.Not_found;} - public static boolean Has(byte[] src, byte lkp) { - if (src == null) return false; - int len = src.length; - for (int i = 0; i < len; i++) - if (src[i] == lkp) return true; - return false; - } - public static boolean Has_at_bgn(byte[] src, byte lkp) {return Has_at_bgn(src, lkp, 0);} - public static boolean Has_at_bgn(byte[] src, byte lkp, int src_bgn) {return src_bgn < src.length ? src[src_bgn] == lkp : false;} - public static boolean Has_at_bgn(byte[] src, byte[] lkp) {return Has_at_bgn(src, lkp, 0, src.length);} - public static boolean Has_at_bgn(byte[] src, byte[] lkp, int src_bgn, int src_end) { - int lkp_len = lkp.length; - if (lkp_len + src_bgn > src_end) return false; // lkp is longer than src - for (int i = 0; i < lkp_len; i++) { - if (lkp[i] != src[i + src_bgn]) return false; - } - return true; - } - public static boolean Has_at_end(byte[] src, byte lkp) { - if (src == null) return false; - int src_len = src.length; - if (src_len == 0) return false; - return src[src_len - 1] == lkp; - } - public static boolean Has_at_end(byte[] src, byte[] lkp) {int src_len = src.length; return Has_at_end(src, lkp, src_len - lkp.length, src_len);} - public static boolean Has_at_end(byte[] src, byte[] lkp, int src_bgn, int src_end) { - int lkp_len = lkp.length; - if (src_bgn < 0) return false; - int pos = src_end - lkp_len; if (pos < src_bgn) return false; // lkp is longer than src - for (int i = 0; i < lkp_len; i++) { - if (lkp[i] != src[i + pos]) return false; - } - return true; - } - public static void Set(byte[] src, int bgn, int end, byte[] repl) { - int repl_len = repl.length; - for (int i = 0; i < repl_len; i++) - src[i + bgn] = repl[i]; - } - public static void Copy_to(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { - int trg_adj = trg_bgn - src_bgn; - for (int i = src_bgn; i < src_end; i++) - trg[i + trg_adj] = src[i]; - } - public static void Copy_to_reversed(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { - // copies src to trg, but in reverse order; EX: trg="1" src="432." -> "1.234" - int len = src_end - src_bgn; - for (int i = 0; i < len; i++) - trg[trg_bgn + i] = src[src_end - i - 1]; - } - public static byte[] Replace_one(byte[] orig, byte[] find, byte[] repl) { - // find val - int orig_len = orig.length; - int find_pos = Bry_find_.Find(orig, find, 0, orig_len, true); - if (find_pos == Bry_find_.Not_found) return orig; // nothing found; exit - - // do copy - int find_len = find.length, repl_len = repl.length; - int rv_len = orig_len + repl_len - find_len; - byte[] rv = new byte[rv_len]; - Copy_to(orig, 0 , find_pos, rv, 0 ); // copy orig before repl - Copy_to(repl, 0 , repl_len, rv, find_pos ); // copy repl - Copy_to(orig, find_pos + find_len, orig_len, rv, find_pos + repl_len); // copy orig after repl - return rv; - } - public static void Replace_all_direct(byte[] src, byte find, byte repl) {Replace_all_direct(src, find, repl, 0, src.length);} - public static void Replace_all_direct(byte[] src, byte find, byte repl, int bgn, int end) { - for (int i = bgn; i < end; i++) { - byte b = src[i]; - if (b == find) src[i] = repl; - } - } - public static byte[] Limit(byte[] src, int len) { - if (src == null) return null; - int src_len = src.length; - return len < src_len ? Bry_.Mid(src, 0, len) : src; - } - public static byte[] Mid_by_nearby(byte[] src, int pos, int around) { - int bgn = pos - around; if (bgn < 0) bgn = 0; - int src_len = src.length; - int end = pos + around; if (end > src_len) end = src_len; - return Mid(src, bgn, end); - } - public static byte[] Mid_by_len(byte[] src, int bgn, int len) {return Mid(src, bgn, bgn + len);} - public static byte[] Mid_by_len_safe(byte[] src, int bgn, int len) { - int src_len = src.length; - if (bgn < 0) bgn = 0; - if (len + bgn > src_len) len = (src_len - bgn); - return Mid(src, bgn, bgn + len); - } - public static String MidByLenToStr(byte[] src, int bgn, int len) { - int end = bgn + len; end = Int_.BoundEnd(end, src.length); - byte[] ary = Bry_.Mid(src, bgn, end); - return String_.new_u8(ary); - } - public static byte[] Mid_safe(byte[] src, int bgn, int end) { - if (src == null) return null; - int src_len = src.length; - if (bgn < 0) - bgn = 0; - else if (bgn >= src_len) - bgn = src_len; - - if (end < 0) - end = 0; - else if (end >= src_len) - end = src_len; - - if (bgn > end) - bgn = end; - else if (end < bgn) - end = bgn; - - return Mid(src, bgn, end); - } - public static byte[] Mid(byte[] src, int bgn) {return Mid(src, bgn, src.length);} - public static byte[] Mid_or(byte[] src, int bgn, int end, byte[] or) { - int src_len = src.length; - if ( src == null - || (bgn < 0 || bgn > src_len) - || (end < 0 || end > src_len) - || (end < bgn) - ) - return or; - return bgn == src_len ? Bry_.Empty : Mid(src, bgn, src_len); - } - public static byte[] Mid(byte[] src, int bgn, int end) { - try { - int len = end - bgn; if (len == 0) return Bry_.Empty; - byte[] rv = new byte[len]; - for (int i = bgn; i < end; i++) - rv[i - bgn] = src[i]; - return rv; - } catch (Exception e) {Err_.Noop(e); throw Err_.new_("Bry_", "mid failed", "bgn", bgn, "end", end);} - } - public static byte[] Mid_w_trim(byte[] src, int bgn, int end) { - int len = end - bgn; if (len == 0) return Bry_.Empty; - int actl_bgn = bgn, actl_end = end; - // trim at bgn - boolean chars_seen = false; - for (int i = bgn; i < end; ++i) { - switch (src[i]) { - case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: - break; - default: - chars_seen = true; - actl_bgn = i; - i = end; - break; - } - } - if (!chars_seen) return Bry_.Empty; // all ws - // trim at end - for (int i = end - 1; i >= actl_bgn; --i) { - switch (src[i]) { - case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: - break; - default: - actl_end = i + 1; - i = -1; - break; - } - } - // extract mid - len = actl_end - actl_bgn; if (len == 0) return Bry_.Empty; - byte[] rv = new byte[len]; - for (int i = actl_bgn; i < actl_end; ++i) - rv[i - actl_bgn] = src[i]; - return rv; - } - public static byte[] mask_(int len, byte... itms) { - byte[] rv = new byte[len]; - int itms_len = itms.length; - for (int i = 0; i < itms_len; i++) { - byte itm = itms[i]; - rv[itm & 0xFF] = itm; // PATCH.JAVA:need to convert to unsigned byte - } - return rv; - } - public static final byte[] Trim_ary_ws = mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr, Byte_ascii.Space); - public static byte[] Trim(byte[] src) {return Trim(src, 0, src.length, true, true, Trim_ary_ws, true);} - public static byte[] Trim(byte[] src, int bgn, int end) {return Trim(src, bgn, end, true, true, Trim_ary_ws, true);} - public static byte[] Trim(byte[] src, int bgn, int end, boolean trim_bgn, boolean trim_end, byte[] trim_ary, boolean reuse_bry_if_noop) { - int txt_bgn = bgn, txt_end = end; - boolean all_ws = true; - if (trim_bgn) { - for (int i = bgn; i < end; i++) { - byte b = src[i]; - if (trim_ary[b & 0xFF] == Byte_ascii.Null) { - txt_bgn = i; - i = end; - all_ws = false; - } - } - if (all_ws) return Bry_.Empty; - } - if (trim_end) { - for (int i = end - 1; i > -1; i--) { - byte b = src[i]; - if (trim_ary[b & 0xFF] == Byte_ascii.Null) { - txt_end = i + 1; - i = -1; - all_ws = false; - } - } - if (all_ws) return Bry_.Empty; - } - - if ( reuse_bry_if_noop - && bgn == 0 && end == src.length // Trim is called on entire bry, not subset - && bgn == txt_bgn && end == txt_end // Trim hasn't trimmed anything - ) { - return src; - } - else - return Bry_.Mid(src, txt_bgn, txt_end); - } - public static byte[] Trim_bgn(byte[] v, byte trim, int bgn) { - boolean trimmed = false; - int len = v.length; - int pos = bgn; - for (; pos < len; pos++) { - if (v[pos] == trim) { - trimmed = true; - } - else - break; - } - return trimmed ? Bry_.Mid(v, pos, len) : v; - } - public static byte[] Trim_end(byte[] v, byte trim, int end) { - boolean trimmed = false; - int pos = end - 1; // NOTE: -1 b/c callers will always be passing pos + 1; EX: src, src_len - for (; pos > -1; pos--) { - if (v[pos] == trim) { - trimmed = true; - } - else - break; - } - return trimmed ? Bry_.Mid(v, 0, pos + 1) : v; - } - public static int Compare(byte[] lhs, byte[] rhs) { - if (lhs == null) return CompareAble_.More; - else if (rhs == null) return CompareAble_.Less; - else return Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); - } - public static int Compare(byte[] lhs, int lhs_bgn, int lhs_end, byte[] rhs, int rhs_bgn, int rhs_end) { - int lhs_len = lhs_end - lhs_bgn, rhs_len = rhs_end - rhs_bgn; - int min = lhs_len < rhs_len ? lhs_len : rhs_len; - int rv = CompareAble_.Same; - for (int i = 0; i < min; i++) { - rv = (lhs[i + lhs_bgn] & 0xff) - (rhs[i + rhs_bgn] & 0xff); // PATCH.JAVA:need to convert to unsigned byte - if (rv != CompareAble_.Same) return rv > CompareAble_.Same ? CompareAble_.More : CompareAble_.Less; // NOTE: changed from if (rv != CompareAble_.Same) return rv; DATE:2013-04-25 - } - return Int_.Compare(lhs_len, rhs_len); // lhs and rhs share same beginning bytes; return len comparisons - } - public static boolean Eq(byte[] src, byte[] val) {return Eq(src, 0, src == null ? 0 : src.length, val);} - public static boolean Eq(byte[] src, int src_bgn, int src_end, byte[] val) { - if (src == null && val == null) return true; - else if (src == null || val == null) return false; - if (src_bgn < 0) return false; - int val_len = val.length; - if (val_len != src_end - src_bgn) return false; - int src_len = src.length; - for (int i = 0; i < val_len; i++) { - int src_pos = i + src_bgn; - if (src_pos == src_len) return false; - if (val[i] != src[src_pos]) return false; - } - return true; - } - public static boolean Eq_ci_a7(byte[] lhs, byte[] rhs, int rhs_bgn, int rhs_end) { - if (lhs == null && rhs == null) return true; - else if (lhs == null || rhs == null) return false; - int lhs_len = lhs.length; - int rhs_len = rhs_end - rhs_bgn; - if (lhs_len != rhs_len) return false; - for (int i = 0; i < lhs_len; i++) { - byte lhs_b = lhs[i]; if (lhs_b > 64 && lhs_b < 91) lhs_b += 32; // lowercase - byte rhs_b = rhs[i + rhs_bgn]; if (rhs_b > 64 && rhs_b < 91) rhs_b += 32; // lowercase - if (lhs_b != rhs_b) return false; - } - return true; - } - public static boolean Match(byte[] src, byte[] find) {return Match(src, 0, src.length, find, 0, find.length);} - public static boolean Match(byte[] src, int src_bgn, byte[] find) {return Match(src, src_bgn, src.length, find, 0, find.length);} - public static boolean Match(byte[] src, int src_bgn, int src_end, byte[] find) {return Match(src, src_bgn, src_end, find, 0, find.length);} - public static boolean Match(byte[] src, int src_bgn, int src_end, byte[] find, int find_bgn, int find_end) { - if (src_bgn == -1) return false; - int src_len = src.length; - if (src_end > src_len) src_end = src_len; // must limit src_end to src_len, else ArrayIndexOutOfBounds below; DATE:2015-01-31 - int find_len = find_end - find_bgn; - if (find_len != src_end - src_bgn) return false; - if (find_len == 0) return src_end - src_bgn == 0; // "" only matches "" - for (int i = 0; i < find_len; i++) { - int pos = src_bgn + i; - if (pos >= src_end) return false; // ran out of src; exit; EX: src=ab; find=abc - if (src[pos] != find[i + find_bgn]) return false; - } - return true; - } - public static boolean Match_w_swap(byte[] src, int src_bgn, int src_end, byte[] find, int find_bgn, int find_end, byte swap_src, byte swap_trg) {// same as above, but used by XOWA for ttl matches; - int src_len = src.length; - if (src_end > src_len) src_end = src_len; // must limit src_end to src_len, else ArrayIndexOutOfBounds below; DATE:2015-01-31 - int find_len = find_end - find_bgn; - if (find_len != src_end - src_bgn) return false; - if (find_len == 0) return src_end - src_bgn == 0; // "" only matches "" - for (int i = 0; i < find_len; i++) { - int pos = src_bgn + i; - if (pos >= src_end) return false; // ran out of src; exit; EX: src=ab; find=abc - byte src_byte = src[pos]; if (src_byte == swap_src) src_byte = swap_trg; - byte trg_byte = find[i + find_bgn]; if (trg_byte == swap_src) trg_byte = swap_trg; - if (src_byte != trg_byte) return false; - } - return true; - } - public static boolean Match_bwd_any(byte[] src, int src_end, int src_bgn, byte[] find) { // NOTE: utf8 doesn't matter (matching byte for byte) - int find_len = find.length; - for (int i = 0; i < find_len; i++) { - int src_pos = src_end - i; - int find_pos = find_len - i - 1; - if (src_pos < src_bgn) return false; // ran out of src; exit; EX: src=ab; find=abc - if (src[src_pos] != find[find_pos]) return false; - } - return true; - } - public static int To_int_by_a7(byte[] v) { - int v_len = v.length; - int mod = 8 * (v_len - 1); - int rv = 0; - for (int i = 0; i < v_len; i++) { - rv |= v[i] << mod; - mod -= 8; - } - return rv; -// return ((0xFF & v[0]) << 24) -// | ((0xFF & v[1]) << 16) -// | ((0xFF & v[2]) << 8) -// | (0xFF & v[3]); - } - public static byte[] To_a7_bry(int val, int pad_len) {return To_a7_bry(val, null, 0, pad_len);} - public static byte[] To_a7_bry(int val, byte[] ary, int aryPos, int pad_len) { - int neg = 0; - if (val < 0) { - val *= -1; - neg = 1; - } - int digits = val == 0 ? 0 : Math_.Log10(val); - digits += 1; // digits = log + 1; EX: Log(1-9) = 0, Log(10-99) = 1 - int ary_len = digits + neg, aryBgn = aryPos, pad = 0; - if (ary_len < pad_len) { // padding specified - pad = pad_len - ary_len; - ary_len = pad_len; - } - if (ary == null) ary = new byte[ary_len]; - long factor = 1; // factor needs to be long to handle 1 billion (for which factor would be 10 billion) - for (int i = 0; i < digits; i++) // calc maxFactor - factor *= 10; - if (neg == 1) ary[0] = Byte_NegSign; - - for (int i = 0; i < pad; i++) // fill ary with pad - ary[i + aryBgn] = Byte_ascii.To_a7_str(0); - aryBgn += pad; // advance aryBgn by pad - for (int i = neg; i < ary_len - pad; i++) { - int denominator = (int)(factor / 10); // cache denominator to check for divide by 0 - int digit = denominator == 0 ? 0 : (int)((val % factor) / denominator); - ary[aryBgn + i] = Byte_ascii.To_a7_str(digit); - factor /= 10; - } - return ary; - } - public static byte[] new_by_int(int v) { - byte b0 = (byte)(v >> 24); - byte b1 = (byte)(v >> 16); - byte b2 = (byte)(v >> 8); - byte b3 = (byte)(v); - if (b0 != 0) return new byte[] {b0, b1, b2, b3}; - else if (b1 != 0) return new byte[] {b1, b2, b3}; - else if (b2 != 0) return new byte[] {b2, b3}; - else return new byte[] {b3}; - } - public static boolean To_bool_or(byte[] raw, boolean or) { - return Bry_.Eq(raw, Bool_.True_bry) ? true : or; - } - public static boolean To_bool_by_int(byte[] ary) { - int rv = To_int_or(ary, 0, ary.length, Int_.Min_value, Bool_.Y, null); - switch (rv) { - case 0: return false; - case 1: return true; - default: throw Err_.new_wo_type("could not parse to boolean int", "val", String_.new_u8(ary)); - } - } - public static byte To_int_as_byte(byte[] ary, int bgn, int end, byte or) {return (byte)To_int_or(ary, bgn, end, or);} - public static int To_int(byte[] ary) {return To_int_or_fail(ary, 0, ary.length);} - public static int To_int_or_fail(byte[] ary, int bgn, int end) { - int rv = To_int_or(ary, bgn, end, Int_.Min_value, Bool_.Y, null); - if (rv == Int_.Min_value) throw Err_.new_wo_type("could not parse to int", "val", String_.new_u8(ary, bgn, end)); - return rv; - } - public static int To_int_or_neg1(byte[] ary) {return To_int_or(ary, 0 , ary.length, -1, Bool_.Y, null);} - public static int To_int_or(byte[] ary, int or) {return To_int_or(ary, 0 , ary.length, or, Bool_.Y, null);} - public static int To_int_or(byte[] ary, int bgn, int end, int or) {return To_int_or(ary, bgn , end , or, Bool_.Y, null);} - public static int To_int_or__strict(byte[] ary, int or) {return To_int_or(ary, 0 , ary.length, or, Bool_.N, null);} - private static int To_int_or(byte[] ary, int bgn, int end, int or, boolean sign_is_valid, byte[] ignore_ary) { - if ( ary == null - || end == bgn // null-len - ) return or; - int rv = 0, multiple = 1; - for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 - byte b = ary[i]; - switch (b) { - case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: - case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: - rv += multiple * (b - Byte_ascii.Num_0); - multiple *= 10; - break; - case Byte_ascii.Dash: - return i == bgn && sign_is_valid ? rv * -1 : or; - case Byte_ascii.Plus: - return i == bgn && sign_is_valid ? rv : or; - default: - boolean invalid = true; - if (ignore_ary != null) { - int ignore_ary_len = ignore_ary.length; - for (int j = 0; j < ignore_ary_len; j++) { - if (b == ignore_ary[j]) { - invalid = false; - break; - } - } - } - if (invalid) return or; - break; - } - } - return rv; - } - public static int To_int_or__trim_ws(byte[] ary, int bgn, int end, int or) { // NOTE: same as To_int_or, except trims ws at bgn / end; DATE:2014-02-09 - if (end == bgn) return or; // null len - int rv = 0, multiple = 1; - boolean numbers_seen = false, ws_seen = false; - for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 - byte b = ary[i]; - switch (b) { - case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: - case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: - rv += multiple * (b - Byte_ascii.Num_0); - multiple *= 10; - if (ws_seen) // "number ws number" pattern; invalid ws in middle; see tests - return or; - numbers_seen = true; - break; - case Byte_ascii.Dash: - return i == bgn ? rv * -1 : or; - case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: - if (numbers_seen) - ws_seen = true; - break; - default: return or; - } - } - return rv; - } - public static int To_int_or__lax(byte[] ary, int bgn, int end, int or) { - if (end == bgn) return or; // null-len - int end_num = end; - for (int i = bgn; i < end; i++) { - byte b = ary[i]; - switch (b) { - case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: - case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: - break; - case Byte_ascii.Dash: - if (i != bgn) { - end_num = i; - i = end; - } - break; - default: - end_num = i; - i = end; - break; - } - } - return To_int_or(ary, bgn, end_num, or); - } - public static long To_long_or(byte[] ary, long or) {return To_long_or(ary, null, 0, ary.length, or);} - public static long To_long_or(byte[] ary, byte[] ignore_ary, int bgn, int end, long or) { - if ( ary == null - || end == bgn // null-len - ) return or; - long rv = 0, multiple = 1; - for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 - byte b = ary[i]; - switch (b) { - case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: - case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: - rv += multiple * (b - Byte_ascii.Num_0); - multiple *= 10; - break; - case Byte_ascii.Dash: - return i == bgn ? rv * -1 : or; - case Byte_ascii.Plus: - return i == bgn ? rv : or; - default: - boolean invalid = true; - if (ignore_ary != null) { - int ignore_ary_len = ignore_ary.length; - for (int j = 0; j < ignore_ary_len; j++) { - if (b == ignore_ary[j]) { - invalid = false; - break; - } - } - } - if (invalid) return or; - break; - } - } - return rv; - } - public static double To_double(byte[] ary, int bgn, int end) {return Double_.parse(String_.new_u8(ary, bgn, end));} - public static double To_double_or(byte[] bry, double or) {return Double_.parse_or(String_.new_u8(bry, 0, bry.length), or);} - public static double To_double_or(byte[] ary, int bgn, int end, double or) {return Double_.parse_or(String_.new_u8(ary, bgn, end), or);} - public static Decimal_adp To_decimal(byte[] ary, int bgn, int end) {return Decimal_adp_.parse(String_.new_u8(ary, bgn, end));} - public static byte[][] Ary_add(byte[][] lhs, byte[][] rhs) { - int lhs_len = lhs.length, rhs_len = rhs.length; - if (lhs_len == 0) return rhs; - else if (rhs_len == 0) return lhs; - else { - byte[][] rv = new byte[lhs_len + rhs_len][]; - for (int i = 0; i < lhs_len; i++) - rv[i] = lhs[i]; - for (int i = 0; i < rhs_len; i++) - rv[i + lhs_len] = rhs[i]; - return rv; - } - } - public static byte[][] Ary(byte[]... ary) {return ary;} - public static byte[][] Ary(String... ary) { - int ary_len = ary.length; - byte[][] rv = new byte[ary_len][]; - for (int i = 0; i < ary_len; i++) { - String itm = ary[i]; - rv[i] = itm == null ? null : Bry_.new_u8(itm); - } - return rv; - } - public static byte[][] Ary_obj(Object... ary) { - if (ary == null) return Bry_.Ary_empty; - int ary_len = ary.length; - byte[][] rv = new byte[ary_len][]; - for (int i = 0; i < ary_len; i++) { - Object itm = ary[i]; - rv[i] = itm == null ? null : Bry_.new_u8(Object_.Xto_str_strict_or_empty(itm)); - } - return rv; - } - public static boolean Ary_eq(byte[][] lhs, byte[][] rhs) { - int lhs_len = lhs.length; - int rhs_len = rhs.length; - if (lhs_len != rhs_len) return false; - for (int i = 0; i < lhs_len; ++i) - if (!Bry_.Eq(lhs[i], rhs[i])) return false; - return true; - } - public static final byte Dlm_fld = (byte)'|', Dlm_row = (byte)'\n', Dlm_quote = (byte)'"', Dlm_null = 0, Ascii_zero = 48; - public static final String Fmt_csvDte = "yyyyMMdd HHmmss.fff"; - public static DateAdp ReadCsvDte(byte[] ary, Int_obj_ref posRef, byte lkp) {// ASSUME: fmt = yyyyMMdd HHmmss.fff - int y = 0, M = 0, d = 0, H = 0, m = 0, s = 0, f = 0; - int bgn = posRef.Val(); - y += (ary[bgn + 0] - Ascii_zero) * 1000; - y += (ary[bgn + 1] - Ascii_zero) * 100; - y += (ary[bgn + 2] - Ascii_zero) * 10; - y += (ary[bgn + 3] - Ascii_zero); - M += (ary[bgn + 4] - Ascii_zero) * 10; - M += (ary[bgn + 5] - Ascii_zero); - d += (ary[bgn + 6] - Ascii_zero) * 10; - d += (ary[bgn + 7] - Ascii_zero); - H += (ary[bgn + 9] - Ascii_zero) * 10; - H += (ary[bgn + 10] - Ascii_zero); - m += (ary[bgn + 11] - Ascii_zero) * 10; - m += (ary[bgn + 12] - Ascii_zero); - s += (ary[bgn + 13] - Ascii_zero) * 10; - s += (ary[bgn + 14] - Ascii_zero); - f += (ary[bgn + 16] - Ascii_zero) * 100; - f += (ary[bgn + 17] - Ascii_zero) * 10; - f += (ary[bgn + 18] - Ascii_zero); - if (ary[bgn + 19] != lkp) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8__by_len(ary, bgn, 20)); - posRef.Val_add(19 + 1); // +1=lkp.len - return DateAdp_.new_(y, M, d, H, m, s, f); - } - public static String ReadCsvStr(byte[] ary, Int_obj_ref posRef, byte lkp) {return String_.new_u8(ReadCsvBry(ary, posRef, lkp, true));} - public static byte[] ReadCsvBry(byte[] ary, Int_obj_ref posRef, byte lkp) {return ReadCsvBry(ary, posRef, lkp, true);} - public static byte[] ReadCsvBry(byte[] ary, Int_obj_ref posRef, byte lkp, boolean make) { - int bgn = posRef.Val(), aryLen = ary.length; - Bry_bfr bb = null; - if (aryLen > 0 && ary[0] == Dlm_quote) { - int pos = bgn + 1; // +1 to skip quote - if (make) bb = Bry_bfr_.New(); - while (true) { - if (pos == aryLen) throw Err_.new_wo_type("endOfAry reached, but no quote found", "txt", String_.new_u8__by_len(ary, bgn, pos)); - byte b = ary[pos]; - if (b == Dlm_quote) { - if (pos == aryLen - 1) throw Err_.new_wo_type("endOfAry reached, quote found but lkp not", "txt", String_.new_u8__by_len(ary, bgn, pos)); - byte next = ary[pos + 1]; - if (next == Dlm_quote) { // byte followed by quote - if (make) bb.Add_byte(b); - pos += 2; - } - else if (next == lkp) { - posRef.Val_(pos + 2); // 1=endQuote;1=lkp; - return make ? bb.To_bry() : Bry_.Empty; - } - else throw Err_.new_wo_type("quote found, but not doubled", "txt", String_.new_u8__by_len(ary, bgn, pos + 1)); - } - else { - if (make) bb.Add_byte(b); - pos++; - } - } - } - else { - for (int i = bgn; i < aryLen; i++) { - if (ary[i] == lkp) { - posRef.Val_(i + 1); // +1 = lkp.Len - return make ? Bry_.Mid(ary, bgn, i) : Bry_.Empty; - } - } - throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "txt", String_.new_u8__by_len(ary, bgn, aryLen)); - } - } - public static int ReadCsvInt(byte[] ary, Int_obj_ref posRef, byte lkp) { - int bgn = posRef.Val(); - int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); - if (pos == Bry_find_.Not_found) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); - int rv = Bry_.To_int_or(ary, posRef.Val(), pos, -1); - posRef.Val_(pos + 1); // +1 = lkp.Len - return rv; - } - public static double ReadCsvDouble(byte[] ary, Int_obj_ref posRef, byte lkp) { - int bgn = posRef.Val(); - int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); - if (pos == Bry_find_.Not_found) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); - double rv = Bry_.To_double(ary, posRef.Val(), pos); - posRef.Val_(pos + 1); // +1 = lkp.Len - return rv; - } - public static void ReadCsvNext(byte[] ary, Int_obj_ref posRef, byte lkp) { - int bgn = posRef.Val(); - int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); - posRef.Val_(pos + 1); // +1 = lkp.Len - } - public static byte Byte_NegSign = (byte)'-'; - public static byte[] Replace_create(byte[] src, byte find, byte replace) { - byte[] rv = Bry_.Copy(src); - Replace_reuse(rv, find, replace); - return rv; - } - public static void Replace_reuse(byte[] src, byte find, byte replace) { - int src_len = src.length; - for (int i = 0; i < src_len; i++) { - if (src[i] == find) src[i] = replace; - } - } - public static byte[] Replace(byte[] src, byte find, byte replace) {return Replace(src, 0, src.length, find, replace);} - public static byte[] Replace(byte[] src, int bgn, int end, byte find, byte replace) { - int src_len = src.length; - byte[] rv = new byte[src_len]; - for (int i = bgn; i < end; ++i) { - byte b = src[i]; - rv[i] = b == find ? replace : b; - } - for (int i = end; i < src_len; ++i) - rv[i] = src[i]; - return rv; - } - public static byte[] Replace_safe(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl) { - if (src == null || find == null || repl == null) return null; - return Replace(bfr, src, find, repl, 0, src.length); - } - public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl) {return Replace(bfr, src, find, repl, 0, src.length);} - public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl, int src_bgn, int src_end) {return Replace(bfr, src, find, repl, src_bgn, src_end, Int_.Max_value);} - public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl, int src_bgn, int src_end, int limit) { - int pos = src_bgn; - boolean dirty = false; - int find_len = find.length; - int bfr_bgn = pos; - int replace_count = 0; - while (pos < src_end) { - int find_pos = Bry_find_.Find_fwd(src, find, pos); - if (find_pos == Bry_find_.Not_found) break; - dirty = true; - bfr.Add_mid(src, bfr_bgn, find_pos); - bfr.Add(repl); - pos = find_pos + find_len; - bfr_bgn = pos; - ++replace_count; - if (replace_count == limit) break; - } - if (dirty) - bfr.Add_mid(src, bfr_bgn, src_end); - return dirty ? bfr.To_bry_and_clear() : src; - } - public static byte[] Replace(byte[] src, byte[] find, byte[] replace) {return Replace_between(src, find, null, replace);} - public static byte[] Replace_between(byte[] src, byte[] bgn, byte[] end, byte[] replace) { - Bry_bfr bfr = Bry_bfr_.New(); - boolean replace_all = end == null; - int src_len = src.length, bgn_len = bgn.length, end_len = replace_all ? 0 : end.length; - int pos = 0; - while (true) { - if (pos >= src_len) break; - int bgn_pos = Bry_find_.Find_fwd(src, bgn, pos); - if (bgn_pos == Bry_find_.Not_found) { - bfr.Add_mid(src, pos, src_len); - break; - } - else { - int bgn_rhs = bgn_pos + bgn_len; - int end_pos = replace_all ? bgn_rhs : Bry_find_.Find_fwd(src, end, bgn_rhs); - if (end_pos == Bry_find_.Not_found) { - bfr.Add_mid(src, pos, src_len); - break; - } - else { - bfr.Add_mid(src, pos, bgn_pos); - bfr.Add(replace); - pos = end_pos + end_len; - } - } - } - return bfr.To_bry_and_clear(); - } - public static byte[] Replace_many(byte[] src, byte[] find, byte[] repl) { - Bry_bfr bfr = null; - int src_len = src.length; - int find_len = find.length; - - int pos = 0; - while (true) { - // find find_bgn - int find_bgn = Bry_find_.Find_fwd(src, find, pos, src_len); - - // exit if nothing found - if (find_bgn == Bry_find_.Not_found) - break; - - // lazy-instantiation - if (bfr == null) - bfr = Bry_bfr_.New(); - - // add everything up to find_bgn - bfr.Add_mid(src, pos, find_bgn); - - // add repl - bfr.Add(repl); - - // move pos forward - pos = find_bgn + find_len; - } - - // nothing found; return src - if (bfr == null) - return src; - else { - // add rest - bfr.Add_mid(src, pos, src_len); - return bfr.To_bry_and_clear(); - } - } - public static int Trim_end_pos(byte[] src, int end) { - for (int i = end - 1; i > -1; i--) { - switch (src[i]) { - case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space: - break; - default: - return i + 1; - } - } - return 0; - } - public static byte[] Increment_last(byte[] ary) {return Increment_last(ary, ary.length - 1);} - public static byte[] Increment_last(byte[] ary, int end_idx) { - for (int i = end_idx; i > -1; i--) { - byte end_val_old = ary[i]; - byte end_val_new = (byte)(end_val_old + 1); - ary[i] = end_val_new; - if (end_val_new > (end_val_old & 0xff)) break; // PATCH.JAVA:need to convert to unsigned byte - } - return ary; - } - public static byte[] Ucase__all(byte[] src) {return Xcase__all(Bool_.Y, src, 0, -1);} - public static byte[] Lcase__all(byte[] src) {return Xcase__all(Bool_.N, src, 0, -1);} - public static byte[] Lcase__all(byte[] src, int bgn, int end) {return Xcase__all(Bool_.N, src, bgn, end);} - private static byte[] Xcase__all(boolean upper, byte[] src, int bgn, int end) { - if (src == null) return null; - int len = end == -1 ? src.length : end - bgn; if (len == 0) return src; - byte[] rv = new byte[len]; - for (int i = 0; i < len; ++i) { - byte b = src[i + bgn]; - if (upper) { - if (b > 96 && b < 123) b -= 32; - } - else { - if (b > 64 && b < 91) b += 32; - } - rv[i] = b; - } - return rv; - } - public static byte[] Xcase__build__all(Bry_bfr tmp, boolean upper, byte[] src) { - if (src == null) return null; - int src_bgn = 0; - int src_end = src.length; - int lbound = 96, ubound = 123; - if (!upper) { - lbound = 64; ubound = 91; - } - - boolean dirty = false; - for (int i = src_bgn; i < src_end; i++) { - byte b = src[i]; - if (b > lbound && b < ubound) { - if (!dirty) { - dirty = true; - tmp.Add_mid(src, src_bgn, i); - } - if (upper) - b -= 32; - else - b += 32; - } - if (dirty) - tmp.Add_byte(b); - } - return dirty ? tmp.To_bry_and_clear() : src; - } - public static byte[] Ucase__1st(byte[] src) {return Xcase__1st(Bool_.Y, src);} - public static byte[] Lcase__1st(byte[] src) {return Xcase__1st(Bool_.N, src);} - private static byte[] Xcase__1st(boolean upper, byte[] src) { - if (src == null) return null; - int len = src.length; if (len == 0) return src; - byte[] rv = new byte[len]; - byte b = src[0]; - if (upper) { - if (b > 96 && b < 123) b -= 32; - } - else { - if (b > 64 && b < 91) b += 32; - } - rv[0] = b; - for (int i = 1; i < len; ++i) { - rv[i] = src[i]; - } - return rv; - } - public static byte[] Null_if_empty(byte[] v) {return Len_eq_0(v) ? null : v;} - - public static byte[] Escape_ws(byte[] bry) {Bry_bfr bfr = Bry_bfr_.Get(); byte[] rv = Escape_ws(bfr, bry); bfr.Mkr_rls(); return rv;} - public static byte[] Escape_ws(Bry_bfr bfr, byte[] src) { - boolean dirty = false; - int len = src.length; - for (int i = 0; i < len; ++i) { - byte b = src[i]; - byte escape = Byte_.Zero; - switch (b) { - case Byte_ascii.Tab: escape = Byte_ascii.Ltr_t; break; - case Byte_ascii.Nl: escape = Byte_ascii.Ltr_n; break; - case Byte_ascii.Cr: escape = Byte_ascii.Ltr_r; break; - default: if (dirty) bfr.Add_byte(b); break; - } - if (escape != Byte_.Zero) { - if (!dirty) { - dirty = true; - bfr.Add_mid(src, 0, i); - } - bfr.Add_byte_backslash().Add_byte(escape); - } - } - return dirty ? bfr.To_bry_and_clear() : src; - } - public static byte[] Resolve_escape(Bry_bfr bfr, byte escape, byte[] raw, int bgn, int end) { - int pos = bgn; - boolean dirty = false; - while (pos < end) { - byte b = raw[pos]; - if (b == escape) { - if (!dirty) { - dirty = true; - bfr.Add_mid(raw, bgn, pos); - } - ++pos; - if (pos < end) { // check for eos; note that this ignores trailing "\"; EX: "a\" -> "a" - bfr.Add_byte(raw[pos]); - ++pos; - } - } - else { - if (dirty) bfr.Add_byte(b); - ++pos; - } - } - return dirty ? bfr.To_bry_and_clear() : raw; - } - public static void Clear(byte[] bry) { - int len = bry.length; - for (int i = 0; i < len; ++i) - bry[i] = Byte_.Zero; - } - public static byte[] Replace_nl_w_tab(byte[] src, int bgn, int end) { - return Bry_.Replace(Bry_.Mid(src, bgn, end), Byte_ascii.Nl, Byte_ascii.Tab); - } - public static byte[] Escape_html(byte[] src) { - return Escape_html(null, Bool_.N, src, 0, src.length); - } - public static byte[] Escape_html(Bry_bfr bfr, boolean ws, byte[] src, int src_bgn, int src_end) { // uses PHP rules for htmlspecialchars; REF.PHP:http://php.net/manual/en/function.htmlspecialchars.php - boolean dirty = false; - int cur = src_bgn; - int prv = cur; - boolean called_by_bry = bfr == null; - - // loop over chars - while (true) { - // if EOS, exit - if (cur == src_end) { - if (dirty) { - bfr.Add_mid(src, prv, src_end); - } - break; - } - - // check current byte if escaped - byte b = src[cur]; - byte[] escaped = null; - switch (b) { - case Byte_ascii.Amp: escaped = Gfh_entity_.Amp_bry; break; - case Byte_ascii.Quote: escaped = Gfh_entity_.Quote_bry; break; - case Byte_ascii.Apos: escaped = Gfh_entity_.Apos_num_bry; break; - case Byte_ascii.Lt: escaped = Gfh_entity_.Lt_bry; break; - case Byte_ascii.Gt: escaped = Gfh_entity_.Gt_bry; break; - case Byte_ascii.Nl: if (ws) escaped = Gfh_entity_.Nl_bry; break; - case Byte_ascii.Cr: if (ws) escaped = Gfh_entity_.Cr_bry; break; - case Byte_ascii.Tab: if (ws) escaped = Gfh_entity_.Tab_bry; break; - } - - // not escaped; increment and continue - if (escaped == null) { - cur++; - continue; - } - // escaped - else { - dirty = true; - if (bfr == null) bfr = Bry_bfr_.New(); - - if (prv < cur) - bfr.Add_mid(src, prv, cur); - bfr.Add(escaped); - cur++; - prv = cur; - } - } - - if (dirty) { - if (called_by_bry) - return bfr.To_bry_and_clear(); - else - return null; - } - else { - if (called_by_bry) { - if (src_bgn == 0 && src_end == src.length) - return src; - else - return Bry_.Mid(src, src_bgn, src_end); - } - else { - bfr.Add_mid(src, src_bgn, src_end); - return null; - } - } - } -} +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2020 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx; + +import gplx.core.primitives.Int_obj_ref; +import gplx.langs.htmls.entitys.Gfh_entity_; + +public class Bry_ { + public static final String Cls_val_name = "byte[]"; + public static final byte[] Empty = new byte[0]; + public static final byte[][] Ary_empty = new byte[0][]; + public static final Class Cls_ref_type = byte[].class; + public static byte[] cast(Object val) {return (byte[])val;} + public static byte[] New_by_byte(byte b) {return new byte[] {b};} + public static byte[] New_by_ints(int... ary) { + int len = ary.length; + byte[] rv = new byte[len]; + for (int i = 0; i < len; i++) + rv[i] = (byte)ary[i]; + return rv; + } + public static byte[] New_by_objs(Bry_bfr bfr, Object... ary) { + int len = ary.length; + for (int i = 0; i < len; ++i) { + Object itm = ary[i]; + Class type = Type_.Type_by_obj(itm); + if (Type_.Eq(type, int.class)) bfr.Add_byte((byte)Int_.Cast(itm)); + else if (Type_.Eq(type, String.class)) bfr.Add_str_u8((String)itm); + else if (Type_.Eq(type, byte[].class)) bfr.Add((byte[])itm); + else throw Err_.new_unhandled(Type_.Canonical_name(type)); + } + return bfr.To_bry_and_clear(); + } + public static byte[] Coalesce_to_empty(byte[] v) {return v == null ? Bry_.Empty : v;} + public static byte[] Coalesce(byte[] v, byte[] or) {return v == null ? or : v;} + public static byte[] new_a7(String str) { + if (str == null) return null; + int str_len = str.length(); + if (str_len == 0) return Bry_.Empty; + byte[] rv = new byte[str_len]; + for (int i = 0; i < str_len; ++i) { + char c = str.charAt(i); + if (c > 128) c = '?'; + rv[i] = (byte)c; + } + return rv; + } + public static byte[] new_u8_safe(String str) {return str == null ? null : new_u8(str);} + public static byte[] new_u8(String str) { + try { + int str_len = str.length(); + if (str_len == 0) return Bry_.Empty; + int bry_len = new_u8__by_len(str, str_len); + byte[] rv = new byte[bry_len]; + new_u8__write(str, str_len, rv, 0); + return rv; + } + catch (Exception e) {throw Err_.new_exc(e, "core", "invalid UTF-8 sequence", "s", str);} + } + public static int new_u8__by_len(String s, int s_len) { + int rv = 0; + for (int i = 0; i < s_len; ++i) { + char c = s.charAt(i); + int c_len = 0; + if ( c < 128) c_len = 1; // 1 << 7 + else if ( c < 2048) c_len = 2; // 1 << 11 + else if ( (c > 55295) // 0xD800 + && (c < 56320)) c_len = 4; // 0xDFFF + else c_len = 3; // 1 << 16 + if (c_len == 4) ++i; // surrogate is 2 wide, not 1 + rv += c_len; + } + return rv; + } + public static byte[] New_u8_nl_apos(String... lines) { + Bry_bfr bfr = Bry_bfr_.Get(); + try { + New_u8_nl_apos(bfr, lines); + return bfr.To_bry_and_clear(); + } + finally {bfr.Mkr_rls();} + } + public static void New_u8_nl_apos(Bry_bfr bfr, String... lines) { + int lines_len = lines.length; + for (int i = 0; i < lines_len; ++i) { + if (i != 0) bfr.Add_byte_nl(); + byte[] line = Bry_.new_u8(lines[i]); + boolean dirty = false; + int prv = 0; + int line_len = line.length; + for (int j = 0; j < line_len; ++j) { + byte b = line[j]; + if (b == Byte_ascii.Apos) { + bfr.Add_mid(line, prv, j); + bfr.Add_byte(Byte_ascii.Quote); + dirty = true; + prv = j + 1; + } + } + if (dirty) + bfr.Add_mid(line, prv, line_len); + else + bfr.Add(line); + } + } + public static void new_u8__write(String str, int str_len, byte[] bry, int bry_pos) { + for (int i = 0; i < str_len; ++i) { + char c = str.charAt(i); + if ( c < 128) { + bry[bry_pos++] = (byte)c; + } + else if ( c < 2048) { + bry[bry_pos++] = (byte)(0xC0 | (c >> 6)); + bry[bry_pos++] = (byte)(0x80 | (c & 0x3F)); + } + else if ( (c > 55295) // 0xD800 + && (c < 56320)) { // 0xDFFF + if (i >= str_len) throw Err_.new_wo_type("incomplete surrogate pair at end of String", "char", c); + char nxt_char = str.charAt(i + 1); + int v = 0x10000 + (c - 0xD800) * 0x400 + (nxt_char - 0xDC00); + bry[bry_pos++] = (byte)(0xF0 | (v >> 18)); + bry[bry_pos++] = (byte)(0x80 | (v >> 12) & 0x3F); + bry[bry_pos++] = (byte)(0x80 | (v >> 6) & 0x3F); + bry[bry_pos++] = (byte)(0x80 | (v & 0x3F)); + ++i; + } + else { + bry[bry_pos++] = (byte)(0xE0 | (c >> 12)); + bry[bry_pos++] = (byte)(0x80 | (c >> 6) & 0x3F); + bry[bry_pos++] = (byte)(0x80 | (c & 0x3F)); + } + } + } + public static byte[] Copy(byte[] src) { + int src_len = src.length; + byte[] trg = new byte[src_len]; + for (int i = 0; i < src_len; ++i) + trg[i] = src[i]; + return trg; + } + public static byte[] Resize(byte[] src, int trg_len) {return Resize(src, 0, trg_len);} + public static byte[] Resize(byte[] src, int src_bgn, int trg_len) { + byte[] trg = new byte[trg_len]; + int src_len = src.length; if (src_len > trg_len) src_len = trg_len; // trg_len can be less than src_len + Copy_to(src, src_bgn, src_len, trg, 0); + return trg; + } + public static byte[] Repeat_space(int len) {return Repeat(Byte_ascii.Space, len);} + public static byte[] Repeat(byte b, int len) { + byte[] rv = new byte[len]; + for (int i = 0; i < len; i++) + rv[i] = b; + return rv; + } + public static byte[] Repeat_bry(byte[] bry, int len) { + int bry_len = bry.length; + int rv_len = len * bry_len; + byte[] rv = new byte[rv_len]; + for (int i = 0; i < len; i++) { + for (int j = 0; j < bry_len; j++) { + rv[(i * bry_len) + j] = bry[j]; + } + } + return rv; + } + public static byte[] Add(byte[] src, byte b) { + int src_len = src.length; + byte[] rv = new byte[src_len + 1]; + Copy_to(src, 0, src_len, rv, 0); + rv[src_len] = b; + return rv; + } + public static byte[] Add(byte b, byte[] src) { + int src_len = src.length; + byte[] rv = new byte[src_len + 1]; + Copy_to(src, 0, src_len, rv, 1); + rv[0] = b; + return rv; + } + public static byte[] Add(byte[]... all) { + int all_len = all.length, rv_len = 0; + for (int i = 0; i < all_len; ++i) { + byte[] cur = all[i]; if (cur == null) continue; + rv_len += cur.length; + } + byte[] rv = new byte[rv_len]; + int rv_idx = 0; + for (int i = 0; i < all_len; ++i) { + byte[] cur = all[i]; if (cur == null) continue; + int cur_len = cur.length; + for (int j = 0; j < cur_len; ++j) + rv[rv_idx++] = cur[j]; + } + return rv; + } + public static byte[] Add_w_dlm(byte[] dlm, byte[]... ary) { + int ary_len = ary.length; + if (ary_len == 0) return Bry_.Empty; + int dlm_len = dlm.length; + int rv_len = dlm_len * (ary_len - 1); // rv will have at least as many dlms as itms - 1 + for (int i = 0; i < ary_len; i++) { + byte[] itm = ary[i]; + if (itm != null) rv_len += itm.length; + } + int rv_pos = 0; + byte[] rv = new byte[rv_len]; + for (int i = 0; i < ary_len; i++) { + byte[] itm = ary[i]; + if (i != 0) { + for (int j = 0; j < dlm_len; j++) { + rv[rv_pos++] = dlm[j]; + } + } + if (itm == null) continue; + int itm_len = itm.length; + for (int j = 0; j < itm_len; j++) { + rv[rv_pos++] = itm[j]; + } + } + return rv; + } + public static byte[] Add_w_dlm(byte dlm, byte[]... ary) { + int ary_len = ary.length; + if (ary_len == 0) return Bry_.Empty; + int rv_len = ary_len - 1; // rv will have at least as many dlms as itms - 1 + for (int i = 0; i < ary_len; i++) { + byte[] itm = ary[i]; + if (itm != null) rv_len += itm.length; + } + int rv_pos = 0; + byte[] rv = new byte[rv_len]; + for (int i = 0; i < ary_len; i++) { + byte[] itm = ary[i]; + if (i != 0) rv[rv_pos++] = dlm; + if (itm == null) continue; + int itm_len = itm.length; + for (int j = 0; j < itm_len; j++) { + rv[rv_pos++] = itm[j]; + } + } + return rv; + } + public static int Len(byte[] v) {return v == null ? 0 : v.length;} + public static boolean Len_gt_0(byte[] v) {return v != null && v.length > 0;} + public static boolean Len_eq_0(byte[] v) {return v == null || v.length == 0;} + public static byte Get_at_end(byte[] bry) {return bry[bry.length - 1];} // don't bother checking for errors; depend on error trace + public static boolean Has_at(byte[] src, int src_len, int pos, byte b) {return (pos < src_len) && (src[pos] == b);} + public static boolean Has(byte[] src, byte[] lkp) {return Bry_find_.Find_fwd(src, lkp) != Bry_find_.Not_found;} + public static boolean Has(byte[] src, byte lkp) { + if (src == null) return false; + int len = src.length; + for (int i = 0; i < len; i++) + if (src[i] == lkp) return true; + return false; + } + public static boolean Has_at_bgn(byte[] src, byte lkp) {return Has_at_bgn(src, lkp, 0);} + public static boolean Has_at_bgn(byte[] src, byte lkp, int src_bgn) {return src_bgn < src.length ? src[src_bgn] == lkp : false;} + public static boolean Has_at_bgn(byte[] src, byte[] lkp) {return Has_at_bgn(src, lkp, 0, src.length);} + public static boolean Has_at_bgn(byte[] src, byte[] lkp, int src_bgn, int src_end) { + int lkp_len = lkp.length; + if (lkp_len + src_bgn > src_end) return false; // lkp is longer than src + for (int i = 0; i < lkp_len; i++) { + if (lkp[i] != src[i + src_bgn]) return false; + } + return true; + } + public static boolean Has_at_end(byte[] src, byte lkp) { + if (src == null) return false; + int src_len = src.length; + if (src_len == 0) return false; + return src[src_len - 1] == lkp; + } + public static boolean Has_at_end(byte[] src, byte[] lkp) {int src_len = src.length; return Has_at_end(src, lkp, src_len - lkp.length, src_len);} + public static boolean Has_at_end(byte[] src, byte[] lkp, int src_bgn, int src_end) { + int lkp_len = lkp.length; + if (src_bgn < 0) return false; + int pos = src_end - lkp_len; if (pos < src_bgn) return false; // lkp is longer than src + for (int i = 0; i < lkp_len; i++) { + if (lkp[i] != src[i + pos]) return false; + } + return true; + } + public static void Set(byte[] src, int bgn, int end, byte[] repl) { + int repl_len = repl.length; + for (int i = 0; i < repl_len; i++) + src[i + bgn] = repl[i]; + } + public static void Copy_to(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { + int trg_adj = trg_bgn - src_bgn; + for (int i = src_bgn; i < src_end; i++) + trg[i + trg_adj] = src[i]; + } + public static void Copy_to_reversed(byte[] src, int src_bgn, int src_end, byte[] trg, int trg_bgn) { + // copies src to trg, but in reverse order; EX: trg="1" src="432." -> "1.234" + int len = src_end - src_bgn; + for (int i = 0; i < len; i++) + trg[trg_bgn + i] = src[src_end - i - 1]; + } + public static byte[] Replace_one(byte[] orig, byte[] find, byte[] repl) { + // find val + int orig_len = orig.length; + int find_pos = Bry_find_.Find(orig, find, 0, orig_len, true); + if (find_pos == Bry_find_.Not_found) return orig; // nothing found; exit + + // do copy + int find_len = find.length, repl_len = repl.length; + int rv_len = orig_len + repl_len - find_len; + byte[] rv = new byte[rv_len]; + Copy_to(orig, 0 , find_pos, rv, 0 ); // copy orig before repl + Copy_to(repl, 0 , repl_len, rv, find_pos ); // copy repl + Copy_to(orig, find_pos + find_len, orig_len, rv, find_pos + repl_len); // copy orig after repl + return rv; + } + public static void Replace_all_direct(byte[] src, byte find, byte repl) {Replace_all_direct(src, find, repl, 0, src.length);} + public static void Replace_all_direct(byte[] src, byte find, byte repl, int bgn, int end) { + for (int i = bgn; i < end; i++) { + byte b = src[i]; + if (b == find) src[i] = repl; + } + } + public static byte[] Limit(byte[] src, int len) { + if (src == null) return null; + int src_len = src.length; + return len < src_len ? Bry_.Mid(src, 0, len) : src; + } + public static byte[] Mid_by_nearby(byte[] src, int pos, int around) { + int bgn = pos - around; if (bgn < 0) bgn = 0; + int src_len = src.length; + int end = pos + around; if (end > src_len) end = src_len; + return Mid(src, bgn, end); + } + public static byte[] Mid_by_len(byte[] src, int bgn, int len) {return Mid(src, bgn, bgn + len);} + public static byte[] Mid_by_len_safe(byte[] src, int bgn, int len) { + int src_len = src.length; + if (bgn < 0) bgn = 0; + if (len + bgn > src_len) len = (src_len - bgn); + return Mid(src, bgn, bgn + len); + } + public static String MidByLenToStr(byte[] src, int bgn, int len) { + int end = bgn + len; end = Int_.BoundEnd(end, src.length); + byte[] ary = Bry_.Mid(src, bgn, end); + return String_.new_u8(ary); + } + public static byte[] Mid_safe(byte[] src, int bgn, int end) { + if (src == null) return null; + int src_len = src.length; + if (bgn < 0) + bgn = 0; + else if (bgn >= src_len) + bgn = src_len; + + if (end < 0) + end = 0; + else if (end >= src_len) + end = src_len; + + if (bgn > end) + bgn = end; + else if (end < bgn) + end = bgn; + + return Mid(src, bgn, end); + } + public static byte[] Mid(byte[] src, int bgn) {return Mid(src, bgn, src.length);} + public static byte[] Mid_or(byte[] src, int bgn, int end, byte[] or) { + int src_len = src.length; + if ( src == null + || (bgn < 0 || bgn > src_len) + || (end < 0 || end > src_len) + || (end < bgn) + ) + return or; + return bgn == src_len ? Bry_.Empty : Mid(src, bgn, src_len); + } + public static byte[] Mid(byte[] src, int bgn, int end) { + try { + int len = end - bgn; if (len == 0) return Bry_.Empty; + byte[] rv = new byte[len]; + for (int i = bgn; i < end; i++) + rv[i - bgn] = src[i]; + return rv; + } catch (Exception e) {Err_.Noop(e); throw Err_.new_("Bry_", "mid failed", "bgn", bgn, "end", end);} + } + public static byte[] Mid_w_trim(byte[] src, int bgn, int end) { + int len = end - bgn; if (len == 0) return Bry_.Empty; + int actl_bgn = bgn, actl_end = end; + // trim at bgn + boolean chars_seen = false; + for (int i = bgn; i < end; ++i) { + switch (src[i]) { + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: + break; + default: + chars_seen = true; + actl_bgn = i; + i = end; + break; + } + } + if (!chars_seen) return Bry_.Empty; // all ws + // trim at end + for (int i = end - 1; i >= actl_bgn; --i) { + switch (src[i]) { + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: + break; + default: + actl_end = i + 1; + i = -1; + break; + } + } + // extract mid + len = actl_end - actl_bgn; if (len == 0) return Bry_.Empty; + byte[] rv = new byte[len]; + for (int i = actl_bgn; i < actl_end; ++i) + rv[i - actl_bgn] = src[i]; + return rv; + } + public static byte[] mask_(int len, byte... itms) { + byte[] rv = new byte[len]; + int itms_len = itms.length; + for (int i = 0; i < itms_len; i++) { + byte itm = itms[i]; + rv[itm & 0xFF] = itm; // PATCH.JAVA:need to convert to unsigned byte + } + return rv; + } + public static final byte[] Trim_ary_ws = mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr, Byte_ascii.Space); + public static byte[] Trim(byte[] src) {return Trim(src, 0, src.length, true, true, Trim_ary_ws, true);} + public static byte[] Trim(byte[] src, int bgn, int end) {return Trim(src, bgn, end, true, true, Trim_ary_ws, true);} + public static byte[] Trim(byte[] src, int bgn, int end, boolean trim_bgn, boolean trim_end, byte[] trim_ary, boolean reuse_bry_if_noop) { + int txt_bgn = bgn, txt_end = end; + boolean all_ws = true; + if (trim_bgn) { + for (int i = bgn; i < end; i++) { + byte b = src[i]; + if (trim_ary[b & 0xFF] == Byte_ascii.Null) { + txt_bgn = i; + i = end; + all_ws = false; + } + } + if (all_ws) return Bry_.Empty; + } + if (trim_end) { + for (int i = end - 1; i > -1; i--) { + byte b = src[i]; + if (trim_ary[b & 0xFF] == Byte_ascii.Null) { + txt_end = i + 1; + i = -1; + all_ws = false; + } + } + if (all_ws) return Bry_.Empty; + } + + if ( reuse_bry_if_noop + && bgn == 0 && end == src.length // Trim is called on entire bry, not subset + && bgn == txt_bgn && end == txt_end // Trim hasn't trimmed anything + ) { + return src; + } + else + return Bry_.Mid(src, txt_bgn, txt_end); + } + public static byte[] Trim_bgn(byte[] v, byte trim, int bgn) { + boolean trimmed = false; + int len = v.length; + int pos = bgn; + for (; pos < len; pos++) { + if (v[pos] == trim) { + trimmed = true; + } + else + break; + } + return trimmed ? Bry_.Mid(v, pos, len) : v; + } + public static byte[] Trim_end(byte[] v, byte trim, int end) { + boolean trimmed = false; + int pos = end - 1; // NOTE: -1 b/c callers will always be passing pos + 1; EX: src, src_len + for (; pos > -1; pos--) { + if (v[pos] == trim) { + trimmed = true; + } + else + break; + } + return trimmed ? Bry_.Mid(v, 0, pos + 1) : v; + } + public static int Compare(byte[] lhs, byte[] rhs) { + if (lhs == null) return CompareAble_.More; + else if (rhs == null) return CompareAble_.Less; + else return Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); + } + public static int Compare(byte[] lhs, int lhs_bgn, int lhs_end, byte[] rhs, int rhs_bgn, int rhs_end) { + int lhs_len = lhs_end - lhs_bgn, rhs_len = rhs_end - rhs_bgn; + int min = lhs_len < rhs_len ? lhs_len : rhs_len; + int rv = CompareAble_.Same; + for (int i = 0; i < min; i++) { + rv = (lhs[i + lhs_bgn] & 0xff) - (rhs[i + rhs_bgn] & 0xff); // PATCH.JAVA:need to convert to unsigned byte + if (rv != CompareAble_.Same) return rv > CompareAble_.Same ? CompareAble_.More : CompareAble_.Less; // NOTE: changed from if (rv != CompareAble_.Same) return rv; DATE:2013-04-25 + } + return Int_.Compare(lhs_len, rhs_len); // lhs and rhs share same beginning bytes; return len comparisons + } + public static boolean Eq(byte[] src, byte[] val) {return Eq(src, 0, src == null ? 0 : src.length, val);} + public static boolean Eq(byte[] src, int src_bgn, int src_end, byte[] val) { + if (src == null && val == null) return true; + else if (src == null || val == null) return false; + if (src_bgn < 0) return false; + int val_len = val.length; + if (val_len != src_end - src_bgn) return false; + int src_len = src.length; + for (int i = 0; i < val_len; i++) { + int src_pos = i + src_bgn; + if (src_pos == src_len) return false; + if (val[i] != src[src_pos]) return false; + } + return true; + } + public static boolean Eq_ci_a7(byte[] lhs, byte[] rhs, int rhs_bgn, int rhs_end) { + if (lhs == null && rhs == null) return true; + else if (lhs == null || rhs == null) return false; + int lhs_len = lhs.length; + int rhs_len = rhs_end - rhs_bgn; + if (lhs_len != rhs_len) return false; + for (int i = 0; i < lhs_len; i++) { + byte lhs_b = lhs[i]; if (lhs_b > 64 && lhs_b < 91) lhs_b += 32; // lowercase + byte rhs_b = rhs[i + rhs_bgn]; if (rhs_b > 64 && rhs_b < 91) rhs_b += 32; // lowercase + if (lhs_b != rhs_b) return false; + } + return true; + } + public static boolean Match(byte[] src, byte[] find) {return Match(src, 0, src.length, find, 0, find.length);} + public static boolean Match(byte[] src, int src_bgn, byte[] find) {return Match(src, src_bgn, src.length, find, 0, find.length);} + public static boolean Match(byte[] src, int src_bgn, int src_end, byte[] find) {return Match(src, src_bgn, src_end, find, 0, find.length);} + public static boolean Match(byte[] src, int src_bgn, int src_end, byte[] find, int find_bgn, int find_end) { + if (src_bgn == -1) return false; + int src_len = src.length; + if (src_end > src_len) src_end = src_len; // must limit src_end to src_len, else ArrayIndexOutOfBounds below; DATE:2015-01-31 + int find_len = find_end - find_bgn; + if (find_len != src_end - src_bgn) return false; + if (find_len == 0) return src_end - src_bgn == 0; // "" only matches "" + for (int i = 0; i < find_len; i++) { + int pos = src_bgn + i; + if (pos >= src_end) return false; // ran out of src; exit; EX: src=ab; find=abc + if (src[pos] != find[i + find_bgn]) return false; + } + return true; + } + public static boolean Match_w_swap(byte[] src, int src_bgn, int src_end, byte[] find, int find_bgn, int find_end, byte swap_src, byte swap_trg) {// same as above, but used by XOWA for ttl matches; + int src_len = src.length; + if (src_end > src_len) src_end = src_len; // must limit src_end to src_len, else ArrayIndexOutOfBounds below; DATE:2015-01-31 + int find_len = find_end - find_bgn; + if (find_len != src_end - src_bgn) return false; + if (find_len == 0) return src_end - src_bgn == 0; // "" only matches "" + for (int i = 0; i < find_len; i++) { + int pos = src_bgn + i; + if (pos >= src_end) return false; // ran out of src; exit; EX: src=ab; find=abc + byte src_byte = src[pos]; if (src_byte == swap_src) src_byte = swap_trg; + byte trg_byte = find[i + find_bgn]; if (trg_byte == swap_src) trg_byte = swap_trg; + if (src_byte != trg_byte) return false; + } + return true; + } + public static boolean Match_bwd_any(byte[] src, int src_end, int src_bgn, byte[] find) { // NOTE: utf8 doesn't matter (matching byte for byte) + int find_len = find.length; + for (int i = 0; i < find_len; i++) { + int src_pos = src_end - i; + int find_pos = find_len - i - 1; + if (src_pos < src_bgn) return false; // ran out of src; exit; EX: src=ab; find=abc + if (src[src_pos] != find[find_pos]) return false; + } + return true; + } + public static int To_int_by_a7(byte[] v) { + int v_len = v.length; + int mod = 8 * (v_len - 1); + int rv = 0; + for (int i = 0; i < v_len; i++) { + rv |= v[i] << mod; + mod -= 8; + } + return rv; +// return ((0xFF & v[0]) << 24) +// | ((0xFF & v[1]) << 16) +// | ((0xFF & v[2]) << 8) +// | (0xFF & v[3]); + } + public static byte[] To_a7_bry(int val, int pad_len) {return To_a7_bry(val, null, 0, pad_len);} + public static byte[] To_a7_bry(int val, byte[] ary, int aryPos, int pad_len) { + int neg = 0; + if (val < 0) { + val *= -1; + neg = 1; + } + int digits = val == 0 ? 0 : Math_.Log10(val); + digits += 1; // digits = log + 1; EX: Log(1-9) = 0, Log(10-99) = 1 + int ary_len = digits + neg, aryBgn = aryPos, pad = 0; + if (ary_len < pad_len) { // padding specified + pad = pad_len - ary_len; + ary_len = pad_len; + } + if (ary == null) ary = new byte[ary_len]; + long factor = 1; // factor needs to be long to handle 1 billion (for which factor would be 10 billion) + for (int i = 0; i < digits; i++) // calc maxFactor + factor *= 10; + if (neg == 1) ary[0] = Byte_NegSign; + + for (int i = 0; i < pad; i++) // fill ary with pad + ary[i + aryBgn] = Byte_ascii.To_a7_str(0); + aryBgn += pad; // advance aryBgn by pad + for (int i = neg; i < ary_len - pad; i++) { + int denominator = (int)(factor / 10); // cache denominator to check for divide by 0 + int digit = denominator == 0 ? 0 : (int)((val % factor) / denominator); + ary[aryBgn + i] = Byte_ascii.To_a7_str(digit); + factor /= 10; + } + return ary; + } + public static byte[] new_by_int(int v) { + byte b0 = (byte)(v >> 24); + byte b1 = (byte)(v >> 16); + byte b2 = (byte)(v >> 8); + byte b3 = (byte)(v); + if (b0 != 0) return new byte[] {b0, b1, b2, b3}; + else if (b1 != 0) return new byte[] {b1, b2, b3}; + else if (b2 != 0) return new byte[] {b2, b3}; + else return new byte[] {b3}; + } + public static boolean To_bool_or(byte[] raw, boolean or) { + return Bry_.Eq(raw, Bool_.True_bry) ? true : or; + } + public static boolean To_bool_by_int(byte[] ary) { + int rv = To_int_or(ary, 0, ary.length, Int_.Min_value, Bool_.Y, null); + switch (rv) { + case 0: return false; + case 1: return true; + default: throw Err_.new_wo_type("could not parse to boolean int", "val", String_.new_u8(ary)); + } + } + public static byte To_int_as_byte(byte[] ary, int bgn, int end, byte or) {return (byte)To_int_or(ary, bgn, end, or);} + public static int To_int(byte[] ary) {return To_int_or_fail(ary, 0, ary.length);} + public static int To_int_or_fail(byte[] ary, int bgn, int end) { + int rv = To_int_or(ary, bgn, end, Int_.Min_value, Bool_.Y, null); + if (rv == Int_.Min_value) throw Err_.new_wo_type("could not parse to int", "val", String_.new_u8(ary, bgn, end)); + return rv; + } + public static int To_int_or_neg1(byte[] ary) {return To_int_or(ary, 0 , ary.length, -1, Bool_.Y, null);} + public static int To_int_or(byte[] ary, int or) {return To_int_or(ary, 0 , ary.length, or, Bool_.Y, null);} + public static int To_int_or(byte[] ary, int bgn, int end, int or) {return To_int_or(ary, bgn , end , or, Bool_.Y, null);} + public static int To_int_or__strict(byte[] ary, int or) {return To_int_or(ary, 0 , ary.length, or, Bool_.N, null);} + private static int To_int_or(byte[] ary, int bgn, int end, int or, boolean sign_is_valid, byte[] ignore_ary) { + if ( ary == null + || end == bgn // null-len + ) return or; + int rv = 0, multiple = 1; + for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 + byte b = ary[i]; + switch (b) { + case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: + case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: + rv += multiple * (b - Byte_ascii.Num_0); + multiple *= 10; + break; + case Byte_ascii.Dash: + return i == bgn && sign_is_valid ? rv * -1 : or; + case Byte_ascii.Plus: + return i == bgn && sign_is_valid ? rv : or; + default: + boolean invalid = true; + if (ignore_ary != null) { + int ignore_ary_len = ignore_ary.length; + for (int j = 0; j < ignore_ary_len; j++) { + if (b == ignore_ary[j]) { + invalid = false; + break; + } + } + } + if (invalid) return or; + break; + } + } + return rv; + } + public static int To_int_or__trim_ws(byte[] ary, int bgn, int end, int or) { // NOTE: same as To_int_or, except trims ws at bgn / end; DATE:2014-02-09 + if (end == bgn) return or; // null len + int rv = 0, multiple = 1; + boolean numbers_seen = false, ws_seen = false; + for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 + byte b = ary[i]; + switch (b) { + case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: + case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: + rv += multiple * (b - Byte_ascii.Num_0); + multiple *= 10; + if (ws_seen) // "number ws number" pattern; invalid ws in middle; see tests + return or; + numbers_seen = true; + break; + case Byte_ascii.Dash: + return i == bgn ? rv * -1 : or; + case Byte_ascii.Space: case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: + if (numbers_seen) + ws_seen = true; + break; + default: return or; + } + } + return rv; + } + public static int To_int_or__lax(byte[] ary, int bgn, int end, int or) { + if (end == bgn) return or; // null-len + int end_num = end; + for (int i = bgn; i < end; i++) { + byte b = ary[i]; + switch (b) { + case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: + case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: + break; + case Byte_ascii.Dash: + if (i != bgn) { + end_num = i; + i = end; + } + break; + default: + end_num = i; + i = end; + break; + } + } + return To_int_or(ary, bgn, end_num, or); + } + public static long To_long_or(byte[] ary, long or) {return To_long_or(ary, null, 0, ary.length, or);} + public static long To_long_or(byte[] ary, byte[] ignore_ary, int bgn, int end, long or) { + if ( ary == null + || end == bgn // null-len + ) return or; + long rv = 0, multiple = 1; + for (int i = end - 1; i >= bgn; i--) { // -1 b/c end will always be next char; EX: {{{1}}}; bgn = 3, end = 4 + byte b = ary[i]; + switch (b) { + case Byte_ascii.Num_0: case Byte_ascii.Num_1: case Byte_ascii.Num_2: case Byte_ascii.Num_3: case Byte_ascii.Num_4: + case Byte_ascii.Num_5: case Byte_ascii.Num_6: case Byte_ascii.Num_7: case Byte_ascii.Num_8: case Byte_ascii.Num_9: + rv += multiple * (b - Byte_ascii.Num_0); + multiple *= 10; + break; + case Byte_ascii.Dash: + return i == bgn ? rv * -1 : or; + case Byte_ascii.Plus: + return i == bgn ? rv : or; + default: + boolean invalid = true; + if (ignore_ary != null) { + int ignore_ary_len = ignore_ary.length; + for (int j = 0; j < ignore_ary_len; j++) { + if (b == ignore_ary[j]) { + invalid = false; + break; + } + } + } + if (invalid) return or; + break; + } + } + return rv; + } + public static double To_double(byte[] ary, int bgn, int end) {return Double_.parse(String_.new_u8(ary, bgn, end));} + public static double To_double_or(byte[] bry, double or) {return Double_.parse_or(String_.new_u8(bry, 0, bry.length), or);} + public static double To_double_or(byte[] ary, int bgn, int end, double or) {return Double_.parse_or(String_.new_u8(ary, bgn, end), or);} + public static Decimal_adp To_decimal(byte[] ary, int bgn, int end) {return Decimal_adp_.parse(String_.new_u8(ary, bgn, end));} + public static byte[][] Ary_add(byte[][] lhs, byte[][] rhs) { + int lhs_len = lhs.length, rhs_len = rhs.length; + if (lhs_len == 0) return rhs; + else if (rhs_len == 0) return lhs; + else { + byte[][] rv = new byte[lhs_len + rhs_len][]; + for (int i = 0; i < lhs_len; i++) + rv[i] = lhs[i]; + for (int i = 0; i < rhs_len; i++) + rv[i + lhs_len] = rhs[i]; + return rv; + } + } + public static byte[][] Ary(byte[]... ary) {return ary;} + public static byte[][] Ary(String... ary) { + int ary_len = ary.length; + byte[][] rv = new byte[ary_len][]; + for (int i = 0; i < ary_len; i++) { + String itm = ary[i]; + rv[i] = itm == null ? null : Bry_.new_u8(itm); + } + return rv; + } + public static byte[][] Ary_obj(Object... ary) { + if (ary == null) return Bry_.Ary_empty; + int ary_len = ary.length; + byte[][] rv = new byte[ary_len][]; + for (int i = 0; i < ary_len; i++) { + Object itm = ary[i]; + rv[i] = itm == null ? null : Bry_.new_u8(Object_.Xto_str_strict_or_empty(itm)); + } + return rv; + } + public static boolean Ary_eq(byte[][] lhs, byte[][] rhs) { + int lhs_len = lhs.length; + int rhs_len = rhs.length; + if (lhs_len != rhs_len) return false; + for (int i = 0; i < lhs_len; ++i) + if (!Bry_.Eq(lhs[i], rhs[i])) return false; + return true; + } + public static final byte Dlm_fld = (byte)'|', Dlm_row = (byte)'\n', Dlm_quote = (byte)'"', Dlm_null = 0, Ascii_zero = 48; + public static final String Fmt_csvDte = "yyyyMMdd HHmmss.fff"; + public static DateAdp ReadCsvDte(byte[] ary, Int_obj_ref posRef, byte lkp) {// ASSUME: fmt = yyyyMMdd HHmmss.fff + int y = 0, M = 0, d = 0, H = 0, m = 0, s = 0, f = 0; + int bgn = posRef.Val(); + y += (ary[bgn + 0] - Ascii_zero) * 1000; + y += (ary[bgn + 1] - Ascii_zero) * 100; + y += (ary[bgn + 2] - Ascii_zero) * 10; + y += (ary[bgn + 3] - Ascii_zero); + M += (ary[bgn + 4] - Ascii_zero) * 10; + M += (ary[bgn + 5] - Ascii_zero); + d += (ary[bgn + 6] - Ascii_zero) * 10; + d += (ary[bgn + 7] - Ascii_zero); + H += (ary[bgn + 9] - Ascii_zero) * 10; + H += (ary[bgn + 10] - Ascii_zero); + m += (ary[bgn + 11] - Ascii_zero) * 10; + m += (ary[bgn + 12] - Ascii_zero); + s += (ary[bgn + 13] - Ascii_zero) * 10; + s += (ary[bgn + 14] - Ascii_zero); + f += (ary[bgn + 16] - Ascii_zero) * 100; + f += (ary[bgn + 17] - Ascii_zero) * 10; + f += (ary[bgn + 18] - Ascii_zero); + if (ary[bgn + 19] != lkp) throw Err_.new_wo_type("csv date is invalid", "txt", String_.new_u8__by_len(ary, bgn, 20)); + posRef.Val_add(19 + 1); // +1=lkp.len + return DateAdp_.new_(y, M, d, H, m, s, f); + } + public static String ReadCsvStr(byte[] ary, Int_obj_ref posRef, byte lkp) {return String_.new_u8(ReadCsvBry(ary, posRef, lkp, true));} + public static byte[] ReadCsvBry(byte[] ary, Int_obj_ref posRef, byte lkp) {return ReadCsvBry(ary, posRef, lkp, true);} + public static byte[] ReadCsvBry(byte[] ary, Int_obj_ref posRef, byte lkp, boolean make) { + int bgn = posRef.Val(), aryLen = ary.length; + Bry_bfr bb = null; + if (aryLen > 0 && ary[0] == Dlm_quote) { + int pos = bgn + 1; // +1 to skip quote + if (make) bb = Bry_bfr_.New(); + while (true) { + if (pos == aryLen) throw Err_.new_wo_type("endOfAry reached, but no quote found", "txt", String_.new_u8__by_len(ary, bgn, pos)); + byte b = ary[pos]; + if (b == Dlm_quote) { + if (pos == aryLen - 1) throw Err_.new_wo_type("endOfAry reached, quote found but lkp not", "txt", String_.new_u8__by_len(ary, bgn, pos)); + byte next = ary[pos + 1]; + if (next == Dlm_quote) { // byte followed by quote + if (make) bb.Add_byte(b); + pos += 2; + } + else if (next == lkp) { + posRef.Val_(pos + 2); // 1=endQuote;1=lkp; + return make ? bb.To_bry() : Bry_.Empty; + } + else throw Err_.new_wo_type("quote found, but not doubled", "txt", String_.new_u8__by_len(ary, bgn, pos + 1)); + } + else { + if (make) bb.Add_byte(b); + pos++; + } + } + } + else { + for (int i = bgn; i < aryLen; i++) { + if (ary[i] == lkp) { + posRef.Val_(i + 1); // +1 = lkp.Len + return make ? Bry_.Mid(ary, bgn, i) : Bry_.Empty; + } + } + throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "txt", String_.new_u8__by_len(ary, bgn, aryLen)); + } + } + public static int ReadCsvInt(byte[] ary, Int_obj_ref posRef, byte lkp) { + int bgn = posRef.Val(); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); + if (pos == Bry_find_.Not_found) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); + int rv = Bry_.To_int_or(ary, posRef.Val(), pos, -1); + posRef.Val_(pos + 1); // +1 = lkp.Len + return rv; + } + public static double ReadCsvDouble(byte[] ary, Int_obj_ref posRef, byte lkp) { + int bgn = posRef.Val(); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); + if (pos == Bry_find_.Not_found) throw Err_.new_wo_type("lkp failed", "lkp", (char)lkp, "bgn", bgn); + double rv = Bry_.To_double(ary, posRef.Val(), pos); + posRef.Val_(pos + 1); // +1 = lkp.Len + return rv; + } + public static void ReadCsvNext(byte[] ary, Int_obj_ref posRef, byte lkp) { + int bgn = posRef.Val(); + int pos = Bry_find_.Find_fwd(ary, lkp, bgn, ary.length); + posRef.Val_(pos + 1); // +1 = lkp.Len + } + public static byte Byte_NegSign = (byte)'-'; + public static byte[] Replace_create(byte[] src, byte find, byte replace) { + byte[] rv = Bry_.Copy(src); + Replace_reuse(rv, find, replace); + return rv; + } + public static void Replace_reuse(byte[] src, byte find, byte replace) { + int src_len = src.length; + for (int i = 0; i < src_len; i++) { + if (src[i] == find) src[i] = replace; + } + } + public static byte[] Replace(byte[] src, byte find, byte replace) {return Replace(src, 0, src.length, find, replace);} + public static byte[] Replace(byte[] src, int bgn, int end, byte find, byte replace) { + int src_len = src.length; + byte[] rv = new byte[src_len]; + for (int i = bgn; i < end; ++i) { + byte b = src[i]; + rv[i] = b == find ? replace : b; + } + for (int i = end; i < src_len; ++i) + rv[i] = src[i]; + return rv; + } + public static byte[] Replace_safe(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl) { + if (src == null || find == null || repl == null) return null; + return Replace(bfr, src, find, repl, 0, src.length); + } + public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl) {return Replace(bfr, src, find, repl, 0, src.length);} + public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl, int src_bgn, int src_end) {return Replace(bfr, src, find, repl, src_bgn, src_end, Int_.Max_value);} + public static byte[] Replace(Bry_bfr bfr, byte[] src, byte[] find, byte[] repl, int src_bgn, int src_end, int limit) { + int pos = src_bgn; + boolean dirty = false; + int find_len = find.length; + int bfr_bgn = pos; + int replace_count = 0; + while (pos < src_end) { + int find_pos = Bry_find_.Find_fwd(src, find, pos); + if (find_pos == Bry_find_.Not_found) break; + dirty = true; + bfr.Add_mid(src, bfr_bgn, find_pos); + bfr.Add(repl); + pos = find_pos + find_len; + bfr_bgn = pos; + ++replace_count; + if (replace_count == limit) break; + } + if (dirty) + bfr.Add_mid(src, bfr_bgn, src_end); + return dirty ? bfr.To_bry_and_clear() : src; + } + public static byte[] Replace(byte[] src, byte[] find, byte[] replace) {return Replace_between(src, find, null, replace);} + public static byte[] Replace_between(byte[] src, byte[] bgn, byte[] end, byte[] replace) { + Bry_bfr bfr = Bry_bfr_.New(); + boolean replace_all = end == null; + int src_len = src.length, bgn_len = bgn.length, end_len = replace_all ? 0 : end.length; + int pos = 0; + while (true) { + if (pos >= src_len) break; + int bgn_pos = Bry_find_.Find_fwd(src, bgn, pos); + if (bgn_pos == Bry_find_.Not_found) { + bfr.Add_mid(src, pos, src_len); + break; + } + else { + int bgn_rhs = bgn_pos + bgn_len; + int end_pos = replace_all ? bgn_rhs : Bry_find_.Find_fwd(src, end, bgn_rhs); + if (end_pos == Bry_find_.Not_found) { + bfr.Add_mid(src, pos, src_len); + break; + } + else { + bfr.Add_mid(src, pos, bgn_pos); + bfr.Add(replace); + pos = end_pos + end_len; + } + } + } + return bfr.To_bry_and_clear(); + } + public static byte[] Replace_many(byte[] src, byte[] find, byte[] repl) { + Bry_bfr bfr = null; + int src_len = src.length; + int find_len = find.length; + + int pos = 0; + while (true) { + // find find_bgn + int find_bgn = Bry_find_.Find_fwd(src, find, pos, src_len); + + // exit if nothing found + if (find_bgn == Bry_find_.Not_found) + break; + + // lazy-instantiation + if (bfr == null) + bfr = Bry_bfr_.New(); + + // add everything up to find_bgn + bfr.Add_mid(src, pos, find_bgn); + + // add repl + bfr.Add(repl); + + // move pos forward + pos = find_bgn + find_len; + } + + // nothing found; return src + if (bfr == null) + return src; + else { + // add rest + bfr.Add_mid(src, pos, src_len); + return bfr.To_bry_and_clear(); + } + } + public static int Trim_end_pos(byte[] src, int end) { + for (int i = end - 1; i > -1; i--) { + switch (src[i]) { + case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space: + break; + default: + return i + 1; + } + } + return 0; + } + public static byte[] Increment_last(byte[] ary) {return Increment_last(ary, ary.length - 1);} + public static byte[] Increment_last(byte[] ary, int end_idx) { + for (int i = end_idx; i > -1; i--) { + byte end_val_old = ary[i]; + byte end_val_new = (byte)(end_val_old + 1); + ary[i] = end_val_new; + if (end_val_new > (end_val_old & 0xff)) break; // PATCH.JAVA:need to convert to unsigned byte + } + return ary; + } + public static byte[] Ucase__all(byte[] src) {return Xcase__all(Bool_.Y, src, 0, -1);} + public static byte[] Lcase__all(byte[] src) {return Xcase__all(Bool_.N, src, 0, -1);} + public static byte[] Lcase__all(byte[] src, int bgn, int end) {return Xcase__all(Bool_.N, src, bgn, end);} + private static byte[] Xcase__all(boolean upper, byte[] src, int bgn, int end) { + if (src == null) return null; + int len = end == -1 ? src.length : end - bgn; if (len == 0) return src; + byte[] rv = new byte[len]; + for (int i = 0; i < len; ++i) { + byte b = src[i + bgn]; + if (upper) { + if (b > 96 && b < 123) b -= 32; + } + else { + if (b > 64 && b < 91) b += 32; + } + rv[i] = b; + } + return rv; + } + public static byte[] Xcase__build__all(Bry_bfr tmp, boolean upper, byte[] src) { + if (src == null) return null; + int src_bgn = 0; + int src_end = src.length; + int lbound = 96, ubound = 123; + if (!upper) { + lbound = 64; ubound = 91; + } + + boolean dirty = false; + for (int i = src_bgn; i < src_end; i++) { + byte b = src[i]; + if (b > lbound && b < ubound) { + if (!dirty) { + dirty = true; + tmp.Add_mid(src, src_bgn, i); + } + if (upper) + b -= 32; + else + b += 32; + } + if (dirty) + tmp.Add_byte(b); + } + return dirty ? tmp.To_bry_and_clear() : src; + } + public static byte[] Ucase__1st(byte[] src) {return Xcase__1st(Bool_.Y, src);} + public static byte[] Lcase__1st(byte[] src) {return Xcase__1st(Bool_.N, src);} + private static byte[] Xcase__1st(boolean upper, byte[] src) { + if (src == null) return null; + int len = src.length; if (len == 0) return src; + byte[] rv = new byte[len]; + byte b = src[0]; + if (upper) { + if (b > 96 && b < 123) b -= 32; + } + else { + if (b > 64 && b < 91) b += 32; + } + rv[0] = b; + for (int i = 1; i < len; ++i) { + rv[i] = src[i]; + } + return rv; + } + public static byte[] Null_if_empty(byte[] v) {return Len_eq_0(v) ? null : v;} + + public static byte[] Escape_ws(byte[] bry) {Bry_bfr bfr = Bry_bfr_.Get(); byte[] rv = Escape_ws(bfr, bry); bfr.Mkr_rls(); return rv;} + public static byte[] Escape_ws(Bry_bfr bfr, byte[] src) { + boolean dirty = false; + int len = src.length; + for (int i = 0; i < len; ++i) { + byte b = src[i]; + byte escape = Byte_.Zero; + switch (b) { + case Byte_ascii.Tab: escape = Byte_ascii.Ltr_t; break; + case Byte_ascii.Nl: escape = Byte_ascii.Ltr_n; break; + case Byte_ascii.Cr: escape = Byte_ascii.Ltr_r; break; + default: if (dirty) bfr.Add_byte(b); break; + } + if (escape != Byte_.Zero) { + if (!dirty) { + dirty = true; + bfr.Add_mid(src, 0, i); + } + bfr.Add_byte_backslash().Add_byte(escape); + } + } + return dirty ? bfr.To_bry_and_clear() : src; + } + public static byte[] Resolve_escape(Bry_bfr bfr, byte escape, byte[] raw, int bgn, int end) { + int pos = bgn; + boolean dirty = false; + while (pos < end) { + byte b = raw[pos]; + if (b == escape) { + if (!dirty) { + dirty = true; + bfr.Add_mid(raw, bgn, pos); + } + ++pos; + if (pos < end) { // check for eos; note that this ignores trailing "\"; EX: "a\" -> "a" + bfr.Add_byte(raw[pos]); + ++pos; + } + } + else { + if (dirty) bfr.Add_byte(b); + ++pos; + } + } + return dirty ? bfr.To_bry_and_clear() : raw; + } + public static void Clear(byte[] bry) { + int len = bry.length; + for (int i = 0; i < len; ++i) + bry[i] = Byte_.Zero; + } + public static byte[] Replace_nl_w_tab(byte[] src, int bgn, int end) { + return Bry_.Replace(Bry_.Mid(src, bgn, end), Byte_ascii.Nl, Byte_ascii.Tab); + } + public static byte[] Escape_html(byte[] src) { + return Escape_html(null, Bool_.N, src, 0, src.length); + } + public static byte[] Escape_html(Bry_bfr bfr, boolean ws, byte[] src, int src_bgn, int src_end) { // uses PHP rules for htmlspecialchars; REF.PHP:http://php.net/manual/en/function.htmlspecialchars.php + boolean dirty = false; + int cur = src_bgn; + int prv = cur; + boolean called_by_bry = bfr == null; + + // loop over chars + while (true) { + // if EOS, exit + if (cur == src_end) { + if (dirty) { + bfr.Add_mid(src, prv, src_end); + } + break; + } + + // check current byte if escaped + byte b = src[cur]; + byte[] escaped = null; + switch (b) { + case Byte_ascii.Amp: escaped = Gfh_entity_.Amp_bry; break; + case Byte_ascii.Quote: escaped = Gfh_entity_.Quote_bry; break; + case Byte_ascii.Apos: escaped = Gfh_entity_.Apos_num_bry; break; + case Byte_ascii.Lt: escaped = Gfh_entity_.Lt_bry; break; + case Byte_ascii.Gt: escaped = Gfh_entity_.Gt_bry; break; + case Byte_ascii.Nl: if (ws) escaped = Gfh_entity_.Nl_bry; break; + case Byte_ascii.Cr: if (ws) escaped = Gfh_entity_.Cr_bry; break; + case Byte_ascii.Tab: if (ws) escaped = Gfh_entity_.Tab_bry; break; + } + + // not escaped; increment and continue + if (escaped == null) { + cur++; + continue; + } + // escaped + else { + dirty = true; + if (bfr == null) bfr = Bry_bfr_.New(); + + if (prv < cur) + bfr.Add_mid(src, prv, cur); + bfr.Add(escaped); + cur++; + prv = cur; + } + } + + if (dirty) { + if (called_by_bry) + return bfr.To_bry_and_clear(); + else + return null; + } + else { + if (called_by_bry) { + if (src_bgn == 0 && src_end == src.length) + return src; + else + return Bry_.Mid(src, src_bgn, src_end); + } + else { + bfr.Add_mid(src, src_bgn, src_end); + return null; + } + } + } +} diff --git a/100_core/src/gplx/Bry_bfr.java b/100_core/src/gplx/Bry_bfr.java index caed53157..cde865d55 100644 --- a/100_core/src/gplx/Bry_bfr.java +++ b/100_core/src/gplx/Bry_bfr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.encoders.*; import gplx.langs.htmls.entitys.*; @@ -558,7 +558,7 @@ public class Bry_bfr { this.Del_by(count); return this; } - private static final boolean[] Trim_end_ws_ary = Trim_end_ws_new(); + private static final boolean[] Trim_end_ws_ary = Trim_end_ws_new(); private static boolean[] Trim_end_ws_new() { boolean[] rv = new boolean[256]; rv[32] = true; diff --git a/100_core/src/gplx/Bry_bfr_.java b/100_core/src/gplx/Bry_bfr_.java index 8f0c43648..bfbd36e60 100644 --- a/100_core/src/gplx/Bry_bfr_.java +++ b/100_core/src/gplx/Bry_bfr_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.brys.*; public class Bry_bfr_ { @@ -20,7 +20,7 @@ public class Bry_bfr_ { public static Bry_bfr New_w_size(int v) {return new Bry_bfr(v);} public static Bry_bfr Reset(int v) {return new Bry_bfr(16).Reset_(v);} // PERF: set initial size to 16, not reset val; allows for faster "startup"; DATE:2014-06-14 - public static final Bry_bfr[] Ary_empty = new Bry_bfr[0]; + public static final Bry_bfr[] Ary_empty = new Bry_bfr[0]; private static Bry_bfr_mkr_mgr dflt; public static Bry_bfr Get() {if (dflt == null) dflt = new Bry_bfr_mkr_mgr(Bry_bfr_mkr.Tid_b128, 128); return dflt.Get();} // NOTE: lazy else "Object synchronization" error; DATE:2015-11-18 public static void Assert_at_end(Bry_bfr bfr, byte assert_byte) { diff --git a/100_core/src/gplx/Bry_bfr_tst.java b/100_core/src/gplx/Bry_bfr_tst.java index fe8c41d02..7fa166ae3 100644 --- a/100_core/src/gplx/Bry_bfr_tst.java +++ b/100_core/src/gplx/Bry_bfr_tst.java @@ -235,7 +235,7 @@ public class Bry_bfr_tst { } } class ByteAryBfr_fxt { - private final Bry_bfr bfr = Bry_bfr_.Reset(16); + private final Bry_bfr bfr = Bry_bfr_.Reset(16); public Bry_bfr Bfr() {return bfr;} public void Clear() { bfr.ClearAndReset(); diff --git a/100_core/src/gplx/Bry_find_.java b/100_core/src/gplx/Bry_find_.java index 42e9fee99..95252d50e 100644 --- a/100_core/src/gplx/Bry_find_.java +++ b/100_core/src/gplx/Bry_find_.java @@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx; public class Bry_find_ { - public static final int Not_found = -1; + public static final int Not_found = -1; public static int Find_fwd(byte[] src, byte lkp) {return Find_fwd(src, lkp, 0, src.length);} public static int Find_fwd(byte[] src, byte lkp, int cur) {return Find_fwd(src, lkp, cur, src.length);} public static int Find_fwd(byte[] src, byte lkp, int cur, int end) { diff --git a/100_core/src/gplx/Bry_fmt.java b/100_core/src/gplx/Bry_fmt.java index ea3b72e0e..de82e2d01 100644 --- a/100_core/src/gplx/Bry_fmt.java +++ b/100_core/src/gplx/Bry_fmt.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.brys.*; import gplx.core.brys.fmts.*; public class Bry_fmt { - private final Object thread_lock = new Object(); + private final Object thread_lock = new Object(); private byte[] src; private Bry_fmt_itm[] itms; private int itms_len; private Bfr_fmt_arg[] args = Bfr_fmt_arg.Ary_empty; diff --git a/100_core/src/gplx/Bry_split_.java b/100_core/src/gplx/Bry_split_.java index 2f46ed571..ac5f3da47 100644 --- a/100_core/src/gplx/Bry_split_.java +++ b/100_core/src/gplx/Bry_split_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.brys.*; public class Bry_split_ { - private static final Object thread_lock = new Object(); + private static final Object thread_lock = new Object(); public static byte[][] Split(byte[] src, byte dlm) {return Split(src, dlm, false);} public static byte[][] Split(byte[] src, byte dlm, boolean trim) {return src == null ? Bry_.Ary_empty : Split(src, 0, src.length, dlm, trim);} public static byte[][] Split(byte[] src, int bgn, int end, byte dlm, boolean trim) { @@ -156,7 +156,7 @@ public class Bry_split_ { public static final int Rv__ok = 0, Rv__extend = 1, Rv__cancel = 2; } class Bry_split_wkr__to_ary implements gplx.core.brys.Bry_split_wkr { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public int Split(byte[] src, int itm_bgn, int itm_end) { synchronized (list) { byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end); @@ -169,5 +169,5 @@ class Bry_split_wkr__to_ary implements gplx.core.brys.Bry_split_wkr { return (byte[][])list.To_ary_and_clear(byte[].class); } } - public static final Bry_split_wkr__to_ary Instance = new Bry_split_wkr__to_ary(); Bry_split_wkr__to_ary() {} + public static final Bry_split_wkr__to_ary Instance = new Bry_split_wkr__to_ary(); Bry_split_wkr__to_ary() {} } diff --git a/100_core/src/gplx/Bry_split__tst.java b/100_core/src/gplx/Bry_split__tst.java index 214532dec..472ddbd03 100644 --- a/100_core/src/gplx/Bry_split__tst.java +++ b/100_core/src/gplx/Bry_split__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx; import org.junit.*; import gplx.core.tests.*; public class Bry_split__tst { - private final Bry_split__fxt fxt = new Bry_split__fxt(); + private final Bry_split__fxt fxt = new Bry_split__fxt(); @Test public void Split() { fxt.Test_split("a" , Byte_ascii.Pipe, Bool_.N, "a"); // no trim fxt.Test_split("a|" , Byte_ascii.Pipe, Bool_.N, "a"); @@ -56,7 +56,7 @@ public class Bry_split__tst { } } class Bry_split__fxt { - private final Bry_split_wkr__example wkr = new Bry_split_wkr__example(); + private final Bry_split_wkr__example wkr = new Bry_split_wkr__example(); public void Test_split(String raw_str, byte dlm, boolean trim, String... expd) { byte[] src = Bry_.new_a7(raw_str); Bry_split_.Split(src, 0, src.length, dlm, trim, wkr); @@ -75,7 +75,7 @@ class Bry_split__fxt { } } class Bry_split_wkr__example implements gplx.core.brys.Bry_split_wkr { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public int Split(byte[] src, int itm_bgn, int itm_end) { byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end); if (Bry_.Eq(bry, Bry_.new_a7("extend"))) return Bry_split_.Rv__extend; diff --git a/100_core/src/gplx/Byte_.java b/100_core/src/gplx/Byte_.java index 042b073d4..034353f0c 100644 --- a/100_core/src/gplx/Byte_.java +++ b/100_core/src/gplx/Byte_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Byte_ {//RF:2017-10-08 public static final String Cls_val_name = "byte"; - public static final Class Cls_ref_type = Byte.class; + public static final Class Cls_ref_type = Byte.class; public static final byte Zero = 0 diff --git a/100_core/src/gplx/Byte_ascii.java b/100_core/src/gplx/Byte_ascii.java index 7a7e939f3..aa6a59968 100644 --- a/100_core/src/gplx/Byte_ascii.java +++ b/100_core/src/gplx/Byte_ascii.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Byte_ascii { public static final byte @@ -95,8 +95,8 @@ public class Byte_ascii { ? (byte)(b + 32) : b; } - public static final byte[] Space_len2 = new byte[] {Space, Space}, Space_len4 = new byte[] {Space, Space, Space, Space}; - public static final byte[] + public static final byte[] Space_len2 = new byte[] {Space, Space}, Space_len4 = new byte[] {Space, Space, Space, Space}; + public static final byte[] Tab_bry = new byte[] {Byte_ascii.Tab} , Nl_bry = new byte[] {Byte_ascii.Nl} , Space_bry = new byte[] {Byte_ascii.Space} diff --git a/100_core/src/gplx/Char_.java b/100_core/src/gplx/Char_.java index f9140a9ed..77ef2feca 100644 --- a/100_core/src/gplx/Char_.java +++ b/100_core/src/gplx/Char_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; -public class Char_ { +public class Char_ { public static final String Cls_val_name = "char"; - public static final Class Cls_ref_type = Character.class; + public static final Class Cls_ref_type = Character.class; public static final char Null = '\0', NewLine = '\n'; public static boolean IsCaseLower(char c) {return Character.isLowerCase(c);} public static boolean IsLetterOrDigit(char c) {return Character.isLetterOrDigit(c);} diff --git a/100_core/src/gplx/DateAdp.java b/100_core/src/gplx/DateAdp.java index ee17577b1..c14f7af6e 100644 --- a/100_core/src/gplx/DateAdp.java +++ b/100_core/src/gplx/DateAdp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import java.util.Calendar; import java.util.GregorianCalendar; @@ -29,7 +29,7 @@ public class DateAdp implements CompareAble, Gfo_invk { return this.Add_day(days); } else return Gfo_invk_.Rv_unhandled; - } public static final String Invk_XtoStr_fmt = "XtoStr_fmt", Invk_AddDays = "Add_day"; + } public static final String Invk_XtoStr_fmt = "XtoStr_fmt", Invk_AddDays = "Add_day"; public int Segment(int segmentIdx) { switch (segmentIdx) { case DateAdp_.SegIdx_year: return this.Year(); diff --git a/100_core/src/gplx/DateAdp_.java b/100_core/src/gplx/DateAdp_.java index 121422ea5..103bb003d 100644 --- a/100_core/src/gplx/DateAdp_.java +++ b/100_core/src/gplx/DateAdp_.java @@ -25,13 +25,13 @@ import java.util.Locale; import java.util.TimeZone; public class DateAdp_ implements Gfo_invk { public static final String Cls_ref_name = "Date"; - public static final Class Cls_ref_type = DateAdp.class; + public static final Class Cls_ref_type = DateAdp.class; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_Now)) return Datetime_now.Get(); else return Gfo_invk_.Rv_unhandled; - } public static final String Invk_Now = "Now"; - public static final DateAdp MinValue = new DateAdp( 1, 1, 1, 0, 0, 0, 0); - public static final DateAdp MaxValue = new DateAdp(9999, 12, 31, 23, 59, 59, 999); + } public static final String Invk_Now = "Now"; + public static final DateAdp MinValue = new DateAdp( 1, 1, 1, 0, 0, 0, 0); + public static final DateAdp MaxValue = new DateAdp(9999, 12, 31, 23, 59, 59, 999); // public static DateAdp Now() {return Tfds.Now_enabled() ? Tfds.Now() : new DateAdp(new GregorianCalendar());} public static DateAdp new_(int year, int month, int day, int hour, int minute, int second, int frac) {return new DateAdp(year, month, day, hour, minute, second, frac);} public static DateAdp seg_(int[] ary) { @@ -64,7 +64,7 @@ public class DateAdp_ implements Gfo_invk { } static DateAdp_parser date_parser = DateAdp_parser.new_(); public static DateAdp dateTime_(GregorianCalendar v) {return new DateAdp(v);} public static DateAdp dateTime_obj_(Object v) {return new DateAdp((GregorianCalendar)v);} - public static final DateAdp_ Gfs = new DateAdp_(); + public static final DateAdp_ Gfs = new DateAdp_(); public static int DaysInMonth(DateAdp date) {return DaysInMonth(date.Month(), date.Year());} public static int DaysInMonth(int month, int year) { diff --git a/100_core/src/gplx/DateAdp__tst.java b/100_core/src/gplx/DateAdp__tst.java index 687046a57..6a729660c 100644 --- a/100_core/src/gplx/DateAdp__tst.java +++ b/100_core/src/gplx/DateAdp__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx; import org.junit.*; import gplx.core.tests.*; public class DateAdp__tst { - private final DateAdp__fxt fxt = new DateAdp__fxt(); + private final DateAdp__fxt fxt = new DateAdp__fxt(); @Test public void Parse_gplx() { fxt.Test__parse_gplx("99991231_235959.999" , "99991231_235959.999"); fxt.Test__parse_gplx("20090430_213200.123" , "20090430_213200.123"); diff --git a/100_core/src/gplx/Datetime_now.java b/100_core/src/gplx/Datetime_now.java index e6573e01c..c9c966cc1 100644 --- a/100_core/src/gplx/Datetime_now.java +++ b/100_core/src/gplx/Datetime_now.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import java.util.GregorianCalendar; public class Datetime_now { - private static final DateAdp dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000"); + private static final DateAdp dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000"); private static DateAdp manual; private static boolean autoincrement = true; public static void Manual_y_() { @@ -49,7 +49,7 @@ public class Datetime_now { public static DateAdp Get_force() { // ignore manual and force get of real time return new DateAdp(new GregorianCalendar()); } -// private static final DateAdp manual_time_dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000"); +// private static final DateAdp manual_time_dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000"); // private static DateAdp manual_time; // static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled; // static void Now_enabled_y_() {now_enabled = Bool_.Y; manual_time = manual_time_dflt;} diff --git a/100_core/src/gplx/Decimal_adp_.java b/100_core/src/gplx/Decimal_adp_.java index bda2535f6..f8cd1eea5 100644 --- a/100_core/src/gplx/Decimal_adp_.java +++ b/100_core/src/gplx/Decimal_adp_.java @@ -25,13 +25,13 @@ import java.util.Locale; public class Decimal_adp_ { public static final String Cls_val_name = "decimal"; - public static final Class Cls_ref_type = Decimal_adp.class; + public static final Class Cls_ref_type = Decimal_adp.class; public static Decimal_adp as_(Object obj) {return obj instanceof Decimal_adp ? (Decimal_adp)obj : null;} - public static final Decimal_adp Zero = new Decimal_adp(0); - public static final Decimal_adp One = new Decimal_adp(1); - public static final Decimal_adp Neg1 = new Decimal_adp(-1); - public static final Decimal_adp Const_e = Decimal_adp_.double_(Math_.E); - public static final Decimal_adp Const_pi = Decimal_adp_.double_(Math_.Pi); + public static final Decimal_adp Zero = new Decimal_adp(0); + public static final Decimal_adp One = new Decimal_adp(1); + public static final Decimal_adp Neg1 = new Decimal_adp(-1); + public static final Decimal_adp Const_e = Decimal_adp_.double_(Math_.E); + public static final Decimal_adp Const_pi = Decimal_adp_.double_(Math_.Pi); public static Decimal_adp base1000_(long v) {return divide_(v, 1000);} public static Decimal_adp parts_1000_(long num, int frc) {return divide_((num * (1000)) + frc, 1000);} public static Decimal_adp parts_(long num, int frc) { diff --git a/100_core/src/gplx/Double_.java b/100_core/src/gplx/Double_.java index 841ccf272..d4ab51281 100644 --- a/100_core/src/gplx/Double_.java +++ b/100_core/src/gplx/Double_.java @@ -17,13 +17,13 @@ package gplx; public class Double_ { public static final String Cls_val_name = "double"; - public static final Class Cls_ref_type = Double.class; + public static final Class Cls_ref_type = Double.class; public static final double MinValue = Double.MIN_VALUE , NaN = Double.NaN , Inf_pos = Double.POSITIVE_INFINITY ; - public static final byte[] + public static final byte[] NaN_bry = Bry_.new_a7("NaN") , Inf_pos_bry = Bry_.new_a7("INF") ; diff --git a/100_core/src/gplx/Err.java b/100_core/src/gplx/Err.java index d8c13bae5..a0071b9c5 100644 --- a/100_core/src/gplx/Err.java +++ b/100_core/src/gplx/Err.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.errs.*; public class Err extends RuntimeException { - private final boolean is_gplx; - private final String trace; + private final boolean is_gplx; + private final String trace; private Err_msg[] msgs_ary = new Err_msg[8]; private int msgs_len = 8, msgs_idx = 0; public Err(boolean is_gplx, String trace, String type, String msg, Object... args) { diff --git a/100_core/src/gplx/Err_.java b/100_core/src/gplx/Err_.java index ae205fd7a..42989724a 100644 --- a/100_core/src/gplx/Err_.java +++ b/100_core/src/gplx/Err_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Err_ { private static String Type__gplx = "gplx", Trace_null = null; @@ -74,5 +74,5 @@ public class Err_ { public static Err Cast_or_null(Exception e) {return Type_.Eq_by_obj(e, Err.class) ? (Err)e : null;} public static Err Cast_or_make(Throwable e) {return Type_.Eq_by_obj(e, Err.class) ? (Err)e : new Err(Bool_.N, Err_.Trace_lang(e), Type_.Name_by_obj(e), Err_.Message_lang(e));} - public static final String Type__op_canceled = "gplx.op_canceled"; + public static final String Type__op_canceled = "gplx.op_canceled"; } diff --git a/100_core/src/gplx/GfoMsg_.java b/100_core/src/gplx/GfoMsg_.java index 1302dad60..3edd7232c 100644 --- a/100_core/src/gplx/GfoMsg_.java +++ b/100_core/src/gplx/GfoMsg_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; import gplx.core.strings.*; import gplx.core.brys.*; import gplx.core.interfaces.*; public class GfoMsg_ { public static GfoMsg as_(Object obj) {return obj instanceof GfoMsg ? (GfoMsg)obj : null;} - public static final GfoMsg Null = new GfoMsg_base().ctor_("<>", false); + public static final GfoMsg Null = new GfoMsg_base().ctor_("<>", false); public static GfoMsg new_parse_(String key) {return new GfoMsg_base().ctor_(key, true);} public static GfoMsg new_cast_(String key) {return new GfoMsg_base().ctor_(key, false);} public static GfoMsg srl_(GfoMsg owner, String key) { @@ -181,7 +181,7 @@ class GfoMsg_base implements GfoMsg { public byte[][] ReadBryAry(String k, byte spr) {return Bry_split_.Split(ReadBry(k), spr);} public String[] ReadStrAryIgnore(String k, String spr, String ignore) {return String_.Split(String_.Replace(ReadStr(k), ignore, ""), spr);} public Object ReadValAt(int i) {return Args_getAt(i).Val();} - @gplx.Virtual protected Object ReadOr(String k, Object defaultOr) { + protected Object ReadOr(String k, Object defaultOr) { if (args == null) return Nil; // WORKAROUND.gfui: args null for DataBndr_whenEvt_execCmd if (!String_.Eq(k, "")) { for (int i = 0; i < args.Count(); i++) { @@ -258,7 +258,7 @@ class GfoMsg_base implements GfoMsg { public GfoMsg_base ctor_(String key, boolean parse) {this.key = key; this.parse = parse; return this;} private boolean parse; @gplx.Internal protected GfoMsg_base(){} - static final String_obj_val Nil = String_obj_val.new_("<>"); + static final String_obj_val Nil = String_obj_val.new_("<>"); } interface XtoStrWkr { String To_str(Object o); diff --git a/100_core/src/gplx/GfoMsg_tst.java b/100_core/src/gplx/GfoMsg_tst.java index 2f8d45a9d..c8d60c2c6 100644 --- a/100_core/src/gplx/GfoMsg_tst.java +++ b/100_core/src/gplx/GfoMsg_tst.java @@ -44,6 +44,6 @@ public class GfoMsg_tst { if (ctx.Deny()) return this; } return this; - } public static final String Invk_Cmd0 = "Cmd0"; + } public static final String Invk_Cmd0 = "Cmd0"; } } diff --git a/100_core/src/gplx/GfoTemplateFactory.java b/100_core/src/gplx/GfoTemplateFactory.java index 918a974e3..4233adf85 100644 --- a/100_core/src/gplx/GfoTemplateFactory.java +++ b/100_core/src/gplx/GfoTemplateFactory.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; -public class GfoTemplateFactory implements Gfo_invk { - public void Reg(String key, GfoTemplate template) {hash.Add(key, template);} - public Object Make(String key) { - GfoTemplate template = (GfoTemplate)hash.Get_by(key); - return template.NewCopy(template); - } - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - ctx.Match(k, k); - Object o = hash.Get_by(k); - return o == null ? Gfo_invk_.Rv_unhandled : o; - } - public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {} - Hash_adp hash = Hash_adp_.New(); -} +package gplx; +public class GfoTemplateFactory implements Gfo_invk { + public void Reg(String key, GfoTemplate template) {hash.Add(key, template);} + public Object Make(String key) { + GfoTemplate template = (GfoTemplate)hash.Get_by(key); + return template.NewCopy(template); + } + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + ctx.Match(k, k); + Object o = hash.Get_by(k); + return o == null ? Gfo_invk_.Rv_unhandled : o; + } + public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {} + Hash_adp hash = Hash_adp_.New(); +} diff --git a/100_core/src/gplx/Gfo_evt_mgr.java b/100_core/src/gplx/Gfo_evt_mgr.java index eac991dc5..75dcd353a 100644 --- a/100_core/src/gplx/Gfo_evt_mgr.java +++ b/100_core/src/gplx/Gfo_evt_mgr.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx; import gplx.core.lists.*; public class Gfo_evt_mgr { - private final Gfo_evt_mgr_owner sender; private Ordered_hash subsRegy, pubsRegy; + private final Gfo_evt_mgr_owner sender; private Ordered_hash subsRegy, pubsRegy; public Gfo_evt_mgr(Gfo_evt_mgr_owner sender) {this.sender = sender;} @gplx.Internal protected void AddSub(Gfo_evt_mgr_owner pub, String pubEvt, Gfo_evt_itm sub, String subPrc) { GfoEvLnk lnk = new GfoEvLnk(pub, pubEvt, sub, subPrc); diff --git a/100_core/src/gplx/Gfo_invk_.java b/100_core/src/gplx/Gfo_invk_.java index 0781ee2fd..e260d5820 100644 --- a/100_core/src/gplx/Gfo_invk_.java +++ b/100_core/src/gplx/Gfo_invk_.java @@ -17,8 +17,8 @@ package gplx; import gplx.core.primitives.*; public class Gfo_invk_ { public static final String Mutator_suffix = "_"; - public static final Gfo_invk Noop = new Gfo_invk__noop(); - public static final String_obj_val + public static final Gfo_invk Noop = new Gfo_invk__noop(); + public static final String_obj_val Rv_unhandled = String_obj_val.new_("Unhandled") , Rv_handled = String_obj_val.new_("Handled") , Rv_host = String_obj_val.new_("Host") diff --git a/100_core/src/gplx/Gfo_invk_cmd.java b/100_core/src/gplx/Gfo_invk_cmd.java index cd8f59254..90d015cd2 100644 --- a/100_core/src/gplx/Gfo_invk_cmd.java +++ b/100_core/src/gplx/Gfo_invk_cmd.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; -public class Gfo_invk_cmd { - private final Gfo_invk itm; private final String cmd; private final GfoMsg msg; - public Gfo_invk_cmd(Gfo_invk itm, String cmd, GfoMsg msg) { - this.itm = itm; this.cmd = cmd; this.msg = msg; - } - public Object Exec() {return itm.Invk(GfsCtx.Instance, 0, cmd, msg);} - public Object Exec_by_ctx(GfsCtx ctx, GfoMsg msg) {return itm.Invk(ctx, 0, cmd, msg);} - - public static final Gfo_invk_cmd Noop = new Gfo_invk_cmd(Gfo_invk_.Noop, "", GfoMsg_.Null); - public static Gfo_invk_cmd New_by_key(Gfo_invk itm, String cmd) {return New_by_val(itm, cmd, null);} - public static Gfo_invk_cmd New_by_val(Gfo_invk itm, String cmd, Object val) { - return new Gfo_invk_cmd(itm, cmd, (val == null) ? GfoMsg_.Null : GfoMsg_.new_parse_(cmd).Add("v", val)); - } -} +package gplx; +public class Gfo_invk_cmd { + private final Gfo_invk itm; private final String cmd; private final GfoMsg msg; + public Gfo_invk_cmd(Gfo_invk itm, String cmd, GfoMsg msg) { + this.itm = itm; this.cmd = cmd; this.msg = msg; + } + public Object Exec() {return itm.Invk(GfsCtx.Instance, 0, cmd, msg);} + public Object Exec_by_ctx(GfsCtx ctx, GfoMsg msg) {return itm.Invk(ctx, 0, cmd, msg);} + + public static final Gfo_invk_cmd Noop = new Gfo_invk_cmd(Gfo_invk_.Noop, "", GfoMsg_.Null); + public static Gfo_invk_cmd New_by_key(Gfo_invk itm, String cmd) {return New_by_val(itm, cmd, null);} + public static Gfo_invk_cmd New_by_val(Gfo_invk itm, String cmd, Object val) { + return new Gfo_invk_cmd(itm, cmd, (val == null) ? GfoMsg_.Null : GfoMsg_.new_parse_(cmd).Add("v", val)); + } +} diff --git a/100_core/src/gplx/Gfo_invk_cmd_mgr.java b/100_core/src/gplx/Gfo_invk_cmd_mgr.java index 973bfc1f8..a7ba66da8 100644 --- a/100_core/src/gplx/Gfo_invk_cmd_mgr.java +++ b/100_core/src/gplx/Gfo_invk_cmd_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; public class Gfo_invk_cmd_mgr { @@ -49,7 +49,7 @@ public class Gfo_invk_cmd_mgr { } return Unhandled; } - public static final String_obj_val Unhandled = String_obj_val.new_("Gfo_invk_cmd_mgr Unhandled"); + public static final String_obj_val Unhandled = String_obj_val.new_("Gfo_invk_cmd_mgr Unhandled"); List_adp list = List_adp_.New(); public static Gfo_invk_cmd_mgr new_() {return new Gfo_invk_cmd_mgr();} Gfo_invk_cmd_mgr() {} } diff --git a/100_core/src/gplx/Gfo_usr_dlg_.java b/100_core/src/gplx/Gfo_usr_dlg_.java index 3a193bf33..d38ba8f58 100644 --- a/100_core/src/gplx/Gfo_usr_dlg_.java +++ b/100_core/src/gplx/Gfo_usr_dlg_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Gfo_usr_dlg_ { private static Gfo_usr_dlg_base test__list, test__show; public static Gfo_usr_dlg Instance = Gfo_usr_dlg_noop.Instance; // NOTE: global instance which can be reassigned - public static final Gfo_usr_dlg Noop = Gfo_usr_dlg_noop.Instance; + public static final Gfo_usr_dlg Noop = Gfo_usr_dlg_noop.Instance; public static Gfo_usr_dlg__gui Test__list__init() { if (test__list == null) test__list = new Gfo_usr_dlg_base(Gfo_usr_dlg__log_.Noop, Gfo_usr_dlg__gui_.Test); @@ -68,5 +68,5 @@ class Gfo_usr_dlg_noop implements Gfo_usr_dlg { public String Log_direct(String msg) {return "";} public String Plog_many(String grp_key, String msg_key, String fmt, Object... args) {return "";} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return this;} - public static final Gfo_usr_dlg_noop Instance = new Gfo_usr_dlg_noop(); Gfo_usr_dlg_noop() {} + public static final Gfo_usr_dlg_noop Instance = new Gfo_usr_dlg_noop(); Gfo_usr_dlg_noop() {} } diff --git a/100_core/src/gplx/Gfo_usr_dlg__gui_.java b/100_core/src/gplx/Gfo_usr_dlg__gui_.java index 046e0d93c..1b0656f9b 100644 --- a/100_core/src/gplx/Gfo_usr_dlg__gui_.java +++ b/100_core/src/gplx/Gfo_usr_dlg__gui_.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.consoles.*; import gplx.core.lists.rings.*; public class Gfo_usr_dlg__gui_ { - public static final Gfo_usr_dlg__gui Noop = new Gfo_usr_dlg__gui_noop(); - public static final Gfo_usr_dlg__gui Console = new Gfo_usr_dlg__gui_console(); - public static final Gfo_usr_dlg__gui Test = new Gfo_usr_dlg__gui_mock(); - public static final Gfo_usr_dlg__gui Mem = new Gfo_usr_dlg__gui_mem_string(); + public static final Gfo_usr_dlg__gui Noop = new Gfo_usr_dlg__gui_noop(); + public static final Gfo_usr_dlg__gui Console = new Gfo_usr_dlg__gui_console(); + public static final Gfo_usr_dlg__gui Test = new Gfo_usr_dlg__gui_mock(); + public static final Gfo_usr_dlg__gui Mem = new Gfo_usr_dlg__gui_mem_string(); public static String Mem_file() {return ((Gfo_usr_dlg__gui_mem_string)Mem).file;} } class Gfo_usr_dlg__gui_noop implements Gfo_usr_dlg__gui { @@ -31,9 +31,9 @@ class Gfo_usr_dlg__gui_noop implements Gfo_usr_dlg__gui { public void Write_stop(String text) {} } class Gfo_usr_dlg__gui_console implements Gfo_usr_dlg__gui { - private final Console_adp__sys console = Console_adp__sys.Instance; + private final Console_adp__sys console = Console_adp__sys.Instance; public void Clear() {} - public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); + public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); public void Write_prog(String text) {console.Write_tmp(text);} public void Write_note(String text) {console.Write_str_w_nl(text);} public void Write_warn(String text) {console.Write_str_w_nl(text);} @@ -42,7 +42,7 @@ class Gfo_usr_dlg__gui_console implements Gfo_usr_dlg__gui { class Gfo_usr_dlg__gui_mem_string implements Gfo_usr_dlg__gui { public String file = ""; public void Clear() {file = "";} - public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); + public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); public void Write_prog(String text) {file += text + "\n";} public void Write_note(String text) {file += text + "\n";} public void Write_warn(String text) {file += text + "\n";} diff --git a/100_core/src/gplx/Gfo_usr_dlg__gui_mock.java b/100_core/src/gplx/Gfo_usr_dlg__gui_mock.java index e32bece3f..04441f625 100644 --- a/100_core/src/gplx/Gfo_usr_dlg__gui_mock.java +++ b/100_core/src/gplx/Gfo_usr_dlg__gui_mock.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; -import gplx.core.lists.rings.*; -public class Gfo_usr_dlg__gui_mock implements Gfo_usr_dlg__gui { - public List_adp Warns() {return warns;} private final List_adp warns = List_adp_.New(); - public List_adp Msgs() {return msgs;} private final List_adp msgs = List_adp_.New(); - public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); - public void Clear() {msgs.Clear(); warns.Clear();} - public void Write_prog(String text) {msgs.Add(text);} - public void Write_note(String text) {msgs.Add(text);} - public void Write_warn(String text) {warns.Add(text);} - public void Write_stop(String text) {msgs.Add(text);} -} +package gplx; +import gplx.core.lists.rings.*; +public class Gfo_usr_dlg__gui_mock implements Gfo_usr_dlg__gui { + public List_adp Warns() {return warns;} private final List_adp warns = List_adp_.New(); + public List_adp Msgs() {return msgs;} private final List_adp msgs = List_adp_.New(); + public Ring__string Prog_msgs() {return ring;} private final Ring__string ring = new Ring__string().Max_(0); + public void Clear() {msgs.Clear(); warns.Clear();} + public void Write_prog(String text) {msgs.Add(text);} + public void Write_note(String text) {msgs.Add(text);} + public void Write_warn(String text) {warns.Add(text);} + public void Write_stop(String text) {msgs.Add(text);} +} diff --git a/100_core/src/gplx/Gfo_usr_dlg__log_base.java b/100_core/src/gplx/Gfo_usr_dlg__log_base.java index a2cfba2a9..ee1701bba 100644 --- a/100_core/src/gplx/Gfo_usr_dlg__log_base.java +++ b/100_core/src/gplx/Gfo_usr_dlg__log_base.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.brys.fmtrs.*; public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log { - private final Object thread_lock = new Object(); + private final Object thread_lock = new Object(); private int archive_dirs_max = 8; private Io_url log_dir, err_fil; - private final Ordered_hash queued_list = Ordered_hash_.New(); - private final Bry_fmtr fmtr = Bry_fmtr.New__tmp(); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Ordered_hash queued_list = Ordered_hash_.New(); + private final Bry_fmtr fmtr = Bry_fmtr.New__tmp(); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); public boolean Queue_enabled() {return queue_enabled;} public void Queue_enabled_(boolean v) {queue_enabled = v; if (!v) this.Flush();} private boolean queue_enabled; public boolean Enabled() {return enabled;} public void Enabled_(boolean v) {enabled = v;} private boolean enabled = true; public Io_url Session_dir() {return session_dir;} private Io_url session_dir; @@ -115,10 +115,10 @@ public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log { else return Gfo_invk_.Rv_unhandled; return this; } - public static final Gfo_usr_dlg__log_base Instance = new Gfo_usr_dlg__log_base(); + public static final Gfo_usr_dlg__log_base Instance = new Gfo_usr_dlg__log_base(); } class Usr_log_fil { - private final String_bldr sb = String_bldr_.new_(); + private final String_bldr sb = String_bldr_.new_(); public Usr_log_fil(Io_url url) { this.url = url; } diff --git a/100_core/src/gplx/Gfo_usr_dlg_base.java b/100_core/src/gplx/Gfo_usr_dlg_base.java index be6b213b0..ec8e2e235 100644 --- a/100_core/src/gplx/Gfo_usr_dlg_base.java +++ b/100_core/src/gplx/Gfo_usr_dlg_base.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.brys.fmtrs.*; public class Gfo_usr_dlg_base implements Gfo_usr_dlg { - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); - private final Bry_fmtr tmp_fmtr = Bry_fmtr.New__tmp().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28 + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Bry_fmtr tmp_fmtr = Bry_fmtr.New__tmp().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28 public Gfo_usr_dlg_base(Gfo_usr_dlg__log log_wkr, Gfo_usr_dlg__gui gui_wkr) {this.log_wkr = log_wkr; this.gui_wkr = gui_wkr;} public Gfo_usr_dlg__log Log_wkr() {return log_wkr;} public void Log_wkr_(Gfo_usr_dlg__log v) {log_wkr = v;} private Gfo_usr_dlg__log log_wkr; public Gfo_usr_dlg__gui Gui_wkr() {return gui_wkr;} public void Gui_wkr_(Gfo_usr_dlg__gui v) {gui_wkr = v;} private Gfo_usr_dlg__gui gui_wkr; diff --git a/100_core/src/gplx/Guid_adp_.java b/100_core/src/gplx/Guid_adp_.java index 4560a276a..094202cb2 100644 --- a/100_core/src/gplx/Guid_adp_.java +++ b/100_core/src/gplx/Guid_adp_.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; +package gplx; public class Guid_adp_ { - public static final String Cls_ref_name = "Guid"; - public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000"); - public static String New_str() {return New().To_str();} - public static Guid_adp New() {return new Guid_adp(java.util.UUID.randomUUID());} - public static Guid_adp Parse(String s) {return new Guid_adp(java.util.UUID.fromString(s));} + public static final String Cls_ref_name = "Guid"; + public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000"); + public static String New_str() {return New().To_str();} + public static Guid_adp New() {return new Guid_adp(java.util.UUID.randomUUID());} + public static Guid_adp Parse(String s) {return new Guid_adp(java.util.UUID.fromString(s));} } \ No newline at end of file diff --git a/100_core/src/gplx/Hash_adp_.java b/100_core/src/gplx/Hash_adp_.java index d3bec8f4e..129c55b41 100644 --- a/100_core/src/gplx/Hash_adp_.java +++ b/100_core/src/gplx/Hash_adp_.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; -public class Hash_adp_ { +public class Hash_adp_ { public static Hash_adp New() {return new Hash_adp_obj();} - public static final Hash_adp Noop = new Hash_adp_noop(); + public static final Hash_adp Noop = new Hash_adp_noop(); } class Hash_adp_obj extends gplx.core.lists.Hash_adp_base implements Hash_adp {}//_20110428 -class Hash_adp_noop implements Hash_adp { +class Hash_adp_noop implements Hash_adp { public int Count() {return 0;} public boolean Has(Object key) {return false;} public Object Get_by(Object key) {return null;} diff --git a/100_core/src/gplx/Hash_adp_bry.java b/100_core/src/gplx/Hash_adp_bry.java index 8cb6afa8e..e6231fc4a 100644 --- a/100_core/src/gplx/Hash_adp_bry.java +++ b/100_core/src/gplx/Hash_adp_bry.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; import gplx.core.intls.*; public class Hash_adp_bry extends gplx.core.lists.Hash_adp_base implements Hash_adp { - private final Hash_adp_bry_itm_base proto, key_ref; + private final Hash_adp_bry_itm_base proto, key_ref; Hash_adp_bry(Hash_adp_bry_itm_base proto) { this.proto = proto; this.key_ref = proto.New(); @@ -106,7 +106,7 @@ class Hash_adp_bry_itm_cs extends Hash_adp_bry_itm_base { } return true; } - public static final Hash_adp_bry_itm_cs Instance = new Hash_adp_bry_itm_cs(); Hash_adp_bry_itm_cs() {} + public static final Hash_adp_bry_itm_cs Instance = new Hash_adp_bry_itm_cs(); Hash_adp_bry_itm_cs() {} } class Hash_adp_bry_itm_ci_a7 extends Hash_adp_bry_itm_base { private byte[] src; int src_bgn, src_end; @@ -139,10 +139,10 @@ class Hash_adp_bry_itm_ci_a7 extends Hash_adp_bry_itm_base { } return true; } - public static final Hash_adp_bry_itm_ci_a7 Instance = new Hash_adp_bry_itm_ci_a7(); Hash_adp_bry_itm_ci_a7() {} + public static final Hash_adp_bry_itm_ci_a7 Instance = new Hash_adp_bry_itm_ci_a7(); Hash_adp_bry_itm_ci_a7() {} } class Hash_adp_bry_itm_ci_u8 extends Hash_adp_bry_itm_base { - private final Gfo_case_mgr case_mgr; + private final Gfo_case_mgr case_mgr; Hash_adp_bry_itm_ci_u8(Gfo_case_mgr case_mgr) {this.case_mgr = case_mgr;} private byte[] src; int src_bgn, src_end; @Override public Hash_adp_bry_itm_base New() {return new Hash_adp_bry_itm_ci_u8(case_mgr);} diff --git a/100_core/src/gplx/Int_.java b/100_core/src/gplx/Int_.java index d6ea40a62..c7f41bfa7 100644 --- a/100_core/src/gplx/Int_.java +++ b/100_core/src/gplx/Int_.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.langs.gfs.*; public class Int_ { // -------- BASELIB_COPY -------- public static final String Cls_val_name = "int"; - public static final Class Cls_ref_type = Integer.class; + public static final Class Cls_ref_type = Integer.class; public static final int Min_value = Integer.MIN_VALUE diff --git a/100_core/src/gplx/Io_mgr.java b/100_core/src/gplx/Io_mgr.java index 0be0c5808..77449a4ca 100644 --- a/100_core/src/gplx/Io_mgr.java +++ b/100_core/src/gplx/Io_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.primitives.*; import gplx.core.ios.*; /*IoItmFil, IoItmDir..*/ import gplx.core.ios.streams.*; import gplx.core.ios.loaders.*; import gplx.core.ios.atrs.*; public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather all cmds under gplx namespace; otherwise need to use gplx.core.ios whenever copying/deleting file public Io_mgr() {evt_mgr = new Gfo_evt_mgr(this);} - public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr; + public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr; public boolean Exists(Io_url url) {return url.Type_dir() ? ExistsDir(url) : ExistsFil(url);} public boolean ExistsFil(Io_url url) {return IoEnginePool.Instance.Get_by(url.Info().EngineKey()).ExistsFil_api(url);} public void ExistsFilOrFail(Io_url url) {if (!ExistsFil(url)) throw Err_.new_wo_type("could not find file", "url", url);} @@ -91,7 +91,7 @@ public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather byte[] bry = LoadFilBry_reuse(url, Bry_.Empty, len); bfr.Bfr_init(bry, len.Val()); } - public static final byte[] LoadFilBry_fail = Bry_.Empty; + public static final byte[] LoadFilBry_fail = Bry_.Empty; public byte[] LoadFilBry_reuse(Io_url url, byte[] ary, Int_obj_ref ary_len) { if (loader != null) { byte[] rv = loader.Load_fil_as_bry(url); @@ -152,11 +152,11 @@ public class Io_mgr implements Gfo_evt_mgr_owner { // exists primarily to gather public boolean DownloadFil(String src, Io_url trg) {return IoEngine_xrg_downloadFil.new_(src, trg).Exec();} public IoEngine_xrg_downloadFil DownloadFil_args(String src, Io_url trg) {return IoEngine_xrg_downloadFil.new_(src, trg);} public boolean Query_read_only(Io_url url, int read_only_type) {return IoEngineUtl.Query_read_only(IoEnginePool.Instance.Get_by(url.Info().EngineKey()), url, read_only_type);} - public static final Io_mgr Instance = new Io_mgr(); + public static final Io_mgr Instance = new Io_mgr(); public static final int Len_kb = 1024, Len_mb = 1048576, Len_gb = 1073741824, Len_gb_2 = 2147483647; public static final long Len_mb_long = Len_mb; public static final long Len_null = -1; - public static final String Evt__fil_created = "fil_created"; + public static final String Evt__fil_created = "fil_created"; public static final int Read_only__basic__file = 1, Read_only__basic__file_and_dirs = 2, Read_only__perms__file = 3; } class Io_mgr_ { diff --git a/100_core/src/gplx/Io_url.java b/100_core/src/gplx/Io_url.java index 358163cd6..1c08e9c36 100644 --- a/100_core/src/gplx/Io_url.java +++ b/100_core/src/gplx/Io_url.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.ios.*; /*IoUrlInfo*/ import gplx.core.envs.*; import gplx.langs.htmls.*; import gplx.core.interfaces.*; public class Io_url implements CompareAble, ParseAble, Gfo_invk { //_20101005 URL:doc/Io_url.txt public IoUrlInfo Info() {return info;} IoUrlInfo info; - public String Raw() {return raw;} final String raw; + public String Raw() {return raw;} final String raw; public byte[] RawBry() {return Bry_.new_u8(raw);} public String To_http_file_str() {return String_.Len_eq_0(raw) ? String_.Empty : String_.Concat (Http_file_str, Http_file_str_encoder.Encode_str(raw));} public byte[] To_http_file_bry() {return String_.Len_eq_0(raw) ? Bry_.Empty : Bry_.Add (Http_file_bry, Http_file_str_encoder.Encode_bry(raw));} public static Url_encoder_interface Http_file_str_encoder = Url_encoder_interface_same.Instance; - public static final String Http_file_str = "file:///"; - public static final int Http_file_len = String_.Len(Http_file_str); - public static final byte[] Http_file_bry = Bry_.new_a7(Http_file_str); + public static final String Http_file_str = "file:///"; + public static final int Http_file_len = String_.Len(Http_file_str); + public static final byte[] Http_file_bry = Bry_.new_a7(Http_file_str); public boolean Type_dir() {return info.IsDir(raw);} public boolean Type_fil() {return !info.IsDir(raw);} public Io_url OwnerDir() {return Io_url_.new_inf_(info.OwnerDir(raw), info);} public Io_url OwnerRoot() {return Io_url_.new_inf_(info.OwnerRoot(raw), info);} diff --git a/100_core/src/gplx/Io_url_.java b/100_core/src/gplx/Io_url_.java index f750fcafd..f8827a737 100644 --- a/100_core/src/gplx/Io_url_.java +++ b/100_core/src/gplx/Io_url_.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.ios.*; /*IoUrlInfo_*/ import gplx.core.stores.*; import gplx.core.envs.*; -public class Io_url_ { - public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil); - public static final Io_url NullPtr = null; - public static final Io_url Parser = new Io_url("", IoUrlInfo_.Nil); +public class Io_url_ { + public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil); + public static final Io_url NullPtr = null; + public static final Io_url Parser = new Io_url("", IoUrlInfo_.Nil); public static Io_url as_(Object obj) {return obj instanceof Io_url ? (Io_url)obj : null;} public static Io_url cast(Object obj) {try {return (Io_url)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, Io_url.class, obj);}} public static Io_url Usr() { diff --git a/100_core/src/gplx/Io_url__tst.java b/100_core/src/gplx/Io_url__tst.java index 6ce37039b..e17aba1c8 100644 --- a/100_core/src/gplx/Io_url__tst.java +++ b/100_core/src/gplx/Io_url__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx; import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*; public class Io_url__tst { - @Before public void init() {fxt.Clear();} private final Io_url__fxt fxt = new Io_url__fxt(); + @Before public void init() {fxt.Clear();} private final Io_url__fxt fxt = new Io_url__fxt(); @Test public void Basic__lnx() {fxt.Test__New__http_or_null(Bool_.N, "file:///C:/a.txt", "C:/a.txt");} @Test public void Basic__wnt() {fxt.Test__New__http_or_null(Bool_.Y, "file:///C:/a.txt", "C:\\a.txt");} @Test public void Null() {fxt.Test__New__http_or_null(Bool_.N, "C:/a.txt", null);} diff --git a/100_core/src/gplx/Keyval_.java b/100_core/src/gplx/Keyval_.java index 970fe6409..825739d35 100644 --- a/100_core/src/gplx/Keyval_.java +++ b/100_core/src/gplx/Keyval_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; -public class Keyval_ { - public static final Keyval[] Ary_empty = new Keyval[0]; +public class Keyval_ { + public static final Keyval[] Ary_empty = new Keyval[0]; public static Keyval[] Ary(Keyval... ary) {return ary;} public static Keyval[] Ary_cast_(Object o) { try {return (Keyval[])o;} diff --git a/100_core/src/gplx/Keyval_hash.java b/100_core/src/gplx/Keyval_hash.java index 0cc108c84..314d28e10 100644 --- a/100_core/src/gplx/Keyval_hash.java +++ b/100_core/src/gplx/Keyval_hash.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Keyval_hash { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public int Count() {return hash.Count();} public int Len() {return hash.Count();} public Keyval_hash Clear() {hash.Clear(); return this;} diff --git a/100_core/src/gplx/Keyval_list.java b/100_core/src/gplx/Keyval_list.java index e0f11f34b..777472c98 100644 --- a/100_core/src/gplx/Keyval_list.java +++ b/100_core/src/gplx/Keyval_list.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Keyval_list { - public int Count() {return list.Count();} private final List_adp list = List_adp_.New(); + public int Count() {return list.Count();} private final List_adp list = List_adp_.New(); public void Clear() {list.Clear();} public Keyval Get_at(int i) {return (Keyval)list.Get_at(i);} public Keyval_list Add(String key, Object val) {list.Add(Keyval_.new_(key, val)); return this;} diff --git a/100_core/src/gplx/List_adp_.java b/100_core/src/gplx/List_adp_.java index 8e5795d0c..5a96a50bf 100644 --- a/100_core/src/gplx/List_adp_.java +++ b/100_core/src/gplx/List_adp_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.lists.*; public class List_adp_ { - public static final List_adp Noop = new List_adp_noop(); + public static final List_adp Noop = new List_adp_noop(); public static List_adp New() {return new List_adp_obj();} public static List_adp New_w_size(int v) {return new List_adp_obj(v);} public static List_adp New_by_many(Object... ary) { @@ -49,5 +49,5 @@ public class List_adp_ { list.Del_at(last_idx); return rv; } - public static final int Not_found = -1, Base1 = 1; + public static final int Not_found = -1, Base1 = 1; } diff --git a/100_core/src/gplx/List_adp_base.java b/100_core/src/gplx/List_adp_base.java index 99b36cec8..01cb63b77 100644 --- a/100_core/src/gplx/List_adp_base.java +++ b/100_core/src/gplx/List_adp_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.lists.*; public abstract class List_adp_base implements List_adp, Gfo_invk { @@ -64,12 +64,12 @@ public abstract class List_adp_base implements List_adp, Gfo_invk { if (Object_.Eq(list[i], o)) return i; return List_adp_.Not_found; } - @gplx.Virtual public void Clear() { + public void Clear() { for (int i = 0; i < count; i++) list[i] = null; count = 0; } - @gplx.Virtual public void Del_at(int index) {if (index >= count || index < 0) throw Err_.new_missing_idx(index, count); + public void Del_at(int index) {if (index >= count || index < 0) throw Err_.new_missing_idx(index, count); Collapse(index); count--; } @@ -102,7 +102,7 @@ public abstract class List_adp_base implements List_adp, Gfo_invk { list[rhs] = temp; } } - @gplx.Virtual public void Shuffle() {// REF: Fisher-Yates shuffle + public void Shuffle() {// REF: Fisher-Yates shuffle RandomAdp random = RandomAdp_.new_(); for (int i = count; i > 1; i--) { int rndIdx = random.Next(i); diff --git a/100_core/src/gplx/Long_.java b/100_core/src/gplx/Long_.java index e8c70dcf3..1e241a8b4 100644 --- a/100_core/src/gplx/Long_.java +++ b/100_core/src/gplx/Long_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; -public class Long_ { +public class Long_ { public static final String Cls_val_name = "long"; - public static final Class Cls_ref_type = Long.class; + public static final Class Cls_ref_type = Long.class; public static final int Log10Ary_len = 21; public static long[] Log10Ary = new long[] { 1, 10, 100, 1000, 10000 diff --git a/100_core/src/gplx/Object_.java b/100_core/src/gplx/Object_.java index 517278e37..3ef78ff2f 100644 --- a/100_core/src/gplx/Object_.java +++ b/100_core/src/gplx/Object_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; public class Object_ { public static final String Cls_val_name = "Object"; - public static final Object[] Ary_empty = new Object[0]; + public static final Object[] Ary_empty = new Object[0]; public static Object[] Ary(Object... ary) {return ary;} public static Object[] Ary_add(Object[] lhs, Object[] rhs) { int lhs_len = lhs.length, rhs_len = rhs.length; @@ -63,6 +63,6 @@ public class Object_ { else if (Type_.Eq(c, Double_.Cls_ref_type)) return Double_.To_str_loose(Double_.cast(v)); else return v.toString(); } - public static final Object Null = null; - public static final byte[] Bry__null = Bry_.new_a7("null"); + public static final Object Null = null; + public static final byte[] Bry__null = Bry_.new_a7("null"); } \ No newline at end of file diff --git a/100_core/src/gplx/Ordered_hash_base.java b/100_core/src/gplx/Ordered_hash_base.java index 8ce6c9956..7aaf30665 100644 --- a/100_core/src/gplx/Ordered_hash_base.java +++ b/100_core/src/gplx/Ordered_hash_base.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.envs.*; import gplx.core.lists.*; /*EnumerAble,ComparerAble*/ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gfo_invk { - private final List_adp ordered = List_adp_.New(); + private final List_adp ordered = List_adp_.New(); @Override protected void Add_base(Object key, Object val) { super.Add_base(key, val); ordered.Add(val); @@ -43,7 +43,7 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf this.Clear(); return rv; } - @gplx.Virtual public void Sort() {if (locked) Lock_fail(); ordered.Sort();} // NOTE: uses item's .compareTo + public void Sort() {if (locked) Lock_fail(); ordered.Sort();} // NOTE: uses item's .compareTo public void Sort_by(ComparerAble comparer) {if (locked) Lock_fail(); ordered.Sort_by(comparer);} @Override public java.util.Iterator iterator() {return ordered.iterator();} public void Add_at(int i, Object key, Object val) { @@ -95,7 +95,7 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf } else return Gfo_invk_.Rv_unhandled; return this; - } static final String Invk_SetKeyOnly = "SetKeyOnly", Invk_Print = "Print"; + } static final String Invk_SetKeyOnly = "SetKeyOnly", Invk_Print = "Print"; @Override public int Count() {return ordered.Count();} public Ordered_hash_base() {} } diff --git a/100_core/src/gplx/RandomAdp_.java b/100_core/src/gplx/RandomAdp_.java index 0da7e3772..9082d3f4f 100644 --- a/100_core/src/gplx/RandomAdp_.java +++ b/100_core/src/gplx/RandomAdp_.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; -import java.util.*; +package gplx; +import java.util.*; public class RandomAdp_ implements Gfo_invk { - public static RandomAdp new_() { - Random random = new Random(System.currentTimeMillis()); - return new RandomAdp(random); - } - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_Next)) return RandomAdp_.new_().Next(m.ReadInt("max")); - else return Gfo_invk_.Rv_unhandled; - } static final String Invk_Next = "Next"; - public static final RandomAdp_ Gfs = new RandomAdp_(); -} + public static RandomAdp new_() { + Random random = new Random(System.currentTimeMillis()); + return new RandomAdp(random); + } + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_Next)) return RandomAdp_.new_().Next(m.ReadInt("max")); + else return Gfo_invk_.Rv_unhandled; + } static final String Invk_Next = "Next"; + public static final RandomAdp_ Gfs = new RandomAdp_(); +} diff --git a/100_core/src/gplx/Short_.java b/100_core/src/gplx/Short_.java index 696f35525..e139bc8d1 100644 --- a/100_core/src/gplx/Short_.java +++ b/100_core/src/gplx/Short_.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx; -public class Short_ { - public static final String Cls_val_name = "short"; - public static final Class Cls_ref_type = Short.class; - - public static short cast(Object obj) {try {return (Short)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, short.class, obj);}} - public static short By_int(int v) {return (short)v;} -} +package gplx; +public class Short_ { + public static final String Cls_val_name = "short"; + public static final Class Cls_ref_type = Short.class; + + public static short cast(Object obj) {try {return (Short)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, short.class, obj);}} + public static short By_int(int v) {return (short)v;} +} diff --git a/100_core/src/gplx/String_.java b/100_core/src/gplx/String_.java index f83b25fcd..81e69acce 100644 --- a/100_core/src/gplx/String_.java +++ b/100_core/src/gplx/String_.java @@ -19,7 +19,7 @@ import gplx.core.strings.String_bldr; import gplx.core.strings.String_bldr_; public class String_ { // -------- BASELIB_COPY -------- - public static final Class Cls_ref_type = String.class; + public static final Class Cls_ref_type = String.class; public static final String Cls_val_name = "str" + "ing"; public static final int Find_none = -1, Pos_neg1 = -1; public static final String Empty = "", Null_mark = "<>", Tab = "\t", Lf = "\n", CrLf = "\r\n", Nl = "\n"; @@ -415,7 +415,7 @@ public class String_ { sb.Add(s).Add(";"); return sb.To_str(); } - public static final String[] Ary_empty = new String[0]; + public static final String[] Ary_empty = new String[0]; public static String[] Split(String raw, char dlm) {return Split(raw, dlm, false);} public static String[] Split(String raw, char dlm, boolean addEmptyIfDlmIsLast) { List_adp list = List_adp_.New(); String_bldr sb = String_bldr_.new_(); diff --git a/100_core/src/gplx/Tfds.java b/100_core/src/gplx/Tfds.java index 668802cae..d2f15840d 100644 --- a/100_core/src/gplx/Tfds.java +++ b/100_core/src/gplx/Tfds.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.tests.*; public class Tfds { // URL:doc/gplx.tfds/Tfds.txt @@ -137,9 +137,9 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt public static void Err_has(Exception e, String hdr) { Tfds.Eq_true(String_.Has(Err_.Message_gplx_full(e), hdr), "could not find '{0}' in '{1}'", hdr, Err_.Message_gplx_full(e)); } - static final String EmptyStr = TfdsMsgBldr.EmptyStr; + static final String EmptyStr = TfdsMsgBldr.EmptyStr; static TfdsMsgBldr msgBldr = TfdsMsgBldr.new_(); - public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst"); + public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst"); public static void WriteText(String text) {Console_adp__sys.Instance.Write_str(text);} public static void Write(byte[] s, int b, int e) {Write(Bry_.Mid(s, b, e));} public static void Write() {Write("tmp");} @@ -156,7 +156,7 @@ class TfdsEqListItmStr_cls_default implements TfdsEqListItmStr { public String To_str(Object cur, Object actl) { return Object_.Xto_str_strict_or_null_mark(cur); } - public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {} + public static final TfdsEqListItmStr_cls_default Instance = new TfdsEqListItmStr_cls_default(); TfdsEqListItmStr_cls_default() {} } class TfdsEqAryItm { public int Idx() {return idx;} public TfdsEqAryItm Idx_(int v) {idx = v; return this;} int idx; @@ -230,5 +230,5 @@ class TfdsMsgBldr { ); } public static TfdsMsgBldr new_() {return new TfdsMsgBldr();} TfdsMsgBldr() {} - public static final String EmptyStr = ""; + public static final String EmptyStr = ""; } diff --git a/100_core/src/gplx/TfdsTstr_fxt.java b/100_core/src/gplx/TfdsTstr_fxt.java index de991df69..c47574c5d 100644 --- a/100_core/src/gplx/TfdsTstr_fxt.java +++ b/100_core/src/gplx/TfdsTstr_fxt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.lists.*; @@ -93,5 +93,5 @@ class TfdsTstrItm { return compareResult == 1 ? "==" : "!="; } public static TfdsTstrItm new_() {return new TfdsTstrItm();} TfdsTstrItm() {} - public static final int CompareResult_none = 0, CompareResult_eq = 1, CompareResult_eqn = 2; + public static final int CompareResult_none = 0, CompareResult_eq = 1, CompareResult_eqn = 2; } diff --git a/100_core/src/gplx/Time_span_.java b/100_core/src/gplx/Time_span_.java index 5119854d6..ad72c9a01 100644 --- a/100_core/src/gplx/Time_span_.java +++ b/100_core/src/gplx/Time_span_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.strings.*; import gplx.core.envs.*; public class Time_span_ { - public static final Time_span Zero = new Time_span(0); - public static final Time_span Null = new Time_span(-1); + public static final Time_span Zero = new Time_span(0); + public static final Time_span Null = new Time_span(-1); public static Time_span fracs_(long val) {return new Time_span(val);} public static Time_span seconds_(double seconds) { long fracs = (long)(seconds * Divisors[Idx_Sec]); @@ -138,18 +138,18 @@ public class Time_span_ { } return rv; } - public static final String Fmt_PadZeros = "00:00:00.000"; // u,h00:m00:s00.f000 - public static final String Fmt_Short = "short"; // u,h##:m#0:s00; - public static final String Fmt_Default = "0.000"; // v,#.000 - public static final String Fmt_NoFractionals = "0"; // v,# - @gplx.Internal protected static final int[] Divisors = { + public static final String Fmt_PadZeros = "00:00:00.000"; // u,h00:m00:s00.f000 + public static final String Fmt_Short = "short"; // u,h##:m#0:s00; + public static final String Fmt_Default = "0.000"; // v,#.000 + public static final String Fmt_NoFractionals = "0"; // v,# + @gplx.Internal protected static final int[] Divisors = { 1, //1 fracs 1000, //1,000 fracs in a second 60000, //60,000 fracs in a minute (60 seconds * 1,000) 3600000, //3,600,000 fracs in an hour (60 minutes * 60,000) }; - public static final String MajorDelimiter = ":"; - public static final int + public static final String MajorDelimiter = ":"; + public static final int Idx_Frac = 0 , Idx_Sec = 1 , Idx_Min = 2 diff --git a/100_core/src/gplx/Yn.java b/100_core/src/gplx/Yn.java index e5baab41c..4ed62217a 100644 --- a/100_core/src/gplx/Yn.java +++ b/100_core/src/gplx/Yn.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx; import gplx.core.stores.*; -public class Yn { - public static final String Y = "y", N = "n"; +public class Yn { + public static final String Y = "y", N = "n"; public static boolean parse_by_char_or(String v, boolean or) { if (String_.Eq(v, Y)) return true; else if (String_.Eq(v, N)) return false; diff --git a/100_core/src/gplx/core/brys/Bry_bfr_mkr.java b/100_core/src/gplx/core/brys/Bry_bfr_mkr.java index ba4ff8e3a..cf25a7508 100644 --- a/100_core/src/gplx/core/brys/Bry_bfr_mkr.java +++ b/100_core/src/gplx/core/brys/Bry_bfr_mkr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys; import gplx.*; import gplx.core.*; public class Bry_bfr_mkr { - public Bry_bfr Get_b128() {return mkr_b128.Get();} private final Bry_bfr_mkr_mgr mkr_b128 = new Bry_bfr_mkr_mgr(Tid_b128, 128); - public Bry_bfr Get_b512() {return mkr_b512.Get();} private final Bry_bfr_mkr_mgr mkr_b512 = new Bry_bfr_mkr_mgr(Tid_b512, 512); - public Bry_bfr Get_k004() {return mkr_k004.Get();} private final Bry_bfr_mkr_mgr mkr_k004 = new Bry_bfr_mkr_mgr(Tid_k004, 4 * Io_mgr.Len_kb); - public Bry_bfr Get_m001() {return mkr_m001.Get();} private final Bry_bfr_mkr_mgr mkr_m001 = new Bry_bfr_mkr_mgr(Tid_m001, 1 * Io_mgr.Len_mb); + public Bry_bfr Get_b128() {return mkr_b128.Get();} private final Bry_bfr_mkr_mgr mkr_b128 = new Bry_bfr_mkr_mgr(Tid_b128, 128); + public Bry_bfr Get_b512() {return mkr_b512.Get();} private final Bry_bfr_mkr_mgr mkr_b512 = new Bry_bfr_mkr_mgr(Tid_b512, 512); + public Bry_bfr Get_k004() {return mkr_k004.Get();} private final Bry_bfr_mkr_mgr mkr_k004 = new Bry_bfr_mkr_mgr(Tid_k004, 4 * Io_mgr.Len_kb); + public Bry_bfr Get_m001() {return mkr_m001.Get();} private final Bry_bfr_mkr_mgr mkr_m001 = new Bry_bfr_mkr_mgr(Tid_m001, 1 * Io_mgr.Len_mb); public void Clear() { for (byte i = Tid_b128; i <= Tid_m001; i++) mkr(i).Clear(); diff --git a/100_core/src/gplx/core/brys/Bry_bfr_mkr_mgr.java b/100_core/src/gplx/core/brys/Bry_bfr_mkr_mgr.java index 16f71e18a..b92cb3ea8 100644 --- a/100_core/src/gplx/core/brys/Bry_bfr_mkr_mgr.java +++ b/100_core/src/gplx/core/brys/Bry_bfr_mkr_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys; import gplx.*; import gplx.core.*; public class Bry_bfr_mkr_mgr { - private final Object thread_lock = new Object(); - private final byte mgr_id; private final int reset; + private final Object thread_lock = new Object(); + private final byte mgr_id; private final int reset; private Bry_bfr[] used = Bry_bfr_.Ary_empty; private int used_len = 0, used_max = 0; private int[] free; private int free_len; public Bry_bfr_mkr_mgr(byte mgr_id, int reset) {// NOTE: random IndexOutOfBounds errors in Get around free[--free_len] with free_len being -1; put member variable initialization within thread_lock to try to avoid; DATE:2014-09-21 diff --git a/100_core/src/gplx/core/brys/Bry_rdr.java b/100_core/src/gplx/core/brys/Bry_rdr.java index f9c56d322..fd566ab91 100644 --- a/100_core/src/gplx/core/brys/Bry_rdr.java +++ b/100_core/src/gplx/core/brys/Bry_rdr.java @@ -24,8 +24,8 @@ import gplx.String_; import gplx.core.btries.Btrie_rv; import gplx.core.btries.Btrie_slim_mgr; public class Bry_rdr { - private final gplx.core.primitives.Int_obj_ref pos_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); - private final Btrie_rv trv = new Btrie_rv(); + private final gplx.core.primitives.Int_obj_ref pos_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); + private final Btrie_rv trv = new Btrie_rv(); public byte[] Src() {return src;} protected byte[] src; public int Src_end() {return src_end;} protected int src_end; public int Pos() {return pos;} protected int pos; diff --git a/100_core/src/gplx/core/brys/Bry_rdr_old.java b/100_core/src/gplx/core/brys/Bry_rdr_old.java index 20f885459..a2e6ac3e2 100644 --- a/100_core/src/gplx/core/brys/Bry_rdr_old.java +++ b/100_core/src/gplx/core/brys/Bry_rdr_old.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys; import gplx.*; import gplx.core.*; public class Bry_rdr_old { private byte[] scope = Bry_.Empty; @@ -104,7 +104,7 @@ public class Bry_rdr_old { byte[] double_bry = Read_bry_to(to_char); return Double_.parse(String_.new_a7(double_bry)); // double will never have utf8 } - @gplx.Virtual public Bry_rdr_old Skip_ws() { + public Bry_rdr_old Skip_ws() { while (pos < src_len) { switch (src[pos]) { case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space: diff --git a/100_core/src/gplx/core/brys/args/Bfr_arg__bry_fmt.java b/100_core/src/gplx/core/brys/args/Bfr_arg__bry_fmt.java index 95960fad2..169b01417 100644 --- a/100_core/src/gplx/core/brys/args/Bfr_arg__bry_fmt.java +++ b/100_core/src/gplx/core/brys/args/Bfr_arg__bry_fmt.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys.args; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import gplx.core.brys.*; public class Bfr_arg__bry_fmt implements Bfr_arg { - private final Bry_fmt fmt; + private final Bry_fmt fmt; private Object[] arg_ary; public Bfr_arg__bry_fmt(Bry_fmt fmt, Object... arg_ary) { this.fmt = fmt; diff --git a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr.java b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr.java index 9168d6bac..f2be60e7c 100644 --- a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr.java +++ b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import gplx.core.brys.*; import gplx.core.primitives.*; import gplx.core.strings.*; public class Bry_fmtr { @@ -232,8 +232,8 @@ public class Bry_fmtr { public boolean Fmt_args_exist() {return fmt_args_exist;} private boolean fmt_args_exist; boolean dirty = true; int baseInt = 0; - public static final byte char_escape = Byte_ascii.Tilde, char_arg_bgn = Byte_ascii.Curly_bgn, char_arg_end = Byte_ascii.Curly_end, char_escape_nl = Byte_ascii.Ltr_n, char_escape_tab = Byte_ascii.Ltr_t, char_eval_bgn = Byte_ascii.Lt, char_eval_end = Byte_ascii.Gt; - public static final Bry_fmtr Null = new Bry_fmtr().Fmt_(""); + public static final byte char_escape = Byte_ascii.Tilde, char_arg_bgn = Byte_ascii.Curly_bgn, char_arg_end = Byte_ascii.Curly_end, char_escape_nl = Byte_ascii.Ltr_n, char_escape_tab = Byte_ascii.Ltr_t, char_eval_bgn = Byte_ascii.Lt, char_eval_end = Byte_ascii.Gt; + public static final Bry_fmtr Null = new Bry_fmtr().Fmt_(""); public static Bry_fmtr New__tmp() {return new Bry_fmtr().Fmt_("").Keys_();} public static Bry_fmtr new_(String fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1; public static Bry_fmtr new_(byte[] fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1; diff --git a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_tst.java b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_tst.java index 6ffaad8c8..d7c1087c4 100644 --- a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_tst.java +++ b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import org.junit.*; public class Bry_fmtr_tst { - private final Bry_fmtr_fxt fxt = new Bry_fmtr_fxt(); + private final Bry_fmtr_fxt fxt = new Bry_fmtr_fxt(); @Test public void Text() {fxt.Clear().Fmt("a").Test("a");} @Test public void Idx__1() {fxt.Clear().Fmt("~{0}").Args("a").Test("a");} @Test public void Idx__3() {fxt.Clear().Fmt("~{0}~{1}~{2}").Args("a", "b", "c").Test("abc");} @@ -53,8 +53,8 @@ class Bry_fmtr_tst_mok implements Bry_fmtr_eval_mgr { } } class Bry_fmtr_fxt { - private final Bry_fmtr fmtr = Bry_fmtr.new_(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_fmtr fmtr = Bry_fmtr.new_(); + private final Bry_bfr bfr = Bry_bfr_.New(); private Object[] args; public Bry_fmtr_fxt Clear() {fmtr.Fmt_(String_.Empty).Keys_(String_.Empty); args = Object_.Ary_empty; return this;} public Bry_fmtr_fxt Fmt (String fmt) {fmtr.Fmt_(fmt); return this;} diff --git a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_vals.java b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_vals.java index 4c7235e8b..37d588108 100644 --- a/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_vals.java +++ b/100_core/src/gplx/core/brys/fmtrs/Bry_fmtr_vals.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*; -import gplx.core.brys.*; -public class Bry_fmtr_vals implements Bfr_arg { - private final Bry_fmtr fmtr; private Object[] vals; - Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;} - public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;} - public void Bfr_arg__add(Bry_bfr bfr) { - fmtr.Bld_bfr_ary(bfr, vals); - } - public static Bry_fmtr_vals new_fmt(String fmt, String... keys) { - Bry_fmtr fmtr = Bry_fmtr.new_(fmt, keys); - return new Bry_fmtr_vals(fmtr); - } - public static Bry_fmtr_vals new_(Bry_fmtr fmtr) {return new Bry_fmtr_vals(fmtr);} -} +package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*; +import gplx.core.brys.*; +public class Bry_fmtr_vals implements Bfr_arg { + private final Bry_fmtr fmtr; private Object[] vals; + Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;} + public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;} + public void Bfr_arg__add(Bry_bfr bfr) { + fmtr.Bld_bfr_ary(bfr, vals); + } + public static Bry_fmtr_vals new_fmt(String fmt, String... keys) { + Bry_fmtr fmtr = Bry_fmtr.new_(fmt, keys); + return new Bry_fmtr_vals(fmtr); + } + public static Bry_fmtr_vals new_(Bry_fmtr fmtr) {return new Bry_fmtr_vals(fmtr);} +} diff --git a/100_core/src/gplx/core/brys/fmts/Bry_fmt_parser_.java b/100_core/src/gplx/core/brys/fmts/Bry_fmt_parser_.java index b95dba82a..67b83cdf5 100644 --- a/100_core/src/gplx/core/brys/fmts/Bry_fmt_parser_.java +++ b/100_core/src/gplx/core/brys/fmts/Bry_fmt_parser_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*; public class Bry_fmt_parser_ { public static Bry_fmt_itm[] Parse(byte escape, byte grp_bgn, byte grp_end, Bfr_fmt_arg[] args, byte[][] keys, byte[] src) { @@ -87,5 +87,5 @@ public class Bry_fmt_parser_ { pos = rhs_pos; // NOTE: auto-increment done at top of loop } return (byte[][])list.To_ary(byte[].class); - } private static final byte[] Bry_arg_lhs = Bry_.new_a7("~{"); + } private static final byte[] Bry_arg_lhs = Bry_.new_a7("~{"); } diff --git a/100_core/src/gplx/core/brys/fmts/Bry_fmt_tst.java b/100_core/src/gplx/core/brys/fmts/Bry_fmt_tst.java index 879d5d109..ad62074d7 100644 --- a/100_core/src/gplx/core/brys/fmts/Bry_fmt_tst.java +++ b/100_core/src/gplx/core/brys/fmts/Bry_fmt_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import org.junit.*; public class Bry_fmt_tst { - private final Bry_fmt_fxt fxt = new Bry_fmt_fxt(); + private final Bry_fmt_fxt fxt = new Bry_fmt_fxt(); @Test public void Text() {fxt.Clear().Fmt("a").Test("a");} @Test public void Key__basic() {fxt.Clear().Fmt("~{key}").Vals("a").Test("a");} @Test public void Key__mult() {fxt.Clear().Fmt("~{key1}~{key2}").Vals("a", "b").Test("ab");} @@ -35,8 +35,8 @@ class Bfr_fmt_arg_mok implements Bfr_arg { } } class Bry_fmt_fxt { - private final Bry_fmt fmt = new Bry_fmt(Bry_.Empty, Bry_.Ary_empty, Bfr_fmt_arg.Ary_empty); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_fmt fmt = new Bry_fmt(Bry_.Empty, Bry_.Ary_empty, Bfr_fmt_arg.Ary_empty); + private final Bry_bfr bfr = Bry_bfr_.New(); private Object[] vals; public Bry_fmt_fxt Clear() {vals = Object_.Ary_empty; return this;} public Bry_fmt_fxt Fmt(String s) {fmt.Fmt_(s); return this;} diff --git a/100_core/src/gplx/core/brys/fmts/Bry_keys_parser_tst.java b/100_core/src/gplx/core/brys/fmts/Bry_keys_parser_tst.java index 4aa8a14d8..e9178de5b 100644 --- a/100_core/src/gplx/core/brys/fmts/Bry_keys_parser_tst.java +++ b/100_core/src/gplx/core/brys/fmts/Bry_keys_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import org.junit.*; public class Bry_keys_parser_tst { - private final Bry_keys_parser_fxt fxt = new Bry_keys_parser_fxt(); + private final Bry_keys_parser_fxt fxt = new Bry_keys_parser_fxt(); @Test public void None() {fxt.Test("a");} @Test public void One() {fxt.Test("~{a}" , "a");} @Test public void Many() {fxt.Test("~{a}b~{c}d~{e}" , "a", "c", "e");} diff --git a/100_core/src/gplx/core/btries/Btrie_slim_itm.java b/100_core/src/gplx/core/btries/Btrie_slim_itm.java index fd883f432..e23c6a9d8 100644 --- a/100_core/src/gplx/core/btries/Btrie_slim_itm.java +++ b/100_core/src/gplx/core/btries/Btrie_slim_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.btries; import gplx.*; import gplx.core.*; public class Btrie_slim_itm { private Btrie_slim_itm[] ary = Btrie_slim_itm.Ary_empty; @@ -95,7 +95,7 @@ public class Btrie_slim_itm { } if (found) --ary_len; } - public static final Btrie_slim_itm[] Ary_empty = new Btrie_slim_itm[0]; int ary_len = 0, ary_max = 0; + public static final Btrie_slim_itm[] Ary_empty = new Btrie_slim_itm[0]; int ary_len = 0, ary_max = 0; } class ByteHashItm_sorter {// quicksort Btrie_slim_itm[] ary; int ary_len; @@ -126,5 +126,5 @@ class ByteHashItm_sorter {// quicksort if (lo < j) Sort_recurse(lo, j); if (i < hi) Sort_recurse(i, hi); } - public static final ByteHashItm_sorter Instance = new ByteHashItm_sorter(); ByteHashItm_sorter() {} + public static final ByteHashItm_sorter Instance = new ByteHashItm_sorter(); ByteHashItm_sorter() {} } diff --git a/100_core/src/gplx/core/btries/Btrie_slim_mgr_tst.java b/100_core/src/gplx/core/btries/Btrie_slim_mgr_tst.java index 2d7cf5c64..2d0054f25 100644 --- a/100_core/src/gplx/core/btries/Btrie_slim_mgr_tst.java +++ b/100_core/src/gplx/core/btries/Btrie_slim_mgr_tst.java @@ -95,7 +95,7 @@ public class Btrie_slim_mgr_tst { } } class Btrie_slim_mgr_fxt { - private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); + private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); public Btrie_slim_mgr_fxt Init__add(String key, String val) { trie.Add_str_str(key, val); return this; diff --git a/100_core/src/gplx/core/caches/Lru_cache.java b/100_core/src/gplx/core/caches/Lru_cache.java index 8f4d7f16f..bfb400154 100644 --- a/100_core/src/gplx/core/caches/Lru_cache.java +++ b/100_core/src/gplx/core/caches/Lru_cache.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; public class Lru_cache { - private final Hash_adp map = Hash_adp_.New(); + private final Hash_adp map = Hash_adp_.New(); private Lru_node head, tail; private long cur, min, max, evicts; public Lru_cache(boolean auto_reg, String key, long min, long max) { @@ -24,7 +24,7 @@ public class Lru_cache { this.max = max; if (auto_reg) Lru_cache_root.Instance.Add(this); } - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public long Evicts() {return evicts;} public long Cur() {return cur;} public void Min_max_(long min, long max) { @@ -132,9 +132,9 @@ public class Lru_cache { } } class Lru_node { - private final Object key; + private final Object key; private Object val; - private final long size; + private final long size; private Lru_node prv; private Lru_node nxt; diff --git a/100_core/src/gplx/core/caches/Lru_cache_root.java b/100_core/src/gplx/core/caches/Lru_cache_root.java index 6ce4545d5..dd4e5a989 100644 --- a/100_core/src/gplx/core/caches/Lru_cache_root.java +++ b/100_core/src/gplx/core/caches/Lru_cache_root.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; public class Lru_cache_root { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public Lru_cache Get_by_key(String key) {return (Lru_cache)hash.Get_by(key);} public void Add(Lru_cache grp) { hash.Add(grp.Key(), grp); @@ -46,5 +46,5 @@ public class Lru_cache_root { } return bfr.To_str_and_clear(); } - public static final Lru_cache_root Instance = new Lru_cache_root(); + public static final Lru_cache_root Instance = new Lru_cache_root(); } diff --git a/100_core/src/gplx/core/caches/Lru_cache_tst.java b/100_core/src/gplx/core/caches/Lru_cache_tst.java index 7607f3736..d0f84b485 100644 --- a/100_core/src/gplx/core/caches/Lru_cache_tst.java +++ b/100_core/src/gplx/core/caches/Lru_cache_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.caches; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; public class Lru_cache_tst { - private final Lru_cache_fxt fxt = new Lru_cache_fxt(); + private final Lru_cache_fxt fxt = new Lru_cache_fxt(); @Test public void Get_one() { fxt.Exec__set("a", 5); fxt.Test__get_y("a"); @@ -73,7 +73,7 @@ public class Lru_cache_tst { } } class Lru_cache_fxt { - private final Lru_cache cache = new Lru_cache(Bool_.N, "test", -1, 10); + private final Lru_cache cache = new Lru_cache(Bool_.N, "test", -1, 10); public void Exec__set(String key, long size) { cache.Set(key, key, size); } diff --git a/100_core/src/gplx/core/consoles/Console_adp__mem.java b/100_core/src/gplx/core/consoles/Console_adp__mem.java index 51487bfe0..dfd7b9607 100644 --- a/100_core/src/gplx/core/consoles/Console_adp__mem.java +++ b/100_core/src/gplx/core/consoles/Console_adp__mem.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.consoles; import gplx.*; import gplx.core.*; public class Console_adp__mem implements Console_adp { - private final List_adp written = List_adp_.New(); - private final Hash_adp ignored = Hash_adp_.New(); + private final List_adp written = List_adp_.New(); + private final Hash_adp ignored = Hash_adp_.New(); public boolean Enabled() {return true;} public boolean Canceled_chk() {return false;} public int Chars_per_line_max() {return 80;} public void Chars_per_line_max_(int v) {} diff --git a/100_core/src/gplx/core/consoles/Console_adp__sys.java b/100_core/src/gplx/core/consoles/Console_adp__sys.java index ff09e193c..01b228171 100644 --- a/100_core/src/gplx/core/consoles/Console_adp__sys.java +++ b/100_core/src/gplx/core/consoles/Console_adp__sys.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.consoles; import gplx.*; import gplx.core.*; import gplx.core.envs.*; public class Console_adp__sys implements Console_adp { @@ -61,5 +61,5 @@ public class Console_adp__sys implements Console_adp { catch (java.io.UnsupportedEncodingException e) {throw Err_.new_wo_type("unsupported exception");} ps.println(s); } - public static final Console_adp__sys Instance = new Console_adp__sys(); + public static final Console_adp__sys Instance = new Console_adp__sys(); } diff --git a/100_core/src/gplx/core/criterias/Criteria_.java b/100_core/src/gplx/core/criterias/Criteria_.java index 82c73bcdc..57660ed38 100644 --- a/100_core/src/gplx/core/criterias/Criteria_.java +++ b/100_core/src/gplx/core/criterias/Criteria_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; import gplx.core.texts.*; /*RegxPatn_cls_like*/ public class Criteria_ { - public static final Criteria All = new Criteria_const(true); - public static final Criteria None = new Criteria_const(false); + public static final Criteria All = new Criteria_const(true); + public static final Criteria None = new Criteria_const(false); public static Criteria Not(Criteria arg) {return new Criteria_not(arg);} public static Criteria And(Criteria lhs, Criteria rhs) {return new Criteria_and(lhs, rhs);} public static Criteria And_many(Criteria... ary) { diff --git a/100_core/src/gplx/core/criterias/Criteria_between.java b/100_core/src/gplx/core/criterias/Criteria_between.java index 311606a02..46eafb2dd 100644 --- a/100_core/src/gplx/core/criterias/Criteria_between.java +++ b/100_core/src/gplx/core/criterias/Criteria_between.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; public class Criteria_between implements Criteria { public Criteria_between(boolean neg, Comparable lo, Comparable hi) {this.neg = neg; this.lo = lo; this.hi = hi;} public byte Tid() {return Criteria_.Tid_between;} - public boolean Neg() {return neg;} private final boolean neg; + public boolean Neg() {return neg;} private final boolean neg; public Comparable Lo() {return lo;} private Comparable lo; public void Lo_(Comparable v) {this.lo = v;} public Comparable Hi() {return hi;} private Comparable hi; public void Hi_(Comparable v) {this.hi = v;} public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();} diff --git a/100_core/src/gplx/core/criterias/Criteria_eq.java b/100_core/src/gplx/core/criterias/Criteria_eq.java index c47f64df5..b84aa105c 100644 --- a/100_core/src/gplx/core/criterias/Criteria_eq.java +++ b/100_core/src/gplx/core/criterias/Criteria_eq.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; public class Criteria_eq implements Criteria { @gplx.Internal protected Criteria_eq(boolean neg, Object val) {this.neg = neg; this.val = val;} public byte Tid() {return Criteria_.Tid_eq;} - public boolean Neg() {return neg;} private final boolean neg; + public boolean Neg() {return neg;} private final boolean neg; public Object Val() {return val;} private Object val; public void Val_as_obj_(Object v) {this.val = v;} public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();} diff --git a/100_core/src/gplx/core/criterias/Criteria_fld.java b/100_core/src/gplx/core/criterias/Criteria_fld.java index 0e381faa1..97938f351 100644 --- a/100_core/src/gplx/core/criterias/Criteria_fld.java +++ b/100_core/src/gplx/core/criterias/Criteria_fld.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; public class Criteria_fld implements Criteria { Criteria_fld(String pre, String key, Criteria crt) {this.pre = pre; this.key = key; this.crt = crt;} public byte Tid() {return Criteria_.Tid_wrapper;} - public String Pre() {return pre;} private final String pre; - public String Key() {return key;} private final String key; - public Criteria Crt() {return crt;} private final Criteria crt; + public String Pre() {return pre;} private final String pre; + public String Key() {return key;} private final String key; + public Criteria Crt() {return crt;} private final Criteria crt; public String Pre_w_key() {return pre == Pre_null ? key : String_.Concat(pre, ".", key);} public void Val_as_obj_(Object v) {throw Err_.new_unimplemented();} public void Val_from_args(Hash_adp args) { diff --git a/100_core/src/gplx/core/criterias/Criteria_in.java b/100_core/src/gplx/core/criterias/Criteria_in.java index 039b20bb6..79ddbc1c2 100644 --- a/100_core/src/gplx/core/criterias/Criteria_in.java +++ b/100_core/src/gplx/core/criterias/Criteria_in.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; public class Criteria_in implements Criteria { public Criteria_in(boolean neg, Object[] ary) {this.neg = neg; Ary_(ary);} public byte Tid() {return Criteria_.Tid_in;} - public boolean Neg() {return neg;} private final boolean neg; + public boolean Neg() {return neg;} private final boolean neg; public Object[] Ary() {return ary;} private Object[] ary; public int Ary_len() {return ary_len;} private int ary_len; public Class Itm_type() {return itm_type;} private Class itm_type; diff --git a/100_core/src/gplx/core/criterias/Criteria_ioMatch.java b/100_core/src/gplx/core/criterias/Criteria_ioMatch.java index 20859a6d7..f285bb009 100644 --- a/100_core/src/gplx/core/criterias/Criteria_ioMatch.java +++ b/100_core/src/gplx/core/criterias/Criteria_ioMatch.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.criterias; import gplx.*; import gplx.core.*; import gplx.core.texts.*; public class Criteria_ioMatch implements Criteria { // EX: url IOMATCH '*.xml|*.txt' public Criteria_ioMatch(boolean match, RegxPatn_cls_ioMatch pattern) {this.match = match; this.pattern = pattern;} public byte Tid() {return Criteria_.Tid_iomatch;} - public boolean Neg() {return !match;} private final boolean match; + public boolean Neg() {return !match;} private final boolean match; public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();} public void Val_as_obj_(Object v) {this.pattern = (RegxPatn_cls_ioMatch)v;} public RegxPatn_cls_ioMatch Pattern() {return pattern;} private RegxPatn_cls_ioMatch pattern; diff --git a/100_core/src/gplx/core/encoders/Hex_utl__tst.java b/100_core/src/gplx/core/encoders/Hex_utl__tst.java index ad5fbb0b2..f60443a6c 100644 --- a/100_core/src/gplx/core/encoders/Hex_utl__tst.java +++ b/100_core/src/gplx/core/encoders/Hex_utl__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.encoders; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; public class Hex_utl__tst { - private final Hex_utl__fxt fxt = new Hex_utl__fxt(); + private final Hex_utl__fxt fxt = new Hex_utl__fxt(); @Test public void To_int() { fxt.Test__to_int("0" , 0); fxt.Test__to_int("F" , 15); @@ -73,7 +73,7 @@ class Hex_utl__fxt { String actl = Hex_utl_.To_str(val, pad); Tfds.Eq(expd, actl); } - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Test__write_bfr(boolean lcase, int val, String expd) { Hex_utl_.Write_bfr(bfr, lcase, val); Gftest.Eq__str(expd, bfr.To_str_and_clear()); diff --git a/100_core/src/gplx/core/envs/Env_.java b/100_core/src/gplx/core/envs/Env_.java index a2ed07285..32506f4a6 100644 --- a/100_core/src/gplx/core/envs/Env_.java +++ b/100_core/src/gplx/core/envs/Env_.java @@ -51,6 +51,6 @@ public class Env_ { return appUrl; } static Io_url appUrl = Io_url_.Empty; - public static final String LocalHost = "127.0.0.1"; + public static final String LocalHost = "127.0.0.1"; public static String NewLine_lang() {return mode_testing ? "\n" : "\n";} } diff --git a/100_core/src/gplx/core/envs/Op_sys.java b/100_core/src/gplx/core/envs/Op_sys.java index f10adc4d0..0fe160989 100644 --- a/100_core/src/gplx/core/envs/Op_sys.java +++ b/100_core/src/gplx/core/envs/Op_sys.java @@ -1,33 +1,33 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.envs; import gplx.*; import gplx.core.*; public class Op_sys { Op_sys(byte tid, byte sub_tid, String os_name, byte bitness, String nl_str, byte fsys_dir_spr_byte, boolean fsys_case_match) { this.tid = tid; this.sub_tid = sub_tid; this.os_name = os_name; this.bitness = bitness; this.nl_str = nl_str; this.fsys_dir_spr_byte = fsys_dir_spr_byte; this.fsys_dir_spr_str = Char_.To_str((char)fsys_dir_spr_byte); this.fsys_case_match = fsys_case_match; } - public byte Tid() {return tid;} private final byte tid; - public byte Sub_tid() {return sub_tid;} private final byte sub_tid; + public byte Tid() {return tid;} private final byte tid; + public byte Sub_tid() {return sub_tid;} private final byte sub_tid; public String Os_name() {return os_name;} private String os_name; - public byte Bitness() {return bitness;} private final byte bitness; + public byte Bitness() {return bitness;} private final byte bitness; public String Bitness_str() {return (bitness == Bitness_32 ? "32" : "64");} - public String Nl_str() {return nl_str;} private final String nl_str; - public String Fsys_dir_spr_str() {return fsys_dir_spr_str;} private final String fsys_dir_spr_str; - public byte Fsys_dir_spr_byte() {return fsys_dir_spr_byte;} private final byte fsys_dir_spr_byte; + public String Nl_str() {return nl_str;} private final String nl_str; + public String Fsys_dir_spr_str() {return fsys_dir_spr_str;} private final String fsys_dir_spr_str; + public byte Fsys_dir_spr_byte() {return fsys_dir_spr_byte;} private final byte fsys_dir_spr_byte; public String Fsys_http_frag_to_url_str(String raw) {return fsys_dir_spr_byte == Byte_ascii.Slash ? raw : String_.Replace(raw, Lnx.Fsys_dir_spr_str(), fsys_dir_spr_str);} - public boolean Fsys_case_match() {return fsys_case_match;} private final boolean fsys_case_match; + public boolean Fsys_case_match() {return fsys_case_match;} private final boolean fsys_case_match; public String Fsys_case_match_str(String s) {return String_.CaseNormalize(fsys_case_match, s);} public boolean Tid_is_wnt() {return tid == Tid_wnt;} public boolean Tid_is_lnx() {return tid == Tid_lnx;} @@ -38,12 +38,12 @@ public class Op_sys { public static final byte Tid_nil = 0, Tid_wnt = 1, Tid_lnx = 2, Tid_osx = 3, Tid_drd = 4, Tid_arm = 5; public static final byte Sub_tid_unknown = 0, Sub_tid_win_xp = 1, Sub_tid_win_7 = 2, Sub_tid_win_8 = 3; public static final byte Bitness_32 = 1, Bitness_64 = 2; - public static final char Nl_char_lnx = '\n'; + public static final char Nl_char_lnx = '\n'; public static final byte Dir_spr__lnx = Byte_ascii.Slash, Dir_spr__wnt = Byte_ascii.Backslash; - public static final Op_sys Lnx = new_unx_flavor_(Tid_lnx, "linux", Bitness_32); - public static final Op_sys Osx = new_unx_flavor_(Tid_osx, "macosx", Bitness_32); - public static final Op_sys Drd = new_unx_flavor_(Tid_drd, "android", Bitness_32); - public static final Op_sys Wnt = new_wnt_(Sub_tid_unknown, Bitness_32); + public static final Op_sys Lnx = new_unx_flavor_(Tid_lnx, "linux", Bitness_32); + public static final Op_sys Osx = new_unx_flavor_(Tid_osx, "macosx", Bitness_32); + public static final Op_sys Drd = new_unx_flavor_(Tid_drd, "android", Bitness_32); + public static final Op_sys Wnt = new_wnt_(Sub_tid_unknown, Bitness_32); public static Op_sys Cur() {return cur_op_sys;} static Op_sys cur_op_sys = new_auto_identify_(); public static String Fsys_path_to_lnx(String v) { return cur_op_sys.Tid_is_wnt() ? String_.Replace(v, Wnt.fsys_dir_spr_str, Lnx.fsys_dir_spr_str) : v; diff --git a/100_core/src/gplx/core/envs/Process_adp.java b/100_core/src/gplx/core/envs/Process_adp.java index 24a57e84c..fdac85cca 100644 --- a/100_core/src/gplx/core/envs/Process_adp.java +++ b/100_core/src/gplx/core/envs/Process_adp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.envs; import gplx.*; import gplx.core.*; import gplx.Bool_; import gplx.Bry_; @@ -63,7 +63,7 @@ public class Process_adp implements Gfo_invk, Rls_able { public int Thread_timeout() {return thread_timeout;} public Process_adp Thread_timeout_seconds_(int v) {thread_timeout = v * 1000; return this;} int thread_timeout = 0; public int Thread_interval() {return thread_interval;} public Process_adp Thread_interval_(int v) {thread_interval = v; return this;} int thread_interval = 20; public String Thread_kill_name() {return thread_kill_name;} public Process_adp Thread_kill_name_(String v) {thread_kill_name = v; return this;} private String thread_kill_name = ""; - public Io_url Tmp_dir() {return tmp_dir;} @gplx.Virtual public Process_adp Tmp_dir_(Io_url v) {tmp_dir = v; return this;} Io_url tmp_dir; + public Io_url Tmp_dir() {return tmp_dir;} public Process_adp Tmp_dir_(Io_url v) {tmp_dir = v; return this;} Io_url tmp_dir; private Process_adp WhenBgn_run() {return Invk_cmds(whenBgnList);} List_adp whenBgnList = List_adp_.New(); public Process_adp WhenEnd_add(Gfo_invk_cmd cmd) {whenEndList.Add(cmd); return this;} public Process_adp WhenEnd_del(Gfo_invk_cmd cmd) {whenEndList.Del(cmd); return this;} @@ -111,7 +111,7 @@ public class Process_adp implements Gfo_invk, Rls_able { else return Gfo_invk_.Rv_unhandled; return this; } - static final String Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_args = "args", Invk_args_ = "args_", Invk_cmd_args_ = "cmd_args_", Invk_enabled = "enabled", Invk_enabled_ = "enabled_", Invk_mode_ = "mode_", Invk_timeout_ = "timeout_", Invk_tmp_dir_ = "tmp_dir_", Invk_owner = "owner"; + static final String Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_args = "args", Invk_args_ = "args_", Invk_cmd_args_ = "cmd_args_", Invk_enabled = "enabled", Invk_enabled_ = "enabled_", Invk_mode_ = "mode_", Invk_timeout_ = "timeout_", Invk_tmp_dir_ = "tmp_dir_", Invk_owner = "owner"; Bry_fmtr_eval_mgr cmd_url_eval; public static Process_adp ini_(Gfo_invk owner, Gfo_usr_dlg usr_dlg, Process_adp process, Bry_fmtr_eval_mgr cmd_url_eval, byte run_mode, int timeout, String cmd_url_fmt, String args_fmt, String... args_keys) { process.Run_mode_(run_mode).Thread_timeout_seconds_(timeout); @@ -294,7 +294,7 @@ public class Process_adp implements Gfo_invk, Rls_able { process.Process_run_and_end(); return; } - public static final List_adp Test_runs = List_adp_.New(); + public static final List_adp Test_runs = List_adp_.New(); private Process_adp Test_runs_add() {Test_runs.Add(exe_url.Raw() + " " + args_str); exit_code = Exit_pass; return this;} public static int run_wait_arg_(Io_url url, String arg) { Process_adp process = new Process_adp(); diff --git a/100_core/src/gplx/core/errs/Err_msg.java b/100_core/src/gplx/core/errs/Err_msg.java index 4d79ca1e5..fd6b7018c 100644 --- a/100_core/src/gplx/core/errs/Err_msg.java +++ b/100_core/src/gplx/core/errs/Err_msg.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.errs; import gplx.*; import gplx.core.*; public class Err_msg { - private final String msg; private Object[] args; + private final String msg; private Object[] args; public Err_msg(String type, String msg, Object[] args) { this.type = type; this.msg = msg; this.args = args; } - public String Type() {return type;} private final String type; + public String Type() {return type;} private final String type; public void Args_add(Object[] add) { this.args = (Object[])Array_.Resize_add(args, add); } diff --git a/100_core/src/gplx/core/gfo_ndes/GfoFldList_.java b/100_core/src/gplx/core/gfo_ndes/GfoFldList_.java index 994346dcb..e0fa589c7 100644 --- a/100_core/src/gplx/core/gfo_ndes/GfoFldList_.java +++ b/100_core/src/gplx/core/gfo_ndes/GfoFldList_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*; import gplx.core.strings.*; import gplx.core.type_xtns.*; -public class GfoFldList_ { - public static final GfoFldList Null = new GfoFldList_null(); +public class GfoFldList_ { + public static final GfoFldList Null = new GfoFldList_null(); public static GfoFldList new_() {return new GfoFldList_base();} public static GfoFldList str_(String... names) { GfoFldList rv = new GfoFldList_base(); @@ -25,7 +25,7 @@ public class GfoFldList_ { return rv; } } -class GfoFldList_base implements GfoFldList { +class GfoFldList_base implements GfoFldList { public int Count() {return hash.Count();} public boolean Has(String key) {return hash.Has(key);} public int Idx_of(String key) { @@ -50,7 +50,7 @@ class GfoFldList_base implements GfoFldList { } Ordered_hash hash = Ordered_hash_.New(); Hash_adp idxs = Hash_adp_.New(); // PERF: idxs used for Idx_of; need to recalc if Del ever added } -class GfoFldList_null implements GfoFldList { +class GfoFldList_null implements GfoFldList { public int Count() {return 0;} public boolean Has(String key) {return false;} public int Idx_of(String key) {return List_adp_.Not_found;} diff --git a/100_core/src/gplx/core/gfo_ndes/GfoNdeList_.java b/100_core/src/gplx/core/gfo_ndes/GfoNdeList_.java index 76117aeac..11149e0e7 100644 --- a/100_core/src/gplx/core/gfo_ndes/GfoNdeList_.java +++ b/100_core/src/gplx/core/gfo_ndes/GfoNdeList_.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*; import gplx.core.lists.*; /*ComparerAble*/ -public class GfoNdeList_ { - public static final GfoNdeList Null = new GfoNdeList_null(); +public class GfoNdeList_ { + public static final GfoNdeList Null = new GfoNdeList_null(); public static GfoNdeList new_() {return new GfoNdeList_base();} } -class GfoNdeList_base implements GfoNdeList { +class GfoNdeList_base implements GfoNdeList { public int Count() {return list.Count();} public GfoNde FetchAt_asGfoNde(int i) {return (GfoNde)list.Get_at(i);} public void Add(GfoNde rcd) {list.Add(rcd);} @@ -28,7 +28,7 @@ class GfoNdeList_base implements GfoNdeList { public void Sort_by(ComparerAble comparer) {list.Sort_by(comparer);} List_adp list = List_adp_.New(); } -class GfoNdeList_null implements GfoNdeList { +class GfoNdeList_null implements GfoNdeList { public int Count() {return 0;} public GfoNde FetchAt_asGfoNde(int index) {return null;} public void Add(GfoNde rcd) {} diff --git a/100_core/src/gplx/core/gfo_ndes/GfoNde_.java b/100_core/src/gplx/core/gfo_ndes/GfoNde_.java index 3b92b339e..a013cf0eb 100644 --- a/100_core/src/gplx/core/gfo_ndes/GfoNde_.java +++ b/100_core/src/gplx/core/gfo_ndes/GfoNde_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*; import gplx.core.type_xtns.*; import gplx.core.stores.*; -public class GfoNde_ { - public static final GfoNde[] Ary_empty = new GfoNde[0]; +public class GfoNde_ { + public static final GfoNde[] Ary_empty = new GfoNde[0]; public static GfoNde[] ary_(GfoNde... ary) {return ary;} public static GfoNde as_(Object obj) {return obj instanceof GfoNde ? (GfoNde)obj : null;} public static GfoNde root_(GfoNde... subs) {return new GfoNde(GfoNde_.Type_Root, "RootName", GfoFldList_.Null, Object_.Ary_empty, GfoFldList_.Null, subs);} @@ -41,5 +41,5 @@ public class GfoNde_ { } finally {rdr.Rls();} } - @gplx.Internal protected static final int Type_Leaf = 1, Type_Node = 2, Type_Root = 3; + @gplx.Internal protected static final int Type_Leaf = 1, Type_Node = 2, Type_Root = 3; } diff --git a/100_core/src/gplx/core/gfo_regys/GfoRegy.java b/100_core/src/gplx/core/gfo_regys/GfoRegy.java index cd82e866e..2c822856d 100644 --- a/100_core/src/gplx/core/gfo_regys/GfoRegy.java +++ b/100_core/src/gplx/core/gfo_regys/GfoRegy.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfo_regys; import gplx.*; import gplx.core.*; import gplx.langs.gfs.*; import gplx.core.type_xtns.*; import gplx.core.interfaces.*; public class GfoRegy implements Gfo_invk { @@ -82,12 +82,12 @@ public class GfoRegy implements Gfo_invk { } else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_RegDir = "RegDir", Invk_RegObj = "RegObj"; + } public static final String Invk_RegDir = "RegDir", Invk_RegObj = "RegObj"; void RegItm(String key, Object val, int valType, Io_url url) { hash.Add_if_dupe_use_nth(key, new GfoRegyItm(key, val, valType, url)); } Hash_adp hash = Hash_adp_.New(); - public static final String Err_ChopBgn = "chopBgn results in null key", Err_ChopEnd = "chopEnd results in null key", Err_Dupe = "key already registered"; - public static final GfoRegy Instance = new GfoRegy(); GfoRegy() {} + public static final String Err_ChopBgn = "chopBgn results in null key", Err_ChopEnd = "chopEnd results in null key", Err_Dupe = "key already registered"; + public static final GfoRegy Instance = new GfoRegy(); GfoRegy() {} @gplx.Internal protected static GfoRegy new_() {return new GfoRegy();} } diff --git a/100_core/src/gplx/core/intls/Utf8_.java b/100_core/src/gplx/core/intls/Utf8_.java index 66230a89f..63bbe0ea8 100644 --- a/100_core/src/gplx/core/intls/Utf8_.java +++ b/100_core/src/gplx/core/intls/Utf8_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.intls; import gplx.*; import gplx.core.*; public class Utf8_ { public static int Len_of_bry(byte[] ary) { @@ -136,7 +136,7 @@ public class Utf8_ { private static boolean Codepoint_valid(int v) { return Character.isDefined(v); } - public static final int + public static final int Codepoint_max = 0x10FFFF //see http://unicode.org/glossary/ , Codepoint_surrogate_bgn = 0xD800 , Codepoint_surrogate_end = 0xDFFF diff --git a/100_core/src/gplx/core/ios/IoEnginePool.java b/100_core/src/gplx/core/ios/IoEnginePool.java index e85628a69..897ae543d 100644 --- a/100_core/src/gplx/core/ios/IoEnginePool.java +++ b/100_core/src/gplx/core/ios/IoEnginePool.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; public class IoEnginePool { - private final Hash_adp hash = Hash_adp_.New(); + private final Hash_adp hash = Hash_adp_.New(); public void Add_if_dupe_use_nth(IoEngine engine) { hash.Del(engine.Key()); hash.Add(engine.Key(), engine); @@ -24,7 +24,7 @@ public class IoEnginePool { IoEngine rv = (IoEngine)hash.Get_by(key); return rv == null ? IoEngine_.Mem : rv; // rv == null when url is null or empty; return Mem which should be a noop; DATE:2013-06-04 } - public static final IoEnginePool Instance = new IoEnginePool(); + public static final IoEnginePool Instance = new IoEnginePool(); IoEnginePool() { this.Add_if_dupe_use_nth(IoEngine_.Sys); this.Add_if_dupe_use_nth(IoEngine_.Mem); diff --git a/100_core/src/gplx/core/ios/IoEngineUtl.java b/100_core/src/gplx/core/ios/IoEngineUtl.java index 44fdc140a..85433a439 100644 --- a/100_core/src/gplx/core/ios/IoEngineUtl.java +++ b/100_core/src/gplx/core/ios/IoEngineUtl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.ios.streams.*; import gplx.core.ios.atrs.*; import gplx.core.consoles.*; import gplx.core.criterias.*; import gplx.core.caches.*; @@ -120,7 +120,7 @@ public class IoEngineUtl { if (trgStream != null) trgStream.Rls(); } } - private static final Lru_cache Dir_cache = new Lru_cache(Bool_.Y, "gplx.ios.dir_cache", 128, 256); + private static final Lru_cache Dir_cache = new Lru_cache(Bool_.Y, "gplx.ios.dir_cache", 128, 256); public static boolean Query_read_only(IoEngine engine, Io_url url, int read_only_type) { switch (read_only_type) { case Io_mgr.Read_only__basic__file: diff --git a/100_core/src/gplx/core/ios/IoEngine_system.java b/100_core/src/gplx/core/ios/IoEngine_system.java index 8f49c0a07..4b6ebced1 100644 --- a/100_core/src/gplx/core/ios/IoEngine_system.java +++ b/100_core/src/gplx/core/ios/IoEngine_system.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import java.io.*; import java.net.HttpURLConnection; @@ -577,7 +577,7 @@ public class IoEngine_system extends IoEngine_base { } void MarkFileWritable(File fil, Io_url url, boolean readOnlyFails, String op) { if (Fil_ReadOnly(fil)) { - if (readOnlyFails) // NOTE: java will always allow final files to be deleted; programmer api is responsible for check + if (readOnlyFails) // NOTE: java will always allow final files to be deleted; programmer api is responsible for check throw Err_.new_(IoEngineArgs.Instance.Err_ReadonlyFileNotWritable, "writable operation attempted on readOnly file", "op", op, "url", url.Xto_api()); else Fil_Writable(fil); @@ -599,7 +599,7 @@ class IoEngineArgs { public String Err_ReadonlyFileNotWritable = "gplx.core.ios.ReadonlyFileNotWritable"; public String Err_FileNotFound = "gplx.core.ios.FileNotFound"; public String Err_IoException = "gplx.core.ios.IoException"; - public static final IoEngineArgs Instance = new IoEngineArgs(); + public static final IoEngineArgs Instance = new IoEngineArgs(); } class IoEngine_system_xtn { // PATCH.DROID:VerifyError if file.setExecutable is referenced directly in IoEngine_system. However, if placed in separate class diff --git a/100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java b/100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java index 2f13db432..84304d1b6 100644 --- a/100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java +++ b/100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.brys.fmtrs.*; import gplx.core.ios.streams.*; @@ -26,7 +26,7 @@ public class IoEngine_xrg_downloadFil { } public String User_agent() {return user_agent;} public IoEngine_xrg_downloadFil User_agent_(String v) {user_agent = v; return this;} private String user_agent; public Gfo_usr_dlg Prog_dlg() {return prog_dlg;} public IoEngine_xrg_downloadFil Prog_dlg_(Gfo_usr_dlg v) {prog_dlg = v; download_fmt.Ctor(prog_dlg); return this;} private Gfo_usr_dlg prog_dlg; - public Bry_fmtr Prog_fmtr() {return prog_fmtr;} private final Bry_fmtr prog_fmtr = Bry_fmtr.new_("~{download_header}: ~{download_read} of ~{download_length} kb;", "download_header", "download_url", "download_read", "download_length"); + public Bry_fmtr Prog_fmtr() {return prog_fmtr;} private final Bry_fmtr prog_fmtr = Bry_fmtr.new_("~{download_header}: ~{download_read} of ~{download_length} kb;", "download_header", "download_url", "download_read", "download_length"); public String Prog_fmt_hdr() {return prog_fmt_hdr;} public IoEngine_xrg_downloadFil Prog_fmt_hdr_(String v) {prog_fmt_hdr = v; return this;} private String prog_fmt_hdr = ""; // NOTE: must init to "", else null ref when building String public boolean Prog_cancel() {return prog_cancel;} public IoEngine_xrg_downloadFil Prog_cancel_y_() {prog_cancel = true; return this;} private volatile boolean prog_cancel; public boolean Prog_running() {return prog_running;} public IoEngine_xrg_downloadFil Prog_running_(boolean v) {prog_running = v; return this;} private boolean prog_running; @@ -34,7 +34,7 @@ public class IoEngine_xrg_downloadFil { public DateAdp Src_last_modified() {return src_last_modified;} public IoEngine_xrg_downloadFil Src_last_modified_(DateAdp v) {src_last_modified = v; return this;} private DateAdp src_last_modified; public boolean Src_last_modified_query() {return src_last_modified_query;} public IoEngine_xrg_downloadFil Src_last_modified_query_(boolean v) {src_last_modified_query = v; return this;} private boolean src_last_modified_query; public String Trg_engine_key() {return trg_engine_key;} public IoEngine_xrg_downloadFil Trg_engine_key_(String v) {trg_engine_key = v; return this;} private String trg_engine_key = IoEngine_.SysKey; - public Io_download_fmt Download_fmt() {return download_fmt;} private final Io_download_fmt download_fmt = new Io_download_fmt(); + public Io_download_fmt Download_fmt() {return download_fmt;} private final Io_download_fmt download_fmt = new Io_download_fmt(); public boolean Exec() {return IoEnginePool.Instance.Get_by(trg.Info().EngineKey()).DownloadFil(this);} public Io_stream_rdr Exec_as_rdr() {return IoEnginePool.Instance.Get_by(IoEngine_.SysKey).DownloadFil_as_rdr(this);} public boolean Exec_meta_only() {return exec_meta_only;} private boolean exec_meta_only; diff --git a/100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java b/100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java index 716cc8f0a..47962f770 100644 --- a/100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java +++ b/100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.ios; import gplx.*; import gplx.core.*; -public class IoEngine_xrg_fil_affects1_base { - public Io_url Url() {return url;} public void Url_set(Io_url v) {url = v;} Io_url url; - public IoEngine_xrg_fil_affects1_base Url_(Io_url v) {url = v; return this;} - public boolean MissingFails() {return missingFails;} public void MissingFails_set(boolean v) {missingFails = v;} private boolean missingFails = true; - public boolean ReadOnlyFails() {return readOnlyFails;} public void ReadOnlyFails_set(boolean v) {readOnlyFails = v;} private boolean readOnlyFails = true; - @gplx.Virtual public void Exec() {} -} +package gplx.core.ios; import gplx.*; import gplx.core.*; +public class IoEngine_xrg_fil_affects1_base { + public Io_url Url() {return url;} public void Url_set(Io_url v) {url = v;} Io_url url; + public IoEngine_xrg_fil_affects1_base Url_(Io_url v) {url = v; return this;} + public boolean MissingFails() {return missingFails;} public void MissingFails_set(boolean v) {missingFails = v;} private boolean missingFails = true; + public boolean ReadOnlyFails() {return readOnlyFails;} public void ReadOnlyFails_set(boolean v) {readOnlyFails = v;} private boolean readOnlyFails = true; + public void Exec() {} +} diff --git a/100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java b/100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java index edae474ea..95a88a959 100644 --- a/100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java +++ b/100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class IoEngine_xrg_recycleFil extends IoEngine_xrg_fil_affects1_base { @@ -53,5 +53,5 @@ public class IoEngine_xrg_recycleFil extends IoEngine_xrg_fil_affects1_base { public static IoEngine_xrg_recycleFil sysm_(Io_url url) {return new IoEngine_xrg_recycleFil(SysmConst);} public static IoEngine_xrg_recycleFil gplx_(Io_url url) {IoEngine_xrg_recycleFil rv = new IoEngine_xrg_recycleFil(GplxConst); rv.Url_set(url); return rv;} public static IoEngine_xrg_recycleFil proto_() {return gplx_(Io_url_.Empty);} - public static final int GplxConst = 0, SysmConst = 1; + public static final int GplxConst = 0, SysmConst = 1; } diff --git a/100_core/src/gplx/core/ios/IoItmClassXtn.java b/100_core/src/gplx/core/ios/IoItmClassXtn.java index 214cbfb1c..32af94455 100644 --- a/100_core/src/gplx/core/ios/IoItmClassXtn.java +++ b/100_core/src/gplx/core/ios/IoItmClassXtn.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.type_xtns.*; public class IoItmClassXtn extends ClassXtn_base implements ClassXtn { - public String Key() {return Key_const;} public static final String Key_const = "ioItemType"; + public String Key() {return Key_const;} public static final String Key_const = "ioItemType"; @Override public Class UnderClass() {return int.class;} public Object DefaultValue() {return IoItmDir.Type_Dir;} public boolean Eq(Object lhs, Object rhs) {return ((IoItm_base)lhs).compareTo(rhs) == CompareAble_.Same;} @@ -27,5 +27,5 @@ public class IoItmClassXtn extends ClassXtn_base implements ClassXtn { else throw Err_.new_unhandled(raw); } @Override public Object XtoDb(Object obj) {return Int_.Cast(obj);} - public static final IoItmClassXtn Instance = new IoItmClassXtn(); IoItmClassXtn() {} + public static final IoItmClassXtn Instance = new IoItmClassXtn(); IoItmClassXtn() {} } diff --git a/100_core/src/gplx/core/ios/IoItmDir.java b/100_core/src/gplx/core/ios/IoItmDir.java index 79a95260f..55b7c6cfe 100644 --- a/100_core/src/gplx/core/ios/IoItmDir.java +++ b/100_core/src/gplx/core/ios/IoItmDir.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.criterias.*; public class IoItmDir extends IoItm_base { public boolean Exists() {return exists;} public void Exists_set(boolean v) {exists = v;} private boolean exists = true; - @Override public int TypeId() {return Type_Dir;} @Override public boolean Type_dir() {return true;} @Override public boolean Type_fil() {return false;} public static final int Type_Dir = 1; + @Override public int TypeId() {return Type_Dir;} @Override public boolean Type_dir() {return true;} @Override public boolean Type_fil() {return false;} public static final int Type_Dir = 1; public boolean ReadOnly() {return readOnly;} public IoItmDir ReadOnly_(boolean val) {this.readOnly = val; return this;} private boolean readOnly; @gplx.New public IoItmDir XtnProps_set(String key, Object val) {return (IoItmDir)super.XtnProps_set(key, val);} public IoItmList SubDirs() {return subDirs;} IoItmList subDirs; diff --git a/100_core/src/gplx/core/ios/IoItmDir_.java b/100_core/src/gplx/core/ios/IoItmDir_.java index 402c92127..03d32e85a 100644 --- a/100_core/src/gplx/core/ios/IoItmDir_.java +++ b/100_core/src/gplx/core/ios/IoItmDir_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; public class IoItmDir_ { public static IoItmDir as_(Object obj) {return obj instanceof IoItmDir ? (IoItmDir)obj : null;} - public static final IoItmDir Null = null_(); + public static final IoItmDir Null = null_(); public static IoItmDir top_(Io_url url) {return scan_(url);} public static IoItmDir scan_(Io_url url) { IoItmDir rv = new IoItmDir(url.Info().CaseSensitive()); diff --git a/100_core/src/gplx/core/ios/IoItmFil.java b/100_core/src/gplx/core/ios/IoItmFil.java index 79e5fe73f..715a1e1f9 100644 --- a/100_core/src/gplx/core/ios/IoItmFil.java +++ b/100_core/src/gplx/core/ios/IoItmFil.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.langs.gfs.*; public class IoItmFil extends IoItm_base { - @Override public int TypeId() {return IoItmFil.Type_Fil;} @Override public boolean Type_dir() {return false;} @Override public boolean Type_fil() {return true;} public static final int Type_Fil = 2; + @Override public int TypeId() {return IoItmFil.Type_Fil;} @Override public boolean Type_dir() {return false;} @Override public boolean Type_fil() {return true;} public static final int Type_Fil = 2; public boolean Exists() {return size != Size_invalid;} // NOTE: questionable logic, but preserved for historical reasons; requires that length be set to -1 if !.exists public DateAdp ModifiedTime() {return modifiedTime;} public IoItmFil ModifiedTime_(DateAdp val) {modifiedTime = val; return this;} DateAdp modifiedTime; public IoItmFil ModifiedTime_(String val) {return ModifiedTime_(DateAdp_.parse_gplx(val));} - @gplx.Virtual public long Size() {return size;} public IoItmFil Size_(long val) {size = val; return this;} private long size; + public long Size() {return size;} public IoItmFil Size_(long val) {size = val; return this;} private long size; public IoItmAttrib Attrib() {return attrib;} public IoItmFil Attrib_(IoItmAttrib val) {attrib = val; return this;} IoItmAttrib attrib = IoItmAttrib.normal_(); public boolean ReadOnly() {return attrib.ReadOnly();} public IoItmFil ReadOnly_(boolean val) {attrib.ReadOnly_(val); return this;} @gplx.New public IoItmFil XtnProps_set(String key, Object val) {return (IoItmFil)super.XtnProps_set(key, val);} diff --git a/100_core/src/gplx/core/ios/IoItmFil_mem.java b/100_core/src/gplx/core/ios/IoItmFil_mem.java index b83bf26ad..996af552b 100644 --- a/100_core/src/gplx/core/ios/IoItmFil_mem.java +++ b/100_core/src/gplx/core/ios/IoItmFil_mem.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.ios.streams.*; /*IoStream_mem*/ import gplx.core.texts.*; /*Encoding_*/ class IoItmFil_mem extends IoItmFil { public static IoItmFil_mem as_(Object obj) {return obj instanceof IoItmFil_mem ? (IoItmFil_mem)obj : null;} @@ -33,5 +33,5 @@ class IoItmFil_mem extends IoItmFil { public static IoItmFil_mem as_(Object obj rv.stream = IoStream_mem.rdr_txt_(filPath, text); return rv; } - public static final IoItmFil_mem Null = new_(Io_url_.Empty, -1, DateAdp_.MinValue, ""); // NOTE: size must be -1 for .Exists to be false; DATE:2015-05-16 + public static final IoItmFil_mem Null = new_(Io_url_.Empty, -1, DateAdp_.MinValue, ""); // NOTE: size must be -1 for .Exists to be false; DATE:2015-05-16 } diff --git a/100_core/src/gplx/core/ios/IoItm_base.java b/100_core/src/gplx/core/ios/IoItm_base.java index e715890f2..61fec22ee 100644 --- a/100_core/src/gplx/core/ios/IoItm_base.java +++ b/100_core/src/gplx/core/ios/IoItm_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.langs.gfs.*; public abstract class IoItm_base implements Gfo_invk, CompareAble { @@ -40,7 +40,7 @@ public abstract class IoItm_base implements Gfo_invk, CompareAble { } public int compareTo(Object comp) {return url.compareTo(((IoItm_base)comp).url);} // NOTE: needed for comic importer (sort done on IoItmHash which contains IoItm_base) // public Object Data_get(String name) {return Gfo_invk_.Invk_by_key(this, name);} - @gplx.Virtual public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, IoItm_base_.Prop_Type)) return this.TypeId(); else if (ctx.Match(k, IoItm_base_.Prop_Path)) return this.Url(); else if (ctx.Match(k, IoItm_base_.Prop_Title)) return this.Url().NameOnly(); // needed for gfio script criteria; diff --git a/100_core/src/gplx/core/ios/IoRecycleBin.java b/100_core/src/gplx/core/ios/IoRecycleBin.java index fc4172ec5..6a177a7dc 100644 --- a/100_core/src/gplx/core/ios/IoRecycleBin.java +++ b/100_core/src/gplx/core/ios/IoRecycleBin.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class IoRecycleBin { @@ -54,5 +54,5 @@ public class IoRecycleBin { String sourceApp = String_.GetStrBefore(url.NameAndExt_noDirSpr(), ";"); return url.OwnerDir().GenSubFil_ary(sourceApp, ".recycle.csv"); } - public static final IoRecycleBin Instance = new IoRecycleBin(); IoRecycleBin() {} + public static final IoRecycleBin Instance = new IoRecycleBin(); IoRecycleBin() {} } diff --git a/100_core/src/gplx/core/ios/IoUrlInfo.java b/100_core/src/gplx/core/ios/IoUrlInfo.java index 38fa8258b..325ad2c45 100644 --- a/100_core/src/gplx/core/ios/IoUrlInfo.java +++ b/100_core/src/gplx/core/ios/IoUrlInfo.java @@ -1,20 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.core.ios; import gplx.*; import gplx.core.*; -import gplx.core.envs.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.core.ios; import gplx.Byte_ascii; +import gplx.Char_; +import gplx.String_; +import gplx.core.envs.Op_sys; public interface IoUrlInfo { String Key(); byte DirSpr_byte(); @@ -33,7 +35,7 @@ public interface IoUrlInfo { String XtoRootName(String raw, int rawLen); } class IoUrlInfo_nil implements IoUrlInfo { - public String Key() {return KeyConst;} public static final String KeyConst = String_.Null_mark; + public String Key() {return KeyConst;} public static final String KeyConst = String_.Null_mark; public String EngineKey() {return "<>";} public String DirSpr() {return "<>";} public byte DirSpr_byte() {return Byte_ascii.Slash;} @@ -48,11 +50,11 @@ class IoUrlInfo_nil implements IoUrlInfo { public String NameOnly(String raw) {return "";} public String Ext(String raw) {return "";} public String XtoRootName(String raw, int rawLen) {return "";} - public static final IoUrlInfo_nil Instance = new IoUrlInfo_nil(); IoUrlInfo_nil() {} + public static final IoUrlInfo_nil Instance = new IoUrlInfo_nil(); IoUrlInfo_nil() {} } abstract class IoUrlInfo_base implements IoUrlInfo { - @gplx.Internal protected static final int DirSprLen = 1; - @gplx.Internal protected static final String NullString = "", ExtSeparator = "."; + @gplx.Internal protected static final int DirSprLen = 1; + @gplx.Internal protected static final String NullString = "", ExtSeparator = "."; public abstract String Key(); public abstract byte DirSpr_byte(); public abstract String DirSpr(); @@ -61,7 +63,7 @@ abstract class IoUrlInfo_base implements IoUrlInfo { public abstract String EngineKey(); public boolean IsDir(String raw) {return String_.Has_at_end(raw, DirSpr());} public abstract String XtoRootName(String raw, int rawLen); - @gplx.Virtual public String Xto_api(String raw) { + public String Xto_api(String raw) { return IsDir(raw) ? String_.DelEnd(raw, IoUrlInfo_base.DirSprLen) // if Dir, remove trailing DirSpr, since most api will not expect it (ex: .Delete will malfunction) : raw; @@ -72,7 +74,7 @@ abstract class IoUrlInfo_base implements IoUrlInfo { if (ownerDirSprPos <= OwnerDirPos_hasNoOwner) return IoUrlInfo_base.NullString; // no ownerDir found; return Null; only (a) NullUrls (b) RootUrls ("C:\") (c) relative ("fil.txt") return String_.MidByLen(raw, 0, ownerDirSprPos + 1); // +1 to include backslash } - @gplx.Virtual public String OwnerRoot(String raw) { + public String OwnerRoot(String raw) { String temp = raw, rv = raw; while (true) { temp = OwnerDir(temp); @@ -116,7 +118,7 @@ abstract class IoUrlInfo_base implements IoUrlInfo { return String_.FindBwd(raw, this.DirSpr(), rawLen - 1 - posAdj); // -1 to adjust for LastIdx } } - static final int + static final int OwnerDirPos_hasNoOwner = -1 // List_adp_.Not_found , OwnerDirPos_isNull = -2 , OwnerDirPos_isRoot = -3; @@ -133,12 +135,12 @@ class IoUrlInfo_wnt extends IoUrlInfo_base { ? Char_.To_str(String_.CharAt(raw, 0)) : null; } - public static final IoUrlInfo_wnt Instance = new IoUrlInfo_wnt(); IoUrlInfo_wnt() {} + public static final IoUrlInfo_wnt Instance = new IoUrlInfo_wnt(); IoUrlInfo_wnt() {} } class IoUrlInfo_lnx extends IoUrlInfo_base { @Override public String Key() {return "lnx";} @Override public String EngineKey() {return IoEngine_.SysKey;} - @Override public String DirSpr() {return DirSprStr;} static final String DirSprStr = Op_sys.Lnx.Fsys_dir_spr_str(); + @Override public String DirSpr() {return DirSprStr;} static final String DirSprStr = Op_sys.Lnx.Fsys_dir_spr_str(); @Override public byte DirSpr_byte() {return Byte_ascii.Slash;} @Override public boolean CaseSensitive() {return Op_sys.Lnx.Fsys_case_match();} @Override public boolean Match(String raw) {return String_.Has_at_bgn(raw, DirSprStr);} // anything that starts with / @@ -153,7 +155,7 @@ class IoUrlInfo_lnx extends IoUrlInfo_base { ? DirSprStr : super.Xto_api(raw); // NOTE: super.Xto_api will strip off last / } - public static final IoUrlInfo_lnx Instance = new IoUrlInfo_lnx(); IoUrlInfo_lnx() {} + public static final IoUrlInfo_lnx Instance = new IoUrlInfo_lnx(); IoUrlInfo_lnx() {} } class IoUrlInfo_rel extends IoUrlInfo_base { @Override public String Key() {return "rel";} @@ -234,8 +236,8 @@ class IoUrlInfo_alias extends IoUrlInfo_base { rv.EngineKey_set(engineKey); return rv; } - public static final IoUrlInfo_alias KEYS = new IoUrlInfo_alias(); - public final String + public static final IoUrlInfo_alias KEYS = new IoUrlInfo_alias(); + public final String Data_EngineKey = "engineKey" , Data_SrcDir = "srcDir" , Data_TrgDir = "trgDir" diff --git a/100_core/src/gplx/core/ios/IoUrlInfoRegy.java b/100_core/src/gplx/core/ios/IoUrlInfoRegy.java index cddf6bb25..cf98509ec 100644 --- a/100_core/src/gplx/core/ios/IoUrlInfoRegy.java +++ b/100_core/src/gplx/core/ios/IoUrlInfoRegy.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.envs.*; import gplx.langs.gfs.*; -public class IoUrlInfoRegy implements Gfo_invk { +public class IoUrlInfoRegy implements Gfo_invk { public void Reg(IoUrlInfo info) {hash.Add_if_dupe_use_nth(info.Key(), info);} public IoUrlInfo Match(String raw) { if (String_.Len(raw) == 0) return IoUrlInfo_.Nil; @@ -43,9 +43,9 @@ public class IoUrlInfoRegy implements Gfo_invk { IoUrlInfoRegy.Instance.Reg(alias); } return this; - } public static final String Invk_Add = "Add"; + } public static final String Invk_Add = "Add"; Ordered_hash hash = Ordered_hash_.New(); - public static final IoUrlInfoRegy Instance = new IoUrlInfoRegy(); + public static final IoUrlInfoRegy Instance = new IoUrlInfoRegy(); IoUrlInfoRegy() { this.Reset(); } diff --git a/100_core/src/gplx/core/ios/IoUrlTypeRegy.java b/100_core/src/gplx/core/ios/IoUrlTypeRegy.java index df775e9cc..2d3609008 100644 --- a/100_core/src/gplx/core/ios/IoUrlTypeRegy.java +++ b/100_core/src/gplx/core/ios/IoUrlTypeRegy.java @@ -41,9 +41,9 @@ public class IoUrlTypeRegy implements Gfo_invk { } else return Gfo_invk_.Rv_unhandled; // return this; - } public static final String Invk_Get = "Get"; + } public static final String Invk_Get = "Get"; Ordered_hash hash = Ordered_hash_.New(); - public static final IoUrlTypeRegy Instance = new IoUrlTypeRegy(); IoUrlTypeRegy() {} + public static final IoUrlTypeRegy Instance = new IoUrlTypeRegy(); IoUrlTypeRegy() {} } class IoUrlTypeGrp implements Gfo_invk { public String[] AsAry() { @@ -78,5 +78,5 @@ class IoUrlTypeGrp implements Gfo_invk { else if (ctx.Match(k, Invk_Clear)) {if (ctx.Deny()) return this; list.Clear();} else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_AddMany = "Add_many", Invk_Clear = "Clear", Invk_Print = "Print"; + } public static final String Invk_AddMany = "Add_many", Invk_Clear = "Clear", Invk_Print = "Print"; } diff --git a/100_core/src/gplx/core/ios/Io_download_fmt.java b/100_core/src/gplx/core/ios/Io_download_fmt.java index 72c700ba7..66986f47c 100644 --- a/100_core/src/gplx/core/ios/Io_download_fmt.java +++ b/100_core/src/gplx/core/ios/Io_download_fmt.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.brys.args.*; import gplx.core.brys.fmtrs.*; import gplx.core.envs.*; public class Io_download_fmt { - private final Io_size_fmtr_arg size_fmtr_arg = new Io_size_fmtr_arg(), rate_fmtr_arg = new Io_size_fmtr_arg().Suffix_(Bry_.new_a7("ps")); - private final Bfr_arg__time prog_left_fmtr_arg = new Bfr_arg__time(); private final Bfr_arg__decimal_int prog_pct_fmtr_arg = new Bfr_arg__decimal_int().Places_(2); + private final Io_size_fmtr_arg size_fmtr_arg = new Io_size_fmtr_arg(), rate_fmtr_arg = new Io_size_fmtr_arg().Suffix_(Bry_.new_a7("ps")); + private final Bfr_arg__time prog_left_fmtr_arg = new Bfr_arg__time(); private final Bfr_arg__decimal_int prog_pct_fmtr_arg = new Bfr_arg__decimal_int().Places_(2); private long time_checkpoint_interval = 250; private long time_checkpoint = 0; private long time_prv = 0; public Io_download_fmt() { this.src_name = prog_msg_hdr = ""; // NOTE: set to "" else prog_mgr will fail with null ref } - private final Bry_bfr prog_bfr = Bry_bfr_.New(); Bry_fmtr prog_fmtr = Bry_fmtr.new_().Fail_when_invalid_escapes_(false); // NOTE: prog_fmtr can be passed file_names with ~ which are not easy to escape; DATE:2013-02-19 + private final Bry_bfr prog_bfr = Bry_bfr_.New(); Bry_fmtr prog_fmtr = Bry_fmtr.new_().Fail_when_invalid_escapes_(false); // NOTE: prog_fmtr can be passed file_names with ~ which are not easy to escape; DATE:2013-02-19 public long Time_bgn() {return time_bgn;} private long time_bgn; public long Time_now() {return time_now;} private long time_now; public long Time_dif() {return time_dif;} private long time_dif; @@ -88,5 +88,5 @@ public class Io_download_fmt { // prog_left = (1000 * (src_len - prog_done)) / prog_rate; // if (usr_dlg != null) usr_dlg.Prog_none(GRP_KEY, "clear", ""); } - public static final Io_download_fmt Null = null; + public static final Io_download_fmt Null = null; } diff --git a/100_core/src/gplx/core/ios/Io_fil_mkr.java b/100_core/src/gplx/core/ios/Io_fil_mkr.java index 52b2e7ed8..ec821b65c 100644 --- a/100_core/src/gplx/core/ios/Io_fil_mkr.java +++ b/100_core/src/gplx/core/ios/Io_fil_mkr.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.ios; import gplx.*; import gplx.core.*; -public class Io_fil_mkr { - private final List_adp list = List_adp_.New(); - public Io_fil_mkr Add(String url, String data) {return Add(Io_url_.mem_fil_(url), data);} - public Io_fil_mkr Add(Io_url url, String data) {list.Add(new Io_fil(url, data)); return this;} - public Io_fil[] To_ary() {return (Io_fil[])list.To_ary(Io_fil.class);} -} +package gplx.core.ios; import gplx.*; import gplx.core.*; +public class Io_fil_mkr { + private final List_adp list = List_adp_.New(); + public Io_fil_mkr Add(String url, String data) {return Add(Io_url_.mem_fil_(url), data);} + public Io_fil_mkr Add(Io_url url, String data) {list.Add(new Io_fil(url, data)); return this;} + public Io_fil[] To_ary() {return (Io_fil[])list.To_ary(Io_fil.class);} +} diff --git a/100_core/src/gplx/core/ios/Io_size_.java b/100_core/src/gplx/core/ios/Io_size_.java index 34a7d33dd..e6655562c 100644 --- a/100_core/src/gplx/core/ios/Io_size_.java +++ b/100_core/src/gplx/core/ios/Io_size_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.brys.*; public class Io_size_ { @@ -121,7 +121,7 @@ public class Io_size_ { } return unitPow; } - private static final String[][] Units = new String[][] + private static final String[][] Units = new String[][] { String_.Ary("B", "BYTE") , String_.Ary("KB", "KILOBYTE") , String_.Ary("MB", "MEGABYTE") @@ -130,7 +130,7 @@ public class Io_size_ { , String_.Ary("PB", "PETABYTE") , String_.Ary("EB", "EXABYTE") }; - public static final byte[][] Units_bry = new byte[][] + public static final byte[][] Units_bry = new byte[][] { Bry_.new_a7("B") , Bry_.new_a7("KB") , Bry_.new_a7("MB") diff --git a/100_core/src/gplx/core/ios/atrs/Io_itm_atr_req.java b/100_core/src/gplx/core/ios/atrs/Io_itm_atr_req.java index 473ea8a6a..341e1711b 100644 --- a/100_core/src/gplx/core/ios/atrs/Io_itm_atr_req.java +++ b/100_core/src/gplx/core/ios/atrs/Io_itm_atr_req.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.atrs; import gplx.*; import gplx.core.*; import gplx.core.ios.*; public class Io_itm_atr_req { Io_itm_atr_req(boolean ignore_errors, boolean check_read_only) { this.ignore_errors = ignore_errors; this.check_read_only = check_read_only; } - public boolean Check_read_only() {return check_read_only;} private final boolean check_read_only; + public boolean Check_read_only() {return check_read_only;} private final boolean check_read_only; public boolean Is_read_only() {return is_read_only;} public void Is_read_only_(boolean v) {this.is_read_only = v;} private boolean is_read_only; - public boolean Ignore_errors() {return ignore_errors;} private final boolean ignore_errors; + public boolean Ignore_errors() {return ignore_errors;} private final boolean ignore_errors; public String To_str() { Keyval[] ary = new Keyval[2]; ary[0] = Keyval_.new_("check_read_only", check_read_only); diff --git a/100_core/src/gplx/core/ios/streams/IoStream_.java b/100_core/src/gplx/core/ios/streams/IoStream_.java index 018d51918..576fcd492 100644 --- a/100_core/src/gplx/core/ios/streams/IoStream_.java +++ b/100_core/src/gplx/core/ios/streams/IoStream_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.streams; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import java.io.File; import java.io.FileInputStream; @@ -25,7 +25,7 @@ import java.io.OutputStream; import java.io.RandomAccessFile; import java.io.UnsupportedEncodingException; public class IoStream_ { - public static final IoStream Null = new IoStream_null(); + public static final IoStream Null = new IoStream_null(); public static IoStream mem_txt_(Io_url url, String v) {return IoStream_mem.rdr_txt_(url, v);} public static IoStream ary_(byte[] v) {return IoStream_mem.rdr_ary_(Io_url_.Empty, v);} public static final byte Mode_rdr = 0, Mode_wtr_create = 1, Mode_wtr_append = 2, Mode_wtr_update = 3; diff --git a/100_core/src/gplx/core/ios/streams/IoStream_base.java b/100_core/src/gplx/core/ios/streams/IoStream_base.java index d7ce08a02..16135fb35 100644 --- a/100_core/src/gplx/core/ios/streams/IoStream_base.java +++ b/100_core/src/gplx/core/ios/streams/IoStream_base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.streams; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; public class IoStream_base implements IoStream { - @gplx.Virtual public Io_url Url() {return url;} Io_url url = Io_url_.Empty; + public Io_url Url() {return url;} Io_url url = Io_url_.Empty; public void Transfer(IoStream trg, int bufferLength) { byte[] buffer = new byte[bufferLength]; int read = -1; @@ -31,11 +31,11 @@ public class IoStream_base implements IoStream { } public int ReadAry(byte[] ary) {return this.Read(ary, 0, ary.length);} public void WriteAry(byte[] ary) {this.Write(ary, 0, ary.length);} - @gplx.Virtual public Object UnderRdr() {return under;} - @gplx.Virtual public void UnderRdr_(Object v) {this.under = (RandomAccessFile)v;} - @gplx.Virtual public long Pos() {return pos;} long pos; - @gplx.Virtual public long Len() {return length;} long length; - @gplx.Virtual public int Read(byte[] array, int offset, int count) { + public Object UnderRdr() {return under;} + public void UnderRdr_(Object v) {this.under = (RandomAccessFile)v;} + public long Pos() {return pos;} long pos; + public long Len() {return length;} long length; + public int Read(byte[] array, int offset, int count) { try { int rv = under.read(array, offset, count); return rv == -1 ? 0 : rv; // NOTE: fis returns -1 if nothing read; .NET returned 0; Hash will fail if -1 returned (will try to create array of 0 length) @@ -50,7 +50,7 @@ public class IoStream_base implements IoStream { } catch (IOException e) {throw Err_.new_exc(e, "io", "seek failed", "url", url);} } - @gplx.Virtual public void Write(byte[] array, int offset, int count) {bfr.Add_mid(array, offset, offset + count); this.Flush();} Bry_bfr bfr = Bry_bfr_.Reset(16); + public void Write(byte[] array, int offset, int count) {bfr.Add_mid(array, offset, offset + count); this.Flush();} Bry_bfr bfr = Bry_bfr_.Reset(16); public void Write_and_flush(byte[] bry, int bgn, int end) { // ConsoleAdp._.WriteLine(bry.length +" " + bgn + " " + end); Flush();// flush anything already in buffer @@ -85,7 +85,7 @@ public class IoStream_base implements IoStream { // } // } } - @gplx.Virtual public void Flush() { + public void Flush() { try { if (mode_is_append) under.seek(under.length()); // else under.seek(0); @@ -95,7 +95,7 @@ public class IoStream_base implements IoStream { catch (IOException e) {throw Err_.new_exc(e, "io", "write failed", "url", url);} bfr.Clear(); } - @gplx.Virtual public void Rls() { + public void Rls() { IoEngine_system.Closeable_close(under, url, true); } RandomAccessFile under; boolean mode_is_append; byte mode; diff --git a/100_core/src/gplx/core/ios/streams/Io_stream_rdr_.java b/100_core/src/gplx/core/ios/streams/Io_stream_rdr_.java index 8193c2943..405171d0c 100644 --- a/100_core/src/gplx/core/ios/streams/Io_stream_rdr_.java +++ b/100_core/src/gplx/core/ios/streams/Io_stream_rdr_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.streams; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import gplx.core.ios.streams.rdrs.*; public class Io_stream_rdr_ { public static final int Read_done = -1, Read_done_compare = 1; - public static final Io_stream_rdr Noop = new Io_stream_rdr__noop(); + public static final Io_stream_rdr Noop = new Io_stream_rdr__noop(); public static Io_stream_rdr New__raw(Io_url url) {return new Io_stream_rdr__raw().Url_(url);} public static Io_stream_rdr New__raw(java.io.InputStream strm) {return new Io_stream_rdr__raw().Under_(strm);} private static Io_stream_rdr New__zip(Io_url url) {return new Io_stream_rdr__zip().Url_(url);} diff --git a/100_core/src/gplx/core/ios/zips/Io_zip_decompress_cmd__base.java b/100_core/src/gplx/core/ios/zips/Io_zip_decompress_cmd__base.java index 1fa2f0108..aba9d5eb9 100644 --- a/100_core/src/gplx/core/ios/zips/Io_zip_decompress_cmd__base.java +++ b/100_core/src/gplx/core/ios/zips/Io_zip_decompress_cmd__base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.zips; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import gplx.core.progs.*; public abstract class Io_zip_decompress_cmd__base implements Io_zip_decompress_cmd { @@ -22,7 +22,7 @@ public abstract class Io_zip_decompress_cmd__base implements Io_zip_decompress_c private long checkpoint_interval = 32 * Io_mgr.Len_mb, checkpoint_nxt = 0; public String Fail_msg() {return fail_msg;} private String fail_msg; public abstract Io_zip_decompress_cmd Make_new(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public long Prog_data_cur() {return resume_file;} public byte Exec(gplx.core.progs.Gfo_prog_ui prog_ui, Io_url src_fil, Io_url trg_dir, List_adp trg_fils) { this.Checkpoint__load_by_src_fil(src_fil); diff --git a/100_core/src/gplx/core/ios/zips/Io_zip_mgr_base.java b/100_core/src/gplx/core/ios/zips/Io_zip_mgr_base.java index b53be91b2..3a269b02c 100644 --- a/100_core/src/gplx/core/ios/zips/Io_zip_mgr_base.java +++ b/100_core/src/gplx/core/ios/zips/Io_zip_mgr_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.zips; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import java.io.*; import java.util.zip.*; @@ -114,5 +114,5 @@ public class Io_zip_mgr_base implements Io_zip_mgr { } catch(IOException e) {throw Err_.new_exc(e, "io", "error duing unzip", "src", src_fil.Raw(), "trg", trg_dir.Raw());} } byte[] tmp = new byte[4096]; int tmpLen = 4096; - public static final Io_zip_mgr Instance = new Io_zip_mgr_base(); + public static final Io_zip_mgr Instance = new Io_zip_mgr_base(); } diff --git a/100_core/src/gplx/core/ios/zips/Io_zip_mgr_mok.java b/100_core/src/gplx/core/ios/zips/Io_zip_mgr_mok.java index bf0cf4f43..f19378bf5 100644 --- a/100_core/src/gplx/core/ios/zips/Io_zip_mgr_mok.java +++ b/100_core/src/gplx/core/ios/zips/Io_zip_mgr_mok.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios.zips; import gplx.*; import gplx.core.*; import gplx.core.ios.*; public class Io_zip_mgr_mok implements Io_zip_mgr { public void Zip_fil(Io_url src_fil, Io_url trg_fil) { @@ -29,6 +29,6 @@ public class Io_zip_mgr_mok implements Io_zip_mgr { return Bry_.Mid(section, Bry_zipped.length, section.length); } public void Unzip_to_dir(Io_url src_fil, Io_url trg_dir) {} - private static final byte[] Bry_zipped = Bry_.new_a7("zipped:"); - public static final Io_zip_mgr_mok Instance = new Io_zip_mgr_mok(); Io_zip_mgr_mok() {} + private static final byte[] Bry_zipped = Bry_.new_a7("zipped:"); + public static final Io_zip_mgr_mok Instance = new Io_zip_mgr_mok(); Io_zip_mgr_mok() {} } diff --git a/100_core/src/gplx/core/js/Js_wtr.java b/100_core/src/gplx/core/js/Js_wtr.java index fc2369cb5..c13eef391 100644 --- a/100_core/src/gplx/core/js/Js_wtr.java +++ b/100_core/src/gplx/core/js/Js_wtr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.js; import gplx.*; import gplx.core.*; public class Js_wtr { - private final Bry_bfr bfr = Bry_bfr_.Reset(32); + private final Bry_bfr bfr = Bry_bfr_.Reset(32); private int arg_idx = 0, ary_idx = 0; public byte Quote_char() {return quote_char;} public Js_wtr Quote_char_(byte v) {quote_char = v; return this;} private byte quote_char = Byte_ascii.Quote; public void Clear() {bfr.Clear();} @@ -102,5 +102,5 @@ public class Js_wtr { } bfr.Add_byte(quote_char); } - private static final byte[] Keyword_return = Bry_.new_a7("return "); + private static final byte[] Keyword_return = Bry_.new_a7("return "); } diff --git a/100_core/src/gplx/core/lists/Hash_adp_base.java b/100_core/src/gplx/core/lists/Hash_adp_base.java index d9dc2c2d9..0244eafb2 100644 --- a/100_core/src/gplx/core/lists/Hash_adp_base.java +++ b/100_core/src/gplx/core/lists/Hash_adp_base.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; -public abstract class Hash_adp_base implements Hash_adp { +public abstract class Hash_adp_base implements Hash_adp { public boolean Has(Object key) {return Has_base(key);} public Object Get_by(Object key) {return Fetch_base(key);} public Object Get_by_or_fail(Object key) {return Get_by_or_fail_base(key);} @@ -35,21 +35,21 @@ public abstract class Hash_adp_base implements Hash_adp { Add(key, val); return true; } - @gplx.Virtual public void Del(Object key) {Del_base(key);} + public void Del(Object key) {Del_base(key);} protected Object Get_by_or_fail_base(Object key) { if (key == null) throw Err_.new_wo_type("key cannot be null"); if (!Has_base(key)) throw Err_.new_wo_type("key not found", "key", key); return Fetch_base(key); } - // private final java.util.HashMap hash = new java.util.HashMap(); - private final java.util.Hashtable hash = new java.util.Hashtable(); - @gplx.Virtual public int Len() {return hash.size();} - @gplx.Virtual public int Count() {return hash.size();} - @gplx.Virtual public void Clear() {hash.clear();} - @gplx.Virtual protected void Add_base(Object key, Object val) {hash.put(key, val);} - @gplx.Virtual protected void Del_base(Object key) {hash.remove(key);} - @gplx.Virtual protected boolean Has_base(Object key) {return hash.containsKey(key);} - @gplx.Virtual protected Object Fetch_base(Object key) {return hash.get(key);} - @gplx.Virtual public java.util.Iterator iterator() {return hash.values().iterator();} + // private final java.util.HashMap hash = new java.util.HashMap(); + private final java.util.Hashtable hash = new java.util.Hashtable(); + public int Len() {return hash.size();} + public int Count() {return hash.size();} + public void Clear() {hash.clear();} + protected void Add_base(Object key, Object val) {hash.put(key, val);} + protected void Del_base(Object key) {hash.remove(key);} + protected boolean Has_base(Object key) {return hash.containsKey(key);} + protected Object Fetch_base(Object key) {return hash.get(key);} + public java.util.Iterator iterator() {return hash.values().iterator();} } diff --git a/100_core/src/gplx/core/lists/Sorted_hash.java b/100_core/src/gplx/core/lists/Sorted_hash.java index 2ee93190f..6c246d2d2 100644 --- a/100_core/src/gplx/core/lists/Sorted_hash.java +++ b/100_core/src/gplx/core/lists/Sorted_hash.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; public class Sorted_hash implements Hash_adp { public Sorted_hash() {this.hash = new java.util.TreeMap();} @@ -50,7 +50,7 @@ public class Sorted_hash implements Hash_adp { return hash.pollFirstEntry().getValue(); } - private final java.util.TreeMap hash; + private final java.util.TreeMap hash; public int Len() {return hash.size();} public int Count() {return hash.size();} public void Clear() {hash.clear();} diff --git a/100_core/src/gplx/core/lists/StackAdp_.java b/100_core/src/gplx/core/lists/StackAdp_.java index 964520991..bb8a582b5 100644 --- a/100_core/src/gplx/core/lists/StackAdp_.java +++ b/100_core/src/gplx/core/lists/StackAdp_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; -public class StackAdp_ { +public class StackAdp_ { public static StackAdp new_() {return new StackAdp_base();} } -class StackAdp_base implements StackAdp { +class StackAdp_base implements StackAdp { public Object Peek() {return Peek_base();} public Object Pop() {return Pop_base();} public void Push(Object obj) {Push_base(obj);} @@ -28,7 +28,7 @@ class StackAdp_base implements StackAdp { // NOTE: dotnet traverses last to first; java: first to last return list; } - final java.util.Stack stack = new java.util.Stack(); + final java.util.Stack stack = new java.util.Stack(); public StackAdp_base() {} public int Count() {return stack.size();} public void Clear() {stack.clear();} diff --git a/100_core/src/gplx/core/lists/hashs/Hash_adp__int.java b/100_core/src/gplx/core/lists/hashs/Hash_adp__int.java index f4d8d1998..b61e47406 100644 --- a/100_core/src/gplx/core/lists/hashs/Hash_adp__int.java +++ b/100_core/src/gplx/core/lists/hashs/Hash_adp__int.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.lists.hashs; import gplx.*; import gplx.core.*; import gplx.core.lists.*; -import gplx.core.primitives.*; -public class Hash_adp__int { - private final Hash_adp hash = Hash_adp_.New(); - private final Int_obj_ref tmp_key = Int_obj_ref.New_neg1(); - public void Clear() {hash.Clear();} - public int Len() {return hash.Count();} - public Object Get_by_or_fail(int key) {synchronized (tmp_key) {return hash.Get_by_or_fail(tmp_key.Val_(key));}} // LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18 - public Object Get_by_or_null(int key) {synchronized (tmp_key) {return hash.Get_by(tmp_key.Val_(key));}} // LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18 - public void Add(int key, Object obj) {hash.Add(Int_obj_ref.New(key), obj);} - public void Add(Int_obj_ref key, Object obj) {hash.Add(key, obj);} - public void Add_if_dupe_use_1st(int key, Object obj) {hash.Add_if_dupe_use_1st(Int_obj_ref.New(key), obj);} - public void Add_if_dupe_use_nth(Int_obj_ref key, Object obj) {hash.Add_if_dupe_use_nth(key, obj);} - public Hash_adp__int Add_as_bry(int key, String val) {hash.Add(Int_obj_ref.New(key), Bry_.new_u8(val)); return this;} -} +package gplx.core.lists.hashs; import gplx.*; import gplx.core.*; import gplx.core.lists.*; +import gplx.core.primitives.*; +public class Hash_adp__int { + private final Hash_adp hash = Hash_adp_.New(); + private final Int_obj_ref tmp_key = Int_obj_ref.New_neg1(); + public void Clear() {hash.Clear();} + public int Len() {return hash.Count();} + public Object Get_by_or_fail(int key) {synchronized (tmp_key) {return hash.Get_by_or_fail(tmp_key.Val_(key));}} // LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18 + public Object Get_by_or_null(int key) {synchronized (tmp_key) {return hash.Get_by(tmp_key.Val_(key));}} // LOCK:used by Xomp_ns_ord_mgr in xomp; DATE:2016-10-18 + public void Add(int key, Object obj) {hash.Add(Int_obj_ref.New(key), obj);} + public void Add(Int_obj_ref key, Object obj) {hash.Add(key, obj);} + public void Add_if_dupe_use_1st(int key, Object obj) {hash.Add_if_dupe_use_1st(Int_obj_ref.New(key), obj);} + public void Add_if_dupe_use_nth(Int_obj_ref key, Object obj) {hash.Add_if_dupe_use_nth(key, obj);} + public Hash_adp__int Add_as_bry(int key, String val) {hash.Add(Int_obj_ref.New(key), Bry_.new_u8(val)); return this;} +} diff --git a/100_core/src/gplx/core/lists/rings/Ring__long.java b/100_core/src/gplx/core/lists/rings/Ring__long.java index 27de7083d..f26878514 100644 --- a/100_core/src/gplx/core/lists/rings/Ring__long.java +++ b/100_core/src/gplx/core/lists/rings/Ring__long.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists.rings; import gplx.*; import gplx.core.*; import gplx.core.lists.*; public class Ring__long { - private final long[] ary; - private final int max; + private final long[] ary; + private final int max; private int nxt, idx_0; public Ring__long(int max) { this.max = max; diff --git a/100_core/src/gplx/core/lists/rings/Ring__long__tst.java b/100_core/src/gplx/core/lists/rings/Ring__long__tst.java index dfbf219a6..27f9dc041 100644 --- a/100_core/src/gplx/core/lists/rings/Ring__long__tst.java +++ b/100_core/src/gplx/core/lists/rings/Ring__long__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.lists.rings; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import org.junit.*; import gplx.core.tests.*; public class Ring__long__tst { - private final Ring__long__fxt fxt = new Ring__long__fxt(); + private final Ring__long__fxt fxt = new Ring__long__fxt(); @Test public void Basic__1() {fxt.Clear().Add(1) .Test__to_ary(1);} @Test public void Basic__2() {fxt.Clear().Add(1, 2) .Test__to_ary(1, 2);} @Test public void Basic__3() {fxt.Clear().Add(1, 2, 3) .Test__to_ary(1, 2, 3);} diff --git a/100_core/src/gplx/core/lists/rings/Ring__string__tst.java b/100_core/src/gplx/core/lists/rings/Ring__string__tst.java index c15562e76..12b052e39 100644 --- a/100_core/src/gplx/core/lists/rings/Ring__string__tst.java +++ b/100_core/src/gplx/core/lists/rings/Ring__string__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.lists.rings; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import org.junit.*; public class Ring__string__tst { - private final Ring__string__fxt fxt = new Ring__string__fxt(); + private final Ring__string__fxt fxt = new Ring__string__fxt(); @Before public void init() {fxt.Clear();} @Test public void Basic() { fxt.Clear().Max_(3).Push_many("a") .Expd("a"); diff --git a/100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java b/100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java index 94340792b..b7125a62c 100644 --- a/100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java +++ b/100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.log_msgs; import gplx.*; import gplx.core.*; -public class Gfo_msg_grp_ { - public static final Gfo_msg_grp Root_gplx = new Gfo_msg_grp(null, Gfo_msg_grp_.Uid_next(), Bry_.new_a7("gplx")); - public static final Gfo_msg_grp Root = new Gfo_msg_grp(null, Gfo_msg_grp_.Uid_next(), Bry_.Empty); - public static Gfo_msg_grp prj_(String key) {return new Gfo_msg_grp(Root , Gfo_msg_grp_.Uid_next(), Bry_.new_a7(key));} - public static Gfo_msg_grp new_(Gfo_msg_grp owner, String key) {return new Gfo_msg_grp(owner , Gfo_msg_grp_.Uid_next(), Bry_.new_a7(key));} - public static int Uid_next() {return uid_next++;} static int uid_next = 0; - public static byte[] Path(byte[] owner_path, byte[] key) { - if (owner_path != Bry_.Empty) tmp_bfr.Add(owner_path).Add_byte(Byte_ascii.Dot); // only add "." if owner_path is available; prevents creating ".gplx" - return tmp_bfr.Add(key).To_bry_and_clear(); - } - static Bry_bfr tmp_bfr = Bry_bfr_.Reset(256); -} +package gplx.core.log_msgs; import gplx.*; import gplx.core.*; +public class Gfo_msg_grp_ { + public static final Gfo_msg_grp Root_gplx = new Gfo_msg_grp(null, Gfo_msg_grp_.Uid_next(), Bry_.new_a7("gplx")); + public static final Gfo_msg_grp Root = new Gfo_msg_grp(null, Gfo_msg_grp_.Uid_next(), Bry_.Empty); + public static Gfo_msg_grp prj_(String key) {return new Gfo_msg_grp(Root , Gfo_msg_grp_.Uid_next(), Bry_.new_a7(key));} + public static Gfo_msg_grp new_(Gfo_msg_grp owner, String key) {return new Gfo_msg_grp(owner , Gfo_msg_grp_.Uid_next(), Bry_.new_a7(key));} + public static int Uid_next() {return uid_next++;} static int uid_next = 0; + public static byte[] Path(byte[] owner_path, byte[] key) { + if (owner_path != Bry_.Empty) tmp_bfr.Add(owner_path).Add_byte(Byte_ascii.Dot); // only add "." if owner_path is available; prevents creating ".gplx" + return tmp_bfr.Add(key).To_bry_and_clear(); + } + static Bry_bfr tmp_bfr = Bry_bfr_.Reset(256); +} diff --git a/100_core/src/gplx/core/logs/Gfo_log__file.java b/100_core/src/gplx/core/logs/Gfo_log__file.java index 44fecb31a..1a62624d3 100644 --- a/100_core/src/gplx/core/logs/Gfo_log__file.java +++ b/100_core/src/gplx/core/logs/Gfo_log__file.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.logs; import gplx.*; import gplx.core.*; public class Gfo_log__file extends Gfo_log__base { - public final Gfo_log_itm_wtr fmtr; - private final Bry_bfr bfr = Bry_bfr_.New(); + public final Gfo_log_itm_wtr fmtr; + private final Bry_bfr bfr = Bry_bfr_.New(); public Gfo_log__file(Io_url url, Gfo_log_itm_wtr fmtr) { this.url = url; this.fmtr = fmtr; } - public Io_url Url() {return url;} private final Io_url url; + public Io_url Url() {return url;} private final Io_url url; @Override public List_adp Itms() {return itms;} @Override public Gfo_log Itms_(List_adp v) {this.itms = v; return this;} private List_adp itms; @Override public void Exec(byte type, long time, long elapsed, String msg, Object[] args) { if (type == Gfo_log_itm.Type__prog) return; diff --git a/100_core/src/gplx/core/logs/Gfo_log_itm.java b/100_core/src/gplx/core/logs/Gfo_log_itm.java index 25eaf9332..63bf894e9 100644 --- a/100_core/src/gplx/core/logs/Gfo_log_itm.java +++ b/100_core/src/gplx/core/logs/Gfo_log_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.logs; import gplx.*; import gplx.core.*; public class Gfo_log_itm { public Gfo_log_itm(byte type, long time, long elapsed, String msg, Object[] args) { @@ -22,11 +22,11 @@ public class Gfo_log_itm { this.Msg = msg; this.Args = args; } - public final byte Type; - public final long Time; - public final long Elapsed; - public final String Msg; - public final Object[] Args; + public final byte Type; + public final long Time; + public final long Elapsed; + public final String Msg; + public final Object[] Args; public static final byte Type__fail = 0, Type__warn = 1, Type__note = 2, Type__info = 3, Type__prog = 4; } diff --git a/100_core/src/gplx/core/logs/Gfo_log_itm_wtr__csv.java b/100_core/src/gplx/core/logs/Gfo_log_itm_wtr__csv.java index a1ea61ad6..fd76e2d3b 100644 --- a/100_core/src/gplx/core/logs/Gfo_log_itm_wtr__csv.java +++ b/100_core/src/gplx/core/logs/Gfo_log_itm_wtr__csv.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.logs; import gplx.*; import gplx.core.*; public class Gfo_log_itm_wtr__csv implements Gfo_log_itm_wtr { - private static final byte[] Type__info = Bry_.new_a7("INFO"), Type__note = Bry_.new_a7("NOTE"), Type__warn = Bry_.new_a7("WARN"); + private static final byte[] Type__info = Bry_.new_a7("INFO"), Type__note = Bry_.new_a7("NOTE"), Type__warn = Bry_.new_a7("WARN"); private String time_fmt = "yyyyMMdd_HHmmss.fff"; public void Write(Bry_bfr bfr, Gfo_log_itm itm) { bfr.Add_str_a7(Int_.To_str_pad_bgn_space((int)itm.Elapsed, 6)).Add_byte_pipe(); diff --git a/100_core/src/gplx/core/memorys/Gfo_memory_mgr.java b/100_core/src/gplx/core/memorys/Gfo_memory_mgr.java index b92685765..0a7c5df8b 100644 --- a/100_core/src/gplx/core/memorys/Gfo_memory_mgr.java +++ b/100_core/src/gplx/core/memorys/Gfo_memory_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.memorys; import gplx.*; import gplx.core.*; public class Gfo_memory_mgr { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public void Reg_safe(Gfo_memory_itm itm) {synchronized (list) {Reg_fast(itm);}} public void Reg_fast(Gfo_memory_itm itm) {list.Add(itm);} public void Rls_safe() {synchronized (list) {Rls_fast();}} @@ -27,5 +27,5 @@ public class Gfo_memory_mgr { } list.Clear(); } - public static final Gfo_memory_mgr Instance = new Gfo_memory_mgr(); Gfo_memory_mgr() {} + public static final Gfo_memory_mgr Instance = new Gfo_memory_mgr(); Gfo_memory_mgr() {} } diff --git a/100_core/src/gplx/core/primitives/Int_obj_val.java b/100_core/src/gplx/core/primitives/Int_obj_val.java index efd806346..6a4f35ce8 100644 --- a/100_core/src/gplx/core/primitives/Int_obj_val.java +++ b/100_core/src/gplx/core/primitives/Int_obj_val.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.primitives; import gplx.*; import gplx.core.*; -public class Int_obj_val implements CompareAble { - public Int_obj_val(int val) {this.val = val;} - public int Val() {return val;} private final int val; - @Override public String toString() {return Int_.To_str(val);} - @Override public int hashCode() {return val;} - @Override public boolean equals(Object obj) {return obj == null ? false : val == ((Int_obj_val)obj).Val();} - public int compareTo(Object obj) {Int_obj_val comp = (Int_obj_val)obj; return Int_.Compare(val, comp.val);} -} +package gplx.core.primitives; import gplx.*; import gplx.core.*; +public class Int_obj_val implements CompareAble { + public Int_obj_val(int val) {this.val = val;} + public int Val() {return val;} private final int val; + @Override public String toString() {return Int_.To_str(val);} + @Override public int hashCode() {return val;} + @Override public boolean equals(Object obj) {return obj == null ? false : val == ((Int_obj_val)obj).Val();} + public int compareTo(Object obj) {Int_obj_val comp = (Int_obj_val)obj; return Int_.Compare(val, comp.val);} +} diff --git a/100_core/src/gplx/core/progs/Gfo_prog_ui_.java b/100_core/src/gplx/core/progs/Gfo_prog_ui_.java index 39fa6d8e5..3cf508a9c 100644 --- a/100_core/src/gplx/core/progs/Gfo_prog_ui_.java +++ b/100_core/src/gplx/core/progs/Gfo_prog_ui_.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.progs; import gplx.*; import gplx.core.*; public class Gfo_prog_ui_ { - public static final Gfo_prog_ui Noop = new Gfo_prog_ui__noop(), Always = new Gfo_prog_ui__always(); + public static final Gfo_prog_ui Noop = new Gfo_prog_ui__noop(), Always = new Gfo_prog_ui__always(); public static final byte Status__init = 1 , Status__working = 2 diff --git a/100_core/src/gplx/core/security/algos/Hash_algo__fxt.java b/100_core/src/gplx/core/security/algos/Hash_algo__fxt.java index 32f4a47a3..ef91fbc03 100644 --- a/100_core/src/gplx/core/security/algos/Hash_algo__fxt.java +++ b/100_core/src/gplx/core/security/algos/Hash_algo__fxt.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.security.algos; import gplx.*; import gplx.core.*; import gplx.core.security.*; -public class Hash_algo__fxt { - private final Hash_algo algo; - public Hash_algo__fxt(Hash_algo algo) {this.algo = algo;} - public void Test__hash(String expd, String raw) { - Tfds.Eq(expd, Hash_algo_utl.Calc_hash_as_str(algo, Bry_.new_u8(raw))); - Tfds.Eq(expd, Hash_algo_utl.Calc_hash_w_prog_as_str(algo, gplx.core.ios.streams.IoStream_.mem_txt_(Io_url_.Empty, raw), gplx.core.consoles.Console_adp_.Noop)); - } -} +package gplx.core.security.algos; import gplx.*; import gplx.core.*; import gplx.core.security.*; +public class Hash_algo__fxt { + private final Hash_algo algo; + public Hash_algo__fxt(Hash_algo algo) {this.algo = algo;} + public void Test__hash(String expd, String raw) { + Tfds.Eq(expd, Hash_algo_utl.Calc_hash_as_str(algo, Bry_.new_u8(raw))); + Tfds.Eq(expd, Hash_algo_utl.Calc_hash_w_prog_as_str(algo, gplx.core.ios.streams.IoStream_.mem_txt_(Io_url_.Empty, raw), gplx.core.consoles.Console_adp_.Noop)); + } +} diff --git a/100_core/src/gplx/core/security/algos/Hash_algo_factory__composite.java b/100_core/src/gplx/core/security/algos/Hash_algo_factory__composite.java index 5427ffad1..d887f9d71 100644 --- a/100_core/src/gplx/core/security/algos/Hash_algo_factory__composite.java +++ b/100_core/src/gplx/core/security/algos/Hash_algo_factory__composite.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos; import gplx.*; import gplx.core.*; import gplx.core.security.*; public class Hash_algo_factory__composite implements Hash_algo_factory { private boolean dirty = true; - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); private String[] algo_keys; public String[] Algo_keys() { if (dirty) { diff --git a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192.java b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192.java index b2aeb6d52..e36b5fa88 100644 --- a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192.java +++ b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.gplx_crypto; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import gplx.core.consoles.*; import gplx.core.ios.streams.*; /*IoStream*/ import gplx.core.progs.*; public class Hash_algo__tth_192 implements Hash_algo, Hash_algo_w_prog { - public String Key() {return KEY;} public static final String KEY = "tth192"; + public String Key() {return KEY;} public static final String KEY = "tth192"; public Hash_algo Clone_hash_algo() {return new Hash_algo__tth_192();} public int BlockSize() {return blockSize;} public void BlockSize_set(int v) {blockSize = v;} int blockSize = 1024; public void Update_digest(byte[] src, int bgn, int end) {throw Err_.new_unimplemented();} diff --git a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192__tst.java b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192__tst.java index 50c17cb68..7e764c481 100644 --- a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192__tst.java +++ b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_algo__tth_192__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.security.algos.gplx_crypto; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.junit.*; import gplx.core.consoles.*; import gplx.core.ios.*; /*IoStream*/ public class Hash_algo__tth_192__tst { // REF: http://open-content.net/specs/draft-jchapweske-thex-02.html; DC++ 0.698 - private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__tth_192()); + private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__tth_192()); @Test public void Empty() {fxt.Test__hash("LWPNACQDBZRYXW3VHJVCJ64QBZNGHOHHHZWCLNQ", "");} @Test public void Null__1() {fxt.Test__hash("VK54ZIEEVTWNAUI5D5RDFIL37LX2IQNSTAXFKSA", "\0");} @Test public void ab() {fxt.Test__hash("XQXRSGMB3PSN2VGZYJMNJG6SOOQ3JIGQHD2I6PQ", "ab");} diff --git a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_console_wtr_tst.java b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_console_wtr_tst.java index 20225cacf..df5fd3806 100644 --- a/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_console_wtr_tst.java +++ b/100_core/src/gplx/core/security/algos/gplx_crypto/Hash_console_wtr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.security.algos.gplx_crypto; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.junit.*; import gplx.core.consoles.*; import gplx.core.ios.streams.*; /*IoStream*/ public class Hash_console_wtr_tst { - private final Hash_console_wtr_fxt fxt = new Hash_console_wtr_fxt(); + private final Hash_console_wtr_fxt fxt = new Hash_console_wtr_fxt(); @Test public void Basic() { fxt.Test__Status(10, " - hash: 100%"); fxt.Test__Status(11, " - hash: 66%"); diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_checksum_factory.java b/100_core/src/gplx/core/security/algos/jre/Jre_checksum_factory.java index d2da320f4..4b5980fcf 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_checksum_factory.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_checksum_factory.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import java.util.zip.CRC32; import java.util.zip.Checksum; @@ -31,5 +31,5 @@ public class Jre_checksum_factory implements Hash_algo_factory { public static String Key__adler32 = "adler32", Key__crc32 = "crc32" ; - public static final Jre_checksum_factory Instance = new Jre_checksum_factory(); Jre_checksum_factory() {} + public static final Jre_checksum_factory Instance = new Jre_checksum_factory(); Jre_checksum_factory() {} } diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo.java b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo.java index fb243e836..c827d9093 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import java.security.MessageDigest; public class Jre_hash_algo implements Hash_algo { @@ -23,7 +23,7 @@ public class Jre_hash_algo implements Hash_algo { this.key = key; this.md = factory.New_algo_under(key); } - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public Hash_algo Clone_hash_algo() {return new Jre_hash_algo(factory, key);} public void Update_digest(byte[] bry, int bgn, int end) {md.update(bry, bgn, end - bgn);} public byte[] To_hash_bry() { diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__md5__tst.java b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__md5__tst.java index 7186588b1..a0c0eccd9 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__md5__tst.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__md5__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.junit.*; public class Jre_hash_algo__md5__tst { // REF: https://www.cosic.esat.kuleuven.be/nessie/testvectors/hash/md5/Md5-128.unverified.test-vectors - private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__md5()); + private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__md5()); @Test public void Empty() {fxt.Test__hash("d41d8cd98f00b204e9800998ecf8427e", "");} @Test public void a() {fxt.Test__hash("0cc175b9c0f1b6a831c399e269772661", "a");} @Test public void abc() {fxt.Test__hash("900150983cd24fb0d6963f7d28e17f72", "abc");} diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha1__tst.java b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha1__tst.java index 9d68e533b..29d7cc375 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha1__tst.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha1__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.junit.*; public class Jre_hash_algo__sha1__tst { // REF: https://www.cosic.esat.kuleuven.be/nessie/testvectors/ - private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__sha1()); + private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__sha1()); @Test public void Empty() {fxt.Test__hash("da39a3ee5e6b4b0d3255bfef95601890afd80709", "");} @Test public void a() {fxt.Test__hash("86f7e437faa5a7fce15d1ddcb9eaeaea377667b8", "a");} @Test public void abc() {fxt.Test__hash("a9993e364706816aba3e25717850c26c9cd0d89d", "abc");} diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha2_256__tst.java b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha2_256__tst.java index 9fcf7de16..d6b7604d9 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha2_256__tst.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_hash_algo__sha2_256__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.junit.*; public class Jre_hash_algo__sha2_256__tst { // REF: https://www.cosic.esat.kuleuven.be/nessie/testvectors/ - private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__sha2_256()); + private final Hash_algo__fxt fxt = new Hash_algo__fxt(Hash_algo_.New__sha2_256()); @Test public void Empty() {fxt.Test__hash("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "");} @Test public void a() {fxt.Test__hash("ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "a");} @Test public void abc() {fxt.Test__hash("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc");} diff --git a/100_core/src/gplx/core/security/algos/jre/Jre_hash_factory.java b/100_core/src/gplx/core/security/algos/jre/Jre_hash_factory.java index be1b89636..15ac07f02 100644 --- a/100_core/src/gplx/core/security/algos/jre/Jre_hash_factory.java +++ b/100_core/src/gplx/core/security/algos/jre/Jre_hash_factory.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.jre; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -29,5 +29,5 @@ public class Jre_hash_factory implements Hash_algo_factory { public static String Key__md5 = "md5", Key__sha1 = "sha1", Key__sha2_256 = "sha-256" ; - public static final Jre_hash_factory Instance = new Jre_hash_factory(); Jre_hash_factory() {} + public static final Jre_hash_factory Instance = new Jre_hash_factory(); Jre_hash_factory() {} } diff --git a/100_core/src/gplx/core/stores/DataRdr_.java b/100_core/src/gplx/core/stores/DataRdr_.java index 42aa7c6ec..2f937cf2e 100644 --- a/100_core/src/gplx/core/stores/DataRdr_.java +++ b/100_core/src/gplx/core/stores/DataRdr_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class DataRdr_ { - public static final DataRdr Null = new DataRdr_null(); + public static final DataRdr Null = new DataRdr_null(); public static DataRdr as_(Object obj) {return obj instanceof DataRdr ? (DataRdr)obj : null;} public static DataRdr cast(Object obj) {try {return (DataRdr)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, DataRdr.class, obj);}} diff --git a/100_core/src/gplx/core/stores/DataRdr_base.java b/100_core/src/gplx/core/stores/DataRdr_base.java index 2d500e941..8b2beb484 100644 --- a/100_core/src/gplx/core/stores/DataRdr_base.java +++ b/100_core/src/gplx/core/stores/DataRdr_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; import gplx.core.strings.*; import gplx.core.type_xtns.*; import gplx.core.ios.streams.*; @@ -26,7 +26,7 @@ public abstract class DataRdr_base implements SrlMgr { public abstract int FieldCount(); public abstract String KeyAt(int i); public abstract Object ReadAt(int i); - @gplx.Virtual public Keyval KeyValAt(int idx) {return Keyval_.new_(this.KeyAt(idx), ReadAt(idx));} + public Keyval KeyValAt(int idx) {return Keyval_.new_(this.KeyAt(idx), ReadAt(idx));} public String ReadStr(String key) { Object val = Read(key); try {return (String)val;} @@ -43,7 +43,7 @@ public abstract class DataRdr_base implements SrlMgr { try {return Bry_.new_u8((String)val);} catch (Exception exc) {Err_dataRdr_ReadFailed_useOr(exc, byte[].class, key, val, or); return or;} } - @gplx.Virtual public void SrlList(String key, List_adp list, SrlObj proto, String itmKey) { + public void SrlList(String key, List_adp list, SrlObj proto, String itmKey) { list.Clear(); DataRdr subRdr = this.Subs_byName_moveFirst(key); // collection node subRdr = subRdr.Subs(); @@ -53,7 +53,7 @@ public abstract class DataRdr_base implements SrlMgr { list.Add(itm); } } - @gplx.Virtual public Object StoreRoot(SrlObj root, String key) { + public Object StoreRoot(SrlObj root, String key) { SrlObj clone = root.SrlObj_New(null); clone.SrlObj_Srl(this); return clone; @@ -75,12 +75,12 @@ public abstract class DataRdr_base implements SrlMgr { try {return (parse) ? Long_.parse(String_.as_(val)) : Long_.cast(val);} catch (Exception exc) {Err_dataRdr_ReadFailed_useOr(exc, long.class, key, val, or); return or;} } - @gplx.Virtual public boolean ReadBool(String key) { + public boolean ReadBool(String key) { Object val = Read(key); try {return (parse) ? Bool_.Cast(BoolClassXtn.Instance.ParseOrNull(String_.as_(val))) : Bool_.Cast(val);} catch (Exception exc) {throw Err_dataRdr_ReadFailed_err(boolean.class, key, val, exc);} } - @gplx.Virtual public boolean ReadBoolOr(String key, boolean or) { + public boolean ReadBoolOr(String key, boolean or) { Object val = Read(key); if (val == null) return or; try {return (parse) ? Bool_.Parse(String_.as_(val)) : Bool_.Cast(val);} catch (Exception exc) {Err_dataRdr_ReadFailed_useOr(exc, boolean.class, key, val, or); return or;} @@ -110,27 +110,27 @@ public abstract class DataRdr_base implements SrlMgr { try {return (parse) ? Double_.parse(String_.as_(val)) : Double_.cast(val);} catch (Exception exc) {Err_dataRdr_ReadFailed_useOr(exc, double.class, key, val, or); return or;} } - @gplx.Virtual public byte ReadByte(String key) { + public byte ReadByte(String key) { Object val = Read(key); try {return (parse) ? Byte_.Parse(String_.as_(val)) : Byte_.Cast(val);} catch (Exception exc) {throw Err_dataRdr_ReadFailed_err(byte.class, key, val, exc);} } - @gplx.Virtual public byte ReadByteOr(String key, byte or) { + public byte ReadByteOr(String key, byte or) { Object val = Read(key); if (val == null) return or; try {return (parse) ? Byte_.Parse(String_.as_(val)) : Byte_.Cast(val);} catch (Exception exc) {Err_dataRdr_ReadFailed_useOr(exc, byte.class, key, val, or); return or;} } - @gplx.Virtual public DateAdp ReadDate(String key) { + public DateAdp ReadDate(String key) { Object val = Read(key); try {return (parse) ? DateAdp_.parse_gplx(String_.as_(val)) : (DateAdp)val;} catch (Exception exc) {throw Err_dataRdr_ReadFailed_err(DateAdp.class, key, val, exc);} } - @gplx.Virtual public DateAdp ReadDateOr(String key, DateAdp or) { + public DateAdp ReadDateOr(String key, DateAdp or) { Object val = Read(key); if (val == null) return or; try {return (parse) ? DateAdp_.parse_gplx(String_.as_(val)) : (DateAdp)val;} catch (Exception exc) {throw Err_dataRdr_ReadFailed_err(DateAdp.class, key, val, exc);} } - @gplx.Virtual public Decimal_adp ReadDecimal(String key) { + public Decimal_adp ReadDecimal(String key) { Object val = Read(key); try { if (parse) return Decimal_adp_.parse(String_.as_(val)); @@ -141,7 +141,7 @@ public abstract class DataRdr_base implements SrlMgr { } catch (Exception exc) {throw Err_dataRdr_ReadFailed_err(Decimal_adp.class, key, val, exc);} } - @gplx.Virtual public Decimal_adp ReadDecimalOr(String key, Decimal_adp or) { + public Decimal_adp ReadDecimalOr(String key, Decimal_adp or) { Object val = Read(key); if (val == null) return or; try { if (parse) return Decimal_adp_.parse(String_.as_(val)); diff --git a/100_core/src/gplx/core/stores/DataWtr_.java b/100_core/src/gplx/core/stores/DataWtr_.java index 4aa21b7d9..17ca76131 100644 --- a/100_core/src/gplx/core/stores/DataWtr_.java +++ b/100_core/src/gplx/core/stores/DataWtr_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; import gplx.core.gfo_ndes.*; public class DataWtr_ { - public static final DataWtr Null = new DataWtr_null(); + public static final DataWtr Null = new DataWtr_null(); } class DataWtr_null implements DataWtr { public boolean Type_rdr() {return false;} diff --git a/100_core/src/gplx/core/stores/DataWtr_base.java b/100_core/src/gplx/core/stores/DataWtr_base.java index c57a57884..4aed90992 100644 --- a/100_core/src/gplx/core/stores/DataWtr_base.java +++ b/100_core/src/gplx/core/stores/DataWtr_base.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; public abstract class DataWtr_base implements SrlMgr { - @gplx.Virtual public Hash_adp EnvVars() {return envVars;} Hash_adp envVars = Hash_adp_.New(); + public Hash_adp EnvVars() {return envVars;} Hash_adp envVars = Hash_adp_.New(); public boolean Type_rdr() {return false;} public abstract void WriteData(String key, Object o); public abstract void WriteNodeBgn(String nodeName); public abstract void WriteNodeEnd(); - @gplx.Virtual public void SrlList(String key, List_adp list, SrlObj proto, String itmKey) { + public void SrlList(String key, List_adp list, SrlObj proto, String itmKey) { this.WriteNodeBgn(key); for (Object itmObj : list) { SrlObj itm = (SrlObj)itmObj; @@ -30,7 +30,7 @@ public abstract class DataWtr_base implements SrlMgr { } this.WriteNodeEnd(); } - @gplx.Virtual public Object StoreRoot(SrlObj root, String key) { + public Object StoreRoot(SrlObj root, String key) { this.WriteNodeBgn(key); root.SrlObj_Srl(this); this.WriteNodeEnd(); diff --git a/100_core/src/gplx/core/stores/xmls/XmlDataWtr_.java b/100_core/src/gplx/core/stores/xmls/XmlDataWtr_.java index 09fdc728c..7b249286b 100644 --- a/100_core/src/gplx/core/stores/xmls/XmlDataWtr_.java +++ b/100_core/src/gplx/core/stores/xmls/XmlDataWtr_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores.xmls; import gplx.*; import gplx.core.*; import gplx.core.stores.*; import gplx.core.strings.*; import gplx.core.gfo_ndes.*; public class XmlDataWtr_ { @@ -103,7 +103,7 @@ class XmlDataWtr extends DataWtr_base implements DataWtr { @Override public SrlMgr SrlMgr_new(Object o) {return new XmlDataWtr();} boolean ndeOpened = false; // int atrCount = 0; -// int ndeState = -1; static final int NdeState0_Opened = 0, NdeState0_H = 1; +// int ndeState = -1; static final int NdeState0_Opened = 0, NdeState0_H = 1; // XmlDocument doc = new XmlDocument(); XmlNode nde; List_adp names = List_adp_.New(); String_bldr sb = String_bldr_.new_(); diff --git a/100_core/src/gplx/core/tests/Gfo_test_err_mgr.java b/100_core/src/gplx/core/tests/Gfo_test_err_mgr.java index 20152abf2..75ed93ce9 100644 --- a/100_core/src/gplx/core/tests/Gfo_test_err_mgr.java +++ b/100_core/src/gplx/core/tests/Gfo_test_err_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; public class Gfo_test_err_mgr { - private final List_adp expd = List_adp_.New(); + private final List_adp expd = List_adp_.New(); public void Init() { Gfo_usr_dlg_.Test__list__init(); expd.Clear(); diff --git a/100_core/src/gplx/core/tests/Gfo_test_itm.java b/100_core/src/gplx/core/tests/Gfo_test_itm.java index 1b6843578..b41debd6c 100644 --- a/100_core/src/gplx/core/tests/Gfo_test_itm.java +++ b/100_core/src/gplx/core/tests/Gfo_test_itm.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class Gfo_test_itm { - private final boolean is_expd; - private final Ordered_hash hash = Ordered_hash_.New(); + private final boolean is_expd; + private final Ordered_hash hash = Ordered_hash_.New(); Gfo_test_itm(boolean is_expd) { this.is_expd = is_expd; } diff --git a/100_core/src/gplx/core/tests/Gfo_test_list_base.java b/100_core/src/gplx/core/tests/Gfo_test_list_base.java index 33c057e52..be2bb4bf8 100644 --- a/100_core/src/gplx/core/tests/Gfo_test_list_base.java +++ b/100_core/src/gplx/core/tests/Gfo_test_list_base.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class Gfo_test_list_base { - private final List_adp expd = List_adp_.New(); + private final List_adp expd = List_adp_.New(); public void Clear() {expd.Clear();} public void Add(Object itm) {expd.Add(itm);} public void Test(Object actl_obj) { diff --git a/100_core/src/gplx/core/tests/Gfo_test_lnr_base.java b/100_core/src/gplx/core/tests/Gfo_test_lnr_base.java index db85d385c..78da0fd79 100644 --- a/100_core/src/gplx/core/tests/Gfo_test_lnr_base.java +++ b/100_core/src/gplx/core/tests/Gfo_test_lnr_base.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class Gfo_test_lnr_base { private String[] keys; - public List_adp Expd() {return expd_list;} private final List_adp expd_list = List_adp_.New(); - public List_adp Actl() {return actl_list;} private final List_adp actl_list = List_adp_.New(); + public List_adp Expd() {return expd_list;} private final List_adp expd_list = List_adp_.New(); + public List_adp Actl() {return actl_list;} private final List_adp actl_list = List_adp_.New(); public void Clear() { expd_list.Clear(); actl_list.Clear(); diff --git a/100_core/src/gplx/core/tests/Gftest.java b/100_core/src/gplx/core/tests/Gftest.java index 99b45e68d..6ac1dd28e 100644 --- a/100_core/src/gplx/core/tests/Gftest.java +++ b/100_core/src/gplx/core/tests/Gftest.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.brys.*; public class Gftest { - private static final Bry_bfr bfr = Bry_bfr_.New(); + private static final Bry_bfr bfr = Bry_bfr_.New(); public static void Fail(String msg_fmt, Object... msg_args) { throw Err_.new_wo_type(String_.Format(msg_fmt, msg_args)); } @@ -204,7 +204,7 @@ public class Gftest { return rv; } private static final String Str__null = "<>"; - private static final byte[] Bry__item__eq_n = Bry_.new_a7("!= ") // Bry__item__eq_y = Bry_.new_a7("== "), + private static final byte[] Bry__item__eq_n = Bry_.new_a7("!= ") // Bry__item__eq_y = Bry_.new_a7("== "), , Bry__null = Bry_.new_a7(Str__null) , Bry__line_bgn = Bry_.new_a7("\n************************************************************************************************\n") , Bry__line_mid = Bry_.new_a7("\n------------------------------------------------------------------------------------------------\n") @@ -215,11 +215,11 @@ public class Gftest { package ns; import org.junit.*; import gplx.core.tests.*; public class Cls1_tst { - private final Cls1_fxt fxt = new Cls1_fxt(); + private final Cls1_fxt fxt = new Cls1_fxt(); @Test public void Basic() {} } class Cls1_fxt { - private final Cls1 mgr = new Cls1(); + private final Cls1 mgr = new Cls1(); public Cls1_fxt Test() {return this;} } */ \ No newline at end of file diff --git a/100_core/src/gplx/core/tests/PerfLogMgr_fxt.java b/100_core/src/gplx/core/tests/PerfLogMgr_fxt.java index 4a53129d6..2362a368e 100644 --- a/100_core/src/gplx/core/tests/PerfLogMgr_fxt.java +++ b/100_core/src/gplx/core/tests/PerfLogMgr_fxt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; import gplx.core.envs.*; public class PerfLogMgr_fxt { @@ -43,7 +43,7 @@ public class PerfLogMgr_fxt { entries.Clear(); } List_adp entries = List_adp_.New(); PerfLogTmr tmr = PerfLogTmr.new_(); Io_url url = Io_url_.Empty; - public static final PerfLogMgr_fxt Instance = new PerfLogMgr_fxt(); PerfLogMgr_fxt() {} + public static final PerfLogMgr_fxt Instance = new PerfLogMgr_fxt(); PerfLogMgr_fxt() {} class PerfLogItm { public String To_str() { String secondsStr = Time_span_.To_str(milliseconds, Time_span_.Fmt_Default); diff --git a/100_core/src/gplx/core/threads/Thread_adp_.java b/100_core/src/gplx/core/threads/Thread_adp_.java index 49197038a..8e3982d79 100644 --- a/100_core/src/gplx/core/threads/Thread_adp_.java +++ b/100_core/src/gplx/core/threads/Thread_adp_.java @@ -40,5 +40,5 @@ public class Thread_adp_ { rv.Thread__start(); return rv; } - public static final String Name_null = null; + public static final String Name_null = null; } diff --git a/100_core/src/gplx/core/threads/Thread_adp_mgr.java b/100_core/src/gplx/core/threads/Thread_adp_mgr.java index 2c3e0ff00..48727157f 100644 --- a/100_core/src/gplx/core/threads/Thread_adp_mgr.java +++ b/100_core/src/gplx/core/threads/Thread_adp_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads; import gplx.*; import gplx.core.*; public class Thread_adp_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); - private final int sleep_time, quit_time; + private final Ordered_hash hash = Ordered_hash_.New(); + private final int sleep_time, quit_time; public Thread_adp_mgr(int sleep_time, int quit_time) {this.sleep_time = sleep_time; this.quit_time = quit_time;} public void Add(String key, Thread_adp thread) { Thread_halt_itm itm = null; @@ -54,6 +54,6 @@ public class Thread_adp_mgr { } class Thread_halt_itm { public Thread_halt_itm(String key, Thread_adp thread) {this.Key = key; this.Thread = thread;} - public final String Key; - public final Thread_adp Thread; + public final String Key; + public final Thread_adp Thread; } diff --git a/100_core/src/gplx/core/threads/Thread_halt_cbk_.java b/100_core/src/gplx/core/threads/Thread_halt_cbk_.java index 127488859..8a4a2c347 100644 --- a/100_core/src/gplx/core/threads/Thread_halt_cbk_.java +++ b/100_core/src/gplx/core/threads/Thread_halt_cbk_.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.threads; import gplx.*; import gplx.core.*; -public class Thread_halt_cbk_ { - public static final Thread_halt_cbk Noop = new Thread_halt_cbk_noop(); -} -class Thread_halt_cbk_noop implements Thread_halt_cbk { - public void Thread__on_halt(boolean interrupted) {} -} +package gplx.core.threads; import gplx.*; import gplx.core.*; +public class Thread_halt_cbk_ { + public static final Thread_halt_cbk Noop = new Thread_halt_cbk_noop(); +} +class Thread_halt_cbk_noop implements Thread_halt_cbk { + public void Thread__on_halt(boolean interrupted) {} +} diff --git a/100_core/src/gplx/core/threads/Thread_halt_wkr.java b/100_core/src/gplx/core/threads/Thread_halt_wkr.java index 4f01af931..334559879 100644 --- a/100_core/src/gplx/core/threads/Thread_halt_wkr.java +++ b/100_core/src/gplx/core/threads/Thread_halt_wkr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads; import gplx.*; import gplx.core.*; class Thread_halt_wkr implements Gfo_invk { - private final Thread_adp_mgr mgr; - private final Thread_adp thread; private final String thread_key; private final Thread_halt_cbk cbk; - private final long bgn_time; - private final int sleep_time, quit_time; + private final Thread_adp_mgr mgr; + private final Thread_adp thread; private final String thread_key; private final Thread_halt_cbk cbk; + private final long bgn_time; + private final int sleep_time, quit_time; public Thread_halt_wkr(Thread_adp_mgr mgr, Thread_halt_itm itm, Thread_halt_cbk cbk, int sleep_time, int quit_time) { this.mgr = mgr; this.thread = itm.Thread; this.thread_key = itm.Key; this.cbk = cbk; this.sleep_time = sleep_time; this.quit_time = quit_time; diff --git a/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr.java b/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr.java index 1a5adb980..cb7bd4750 100644 --- a/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr.java +++ b/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads.poolables; import gplx.*; import gplx.core.*; import gplx.core.threads.*; import gplx.core.memorys.*; public class Gfo_poolable_mgr implements Gfo_memory_itm { - private final Object thread_lock = new Object(); - private final Gfo_poolable_itm prototype; private final Object[] make_args; + private final Object thread_lock = new Object(); + private final Gfo_poolable_itm prototype; private final Object[] make_args; private Gfo_poolable_itm[] pool; private int pool_nxt, pool_len; public Gfo_poolable_mgr(Gfo_poolable_itm prototype, Object[] make_args, int init_pool_len, int pool_max) {// NOTE: random IndexOutOfBounds errors in Get around free_ary[--free_len] with free_len being -1; put member variable initialization within thread_lock to try to avoid; DATE:2014-09-21 this.prototype = prototype; this.make_args = make_args; diff --git a/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr_tst.java b/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr_tst.java index 5bd776e95..8ae0d4339 100644 --- a/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr_tst.java +++ b/100_core/src/gplx/core/threads/poolables/Gfo_poolable_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.threads.poolables; import gplx.*; import gplx.core.*; import gplx.core.threads.*; import org.junit.*; public class Gfo_poolable_mgr_tst { - private final Gfo_poolable_mgr_tstr tstr = new Gfo_poolable_mgr_tstr(); + private final Gfo_poolable_mgr_tstr tstr = new Gfo_poolable_mgr_tstr(); @Before public void init() {tstr.Clear();} @Test public void Get__one() { tstr.Test__get(0); @@ -59,7 +59,7 @@ public class Gfo_poolable_mgr_tst { } } class Gfo_poolable_mgr_tstr { - private final Gfo_poolable_mgr mgr = new Gfo_poolable_mgr(new Sample_poolable_itm(null, -1, Object_.Ary_empty), Object_.Ary("make"), 2, 8); + private final Gfo_poolable_mgr mgr = new Gfo_poolable_mgr(new Sample_poolable_itm(null, -1, Object_.Ary_empty), Object_.Ary("make"), 2, 8); public void Clear() {mgr.Clear_fast();} public void Test__get(int expd_idx) { Sample_poolable_itm actl_itm = (Sample_poolable_itm)mgr.Get_fast(); @@ -74,8 +74,8 @@ class Gfo_poolable_mgr_tstr { class Sample_poolable_itm implements Gfo_poolable_itm { private Gfo_poolable_mgr pool_mgr; public Sample_poolable_itm(Gfo_poolable_mgr pool_mgr, int pool_idx, Object[] make_args) {this.pool_mgr = pool_mgr; this.pool_idx = pool_idx; this.pool__make_args = make_args;} - public int Pool__idx() {return pool_idx;} private final int pool_idx; - public Object[] Pool__make_args() {return pool__make_args;} private final Object[] pool__make_args; + public int Pool__idx() {return pool_idx;} private final int pool_idx; + public Object[] Pool__make_args() {return pool__make_args;} private final Object[] pool__make_args; public void Pool__rls() {pool_mgr.Rls_safe(pool_idx);} public Gfo_poolable_itm Pool__make (Gfo_poolable_mgr mgr, int idx, Object[] args) {return new Sample_poolable_itm(pool_mgr, idx, args);} } diff --git a/100_core/src/gplx/core/threads/utils/Gfo_blocking_queue.java b/100_core/src/gplx/core/threads/utils/Gfo_blocking_queue.java index 873659c38..e8ad521a9 100644 --- a/100_core/src/gplx/core/threads/utils/Gfo_blocking_queue.java +++ b/100_core/src/gplx/core/threads/utils/Gfo_blocking_queue.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads.utils; import gplx.*; import gplx.core.*; import gplx.core.threads.*; import java.util.concurrent.ArrayBlockingQueue; public class Gfo_blocking_queue { @@ -21,7 +21,7 @@ public class Gfo_blocking_queue { this.capacity = capacity; this.queue = new ArrayBlockingQueue(capacity); } - public int Capacity() {return capacity;} private final int capacity; + public int Capacity() {return capacity;} private final int capacity; public void Put(Object o) { try {queue.put(o);} catch (InterruptedException e) {throw Err_.new_exc(e, "threads", "put interrupted");} diff --git a/100_core/src/gplx/core/type_xtns/BoolClassXtn.java b/100_core/src/gplx/core/type_xtns/BoolClassXtn.java index 955044f10..89490689f 100644 --- a/100_core/src/gplx/core/type_xtns/BoolClassXtn.java +++ b/100_core/src/gplx/core/type_xtns/BoolClassXtn.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.type_xtns; import gplx.*; import gplx.core.*; public class BoolClassXtn extends ClassXtn_base implements ClassXtn { - public static final String Key_const = "bo" + "ol"; + public static final String Key_const = "bo" + "ol"; public String Key() {return Key_const;} @Override public Class UnderClass() {return boolean.class;} public Object DefaultValue() {return false;} @@ -35,5 +35,5 @@ public class BoolClassXtn extends ClassXtn_base implements ClassXtn { throw Err_.new_parse_type(boolean.class, raw); } @Override public Object XtoDb(Object obj) {return obj;} - public static final BoolClassXtn Instance = new BoolClassXtn(); BoolClassXtn() {} // added to ClassXtnPool by default + public static final BoolClassXtn Instance = new BoolClassXtn(); BoolClassXtn() {} // added to ClassXtnPool by default } \ No newline at end of file diff --git a/100_core/src/gplx/core/type_xtns/ByteClassXtn.java b/100_core/src/gplx/core/type_xtns/ByteClassXtn.java index eb933c26b..50ea54a57 100644 --- a/100_core/src/gplx/core/type_xtns/ByteClassXtn.java +++ b/100_core/src/gplx/core/type_xtns/ByteClassXtn.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.type_xtns; import gplx.*; import gplx.core.*; -public class ByteClassXtn extends ClassXtn_base implements ClassXtn { - public static final String Key_const = "byte"; - public String Key() {return Key_const;} - @Override public Class UnderClass() {return byte.class;} - public Object DefaultValue() {return 0;} - public boolean Eq(Object lhs, Object rhs) {try {return Byte_.Cast(lhs) == Byte_.Cast(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} - @Override public Object ParseOrNull(String raw) {return raw == null ? (Object)null : Byte_.Parse(raw);} - @Override public Object XtoDb(Object obj) {return Byte_.Cast(obj);} - public static final ByteClassXtn Instance = new ByteClassXtn(); ByteClassXtn() {} // added to ClassXtnPool by default +package gplx.core.type_xtns; import gplx.*; import gplx.core.*; +public class ByteClassXtn extends ClassXtn_base implements ClassXtn { + public static final String Key_const = "byte"; + public String Key() {return Key_const;} + @Override public Class UnderClass() {return byte.class;} + public Object DefaultValue() {return 0;} + public boolean Eq(Object lhs, Object rhs) {try {return Byte_.Cast(lhs) == Byte_.Cast(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} + @Override public Object ParseOrNull(String raw) {return raw == null ? (Object)null : Byte_.Parse(raw);} + @Override public Object XtoDb(Object obj) {return Byte_.Cast(obj);} + public static final ByteClassXtn Instance = new ByteClassXtn(); ByteClassXtn() {} // added to ClassXtnPool by default } \ No newline at end of file diff --git a/100_core/src/gplx/core/type_xtns/ClassXtn_base.java b/100_core/src/gplx/core/type_xtns/ClassXtn_base.java index 0aaf79e4f..025a2e975 100644 --- a/100_core/src/gplx/core/type_xtns/ClassXtn_base.java +++ b/100_core/src/gplx/core/type_xtns/ClassXtn_base.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.type_xtns; import gplx.*; import gplx.core.*; -public abstract class ClassXtn_base { - public abstract Class UnderClass(); - public abstract Object ParseOrNull(String raw); - @gplx.Virtual public Object XtoDb(Object obj) {return obj;} - @gplx.Virtual public String XtoUi(Object obj, String fmt) {return Object_.Xto_str_strict_or_null_mark(obj);} - @gplx.Virtual public boolean MatchesClass(Object obj) {if (obj == null) throw Err_.new_null(); - return Type_.Eq_by_obj(obj, UnderClass()); - } - @gplx.Virtual public int compareTo(Object lhs, Object rhs) {return CompareAble_.Compare_obj(lhs, rhs);} -} +package gplx.core.type_xtns; import gplx.*; import gplx.core.*; +public abstract class ClassXtn_base { + public abstract Class UnderClass(); + public abstract Object ParseOrNull(String raw); + public Object XtoDb(Object obj) {return obj;} + public String XtoUi(Object obj, String fmt) {return Object_.Xto_str_strict_or_null_mark(obj);} + public boolean MatchesClass(Object obj) {if (obj == null) throw Err_.new_null(); + return Type_.Eq_by_obj(obj, UnderClass()); + } + public int compareTo(Object lhs, Object rhs) {return CompareAble_.Compare_obj(lhs, rhs);} +} diff --git a/100_core/src/gplx/core/type_xtns/IntClassXtn.java b/100_core/src/gplx/core/type_xtns/IntClassXtn.java index ecc007ba2..28e48c91d 100644 --- a/100_core/src/gplx/core/type_xtns/IntClassXtn.java +++ b/100_core/src/gplx/core/type_xtns/IntClassXtn.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.type_xtns; import gplx.*; import gplx.core.*; -public class IntClassXtn extends ClassXtn_base implements ClassXtn { - public String Key() {return Key_const;} public static final String Key_const = "int"; - @Override public Class UnderClass() {return Integer.class;} - public Object DefaultValue() {return 0;} - @Override public Object ParseOrNull(String raw) {return raw == null ? (Object)null : Int_.Parse(raw);} - public boolean Eq(Object lhs, Object rhs) {try {return Int_.Cast(lhs) == Int_.Cast(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} - @Override public Object XtoDb(Object obj) {return Int_.Cast(obj);} // necessary for enums - - public static final IntClassXtn Instance = new IntClassXtn(); IntClassXtn() {} // added to ClassXtnPool by default -} +package gplx.core.type_xtns; import gplx.*; import gplx.core.*; +public class IntClassXtn extends ClassXtn_base implements ClassXtn { + public String Key() {return Key_const;} public static final String Key_const = "int"; + @Override public Class UnderClass() {return Integer.class;} + public Object DefaultValue() {return 0;} + @Override public Object ParseOrNull(String raw) {return raw == null ? (Object)null : Int_.Parse(raw);} + public boolean Eq(Object lhs, Object rhs) {try {return Int_.Cast(lhs) == Int_.Cast(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} + @Override public Object XtoDb(Object obj) {return Int_.Cast(obj);} // necessary for enums + + public static final IntClassXtn Instance = new IntClassXtn(); IntClassXtn() {} // added to ClassXtnPool by default +} diff --git a/100_core/src/gplx/core/type_xtns/TimeSpanAdpClassXtn.java b/100_core/src/gplx/core/type_xtns/TimeSpanAdpClassXtn.java index 4b7e6e9b7..b1d662e57 100644 --- a/100_core/src/gplx/core/type_xtns/TimeSpanAdpClassXtn.java +++ b/100_core/src/gplx/core/type_xtns/TimeSpanAdpClassXtn.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.type_xtns; import gplx.*; import gplx.core.*; -public class TimeSpanAdpClassXtn extends ClassXtn_base implements ClassXtn { - public String Key() {return Key_const;} public static final String Key_const = "timeSpan"; - @Override public Class UnderClass() {return Time_span.class;} - public Object DefaultValue() {return Time_span_.Zero;} - @Override public Object ParseOrNull(String raw) {return Time_span_.parse(raw);} - @Override public Object XtoDb(Object obj) {return Time_span_.cast(obj).Total_secs();} - @Override public String XtoUi(Object obj, String fmt) {return Time_span_.cast(obj).To_str(fmt);} - public boolean Eq(Object lhs, Object rhs) {try {return Time_span_.cast(lhs).Eq(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} - public static final TimeSpanAdpClassXtn Instance = new TimeSpanAdpClassXtn(); TimeSpanAdpClassXtn() {} // added to ClassXtnPool by default +package gplx.core.type_xtns; import gplx.*; import gplx.core.*; +public class TimeSpanAdpClassXtn extends ClassXtn_base implements ClassXtn { + public String Key() {return Key_const;} public static final String Key_const = "timeSpan"; + @Override public Class UnderClass() {return Time_span.class;} + public Object DefaultValue() {return Time_span_.Zero;} + @Override public Object ParseOrNull(String raw) {return Time_span_.parse(raw);} + @Override public Object XtoDb(Object obj) {return Time_span_.cast(obj).Total_secs();} + @Override public String XtoUi(Object obj, String fmt) {return Time_span_.cast(obj).To_str(fmt);} + public boolean Eq(Object lhs, Object rhs) {try {return Time_span_.cast(lhs).Eq(rhs);} catch (Exception e) {Err_.Noop(e); return false;}} + public static final TimeSpanAdpClassXtn Instance = new TimeSpanAdpClassXtn(); TimeSpanAdpClassXtn() {} // added to ClassXtnPool by default } \ No newline at end of file diff --git a/100_core/src/gplx/langs/dsvs/DsvDataRdr_.java b/100_core/src/gplx/langs/dsvs/DsvDataRdr_.java index fb135f222..8f626a597 100644 --- a/100_core/src/gplx/langs/dsvs/DsvDataRdr_.java +++ b/100_core/src/gplx/langs/dsvs/DsvDataRdr_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; import gplx.core.strings.*; import gplx.core.gfo_ndes.*; import gplx.core.stores.*; import gplx.core.type_xtns.*; import gplx.core.texts.*; /*CharStream*/ -public class DsvDataRdr_ { +public class DsvDataRdr_ { public static DataRdr dsv_(String text) {return DsvParser.dsv_().ParseAsRdr(text);} public static DataRdr csv_hdr_(String text) {return csv_opts_(text, DsvDataRdrOpts.new_().HasHeader_(true));} public static DataRdr csv_dat_(String text) {return csv_opts_(text, DsvDataRdrOpts.new_());} @@ -30,7 +30,7 @@ public class DsvDataRdr_ { return csvTable.Subs(); } } -class DsvParser { +class DsvParser { @gplx.Internal protected DsvSymbols Symbols() {return sym;} DsvSymbols sym = DsvSymbols.default_(); @gplx.Internal protected void Init() {sb.Clear(); bldr.Init(); qteOn = false;} @gplx.Internal protected DataRdr ParseAsRdr(String raw) {return GfoNdeRdr_.root_(ParseAsNde(raw), csvOn);} // NOTE: csvOn means parse; assume manual typed flds not passed in (ex: id,Int) @@ -144,10 +144,10 @@ class DsvParser { rv.bldr.MakeFldNames(names); rv.bldr.MakeFldTypes(types); return rv; } - static final int ValType_Data = 0, ValType_CmdName = 1; - static final int LineType_Data = 0, LineType_Comment = 1, LineType_TblBgn = 2, LineType_FldNames = 3, LineType_FldTypes = 4, LineType_BlankLine = 5; + static final int ValType_Data = 0, ValType_CmdName = 1; + static final int LineType_Data = 0, LineType_Comment = 1, LineType_TblBgn = 2, LineType_FldNames = 3, LineType_FldTypes = 4, LineType_BlankLine = 5; } -class DsvTblBldr { +class DsvTblBldr { public void Init() { root = GfoNde_.root_(); tbl = GfoNde_.tbl_(NullTblName, GfoFldList_.new_()); fldNames.Clear(); fldTypes.Clear(); @@ -241,6 +241,6 @@ class DsvTblBldr { List_adp fldNames = List_adp_.New(); List_adp fldTypes = List_adp_.New(); int stage = Stage_Init; public static DsvTblBldr new_() {return new DsvTblBldr();} DsvTblBldr() {this.Init();} - @gplx.Internal protected static final String NullTblName = ""; - static final int Stage_Init = 0, Stage_Hdr = 1, Stage_Row = 2; + @gplx.Internal protected static final String NullTblName = ""; + static final int Stage_Init = 0, Stage_Hdr = 1, Stage_Row = 2; } diff --git a/100_core/src/gplx/langs/dsvs/DsvDataRdr_csv_dat_tst.java b/100_core/src/gplx/langs/dsvs/DsvDataRdr_csv_dat_tst.java index f4558b296..8b7b50a0b 100644 --- a/100_core/src/gplx/langs/dsvs/DsvDataRdr_csv_dat_tst.java +++ b/100_core/src/gplx/langs/dsvs/DsvDataRdr_csv_dat_tst.java @@ -210,5 +210,5 @@ class DsvDataRdr_fxt { return this; } public static DsvDataRdr_fxt new_() {return new DsvDataRdr_fxt();} - static final int TblIdx0 = 0; + static final int TblIdx0 = 0; } diff --git a/100_core/src/gplx/langs/dsvs/DsvHeaderList.java b/100_core/src/gplx/langs/dsvs/DsvHeaderList.java index c06f6be00..c63f079ea 100644 --- a/100_core/src/gplx/langs/dsvs/DsvHeaderList.java +++ b/100_core/src/gplx/langs/dsvs/DsvHeaderList.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public class DsvHeaderList { @gplx.Internal protected int Count() {return list.Count();} @@ -32,7 +32,7 @@ class DsvHeaderItm { public Object Val() {return val;} Object val; @gplx.Internal protected DsvHeaderItm(int id, Object val) {this.id = id; this.val = val;} - public static final int + public static final int Id_Comment = 1 , Id_TableName = 2 , Id_BlankLine = 3 diff --git a/100_core/src/gplx/langs/gfs/GfsCore.java b/100_core/src/gplx/langs/gfs/GfsCore.java index 11edccad5..beea05855 100644 --- a/100_core/src/gplx/langs/gfs/GfsCore.java +++ b/100_core/src/gplx/langs/gfs/GfsCore.java @@ -82,7 +82,7 @@ public class GfsCore implements Gfo_invk { } else return Gfo_invk_.Rv_unhandled; // return this; - } public static final String Invk_ExecFil = "ExecFil"; - public static final GfsCore Instance = new GfsCore(); + } public static final String Invk_ExecFil = "ExecFil"; + public static final GfsCore Instance = new GfsCore(); @gplx.Internal protected static GfsCore new_() {return new GfsCore();} } diff --git a/100_core/src/gplx/langs/gfs/GfsCore_.java b/100_core/src/gplx/langs/gfs/GfsCore_.java index 221441d28..b0d45ddb9 100644 --- a/100_core/src/gplx/langs/gfs/GfsCore_.java +++ b/100_core/src/gplx/langs/gfs/GfsCore_.java @@ -24,7 +24,7 @@ import gplx.String_; import gplx.Type_; import gplx.UsrDlg_; public class GfsCore_ { - public static final String Arg_primitive = "v"; + public static final String Arg_primitive = "v"; public static Object Exec(GfsCtx ctx, Gfo_invk owner_invk, GfoMsg owner_msg, Object owner_primitive, int depth) { if (owner_msg.Args_count() == 0 && owner_msg.Subs_count() == 0 && String_.Eq(owner_msg.Key(), "")) {UsrDlg_.Instance.Warn("empty msg"); return Gfo_invk_.Rv_unhandled;} if (owner_primitive != null) owner_msg.Parse_(false).Add(GfsCore_.Arg_primitive, owner_primitive); @@ -87,7 +87,7 @@ public class GfsCore_ { // } // else return Gfo_invk_.Rv_unhandled; // return this; -// } public static final String Invk_Add = "Add", Invk_Del = "Del", Invk_Load = "Load"; +// } public static final String Invk_Add = "Add", Invk_Del = "Del", Invk_Load = "Load"; // GfsCore core; GfsRegy regy; // public static GfsRegyMgr new_(GfsCore core, GfsRegy regy) { // GfsRegyMgr rv = new GfsRegyMgr(); diff --git a/100_core/src/gplx/langs/gfs/GfsLibIni_core.java b/100_core/src/gplx/langs/gfs/GfsLibIni_core.java index d03a2a00c..2974ac401 100644 --- a/100_core/src/gplx/langs/gfs/GfsLibIni_core.java +++ b/100_core/src/gplx/langs/gfs/GfsLibIni_core.java @@ -30,5 +30,5 @@ public class GfsLibIni_core implements GfsLibIni { GfoRegy.Instance.Parsers().Add("Io_url", Io_url_.Parser); } - public static final GfsLibIni_core Instance = new GfsLibIni_core(); GfsLibIni_core() {} + public static final GfsLibIni_core Instance = new GfsLibIni_core(); GfsLibIni_core() {} } diff --git a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_.java b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_.java index a6712ebf1..2a9c72881 100644 --- a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_.java +++ b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls.entitys; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; public class Gfh_entity_ { public static final String Nl_str = " " ; - public static final byte[] + public static final byte[] Lt_bry = Bry_.new_a7("<"), Gt_bry = Bry_.new_a7(">") , Amp_bry = Bry_.new_a7("&"), Quote_bry = Bry_.new_a7(""") , Apos_num_bry = Bry_.new_a7("'") diff --git a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_itm.java b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_itm.java index 281d4b879..31a503e55 100644 --- a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_itm.java +++ b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls.entitys; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; public class Gfh_entity_itm { // TS:immutable public Gfh_entity_itm(byte tid, int char_int, byte[] xml_name_bry) { @@ -22,11 +22,11 @@ public class Gfh_entity_itm { // TS:immutable this.xml_name_bry = xml_name_bry; this.key_name_len = xml_name_bry.length - 2; // 2 for & and ; } - public byte Tid() {return tid;} private final byte tid; - public int Char_int() {return char_int;} private final int char_int; // val; EX: 160 - public byte[] U8_bry() {return u8_bry;} private final byte[] u8_bry; // EX: new byte[] {192, 160}; (C2, A0) - public byte[] Xml_name_bry() {return xml_name_bry;} private final byte[] xml_name_bry; // EX: " " - public int Key_name_len() {return key_name_len;} private final int key_name_len; // EX: "nbsp".Len + public byte Tid() {return tid;} private final byte tid; + public int Char_int() {return char_int;} private final int char_int; // val; EX: 160 + public byte[] U8_bry() {return u8_bry;} private final byte[] u8_bry; // EX: new byte[] {192, 160}; (C2, A0) + public byte[] Xml_name_bry() {return xml_name_bry;} private final byte[] xml_name_bry; // EX: " " + public int Key_name_len() {return key_name_len;} private final int key_name_len; // EX: "nbsp".Len public void Print_ncr(Bry_bfr bfr) { switch (char_int) { @@ -49,7 +49,7 @@ public class Gfh_entity_itm { // TS:immutable default: bfr.Add(u8_bry); break; // write literal; EX: "[" not "[" } } - private static final byte[] Escape_bgn = Bry_.new_a7("&#"); + private static final byte[] Escape_bgn = Bry_.new_a7("&#"); public static final byte Tid_name_std = 1, Tid_name_xowa = 2, Tid_num_hex = 3, Tid_num_dec = 4; public static final int Char_int_null = -1; } diff --git a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_trie.java b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_trie.java index 142c31541..5a51fc48f 100644 --- a/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_trie.java +++ b/100_core/src/gplx/langs/htmls/entitys/Gfh_entity_trie.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls.entitys; import gplx.*; import gplx.langs.*; import gplx.langs.htmls.*; import gplx.core.btries.*; public class Gfh_entity_trie { // TS - public static final String // NOTE: top_define; entities needed for escaping + public static final String // NOTE: top_define; entities needed for escaping Str__xowa_lt = "&xowa_lt;" , Str__xowa_brack_bgn = "&xowa_brack_bgn;" , Str__xowa_brack_end = "&xowa_brack_end;" @@ -29,7 +29,7 @@ public class Gfh_entity_trie { // TS , Str__xowa_nl = "&xowa_nl;" , Str__xowa_dash = "&xowa_dash;" ; - public static final Btrie_slim_mgr Instance = New(); Gfh_entity_trie() {} + public static final Btrie_slim_mgr Instance = New(); Gfh_entity_trie() {} private static Btrie_slim_mgr New() {// REF.MW: Sanitizer|$wgHtmlEntities; NOTE:added apos Btrie_slim_mgr rv = Btrie_slim_mgr.cs(); Add_name(rv, Bool_.Y, 60, Str__xowa_lt); diff --git a/100_core/src/gplx/langs/regxs/Regx_adp.java b/100_core/src/gplx/langs/regxs/Regx_adp.java index 25ea38900..af902f13e 100644 --- a/100_core/src/gplx/langs/regxs/Regx_adp.java +++ b/100_core/src/gplx/langs/regxs/Regx_adp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.regxs; import gplx.*; import gplx.langs.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -84,5 +84,5 @@ public class Regx_adp { , FLAG__CANON_EQ = Pattern.CANON_EQ , FLAG__UNICODE_CHARACTER_CLASS = Pattern.UNICODE_CHARACTER_CLASS ; - public static final int FLAG__DEFAULT = FLAG__DOTALL | FLAG__UNICODE_CHARACTER_CLASS;// JRE.7:UNICODE_CHARACTER_CLASS; added during %w fix for en.w:A#; DATE:2015-06-10 + public static final int FLAG__DEFAULT = FLAG__DOTALL | FLAG__UNICODE_CHARACTER_CLASS;// JRE.7:UNICODE_CHARACTER_CLASS; added during %w fix for en.w:A#; DATE:2015-06-10 } diff --git a/100_core/src/gplx/langs/regxs/Regx_group.java b/100_core/src/gplx/langs/regxs/Regx_group.java index d9e001c0c..4c7666730 100644 --- a/100_core/src/gplx/langs/regxs/Regx_group.java +++ b/100_core/src/gplx/langs/regxs/Regx_group.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Regx_group { public Regx_group(boolean rslt, int bgn, int end, String val) { @@ -31,5 +31,5 @@ public class Regx_group { this.end = end; this.val = val; } - public static final Regx_group[] Ary_empty = new Regx_group[0]; + public static final Regx_group[] Ary_empty = new Regx_group[0]; } diff --git a/100_core/src/gplx/langs/regxs/Regx_match.java b/100_core/src/gplx/langs/regxs/Regx_match.java index 7df9e55f0..c49371916 100644 --- a/100_core/src/gplx/langs/regxs/Regx_match.java +++ b/100_core/src/gplx/langs/regxs/Regx_match.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.regxs; import gplx.*; import gplx.langs.*; public class Regx_match { public Regx_match(boolean rslt, int find_bgn, int find_end, Regx_group[] groups) { @@ -21,13 +21,13 @@ public class Regx_match { this.find_end = find_end; this.groups = groups; } - public boolean Rslt() {return rslt;} private final boolean rslt; + public boolean Rslt() {return rslt;} private final boolean rslt; public boolean Rslt_none() {return !rslt;} // NOTE: was "|| find_end - find_bgn == 0"; DATE:2013-04-11; DATE:2014-09-02 - public int Find_bgn() {return find_bgn;} private final int find_bgn; - public int Find_end() {return find_end;} private final int find_end; + public int Find_bgn() {return find_bgn;} private final int find_bgn; + public int Find_end() {return find_end;} private final int find_end; public int Find_len() {return find_end - find_bgn;} public String Find_str(String s) {return String_.Mid(s, find_bgn, find_end);} - public Regx_group[] Groups() {return groups;} private final Regx_group[] groups; + public Regx_group[] Groups() {return groups;} private final Regx_group[] groups; - public static final Regx_match[] Ary_empty = new Regx_match[0]; + public static final Regx_match[] Ary_empty = new Regx_match[0]; } diff --git a/100_core/src/gplx/langs/xmls/Xpath_.java b/100_core/src/gplx/langs/xmls/Xpath_.java index 6971175ed..616d1df59 100644 --- a/100_core/src/gplx/langs/xmls/Xpath_.java +++ b/100_core/src/gplx/langs/xmls/Xpath_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.xmls; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; public class Xpath_ { @@ -54,7 +54,7 @@ public class Xpath_ { TraverseSubs(sub, parts, depth + 1, results, args); } } - public static final String InnetTextKey = "&innerText"; + public static final String InnetTextKey = "&innerText"; public static Keyval_hash ExtractKeyVals(String xml, Int_obj_ref posRef, String nodeName) { int pos = posRef.Val(); Err xmlErr = Err_.new_wo_type("error parsing xml", "xml", xml, "pos", pos); diff --git a/100_core/tst/gplx/core/ios/IoEngine_dir_basic_base_tst.java b/100_core/tst/gplx/core/ios/IoEngine_dir_basic_base_tst.java index a8142c6ba..1ece9876b 100644 --- a/100_core/tst/gplx/core/ios/IoEngine_dir_basic_base_tst.java +++ b/100_core/tst/gplx/core/ios/IoEngine_dir_basic_base_tst.java @@ -23,7 +23,7 @@ public abstract class IoEngine_dir_basic_base_tst { } protected IoEngine engine; @gplx.Internal protected IoEngineFxt fx; protected Io_url fil, root; protected abstract IoEngine engine_(); protected abstract void setup_hook(); - @Test @gplx.Virtual public void CreateDir() { + @Test public void CreateDir() { fx.tst_ExistsPaths(false, root); engine.CreateDir(root); @@ -51,7 +51,7 @@ public abstract class IoEngine_dir_basic_base_tst { @Test public void DeleteDir_missing_pass() { engine.DeleteDir(root); } - @Test @gplx.Virtual public void ScanDir() { + @Test public void ScanDir() { Io_url fil = root.GenSubFil("fil1.txt"); fx.run_SaveFilText(fil, "test"); Io_url dir1 = root.GenSubDir_nest("dir1"); engine.CreateDir(dir1); Io_url dir1_1 = dir1.GenSubDir_nest("dir1_1"); engine.CreateDir(dir1_1); // NOTE: QueryDir should not recurse by default; dir1_1 should not be returned below @@ -66,7 +66,7 @@ public abstract class IoEngine_dir_basic_base_tst { engine.MoveDir(src, trg); fx.tst_ExistsPaths(false, src); fx.tst_ExistsPaths(true, trg); } - @Test @gplx.Virtual public void CopyDir() { + @Test public void CopyDir() { Io_url src = root.GenSubDir_nest("src"), trg = root.GenSubDir_nest("trg"); engine.CreateDir(src); fx.tst_ExistsPaths(true, src); fx.tst_ExistsPaths(false, trg); diff --git a/100_core/tst/gplx/core/ios/IoEngine_dir_deep_base_tst.java b/100_core/tst/gplx/core/ios/IoEngine_dir_deep_base_tst.java index 5a4000b94..c753ccad4 100644 --- a/100_core/tst/gplx/core/ios/IoEngine_dir_deep_base_tst.java +++ b/100_core/tst/gplx/core/ios/IoEngine_dir_deep_base_tst.java @@ -25,26 +25,26 @@ public abstract class IoEngine_dir_deep_base_tst { } protected IoEngine engine; protected Io_url fil, root; @gplx.Internal protected IoEngineFxt fx; protected abstract IoEngine engine_(); protected abstract void setup_hook(); - @Test @gplx.Virtual public void SearchDir() { + @Test public void SearchDir() { Io_url[] expd = paths_(src_dir0a, src_fil0a, src_dir0a_dir0a, src_dir0a_fil0a); Io_url[] actl = IoEngine_xrg_queryDir.new_(src).Recur_().DirInclude_().ExecAsUrlAry(); Tfds.Eq_ary(expd, actl); } - @Test @gplx.Virtual public void MoveDirDeep() { + @Test public void MoveDirDeep() { fx.tst_ExistsPaths(true, srcTree); fx.tst_ExistsPaths(false, trgTree); engine.MoveDirDeep(IoEngine_xrg_xferDir.move_(src, trg).Recur_()); fx.tst_ExistsPaths(false, srcTree); fx.tst_ExistsPaths(true, trgTree); } - @Test @gplx.Virtual public void CopyDir() { + @Test public void CopyDir() { fx.tst_ExistsPaths(true, srcTree); fx.tst_ExistsPaths(false, trgTree); engine.CopyDir(src, trg); fx.tst_ExistsPaths(true, srcTree); fx.tst_ExistsPaths(true, trgTree); } - @Test @gplx.Virtual public void DeleteDir() { + @Test public void DeleteDir() { fx.tst_ExistsPaths(true, srcTree); engine.DeleteDirDeep(IoEngine_xrg_deleteDir.new_(src).Recur_()); diff --git a/100_core/tst/gplx/core/ios/IoEngine_fil_basic_base_tst.java b/100_core/tst/gplx/core/ios/IoEngine_fil_basic_base_tst.java index 9285ed075..c51efb7d6 100644 --- a/100_core/tst/gplx/core/ios/IoEngine_fil_basic_base_tst.java +++ b/100_core/tst/gplx/core/ios/IoEngine_fil_basic_base_tst.java @@ -23,39 +23,39 @@ public abstract class IoEngine_fil_basic_base_tst { } protected IoEngine engine; protected IoEngineFxt fx; protected Io_url fil, root; protected abstract IoEngine engine_(); protected abstract void setup_hook(); - @Test @gplx.Virtual public void ExistsFil() { + @Test public void ExistsFil() { fx.tst_ExistsPaths(false, fil); } - @Test @gplx.Virtual public void ExistsFil_deep() { + @Test public void ExistsFil_deep() { fx.tst_ExistsPaths(false, root.GenSubFil_nest("dir1", "dir2", "fil1.txt")); } - @Test @gplx.Virtual public void SaveFilStr() { + @Test public void SaveFilStr() { fx.tst_ExistsPaths(false, fil, fil.OwnerDir()); fx.run_SaveFilText(fil, "text"); fx.tst_ExistsPaths(true, fil, fil.OwnerDir()); } - @Test @gplx.Virtual public void SaveFilText_autoCreateOwnerDir() { + @Test public void SaveFilText_autoCreateOwnerDir() { fil = fil.OwnerDir().GenSubFil_nest("sub1", "fil1.txt"); fx.tst_ExistsPaths(false, fil, fil.OwnerDir()); fx.run_SaveFilText(fil, "text"); fx.tst_ExistsPaths(true, fil, fil.OwnerDir()); } - @Test @gplx.Virtual public void SaveFilText_overwrite() { + @Test public void SaveFilText_overwrite() { fx.run_SaveFilText(fil, "text"); fx.tst_ExistsPaths(true, fil); fx.run_SaveFilText(fil, "changed"); fx.tst_LoadFilStr(fil, "changed"); } - @Test @gplx.Virtual public void SaveFilText_append() { + @Test public void SaveFilText_append() { fx.run_SaveFilText(fil, "text"); engine.SaveFilText_api(IoEngine_xrg_saveFilStr.new_(fil, "appended").Append_()); fx.tst_LoadFilStr(fil, "text" + "appended"); } - @Test @gplx.Virtual public void SaveFilText_caseInsensitive() { + @Test public void SaveFilText_caseInsensitive() { if (root.Info().CaseSensitive()) return; Io_url lcase = root.GenSubFil_nest("dir", "fil.txt"); Io_url ucase = root.GenSubFil_nest("DIR", "FIL.TXT"); @@ -65,7 +65,7 @@ public abstract class IoEngine_fil_basic_base_tst { fx.tst_LoadFilStr(lcase, "text"); fx.tst_LoadFilStr(ucase, "text"); } - @Test @gplx.Virtual public void SaveFilText_readOnlyFails() { + @Test public void SaveFilText_readOnlyFails() { fx.run_SaveFilText(fil, "text"); engine.UpdateFilAttrib(fil, IoItmAttrib.readOnly_()); @@ -77,34 +77,34 @@ public abstract class IoEngine_fil_basic_base_tst { } Tfds.Fail_expdError(); } - @Test @gplx.Virtual public void LoadFilStr() { + @Test public void LoadFilStr() { fx.run_SaveFilText(fil, "text"); fx.tst_LoadFilStr(fil, "text"); } - @Test @gplx.Virtual public void LoadFilStr_missingIgnored() { + @Test public void LoadFilStr_missingIgnored() { Tfds.Eq("", engine.LoadFilStr(IoEngine_xrg_loadFilStr.new_(fil).MissingIgnored_())); } - @Test @gplx.Virtual public void UpdateFilAttrib() { + @Test public void UpdateFilAttrib() { fx.run_SaveFilText(fil, "text"); fx.tst_QueryFilReadOnly(fil, false); engine.UpdateFilAttrib(fil, IoItmAttrib.readOnly_()); fx.tst_QueryFilReadOnly(fil, true); } - @Test @gplx.Virtual public void DeleteFil() { + @Test public void DeleteFil() { fx.run_SaveFilText(fil, "text"); fx.tst_ExistsPaths(true, fil); engine.DeleteFil_api(IoEngine_xrg_deleteFil.new_(fil)); fx.tst_ExistsPaths(false, fil); } - @Test @gplx.Virtual public void DeleteFil_missing_pass() { + @Test public void DeleteFil_missing_pass() { fil = root.GenSubFil("fileThatDoesntExist.txt"); engine.DeleteFil_api(IoEngine_xrg_deleteFil.new_(fil).MissingFails_off()); fx.tst_ExistsPaths(false, fil); } - @Test @gplx.Virtual public void DeleteFil_readOnly_fail() { + @Test public void DeleteFil_readOnly_fail() { fx.run_SaveFilText(fil, "text"); engine.UpdateFilAttrib(fil, IoItmAttrib.readOnly_()); @@ -115,26 +115,26 @@ public abstract class IoEngine_fil_basic_base_tst { } Tfds.Fail_expdError(); } - @Test @gplx.Virtual public void DeleteFil_readOnly_pass() { + @Test public void DeleteFil_readOnly_pass() { fx.run_SaveFilText(fil, "text"); engine.UpdateFilAttrib(fil, IoItmAttrib.readOnly_()); engine.DeleteFil_api(IoEngine_xrg_deleteFil.new_(fil).ReadOnlyFails_off()); fx.tst_ExistsPaths(false, fil); } - @Test @gplx.Virtual public void QueryFil_size() { + @Test public void QueryFil_size() { fx.run_SaveFilText(fil, "text"); fx.tst_QueryFil_size(fil, String_.Len("text")); } - @Test @gplx.Virtual public void UpdateFilModifiedTime() { + @Test public void UpdateFilModifiedTime() { fx.run_SaveFilText(fil, "text"); DateAdp time = Datetime_now.Dflt_add_min_(10); engine.UpdateFilModifiedTime(fil, time); fx.tst_QueryFil_modifiedTime(fil, time); } - @Test @gplx.Virtual public void OpenStreamRead() { + @Test public void OpenStreamRead() { fx.run_SaveFilText(fil, "text"); int textLen = String_.Len("text"); @@ -148,7 +148,7 @@ public abstract class IoEngine_fil_basic_base_tst { String actl = String_.new_u8(buffer); Tfds.Eq("text", actl); } - @Test @gplx.Virtual public void OpenStreamWrite() { + @Test public void OpenStreamWrite() { IoStream stream = IoEngine_xrg_openWrite.new_(fil).Exec(); byte[] buffer = Bry_.new_u8("text"); int textLen = String_.Len("text"); diff --git a/100_core/tst/gplx/core/ios/IoEngine_fil_basic_system_tst.java b/100_core/tst/gplx/core/ios/IoEngine_fil_basic_system_tst.java index d51e72951..b316e7dd3 100644 --- a/100_core/tst/gplx/core/ios/IoEngine_fil_basic_system_tst.java +++ b/100_core/tst/gplx/core/ios/IoEngine_fil_basic_system_tst.java @@ -27,7 +27,7 @@ public class IoEngine_fil_basic_system_tst extends IoEngine_fil_basic_base_tst { fx.tst_ExistsPaths(true, fil); fx.tst_ExistsPaths(true, fil.OwnerDir().GenSubFil("FIL.txt")); } - @Test @gplx.Virtual public void RecycleFil() { + @Test public void RecycleFil() { fx.run_SaveFilText(fil, "text"); fx.tst_ExistsPaths(true, fil); diff --git a/100_core/tst/gplx/core/ios/IoEngine_fil_xfer_base_tst.java b/100_core/tst/gplx/core/ios/IoEngine_fil_xfer_base_tst.java index 9cdfa6104..376e594e7 100644 --- a/100_core/tst/gplx/core/ios/IoEngine_fil_xfer_base_tst.java +++ b/100_core/tst/gplx/core/ios/IoEngine_fil_xfer_base_tst.java @@ -26,7 +26,7 @@ public abstract class IoEngine_fil_xfer_base_tst { protected abstract IoEngine engine_(); protected abstract void setup_hook(); protected abstract Io_url AltRoot(); - @Test @gplx.Virtual public void CopyFil() { + @Test public void CopyFil() { fx.run_SaveFilText(src, "src"); fx.run_UpdateFilModifiedTime(src, srcModifiedTime); fx.tst_ExistsPaths(true, src); fx.tst_ExistsPaths(false, trg); @@ -36,7 +36,7 @@ public abstract class IoEngine_fil_xfer_base_tst { fx.tst_LoadFilStr(trg, "src"); fx.tst_QueryFil_modifiedTime(trg, srcModifiedTime); } - @Test @gplx.Virtual public void CopyFil_overwrite_fail() { + @Test public void CopyFil_overwrite_fail() { fx.run_SaveFilText(src, "src"); fx.run_SaveFilText(trg, "trg"); @@ -48,7 +48,7 @@ public abstract class IoEngine_fil_xfer_base_tst { } Tfds.Fail_expdError(); } - @Test @gplx.Virtual public void CopyFil_overwrite_pass() { + @Test public void CopyFil_overwrite_pass() { fx.run_SaveFilText(src, "src"); fx.run_UpdateFilModifiedTime(src, srcModifiedTime); fx.run_SaveFilText(trg, "trg"); fx.run_UpdateFilModifiedTime(trg, trgModifiedTime); @@ -57,7 +57,7 @@ public abstract class IoEngine_fil_xfer_base_tst { fx.tst_LoadFilStr(trg, "src"); fx.tst_QueryFil_modifiedTime(trg, srcModifiedTime); } - @Test @gplx.Virtual public void MoveFil() { + @Test public void MoveFil() { fx.run_SaveFilText(src, "src"); fx.tst_ExistsPaths(true, src); fx.tst_ExistsPaths(false, trg); @@ -66,7 +66,7 @@ public abstract class IoEngine_fil_xfer_base_tst { fx.tst_ExistsPaths(false, src); fx.tst_ExistsPaths(true, trg); } - @Test @gplx.Virtual public void MoveFil_overwrite_fail() { + @Test public void MoveFil_overwrite_fail() { fx.run_SaveFilText(src, "src"); fx.run_SaveFilText(trg, "trg"); @@ -79,7 +79,7 @@ public abstract class IoEngine_fil_xfer_base_tst { } Tfds.Fail_expdError(); } - @Test @gplx.Virtual public void MoveFil_overwrite_pass() { + @Test public void MoveFil_overwrite_pass() { fx.run_SaveFilText(src, "src"); fx.run_UpdateFilModifiedTime(src, srcModifiedTime); fx.run_SaveFilText(trg, "trg"); fx.run_UpdateFilModifiedTime(trg, trgModifiedTime); @@ -89,7 +89,7 @@ public abstract class IoEngine_fil_xfer_base_tst { fx.tst_LoadFilStr(trg, "src"); fx.tst_QueryFil_modifiedTime(trg, srcModifiedTime); } - @Test @gplx.Virtual public void MoveFil_betweenDrives() { + @Test public void MoveFil_betweenDrives() { IoEngine_xrg_deleteDir.new_(AltRoot()).Recur_().ReadOnlyFails_off().Exec(); src = root.GenSubFil_nest("dir", "fil1a.txt"); trg = AltRoot().GenSubFil_nest("dir", "fil1b.txt"); diff --git a/110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java b/110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java index e444f0ef2..91e8925ab 100644 --- a/110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java +++ b/110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; import gplx.core.strings.*; import gplx.core.texts.*; /*CharStream*/ -public class GfmlLxr_ { +public class GfmlLxr_ { public static GfmlLxr general_(String key, GfmlTkn protoTkn) {return GfmlLxr_general.new_(key, protoTkn);} public static GfmlLxr solo_(String key, GfmlTkn singletonTkn) {return GfmlLxr_singleton.new_(key, singletonTkn.Raw(), singletonTkn);} public static GfmlLxr range_(String key, String[] ary, GfmlTkn protoTkn, boolean ignoreOutput) {return GfmlLxr_group.new_(key, ary, protoTkn, ignoreOutput);} @@ -26,12 +26,12 @@ public class GfmlLxr_ { return GfmlLxr_.solo_(key, tkn); } @gplx.Internal protected static GfmlLxr frame_(String key, GfmlFrame frame, String bgn, String end) {return GfmlLxr_frame.new_(key, frame, bgn, end, GfmlBldrCmd_pendingTkns_add.Instance, GfmlBldrCmd_frameEnd.data_());} - public static final GfmlLxr Null = new GfmlLxr_null(); - public static final String CmdTknChanged_evt = "Changed"; + public static final GfmlLxr Null = new GfmlLxr_null(); + public static final String CmdTknChanged_evt = "Changed"; public static GfmlLxr as_(Object obj) {return obj instanceof GfmlLxr ? (GfmlLxr)obj : null;} public static GfmlLxr cast(Object obj) {try {return (GfmlLxr)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr.class, obj);}} } -class GfmlLxr_null implements GfmlLxr { +class GfmlLxr_null implements GfmlLxr { public String Key() {return "gfml.nullLxr";} public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;} @@ -41,7 +41,7 @@ class GfmlLxr_null implements GfmlLxr { public void SubLxr_Add(GfmlLxr... lexer) {} public GfmlLxr SubLxr() {return this;} } -class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm { +class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm { public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;} public String Key() {return key;} private String key; @@ -71,7 +71,7 @@ class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm { this.singletonTkn = singletonTkn; } } -class GfmlLxr_group implements GfmlLxr { +class GfmlLxr_group implements GfmlLxr { public String Key() {return key;} private String key; public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;} @@ -104,7 +104,7 @@ class GfmlLxr_group implements GfmlLxr { return rv; } GfmlLxr_group() {} } -class GfmlLxr_general implements GfmlLxr, Gfo_invk { +class GfmlLxr_general implements GfmlLxr, Gfo_invk { public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; public String Key() {return key;} private String key; public GfmlTkn CmdTkn() {return txtTkn;} public void CmdTkn_set(GfmlTkn val) {} GfmlTkn txtTkn; @@ -165,14 +165,14 @@ class GfmlLxr_general implements GfmlLxr, Gfo_invk { return this; } } -class GfmlLxr_general_txtBfr { +class GfmlLxr_general_txtBfr { public int Bgn = NullPos; public int Len; public boolean Has() {return Bgn != NullPos;} public void Add(CharStream stream) { if (Bgn == NullPos) Bgn = stream.Pos(); Len++; - } static final int NullPos = -1; + } static final int NullPos = -1; public GfmlTkn MakeTkn(CharStream stream, GfmlTkn textTkn) { String raw = String_.new_charAry_(stream.Ary(), Bgn, Len); Bgn = -1; Len = 0; diff --git a/110_gfml/src_100_tkn/gplx/gfml/GfmlTkn_.java b/110_gfml/src_100_tkn/gplx/gfml/GfmlTkn_.java index 22c968c88..016ae104a 100644 --- a/110_gfml/src_100_tkn/gplx/gfml/GfmlTkn_.java +++ b/110_gfml/src_100_tkn/gplx/gfml/GfmlTkn_.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; -public class GfmlTkn_ { +public class GfmlTkn_ { @gplx.Internal protected static final String NullRaw = "", NullVal = ""; static final String Type_base = "gfml.baseTkn"; @gplx.Internal protected static final GfmlTkn Null = new GfmlTkn_base().ctor_GfmlTkn_base("gfml.nullTkn", NullRaw, NullVal, GfmlBldrCmd_.Null) @@ -35,23 +35,23 @@ public class GfmlTkn_ { return GfmlTkn_.composite_(tknType, ary); } } -class GfmlTkn_base implements GfmlTkn { +class GfmlTkn_base implements GfmlTkn { public int ObjType() {return GfmlObj_.Type_tkn;} public String TknType() {return tknType;} private String tknType; public String Raw() {return raw;} private String raw; public String Val() {return val;} private String val; public GfmlBldrCmd Cmd_of_Tkn() {return cmd;} GfmlBldrCmd cmd; public GfmlTkn[] SubTkns() {return GfmlTknAry_.Empty;} - @gplx.Virtual public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(tknType, rawNew, valNew, cmd);} + public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(tknType, rawNew, valNew, cmd);} @gplx.Internal protected GfmlTkn_base ctor_GfmlTkn_base(String tknType, String raw, String val, GfmlBldrCmd cmd) {this.tknType = tknType; this.raw = raw; this.val = val; this.cmd = cmd; return this;} } -class GfmlTkn_valConst extends GfmlTkn_base { +class GfmlTkn_valConst extends GfmlTkn_base { @Override public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(this.TknType(), rawNew, this.Val(), this.Cmd_of_Tkn());} } -class GfmlTkn_singleton extends GfmlTkn_base { +class GfmlTkn_singleton extends GfmlTkn_base { @Override public GfmlTkn MakeNew(String rawNew, String valNew) {return this;} } -class GfmlTkn_composite implements GfmlTkn { +class GfmlTkn_composite implements GfmlTkn { public int ObjType() {return GfmlObj_.Type_tkn;} public String TknType() {return tknType;} private String tknType; public String Raw() {return GfmlTknAry_.XtoRaw(ary);} diff --git a/110_gfml/src_300_gdoc/gplx/gfml/GfmlDoc.java b/110_gfml/src_300_gdoc/gplx/gfml/GfmlDoc.java index dfb6a4ac9..104358bbd 100644 --- a/110_gfml/src_300_gdoc/gplx/gfml/GfmlDoc.java +++ b/110_gfml/src_300_gdoc/gplx/gfml/GfmlDoc.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; public class GfmlDoc { public GfmlNde RootNde() {return rootNde;} GfmlNde rootNde; @@ -39,5 +39,5 @@ public class GfmlDoc { // public GfmlTkn BgnBrace() {return bgnBrace;} public GfmlDocEditor BgnBrace_(GfmlTkn v) {bgnBrace = v; return this;} GfmlTkn bgnBrace = GfmlTkn_.new_("{", ""); // public GfmlTkn EndBrace() {return endBrace;} public GfmlDocEditor EndBrace_(GfmlTkn v) {endBrace = v; return this;} GfmlTkn endBrace = GfmlTkn_.new_("}", ""); // public GfmlTkn Hnd() {return hnd;} public GfmlDocEditor Hnd_(GfmlTkn v) {hnd = v; return this;} GfmlTkn hnd = GfmlTkn_.new_(":", ""); -// public static final GfmlDocEditor Instance = new GfmlDocEditor(); GfmlDocEditor() {} +// public static final GfmlDocEditor Instance = new GfmlDocEditor(); GfmlDocEditor() {} // } diff --git a/110_gfml/src_300_gdoc/gplx/gfml/GfmlItmKeys.java b/110_gfml/src_300_gdoc/gplx/gfml/GfmlItmKeys.java index ace024760..8b713dad7 100644 --- a/110_gfml/src_300_gdoc/gplx/gfml/GfmlItmKeys.java +++ b/110_gfml/src_300_gdoc/gplx/gfml/GfmlItmKeys.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; -public class GfmlItmKeys { +public class GfmlItmKeys { public int Count() {return list.Count();} public boolean Has(String key) {return hash.Has(key);} public GfmlItm Get_at(int i) {return (GfmlItm)list.Get_at(i);} @@ -55,5 +55,5 @@ public class GfmlItmKeys { GfmlAtr FetchAtr(String key) {return GfmlAtr.as_(hash.Get_by(key));} List_adp list = List_adp_.New(); Hash_adp hash = Hash_adp_.New(); public static GfmlItmKeys new_() {return new GfmlItmKeys();} GfmlItmKeys() {} - @gplx.Internal protected static final String NullKey = ""; + @gplx.Internal protected static final String NullKey = ""; } diff --git a/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaDefault.java b/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaDefault.java index 4f7ee1e93..4e4f2f93a 100644 --- a/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaDefault.java +++ b/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaDefault.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; class GfmlPragmaDefault implements GfmlPragma { public String KeyOfPragma() {return "_default";} @@ -49,7 +49,7 @@ class GfmlPragmaDefault implements GfmlPragma { return makr.Xto_bry(); } public static GfmlPragmaDefault new_() {return new GfmlPragmaDefault();} GfmlPragmaDefault() {} - public static final GfmlTkn Default_none = GfmlTkn_.raw_("DEFAULT NONE"); + public static final GfmlTkn Default_none = GfmlTkn_.raw_("DEFAULT NONE"); } class GfmlDefaultItem { public String TypeKey() {return typeKey;} private String typeKey; diff --git a/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaType.java b/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaType.java index d5a114ede..5dbbb4df4 100644 --- a/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaType.java +++ b/110_gfml/src_400_pragma/gplx/gfml/GfmlPragmaType.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; import gplx.core.lists.*; class GfmlPragmaType implements GfmlPragma { @@ -45,7 +45,7 @@ class GfmlPragmaType implements GfmlPragma { makr.AddSubFld(GfmlFld.new_(false, "fld", "_type/type/fld")); return makr.Xto_bry(); } - public static final String CacheLog_key = "log:type"; + public static final String CacheLog_key = "log:type"; @gplx.Internal protected static void ExecList(GfmlTypRegy regy, Ordered_hash list, List_adp replaced) { for (Object typeObj : list) { GfmlType type = (GfmlType)typeObj; diff --git a/110_gfml/src_400_pragma/gplx/gfml/GfmlVarCtx.java b/110_gfml/src_400_pragma/gplx/gfml/GfmlVarCtx.java index b3309cdb4..620cffdf1 100644 --- a/110_gfml/src_400_pragma/gplx/gfml/GfmlVarCtx.java +++ b/110_gfml/src_400_pragma/gplx/gfml/GfmlVarCtx.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; -class GfmlVarCtx { +class GfmlVarCtx { public String Key() {return key;} private String key; public void Add_if_dupe_use_nth(GfmlVarItm itm) {hash.Add_if_dupe_use_nth(itm.Key(), itm);} public void Del(String key) {hash.Del(key);} @@ -29,7 +29,7 @@ class GfmlVarCtx { return rv; } } -class GfmlVarCtx_ { +class GfmlVarCtx_ { public static GfmlVarCtx FetchFromCacheOrNew(Hash_adp cache, String ctxKey) { Hash_adp ctxRegy = FetchRegyOrNew(cache); GfmlVarCtx rv = (GfmlVarCtx)ctxRegy.Get_by(ctxKey); @@ -56,5 +56,5 @@ class GfmlVarCtx_ { } return rv; } - public static final String DefaultKey = "gfml.varKeys.default"; + public static final String DefaultKey = "gfml.varKeys.default"; } diff --git a/110_gfml/src_500_build/gplx/gfml/GfmlBldrCmd.java b/110_gfml/src_500_build/gplx/gfml/GfmlBldrCmd.java index 63562e294..3b76d7a4d 100644 --- a/110_gfml/src_500_build/gplx/gfml/GfmlBldrCmd.java +++ b/110_gfml/src_500_build/gplx/gfml/GfmlBldrCmd.java @@ -13,26 +13,26 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfml; import gplx.*; +package gplx.gfml; import gplx.*; public interface GfmlBldrCmd { - String Key(); - void Exec(GfmlBldr bldr, GfmlTkn tkn); -} + String Key(); + void Exec(GfmlBldr bldr, GfmlTkn tkn); +} class GfmlBldrCmd_ { - public static final GfmlBldrCmd Null = new GfmlBldrCmd_null(); -} + public static final GfmlBldrCmd Null = new GfmlBldrCmd_null(); +} class GfmlBldrCmd_null implements GfmlBldrCmd { - public String Key() {return "gfml.nullCmd";} - public void Exec(GfmlBldr bldr, GfmlTkn tkn) {} -} + public String Key() {return "gfml.nullCmd";} + public void Exec(GfmlBldr bldr, GfmlTkn tkn) {} +} class GfmlBldrCmdRegy { - public void Add(GfmlBldrCmd cmd) {hash.Add(cmd.Key(), cmd);} - public GfmlBldrCmd GetOrFail(String key) {return (GfmlBldrCmd)hash.Get_by_or_fail(key);} - Hash_adp hash = Hash_adp_.New(); - public static GfmlBldrCmdRegy new_() { - GfmlBldrCmdRegy rv = new GfmlBldrCmdRegy(); - rv.Add(GfmlBldrCmd_elemKey_set.Instance); - rv.Add(GfmlBldrCmd_dataTkn_set.Instance); - return rv; - } GfmlBldrCmdRegy() {} -} + public void Add(GfmlBldrCmd cmd) {hash.Add(cmd.Key(), cmd);} + public GfmlBldrCmd GetOrFail(String key) {return (GfmlBldrCmd)hash.Get_by_or_fail(key);} + Hash_adp hash = Hash_adp_.New(); + public static GfmlBldrCmdRegy new_() { + GfmlBldrCmdRegy rv = new GfmlBldrCmdRegy(); + rv.Add(GfmlBldrCmd_elemKey_set.Instance); + rv.Add(GfmlBldrCmd_dataTkn_set.Instance); + return rv; + } GfmlBldrCmdRegy() {} +} diff --git a/110_gfml/src_500_build/gplx/gfml/GfmlStringHighlighter.java b/110_gfml/src_500_build/gplx/gfml/GfmlStringHighlighter.java index 5fc75ed70..413b8a0f3 100644 --- a/110_gfml/src_500_build/gplx/gfml/GfmlStringHighlighter.java +++ b/110_gfml/src_500_build/gplx/gfml/GfmlStringHighlighter.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; import gplx.core.strings.*; class GfmlStringHighlighter { @@ -97,5 +97,5 @@ class GfmlStringHighlighterMarker { public int Pos() {return pos;} public GfmlStringHighlighterMarker Pos_(int v) {pos = v; return this;} int pos; public char Sym() {return sym;} public GfmlStringHighlighterMarker Sym_(char v) {sym = v; return this;} char sym; public String Msg() {return msg;} public GfmlStringHighlighterMarker Msg_(String v) {msg = v; return this;} private String msg; - public static final GfmlStringHighlighterMarker Null = new GfmlStringHighlighterMarker().Pos_(-1); + public static final GfmlStringHighlighterMarker Null = new GfmlStringHighlighterMarker().Pos_(-1); } diff --git a/110_gfml/tst/gplx/gfml/ymoks_GfmlAtr_GfmlNde_mok.java b/110_gfml/tst/gplx/gfml/ymoks_GfmlAtr_GfmlNde_mok.java index 531da3f99..fd3f53a26 100644 --- a/110_gfml/tst/gplx/gfml/ymoks_GfmlAtr_GfmlNde_mok.java +++ b/110_gfml/tst/gplx/gfml/ymoks_GfmlAtr_GfmlNde_mok.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfml; import gplx.*; import gplx.core.strings.*; interface GfmlItm_mok { @@ -31,7 +31,7 @@ class GfmlAtr_mok implements GfmlItm_mok { sb.Add_kv("key=", key).Add_kv("val=", val); return sb.To_str(); } - public static final GfmlAtr_mok Null = new GfmlAtr_mok().Key_(String_.Null_mark).Val_(String_.Null_mark); + public static final GfmlAtr_mok Null = new GfmlAtr_mok().Key_(String_.Null_mark).Val_(String_.Null_mark); public static GfmlAtr_mok as_(Object obj) {return obj instanceof GfmlAtr_mok ? (GfmlAtr_mok)obj : null;} public static GfmlAtr_mok new_(String key, String val) { GfmlAtr_mok rv = new GfmlAtr_mok(); @@ -89,8 +89,8 @@ class GfmlNde_mok implements GfmlItm_mok { return rv; } public static GfmlNde_mok as_(Object obj) {return obj instanceof GfmlNde_mok ? (GfmlNde_mok)obj : null;} - public static final GfmlNde_mok Null = new GfmlNde_mok().Hnd_(String_.Null_mark).Typ_(String_.Null_mark); - public static final GfmlNde_mok ErrAtr = new GfmlNde_mok().Hnd_("<>").Typ_("<>"); + public static final GfmlNde_mok Null = new GfmlNde_mok().Hnd_(String_.Null_mark).Typ_(String_.Null_mark); + public static final GfmlNde_mok ErrAtr = new GfmlNde_mok().Hnd_("<>").Typ_("<>"); public static GfmlNde_mok new_() {return new GfmlNde_mok();} GfmlNde_mok() {} public static GfmlNde_mok gfmlNde_(GfmlNde nde) {return InitNde(nde);} static GfmlNde_mok InitNde(GfmlNde nde) { diff --git a/110_gfml/tst/gplx/gfml/z901_perf_tst.java b/110_gfml/tst/gplx/gfml/z901_perf_tst.java index 51ff131e8..2aeddaaf1 100644 --- a/110_gfml/tst/gplx/gfml/z901_perf_tst.java +++ b/110_gfml/tst/gplx/gfml/z901_perf_tst.java @@ -89,7 +89,7 @@ public class z901_perf_tst { // tmr.End_and_print("type"); // } interface ClassType {int Type();} - class ClassType_ {public static final int Type_1 = 1, Type_2 = 2, Type_3 = 3;} + class ClassType_ {public static final int Type_1 = 1, Type_2 = 2, Type_3 = 3;} class ClassType1 implements ClassType {public int Type() {return ClassType_.Type_1;}} class ClassType2 implements ClassType {public int Type() {return ClassType_.Type_2;}} class ClassType3 implements ClassType {public int Type() {return ClassType_.Type_3;}} diff --git a/140_dbs/src/gplx/core/stores/DbMaprWtr.java b/140_dbs/src/gplx/core/stores/DbMaprWtr.java index 02ee4bd83..acd4f8cbf 100644 --- a/140_dbs/src/gplx/core/stores/DbMaprWtr.java +++ b/140_dbs/src/gplx/core/stores/DbMaprWtr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; import gplx.core.criterias.*; import gplx.core.gfo_ndes.*; import gplx.dbs.*; import gplx.dbs.qrys.*; @@ -87,7 +87,7 @@ public class DbMaprWtr extends DataWtr_base implements DataWtr { rv.conn = Db_conn_pool.Instance.Get_or_new(url); return rv; } DbMaprWtr() {} - public static final String Key_Mgr = "DbMapr.mgr"; + public static final String Key_Mgr = "DbMapr.mgr"; } class DbMaprWtrUtl { public static void PurgeObjTree(SrlObj root, DbMaprMgr mgr, Db_conn conn) { diff --git a/140_dbs/src/gplx/core/stores/MockDiscObj.java b/140_dbs/src/gplx/core/stores/MockDiscObj.java index a069b9095..3b8082339 100644 --- a/140_dbs/src/gplx/core/stores/MockDiscObj.java +++ b/140_dbs/src/gplx/core/stores/MockDiscObj.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.stores; import gplx.*; import gplx.core.*; class MockDisc implements SrlObj, Gfo_invk { - public int Id() {return id;} public MockDisc Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; - public String Name() {return name;} public MockDisc Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; - public List_adp Titles() {return titles;} List_adp titles = List_adp_.New(); public static final String titles_idk = "titles"; - public static final MockDisc Instance = new MockDisc(); MockDisc() {} + public int Id() {return id;} public MockDisc Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; + public String Name() {return name;} public MockDisc Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; + public List_adp Titles() {return titles;} List_adp titles = List_adp_.New(); public static final String titles_idk = "titles"; + public static final MockDisc Instance = new MockDisc(); MockDisc() {} public SrlObj SrlObj_New(Object o) {return new MockDisc();} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, id_idk)) return Id(); @@ -48,17 +48,17 @@ class MockDisc implements SrlObj, Gfo_invk { } } class MockTitle implements SrlObj, Gfo_invk { - public int Id() {return id;} public MockTitle Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; - public String Name() {return name;} public MockTitle Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; - public List_adp Chapters() {return chapters;} List_adp chapters = List_adp_.New(); public static final String chapters_idk = "chapters"; - public List_adp Audios() {return audios;} List_adp audios = List_adp_.New(); public static final String audios_idk = "audios"; - public List_adp Subtitles() {return subtitles;} List_adp subtitles = List_adp_.New(); public static final String subtitles_idk = "subtitles"; + public int Id() {return id;} public MockTitle Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; + public String Name() {return name;} public MockTitle Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; + public List_adp Chapters() {return chapters;} List_adp chapters = List_adp_.New(); public static final String chapters_idk = "chapters"; + public List_adp Audios() {return audios;} List_adp audios = List_adp_.New(); public static final String audios_idk = "audios"; + public List_adp Subtitles() {return subtitles;} List_adp subtitles = List_adp_.New(); public static final String subtitles_idk = "subtitles"; public MockTitle Disc_(MockDisc disc) {disc.Titles().Add(this); return this;} public static MockTitle new_() { MockTitle rv = new MockTitle(); return rv; } - public static final MockTitle Instance = new MockTitle(); MockTitle() {} + public static final MockTitle Instance = new MockTitle(); MockTitle() {} public SrlObj SrlObj_New(Object o) {return new MockTitle();} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, id_idk)) return Id(); @@ -87,10 +87,10 @@ class MockTitle implements SrlObj, Gfo_invk { } } class MockChapter implements SrlObj, Gfo_invk { - public int Id() {return id;} public MockChapter Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; - public String Name() {return name;} public MockChapter Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; + public int Id() {return id;} public MockChapter Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; + public String Name() {return name;} public MockChapter Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; public MockChapter Title_(MockTitle title) {title.Chapters().Add(this); return this;} - public static final MockChapter Instance = new MockChapter(); MockChapter() {} + public static final MockChapter Instance = new MockChapter(); MockChapter() {} public static MockChapter new_() { MockChapter rv = new MockChapter(); return rv; @@ -107,10 +107,10 @@ class MockChapter implements SrlObj, Gfo_invk { } } class MockStream implements SrlObj, Gfo_invk { - public int Id() {return id;} public MockStream Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; - public String Name() {return name;} public MockStream Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; + public int Id() {return id;} public MockStream Id_(int val) {id = val; return this;} int id; public static final String id_idk = "id"; + public String Name() {return name;} public MockStream Name_(String val) {name = val; return this;} private String name; public static final String name_idk = "name"; public MockStream Title_(List_adp list) {list.Add(this); return this;} - public static final MockStream Instance = new MockStream(); MockStream() {} + public static final MockStream Instance = new MockStream(); MockStream() {} public static MockStream new_() { MockStream rv = new MockStream(); return rv; diff --git a/140_dbs/src/gplx/dbs/Db_attach_mgr.java b/140_dbs/src/gplx/dbs/Db_attach_mgr.java index aac83e503..8689ed19d 100644 --- a/140_dbs/src/gplx/dbs/Db_attach_mgr.java +++ b/140_dbs/src/gplx/dbs/Db_attach_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.itms.*; public class Db_attach_mgr { private Db_conn main_conn; private Io_url main_conn_url; - private final Ordered_hash links_hash = Ordered_hash_.New(); - private final List_adp attach_list = List_adp_.New(); + private final Ordered_hash links_hash = Ordered_hash_.New(); + private final List_adp attach_list = List_adp_.New(); public Db_attach_mgr() {} public Db_attach_mgr(Db_conn main_conn, Db_attach_itm... links_ary) { this.Conn_main_(main_conn); @@ -96,7 +96,7 @@ public class Db_attach_mgr { } public Db_stmt Test__make_stmt_and_attach(Db_qry qry, gplx.dbs.sqls.itms.Sql_from_clause from_itm) { // NOTE: tries to do attach via DOM not SQL attach_list.Clear(); - Sql_qry_wtr sql_wtr = main_conn.Engine().Sql_wtr(); + SqlQryWtr sql_wtr = main_conn.Engine().Sql_wtr(); List_adp from_tbls = from_itm.Tbls; int from_tbls_len = from_tbls.Count(); for (int i = 0; i < from_tbls_len; ++i) { @@ -109,7 +109,7 @@ public class Db_attach_mgr { else attach_list.Add(attach_itm); } - attached_sql = sql_wtr.To_sql_str(qry, true); + attached_sql = sql_wtr.ToSqlStr(qry, true); this.Attach(); for (int i = 0; i < from_tbls_len; ++i) { // reverse blanking from above Sql_tbl_itm from_tbl = (Sql_tbl_itm)from_tbls.Get_at(i); diff --git a/140_dbs/src/gplx/dbs/Db_attach_mgr__tst.java b/140_dbs/src/gplx/dbs/Db_attach_mgr__tst.java index af3940b6e..740838686 100644 --- a/140_dbs/src/gplx/dbs/Db_attach_mgr__tst.java +++ b/140_dbs/src/gplx/dbs/Db_attach_mgr__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.dbs; import gplx.*; import org.junit.*; import gplx.core.tests.*; import gplx.dbs.qrys.*; public class Db_attach_mgr__tst { - private final Db_attach_mgr__fxt fxt = new Db_attach_mgr__fxt(); + private final Db_attach_mgr__fxt fxt = new Db_attach_mgr__fxt(); @Test public void Basic() { Db_qry__select_cmd qry = Db_qry_.select_() .Cols_w_tbl_("t1", "fld_1") diff --git a/140_dbs/src/gplx/dbs/Db_conn.java b/140_dbs/src/gplx/dbs/Db_conn.java index d79164b85..28d247eb2 100644 --- a/140_dbs/src/gplx/dbs/Db_conn.java +++ b/140_dbs/src/gplx/dbs/Db_conn.java @@ -43,7 +43,7 @@ import gplx.dbs.sys.Db_sys_mgr; import gplx.dbs.wkrs.SqlWkrMgr; public class Db_conn { - private final List_adp rls_list = List_adp_.New(); + private final List_adp rls_list = List_adp_.New(); public Db_conn(Db_engine engine) { this.engine = engine; this.sys_mgr = new Db_sys_mgr(this); diff --git a/140_dbs/src/gplx/dbs/Db_conn_.java b/140_dbs/src/gplx/dbs/Db_conn_.java index 7ce6e441e..0993af2ed 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_.java +++ b/140_dbs/src/gplx/dbs/Db_conn_.java @@ -13,7 +13,7 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs; import gplx.*; -public class Db_conn_ { - public static final Db_conn Noop = new Db_conn(gplx.dbs.engines.noops.Noop_engine.Instance); -} +package gplx.dbs; import gplx.*; +public class Db_conn_ { + public static final Db_conn Noop = new Db_conn(gplx.dbs.engines.noops.Noop_engine.Instance); +} diff --git a/140_dbs/src/gplx/dbs/Db_conn_bldr.java b/140_dbs/src/gplx/dbs/Db_conn_bldr.java index d33d642f6..da2a1a7fd 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_bldr.java +++ b/140_dbs/src/gplx/dbs/Db_conn_bldr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; public class Db_conn_bldr { - private final Object thread_lock = new Object(); // LOCK:synchronized else random failures in Schema_mgr due to diff conn pointing to same db; DATE:2016-07-12 + private final Object thread_lock = new Object(); // LOCK:synchronized else random failures in Schema_mgr due to diff conn pointing to same db; DATE:2016-07-12 private Db_conn_bldr_wkr wkr; public void Reg_default_sqlite() {wkr = Db_conn_bldr_wkr__sqlite.Instance; wkr.Clear_for_tests();} public void Reg_default_mem() {wkr = Db_conn_bldr_wkr__mem.Instance; wkr.Clear_for_tests();} @@ -48,5 +48,5 @@ public class Db_conn_bldr { if (rv == Db_conn_.Noop) throw Err_.new_wo_type("connection is null; file does not exist: file={0}", "file", url.Raw()); return rv; } - public static final Db_conn_bldr Instance = new Db_conn_bldr(); Db_conn_bldr() {} + public static final Db_conn_bldr Instance = new Db_conn_bldr(); Db_conn_bldr() {} } diff --git a/140_dbs/src/gplx/dbs/Db_conn_bldr_wkr.java b/140_dbs/src/gplx/dbs/Db_conn_bldr_wkr.java index 84ae2bdd7..2d9ed11bd 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_bldr_wkr.java +++ b/140_dbs/src/gplx/dbs/Db_conn_bldr_wkr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.engines.sqlite.*; import gplx.dbs.qrys.bats.*; public interface Db_conn_bldr_wkr { @@ -23,7 +23,7 @@ public interface Db_conn_bldr_wkr { } class Db_conn_bldr_wkr__sqlite implements Db_conn_bldr_wkr { public void Clear_for_tests() {} -// public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); +// public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); public boolean Exists(Io_url url) {return Io_mgr.Instance.ExistsFil(url);} public Db_conn Get(Io_url url) { if (!Io_mgr.Instance.ExistsFil(url)) return null; @@ -37,10 +37,10 @@ class Db_conn_bldr_wkr__sqlite implements Db_conn_bldr_wkr { conn.Exec_qry(Sqlite_pragma.New__page_size(4096)); return conn; } - public static final Db_conn_bldr_wkr__sqlite Instance = new Db_conn_bldr_wkr__sqlite(); Db_conn_bldr_wkr__sqlite() {} + public static final Db_conn_bldr_wkr__sqlite Instance = new Db_conn_bldr_wkr__sqlite(); Db_conn_bldr_wkr__sqlite() {} } class Db_conn_bldr_wkr__mem implements Db_conn_bldr_wkr { - private final Hash_adp hash = Hash_adp_.New(); + private final Hash_adp hash = Hash_adp_.New(); public void Clear_for_tests() {hash.Clear(); Db_conn_pool.Instance.Rls_all();} public boolean Exists(Io_url url) { String io_url_str = url.Xto_api(); @@ -59,5 +59,5 @@ class Db_conn_bldr_wkr__mem implements Db_conn_bldr_wkr { private Db_conn Get_or_new(Io_url url) { return Db_conn_pool.Instance.Get_or_new(gplx.dbs.engines.mems.Mem_conn_info.new_(url.Xto_api())); } - public static final Db_conn_bldr_wkr__mem Instance = new Db_conn_bldr_wkr__mem(); Db_conn_bldr_wkr__mem() {} + public static final Db_conn_bldr_wkr__mem Instance = new Db_conn_bldr_wkr__mem(); Db_conn_bldr_wkr__mem() {} } diff --git a/140_dbs/src/gplx/dbs/Db_conn_info_.java b/140_dbs/src/gplx/dbs/Db_conn_info_.java index 51503c132..997ca299b 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_info_.java +++ b/140_dbs/src/gplx/dbs/Db_conn_info_.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.engines.noops.*; import gplx.dbs.engines.mems.*; import gplx.dbs.engines.sqlite.*; import gplx.dbs.engines.tdbs.*; import gplx.dbs.engines.mysql.*; import gplx.dbs.engines.postgres.*; public class Db_conn_info_ { - public static final Db_conn_info Null = Noop_conn_info.Instance; - public static final Db_conn_info Test = Mysql_conn_info.new_("127.0.0.1", "unit_tests", "root", "mysql7760"); + public static final Db_conn_info Null = Noop_conn_info.Instance; + public static final Db_conn_info Test = Mysql_conn_info.new_("127.0.0.1", "unit_tests", "root", "mysql7760"); public static Db_conn_info parse(String raw) {return Db_conn_info_pool.Instance.Parse(raw);} public static Db_conn_info sqlite_(Io_url url) {return Sqlite_conn_info.load_(url);} public static Db_conn_info tdb_(Io_url url) {return Tdb_conn_info.new_(url);} public static Db_conn_info mem_(String db) {return Mem_conn_info.new_(db);} - public static final String Key_tdb = Tdb_conn_info.Tid_const; + public static final String Key_tdb = Tdb_conn_info.Tid_const; public static Io_url To_url(Db_conn_info cs) { if (String_.Eq(cs.Key(), Sqlite_conn_info.Key_const)) return ((Sqlite_conn_info)cs).Url(); else if (String_.Eq(cs.Key(), Mem_conn_info.Instance.Key())) return Io_url_.mem_fil_("mem/" + ((Mem_conn_info)cs).Database()); @@ -31,7 +31,7 @@ public class Db_conn_info_ { } } class Db_conn_info_pool { - private final Ordered_hash regy = Ordered_hash_.New(); + private final Ordered_hash regy = Ordered_hash_.New(); public Db_conn_info_pool() { this.Add(Noop_conn_info.Instance).Add(Tdb_conn_info.Instance).Add(Mysql_conn_info.Instance).Add(Postgres_conn_info.Instance).Add(Sqlite_conn_info.Instance); this.Add(Mem_conn_info.Instance); @@ -82,5 +82,5 @@ class Db_conn_info_pool { Db_conn_info prototype = (Db_conn_info)regy.Get_by(cs_tid); return prototype.New_self(raw, hash); } - public static final Db_conn_info_pool Instance = new Db_conn_info_pool(); + public static final Db_conn_info_pool Instance = new Db_conn_info_pool(); } diff --git a/140_dbs/src/gplx/dbs/Db_conn_info__base.java b/140_dbs/src/gplx/dbs/Db_conn_info__base.java index 6e6c80a25..34d9ee953 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_info__base.java +++ b/140_dbs/src/gplx/dbs/Db_conn_info__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; public abstract class Db_conn_info__base implements Db_conn_info { public Db_conn_info__base(String raw, String db_api, String database) {this.raw = raw; this.db_api = db_api; this.database = database;} public abstract String Key(); - public String Raw() {return raw;} private final String raw; - public String Db_api() {return db_api;} private final String db_api; - public String Database() {return database;} protected final String database; + public String Raw() {return raw;} private final String raw; + public String Db_api() {return db_api;} private final String db_api; + public String Database() {return database;} protected final String database; public abstract Db_conn_info New_self(String raw, Keyval_hash hash); protected static String Bld_raw(String... ary) {// "a", "b" -> "a=b;" diff --git a/140_dbs/src/gplx/dbs/Db_conn_pool.java b/140_dbs/src/gplx/dbs/Db_conn_pool.java index 441932096..dca568f85 100644 --- a/140_dbs/src/gplx/dbs/Db_conn_pool.java +++ b/140_dbs/src/gplx/dbs/Db_conn_pool.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.engines.*; import gplx.dbs.qrys.bats.*; public class Db_conn_pool { // PURPOSE: cache one connection per connection_string - private final Ordered_hash hash = Ordered_hash_.New(); - public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); + private final Ordered_hash hash = Ordered_hash_.New(); + public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); public void Del(Db_conn_info url) {hash.Del(url.Db_api());} public Db_conn Get_or_new(String s) {return Get_or_new(Db_conn_info_.parse(s));} public Db_conn Get_or_new(Db_conn_info url) { @@ -45,8 +45,8 @@ public class Db_conn_pool { // PURPOSE: cache one connection per connection_stri hash.Clear(); } - private final Hash_adp prime_hash = Hash_adp_.New(); - public static final Db_conn_pool Instance = new Db_conn_pool(); Db_conn_pool() {this.Init();} + private final Hash_adp prime_hash = Hash_adp_.New(); + public static final Db_conn_pool Instance = new Db_conn_pool(); Db_conn_pool() {this.Init();} public void Primes__add(Db_engine... ary) { // PUBLIC.DRD: for (Db_engine itm : ary) prime_hash.Add(itm.Tid(), itm); diff --git a/140_dbs/src/gplx/dbs/Db_qry.java b/140_dbs/src/gplx/dbs/Db_qry.java index 994de8035..47d20a879 100644 --- a/140_dbs/src/gplx/dbs/Db_qry.java +++ b/140_dbs/src/gplx/dbs/Db_qry.java @@ -13,16 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs; import gplx.*; -public interface Db_qry { - int Tid(); - boolean Exec_is_rdr(); - String Base_table(); - String To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr wtr); -} -class Db_qry__noop implements Db_qry { - public int Tid() {return Db_qry_.Tid_noop;} - public boolean Exec_is_rdr() {return false;} - public String Base_table() {return "";} - public String To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr wtr) {return "";} -} +package gplx.dbs; +import gplx.dbs.sqls.SqlQryWtr; +public interface Db_qry { + int Tid(); + boolean Exec_is_rdr(); + String Base_table(); + String To_sql__exec(SqlQryWtr wtr); +} diff --git a/140_dbs/src/gplx/dbs/Db_qry_.java b/140_dbs/src/gplx/dbs/Db_qry_.java index c6acc412b..9f8b5beca 100644 --- a/140_dbs/src/gplx/dbs/Db_qry_.java +++ b/140_dbs/src/gplx/dbs/Db_qry_.java @@ -13,49 +13,54 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs; import gplx.*; -import gplx.core.criterias.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.itms.*; -public class Db_qry_ { - public static Db_qry__select_cmd select_cols_(String tbl, Criteria crt, String... cols){return select_().From_(tbl).Where_(crt).Cols_(cols);} - public static Db_qry__select_cmd select_val_(String tbl, String col, Criteria crt) {return select_().From_(tbl).Where_(crt).Cols_(col);} - public static Db_qry__select_cmd select_tbl_(String tbl) {return select_().From_(tbl).Cols_all_();} - public static Db_qry__select_cmd select_() {return new Db_qry__select_cmd();} - public static Db_qry__select_cmd select_(String tbl, String... cols) {return new Db_qry__select_cmd().From_(tbl).Cols_(cols);} - public static Db_qry_delete delete_(String tbl, Criteria crt) {return Db_qry_delete.new_(tbl, crt);} - public static Db_qry_delete delete_tbl_(String tbl) {return Db_qry_delete.new_(tbl);} - public static Db_qry_insert insert_(String tbl) {return new Db_qry_insert(tbl);} - public static Db_qry_insert insert_common_(String tbl, Keyval... pairs) { - Db_qry_insert cmd = new Db_qry_insert(tbl); - for (Keyval pair : pairs) - cmd.Val_obj(pair.Key(), pair.Val()); - return cmd; - } - - public static Sql_join_fld New_join__join(String trg_fld, String src_tbl, String src_fld) {return new Sql_join_fld(trg_fld, src_tbl, src_fld);} - public static Sql_join_fld New_join__same(String tbl, String fld) {return new Sql_join_fld(fld, tbl, fld);} - - public static Db_qry_update update_(String tbl, Criteria crt) { - Db_qry_update update = new Db_qry_update(); - update.From_(tbl); - update.Where_(crt); - return update; - } - public static Db_qry_update update_common_(String tbl, Criteria crt, Keyval... pairs) { - Db_qry_update cmd = new Db_qry_update(); - cmd.From_(tbl); cmd.Where_(crt); - for (Keyval pair : pairs) - cmd.Val_obj(pair.Key(), pair.Val()); - return cmd; - } - public static gplx.core.gfo_ndes.GfoNde Exec_as_nde(Db_conn conn, Db_qry qry) {return gplx.core.gfo_ndes.GfoNde_.rdr_(conn.Exec_qry_as_old_rdr(qry));} - public static Object Exec_as_obj(Db_conn conn, Db_qry__select_cmd qry) { - gplx.core.stores.DataRdr rdr = conn.Exec_qry_as_old_rdr(qry); - try { - return rdr.MoveNextPeer() ? rdr.Read(qry.Cols().Flds.Get_at(0).Fld) : null; // NOTE: need to access from flds for tdb - } finally {rdr.Rls();} - } - - public static Db_qry as_(Object obj) {return obj instanceof Db_qry ? (Db_qry)obj : null;} - public static final Db_qry Noop = new Db_qry__noop(); - public static final int Tid_insert = 0, Tid_delete = 1, Tid_update = 2, Tid_select = 3, Tid_sql = 4, Tid_select_in_tbl = 5, Tid_flush = 6, Tid_noop = 7, Tid_pragma = 8; -} +package gplx.dbs; +import gplx.Keyval; +import gplx.core.criterias.Criteria; +import gplx.dbs.qrys.Db_qry__select_cmd; +import gplx.dbs.qrys.Db_qry_delete; +import gplx.dbs.qrys.Db_qry_insert; +import gplx.dbs.qrys.Db_qry_update; +import gplx.dbs.sqls.itms.Sql_join_fld; +public class Db_qry_ { + public static Db_qry__select_cmd select_cols_(String tbl, Criteria crt, String... cols){return select_().From_(tbl).Where_(crt).Cols_(cols);} + public static Db_qry__select_cmd select_val_(String tbl, String col, Criteria crt) {return select_().From_(tbl).Where_(crt).Cols_(col);} + public static Db_qry__select_cmd select_tbl_(String tbl) {return select_().From_(tbl).Cols_all_();} + public static Db_qry__select_cmd select_() {return new Db_qry__select_cmd();} + public static Db_qry__select_cmd select_(String tbl, String... cols) {return new Db_qry__select_cmd().From_(tbl).Cols_(cols);} + public static Db_qry_delete delete_(String tbl, Criteria crt) {return Db_qry_delete.new_(tbl, crt);} + public static Db_qry_delete delete_tbl_(String tbl) {return Db_qry_delete.new_(tbl);} + public static Db_qry_insert insert_(String tbl) {return new Db_qry_insert(tbl);} + public static Db_qry_insert insert_common_(String tbl, Keyval... pairs) { + Db_qry_insert cmd = new Db_qry_insert(tbl); + for (Keyval pair : pairs) + cmd.Val_obj(pair.Key(), pair.Val()); + return cmd; + } + + public static Sql_join_fld New_join__join(String trg_fld, String src_tbl, String src_fld) {return new Sql_join_fld(trg_fld, src_tbl, src_fld);} + public static Sql_join_fld New_join__same(String tbl, String fld) {return new Sql_join_fld(fld, tbl, fld);} + + public static Db_qry_update update_(String tbl, Criteria crt) { + Db_qry_update update = new Db_qry_update(); + update.From_(tbl); + update.Where_(crt); + return update; + } + public static Db_qry_update update_common_(String tbl, Criteria crt, Keyval... pairs) { + Db_qry_update cmd = new Db_qry_update(); + cmd.From_(tbl); cmd.Where_(crt); + for (Keyval pair : pairs) + cmd.Val_obj(pair.Key(), pair.Val()); + return cmd; + } + public static gplx.core.gfo_ndes.GfoNde Exec_as_nde(Db_conn conn, Db_qry qry) {return gplx.core.gfo_ndes.GfoNde_.rdr_(conn.Exec_qry_as_old_rdr(qry));} + public static Object Exec_as_obj(Db_conn conn, Db_qry__select_cmd qry) { + gplx.core.stores.DataRdr rdr = conn.Exec_qry_as_old_rdr(qry); + try { + return rdr.MoveNextPeer() ? rdr.Read(qry.Cols().Flds.Get_at(0).Fld) : null; // NOTE: need to access from flds for tdb + } finally {rdr.Rls();} + } + + public static Db_qry as_(Object obj) {return obj instanceof Db_qry ? (Db_qry)obj : null;} + public static final int Tid_insert = 0, Tid_delete = 1, Tid_update = 2, Tid_select = 3, Tid_sql = 4, Tid_select_in_tbl = 5, Tid_flush = 6, Tid_noop = 7, Tid_pragma = 8; +} diff --git a/140_dbs/src/gplx/dbs/Db_rdr__basic.java b/140_dbs/src/gplx/dbs/Db_rdr__basic.java index c256d0ace..99935fcd0 100644 --- a/140_dbs/src/gplx/dbs/Db_rdr__basic.java +++ b/140_dbs/src/gplx/dbs/Db_rdr__basic.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import java.sql.ResultSet; public class Db_rdr__basic implements Db_rdr { @@ -24,21 +24,21 @@ public class Db_rdr__basic implements Db_rdr { try {return rdr.next();} catch (Exception e) {throw Err_.new_exc(e, "db", "move_next failed; check column casting error in SQL", "sql", sql);} } - @gplx.Virtual public byte[] Read_bry(String k) {try {return (byte[])rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Bry_.Cls_val_name);}} - @gplx.Virtual public byte[] Read_bry_by_str(String k) {try {return Bry_.new_u8((String)rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", String_.Cls_val_name);}} - @gplx.Virtual public void Save_bry_in_parts(Io_url url, String tbl, String fld, String crt_key, Object crt_val) {throw Err_.new_unimplemented();} - @gplx.Virtual public String Read_str(String k) {try {return (String)rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", String_.Cls_val_name);}} - @gplx.Virtual public DateAdp Read_date_by_str(String k) {return DateAdp_.parse_iso8561(Read_str(k));} - @gplx.Virtual public int Read_int(String k) {try {return Int_.Cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Int_.Cls_val_name);}} - @gplx.Virtual public long Read_long(String k) {try {return Long_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Long_.Cls_val_name);}} - @gplx.Virtual public float Read_float(String k) {try {return Float_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Float_.Cls_val_name);}} - @gplx.Virtual public double Read_double(String k) {try {return Double_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Double_.Cls_val_name);}} - @gplx.Virtual public byte Read_byte(String k) {try {return Byte_.Cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Byte_.Cls_val_name);}} - @gplx.Virtual public boolean Read_bool_by_byte(String k) {try {return Byte_.Cast(rdr.getObject(k)) == 1;} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Bool_.Cls_val_name);}} - @gplx.Virtual public int Fld_len() {try {return rdr.getMetaData().getColumnCount();} catch (Exception e) {throw Err_.new_exc(e, "db", "field count failed", "sql", sql);}} - @gplx.Virtual public Object Read_obj(String k) {try {return rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Object_.Cls_val_name);}} - @gplx.Virtual public Object Read_at(int i) {try {return rdr.getObject(i + 1);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "idx", i, "type", Object_.Cls_val_name);}} - @gplx.Virtual public void Rls() { + public byte[] Read_bry(String k) {try {return (byte[])rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Bry_.Cls_val_name);}} + public byte[] Read_bry_by_str(String k) {try {return Bry_.new_u8((String)rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", String_.Cls_val_name);}} + public void Save_bry_in_parts(Io_url url, String tbl, String fld, String crt_key, Object crt_val) {throw Err_.new_unimplemented();} + public String Read_str(String k) {try {return (String)rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", String_.Cls_val_name);}} + public DateAdp Read_date_by_str(String k) {return DateAdp_.parse_iso8561(Read_str(k));} + public int Read_int(String k) {try {return Int_.Cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Int_.Cls_val_name);}} + public long Read_long(String k) {try {return Long_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Long_.Cls_val_name);}} + public float Read_float(String k) {try {return Float_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Float_.Cls_val_name);}} + public double Read_double(String k) {try {return Double_.cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Double_.Cls_val_name);}} + public byte Read_byte(String k) {try {return Byte_.Cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Byte_.Cls_val_name);}} + public boolean Read_bool_by_byte(String k) {try {return Byte_.Cast(rdr.getObject(k)) == 1;} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Bool_.Cls_val_name);}} + public int Fld_len() {try {return rdr.getMetaData().getColumnCount();} catch (Exception e) {throw Err_.new_exc(e, "db", "field count failed", "sql", sql);}} + public Object Read_obj(String k) {try {return rdr.getObject(k);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "key", k, "type", Object_.Cls_val_name);}} + public Object Read_at(int i) {try {return rdr.getObject(i + 1);} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "idx", i, "type", Object_.Cls_val_name);}} + public void Rls() { try {rdr.close();} catch (Exception e) {throw Err_.new_exc(e, "db", "close failed");} if (stmt != null) { diff --git a/140_dbs/src/gplx/dbs/Db_sql_select.java b/140_dbs/src/gplx/dbs/Db_sql_select.java index 63951e0fd..b0814ce30 100644 --- a/140_dbs/src/gplx/dbs/Db_sql_select.java +++ b/140_dbs/src/gplx/dbs/Db_sql_select.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.core.criterias.*; interface Db_sql_qry { @@ -20,7 +20,7 @@ interface Db_sql_qry { } class Db_sql_qry__select { public Db_sql_qry__select(String from) {this.from = from;} - public String From() {return from;} private final String from; + public String From() {return from;} private final String from; public Db_sql_col[] Select() {return select;} private Db_sql_col[] select; // public Criteria Where() {return where;} private Criteria where; // public Db_sql_col[] Group_bys() {return group_bys;} private Db_sql_col[] group_bys; @@ -49,7 +49,7 @@ class Db_sql_col_ { public static Db_sql_col[] Ary(Db_sql_col... v) {return v;} } class Db_sql_col_bldr { - private final List_adp tmp_list = List_adp_.New(); + private final List_adp tmp_list = List_adp_.New(); public Db_sql_col[] new_fld_many(String[] ary) { tmp_list.Clear(); int ord = -1; @@ -61,16 +61,16 @@ class Db_sql_col_bldr { } return (Db_sql_col[])tmp_list.To_ary_and_clear(Db_sql_col.class); } - public static final Db_sql_col_bldr Instance = new Db_sql_col_bldr(); Db_sql_col_bldr() {} + public static final Db_sql_col_bldr Instance = new Db_sql_col_bldr(); Db_sql_col_bldr() {} } class Db_sql_col__name { public Db_sql_col__name(int ord, String key) {this.ord = ord; this.key = key;} - public int Ord() {return ord;} private final int ord; - public String Key() {return key;} private final String key; + public int Ord() {return ord;} private final int ord; + public String Key() {return key;} private final String key; } class Db_sql_col__all implements Db_sql_col { public Db_sql_col__all(int ord, String tbl) {this.ord = ord; this.tbl = tbl;} - public int Ord() {return ord;} private final int ord; - public String Tbl() {return tbl;} private final String tbl; + public int Ord() {return ord;} private final int ord; + public String Tbl() {return tbl;} private final String tbl; public String Alias() {return "*";} } diff --git a/140_dbs/src/gplx/dbs/Db_stmt_.java b/140_dbs/src/gplx/dbs/Db_stmt_.java index 9ff49d4b3..f74b733fe 100644 --- a/140_dbs/src/gplx/dbs/Db_stmt_.java +++ b/140_dbs/src/gplx/dbs/Db_stmt_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.qrys.*; public class Db_stmt_ { - public static final Db_stmt Null = new Db_stmt_sql(); + public static final Db_stmt Null = new Db_stmt_sql(); public static Db_stmt new_insert_(Db_conn conn, String tbl, String... flds) { Db_qry qry = Db_qry_insert.new_(tbl, flds); return conn.Stmt_new(qry); diff --git a/140_dbs/src/gplx/dbs/Dbmeta_fld_itm.java b/140_dbs/src/gplx/dbs/Dbmeta_fld_itm.java index e9cbc3e9c..06f3663d1 100644 --- a/140_dbs/src/gplx/dbs/Dbmeta_fld_itm.java +++ b/140_dbs/src/gplx/dbs/Dbmeta_fld_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.metas.*; public class Dbmeta_fld_itm { @@ -20,8 +20,8 @@ public class Dbmeta_fld_itm { this.name = name; this.type = type; this.primary = false; this.autonum = false; this.default_val = Default_value_null; } - public String Name() {return name;} private final String name; - public Dbmeta_fld_tid Type() {return type;} private final Dbmeta_fld_tid type; + public String Name() {return name;} private final String name; + public Dbmeta_fld_tid Type() {return type;} private final Dbmeta_fld_tid type; public int Nullable_tid() {return nullable_tid;} public Dbmeta_fld_itm Nullable_tid_(int v) {nullable_tid = v; return this;} private int nullable_tid; public Dbmeta_fld_itm Nullable_y_() {return Nullable_tid_(Nullable_null);} public boolean Primary() {return primary;} public Dbmeta_fld_itm Primary_y_() {primary = true; return this;} private boolean primary; public Dbmeta_fld_itm Primary_n_() {primary = false; return this;} @@ -37,10 +37,10 @@ public class Dbmeta_fld_itm { } public static final int Nullable_unknown = 0, Nullable_null = 1, Nullable_not_null = 2; - public static final Object Default_value_null = null; + public static final Object Default_value_null = null; public static final String Key_null = null; - public static final String[] Str_ary_empty = String_.Ary_empty; - public static final Dbmeta_fld_itm[] Ary_empty = new Dbmeta_fld_itm[0]; + public static final String[] Str_ary_empty = String_.Ary_empty; + public static final Dbmeta_fld_itm[] Ary_empty = new Dbmeta_fld_itm[0]; public static Dbmeta_fld_itm new_bool(String name) {return new Dbmeta_fld_itm(name, Dbmeta_fld_tid.Itm__bool);} public static Dbmeta_fld_itm new_byte(String name) {return new Dbmeta_fld_itm(name, Dbmeta_fld_tid.Itm__byte);} diff --git a/140_dbs/src/gplx/dbs/Dbmeta_fld_list.java b/140_dbs/src/gplx/dbs/Dbmeta_fld_list.java index 487cd3c66..c23cc248c 100644 --- a/140_dbs/src/gplx/dbs/Dbmeta_fld_list.java +++ b/140_dbs/src/gplx/dbs/Dbmeta_fld_list.java @@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.dbs; import gplx.*; public class Dbmeta_fld_list { - private final Ordered_hash flds = Ordered_hash_.New(); + private final Ordered_hash flds = Ordered_hash_.New(); public void Clear() {flds.Clear(); str_ary = null; fld_ary = null;} public int Len() {return flds.Len();} public boolean Has(String key) {return flds.Has(key);} diff --git a/140_dbs/src/gplx/dbs/Dbmeta_fld_tid.java b/140_dbs/src/gplx/dbs/Dbmeta_fld_tid.java index f468c2b32..e1eef8252 100644 --- a/140_dbs/src/gplx/dbs/Dbmeta_fld_tid.java +++ b/140_dbs/src/gplx/dbs/Dbmeta_fld_tid.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.engines.sqlite.*; // for Tid_sqlite; note that Tid_sqlite is not used, and only exists for doc purposes public class Dbmeta_fld_tid { public Dbmeta_fld_tid(int tid_ansi, int tid_sqlite, byte[] name, int len_1, int len_2) { this.tid_ansi = tid_ansi; this.tid_sqlite = tid_sqlite; this.name = name; this.len_1 = len_1; this.len_2 = len_2; } - public int Tid_ansi() {return tid_ansi;} private final int tid_ansi; - public int Tid_sqlite() {return tid_sqlite;} private final int tid_sqlite; - public byte[] Name() {return name;} private final byte[] name; - public int Len_1() {return len_1;} private final int len_1; - public int Len_2() {return len_2;} private final int len_2; + public int Tid_ansi() {return tid_ansi;} private final int tid_ansi; + public int Tid_sqlite() {return tid_sqlite;} private final int tid_sqlite; + public byte[] Name() {return name;} private final byte[] name; + public int Len_1() {return len_1;} private final int len_1; + public int Len_2() {return len_2;} private final int len_2; public boolean Eq(Dbmeta_fld_tid comp) { return tid_ansi == comp.tid_ansi && tid_sqlite == comp.tid_sqlite @@ -33,7 +33,7 @@ public class Dbmeta_fld_tid { } public static final int Tid__bool = 0, Tid__byte = 1, Tid__short = 2, Tid__int = 3, Tid__long = 4, Tid__float = 5, Tid__double = 6, Tid__str = 7, Tid__text = 8, Tid__bry = 9, Tid__decimal = 10, Tid__date = 11; - public static final Dbmeta_fld_tid + public static final Dbmeta_fld_tid Itm__byte = new Dbmeta_fld_tid(Dbmeta_fld_tid.Tid__byte , Sqlite_tid.Tid_int , Bry_.new_a7("tinyint") , -1, -1) , Itm__short = new Dbmeta_fld_tid(Dbmeta_fld_tid.Tid__short , Sqlite_tid.Tid_int , Bry_.new_a7("smallint") , -1, -1) , Itm__int = new Dbmeta_fld_tid(Dbmeta_fld_tid.Tid__int , Sqlite_tid.Tid_int , Bry_.new_a7("integer") , -1, -1) diff --git a/140_dbs/src/gplx/dbs/Dbmeta_idx_itm.java b/140_dbs/src/gplx/dbs/Dbmeta_idx_itm.java index 0cc179e55..07db9f8fe 100644 --- a/140_dbs/src/gplx/dbs/Dbmeta_idx_itm.java +++ b/140_dbs/src/gplx/dbs/Dbmeta_idx_itm.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; -import gplx.dbs.metas.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.wtrs.*; +import gplx.dbs.metas.*; import gplx.dbs.sqls.*; public class Dbmeta_idx_itm { public Dbmeta_idx_itm(boolean unique, String tbl, String name, Dbmeta_idx_fld[] flds) { this.tbl = tbl; this.name = name; this.unique = unique; this.Flds = flds; } - public String Tbl() {return tbl;} private final String tbl; - public String Name() {return name;} private final String name; - public boolean Unique() {return unique;} private final boolean unique; - public final Dbmeta_idx_fld[] Flds; - public String To_sql_create(Sql_qry_wtr sql_wtr) {return sql_wtr.Schema_wtr().Bld_create_idx(this);} + public String Tbl() {return tbl;} private final String tbl; + public String Name() {return name;} private final String name; + public boolean Unique() {return unique;} private final boolean unique; + public final Dbmeta_idx_fld[] Flds; + public String To_sql_create(SqlQryWtr sql_wtr) {return sql_wtr.Schema_wtr().Bld_create_idx(this);} public boolean Eq(Dbmeta_idx_itm comp) { return String_.Eq(name, comp.name) && unique == comp.unique @@ -39,7 +39,7 @@ public class Dbmeta_idx_itm { public static Dbmeta_idx_itm new_unique_by_tbl_wo_null (String tbl, String name, String... flds) {return new Dbmeta_idx_itm(Bool_.Y, tbl, Bld_idx_name(tbl, name), To_fld_ary(flds));} public static Dbmeta_idx_itm new_normal_by_tbl_wo_null (String tbl, String name, String... flds) {return new Dbmeta_idx_itm(Bool_.N, tbl, Bld_idx_name(tbl, name), To_fld_ary(flds));} public static String Bld_idx_name(String tbl, String suffix) {return String_.Concat(tbl, "__", suffix);} - public static final Dbmeta_idx_itm[] Ary_empty = new Dbmeta_idx_itm[0]; + public static final Dbmeta_idx_itm[] Ary_empty = new Dbmeta_idx_itm[0]; public static Dbmeta_idx_fld[] To_fld_ary(String[] ary) { int len = ary.length; Dbmeta_idx_fld[] rv = new Dbmeta_idx_fld[len]; diff --git a/140_dbs/src/gplx/dbs/Dbmeta_tbl_itm.java b/140_dbs/src/gplx/dbs/Dbmeta_tbl_itm.java index c99fc81e2..5e1155d1e 100644 --- a/140_dbs/src/gplx/dbs/Dbmeta_tbl_itm.java +++ b/140_dbs/src/gplx/dbs/Dbmeta_tbl_itm.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.dbs; import gplx.*; -import gplx.dbs.metas.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.wtrs.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.dbs; +import gplx.dbs.metas.*; import gplx.dbs.sqls.*; public class Dbmeta_tbl_itm { public String Name() {return name;} private String name; public Dbmeta_idx_mgr Idxs() {return idxs;} private final Dbmeta_idx_mgr idxs = new Dbmeta_idx_mgr(); public Dbmeta_fld_mgr Flds() {return flds;} private final Dbmeta_fld_mgr flds = new Dbmeta_fld_mgr(); - public String To_sql_create(Sql_qry_wtr sql_wtr) {return sql_wtr.Schema_wtr().Bld_create_tbl(this);} + public String To_sql_create(SqlQryWtr sql_wtr) {return sql_wtr.Schema_wtr().Bld_create_tbl(this);} public static Dbmeta_tbl_itm New(String name, Dbmeta_fld_list flds, Dbmeta_idx_itm... idxs) {return New(name, flds.To_fld_ary(), idxs);} public static Dbmeta_tbl_itm New(String name, Dbmeta_fld_itm... flds) {return New(name, flds, Dbmeta_idx_itm.Ary_empty);} diff --git a/140_dbs/src/gplx/dbs/conn_props/Db_conn_props_mgr.java b/140_dbs/src/gplx/dbs/conn_props/Db_conn_props_mgr.java index dc31990c9..56837ebc5 100644 --- a/140_dbs/src/gplx/dbs/conn_props/Db_conn_props_mgr.java +++ b/140_dbs/src/gplx/dbs/conn_props/Db_conn_props_mgr.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.conn_props; import gplx.*; import gplx.dbs.*; -public class Db_conn_props_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); - public boolean Has(String key) {return hash.Has(key);} - public boolean Match(String key, String expd_val) { - String actl_val = (String)hash.Get_by(key); - return actl_val == null ? false : String_.Eq(expd_val,actl_val); - } - public void Add(String key, String val) {hash.Add(key, val);} - public void Del(String key) {hash.Del(key);} -} +package gplx.dbs.conn_props; import gplx.*; import gplx.dbs.*; +public class Db_conn_props_mgr { + private final Ordered_hash hash = Ordered_hash_.New(); + public boolean Has(String key) {return hash.Has(key);} + public boolean Match(String key, String expd_val) { + String actl_val = (String)hash.Get_by(key); + return actl_val == null ? false : String_.Eq(expd_val,actl_val); + } + public void Add(String key, String val) {hash.Add(key, val);} + public void Del(String key) {hash.Del(key);} +} diff --git a/140_dbs/src/gplx/dbs/diffs/Gdif_core.java b/140_dbs/src/gplx/dbs/diffs/Gdif_core.java index 6c46ceed9..1633707c1 100644 --- a/140_dbs/src/gplx/dbs/diffs/Gdif_core.java +++ b/140_dbs/src/gplx/dbs/diffs/Gdif_core.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.itms.*; import gplx.dbs.diffs.builds.*; public class Gdif_core { - private final Db_conn conn; - private final Gdif_job_tbl job_tbl; - private final Gdif_cmd_tbl cmd_tbl; - private final Gdif_txn_tbl txn_tbl; + private final Db_conn conn; + private final Gdif_job_tbl job_tbl; + private final Gdif_cmd_tbl cmd_tbl; + private final Gdif_txn_tbl txn_tbl; public Gdif_core(Db_conn conn) { this.conn = conn; this.db = new Gdif_db(conn); @@ -28,7 +28,7 @@ public class Gdif_core { this.cmd_tbl = db.Cmd_tbl(); this.txn_tbl = db.Txn_tbl(); } - public Gdif_db Db() {return db;} private final Gdif_db db; + public Gdif_db Db() {return db;} private final Gdif_db db; public Gdif_job_itm New_job(String name, String made_by) { int job_id = conn.Sys_mgr().Autonum_next(job_tbl.Tbl_name(), job_tbl.Fld_job_id()); return job_tbl.Insert(job_id, name, made_by, Datetime_now.Get().XtoUtc(), ""); diff --git a/140_dbs/src/gplx/dbs/diffs/builds/Gfdb_diff_bldr_tst.java b/140_dbs/src/gplx/dbs/diffs/builds/Gfdb_diff_bldr_tst.java index e8ebff449..0073fd1c2 100644 --- a/140_dbs/src/gplx/dbs/diffs/builds/Gfdb_diff_bldr_tst.java +++ b/140_dbs/src/gplx/dbs/diffs/builds/Gfdb_diff_bldr_tst.java @@ -17,7 +17,7 @@ package gplx.dbs.diffs.builds; import gplx.*; import gplx.dbs.*; import gplx.dbs import org.junit.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.dbs.engines.mems.*; public class Gfdb_diff_bldr_tst { - private final Gfdb_diff_bldr_fxt fxt = new Gfdb_diff_bldr_fxt(); + private final Gfdb_diff_bldr_fxt fxt = new Gfdb_diff_bldr_fxt(); @Before public void init() {fxt.Clear();} @Test public void Same() { fxt.Init__tbl__old(Object_.Ary(1, "A") , Object_.Ary(2, "B")); @@ -54,13 +54,13 @@ public class Gfdb_diff_bldr_tst { } } class Gfdb_diff_bldr_fxt { - private final Gfdb_diff_bldr bldr = new Gfdb_diff_bldr(); - private final Db_conn old_conn, new_conn; - private final Gfdb_diff_tbl tbl; - private final Gfdb_diff_wkr__test wkr = new Gfdb_diff_wkr__test(); - private final Dbmeta_fld_itm[] flds_ary; - private final String tbl_name = "tbl"; - private final Gdif_bldr_ctx ctx = new Gdif_bldr_ctx(); + private final Gfdb_diff_bldr bldr = new Gfdb_diff_bldr(); + private final Db_conn old_conn, new_conn; + private final Gfdb_diff_tbl tbl; + private final Gfdb_diff_wkr__test wkr = new Gfdb_diff_wkr__test(); + private final Dbmeta_fld_itm[] flds_ary; + private final String tbl_name = "tbl"; + private final Gdif_bldr_ctx ctx = new Gdif_bldr_ctx(); public Gfdb_diff_bldr_fxt() { old_conn = Db_conn_utl.Conn__new("old_db"); new_conn = Db_conn_utl.Conn__new("new_db"); @@ -81,8 +81,8 @@ class Gfdb_diff_bldr_fxt { } } class Gfdb_diff_wkr__test implements Gfdb_diff_wkr { - private final List_adp list = List_adp_.New(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final List_adp list = List_adp_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); private Db_rdr old_rdr, new_rdr; public void Init_rdrs(Gdif_bldr_ctx ctx, Gfdb_diff_tbl tbl, Db_rdr old_rdr, Db_rdr new_rdr) { this.old_rdr = old_rdr; this.new_rdr = new_rdr; diff --git a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd.java b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd.java index 70e44a846..1c31ec58b 100644 --- a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd.java +++ b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs.cmds; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.*; import gplx.core.srls.*; import gplx.core.brys.fmtrs.*; import gplx.dbs.metas.*; @@ -77,12 +77,12 @@ class Gfo_srl_mgr_rdr__db { } class Gfdb_diff_cmd__idx__delete { public Gfdb_diff_cmd__idx__delete(Dbmeta_idx_itm old) {this.Old = old;} - public final Dbmeta_idx_itm Old; + public final Dbmeta_idx_itm Old; } class Gfdb_diff_cmd__idx__modify { public Gfdb_diff_cmd__idx__modify(Dbmeta_idx_itm old, Dbmeta_idx_itm cur) {this.Old = old; this.Cur = cur;} - public final Dbmeta_idx_itm Old; - public final Dbmeta_idx_itm Cur; + public final Dbmeta_idx_itm Old; + public final Dbmeta_idx_itm Cur; } class Gfdb_diff_txn { public int Id = 0; @@ -123,20 +123,20 @@ class Gfdb_diff_cmd__fld__create { } class Gfdb_diff_cmd__fld__delete { public Gfdb_diff_cmd__fld__delete(Dbmeta_fld_itm old) {this.Old = old;} - public final Dbmeta_fld_itm Old; + public final Dbmeta_fld_itm Old; } class Gfdb_diff_cmd__fld__modify { public Gfdb_diff_cmd__fld__modify(Dbmeta_fld_itm old, Dbmeta_fld_itm cur) {this.Old = old; this.Cur = cur;} - public final Dbmeta_fld_itm Old; - public final Dbmeta_fld_itm Cur; + public final Dbmeta_fld_itm Old; + public final Dbmeta_fld_itm Cur; } class Gfdb_diff_cmd__tbl__create { public Gfdb_diff_cmd__tbl__create(Dbmeta_tbl_itm cur) {this.Cur = cur;} - public final Dbmeta_tbl_itm Cur; + public final Dbmeta_tbl_itm Cur; } class Gfdb_diff_cmd__tbl__delete { public Gfdb_diff_cmd__tbl__delete(Dbmeta_tbl_itm old) {this.Old = old;} - public final Dbmeta_tbl_itm Old; + public final Dbmeta_tbl_itm Old; } class Gfdb_diff_cmd_bldr { public void Chk_tbls(List_adp rv, Dbmeta_tbl_mgr old_tbls, Dbmeta_tbl_mgr cur_tbls) { @@ -232,8 +232,8 @@ class Gfdb_diff_cmd__insert { } } class Gfdb_diff_cmd_sql_bldr { - private final Bry_fmtr fmtr = Bry_fmtr.new_(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_fmtr fmtr = Bry_fmtr.new_(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public void Bld_insert(Bry_bfr bfr, String tbl_name, String[] keys, String[] vals, int rng_bgn, int rng_end) { fmtr.Fmt_(Insert__fmt).Keys_(Insert__keys); fmtr.Bld_bfr_many(bfr, tbl_name, Bld_flds(tmp_bfr, ", ", "d.", keys, vals), Bld_join(keys), rng_bgn, rng_end); @@ -271,8 +271,8 @@ class Gfdb_diff_cmd_sql_bldr { } return tmp_bfr.To_str_and_clear(); } - private static final String[] Insert__keys = String_.Ary("tbl", "flds", "join", "rng_bgn", "rng_end"); - private static final String Insert__fmt = String_.Concat_lines_nl_skip_last + private static final String[] Insert__keys = String_.Ary("tbl", "flds", "join", "rng_bgn", "rng_end"); + private static final String Insert__fmt = String_.Concat_lines_nl_skip_last ( "INSERT INTO db_curr.~{tbl}" , "SELECT ~{flds}" , "FROM db_temp.~{tbl}_pkey k" @@ -280,8 +280,8 @@ class Gfdb_diff_cmd_sql_bldr { , "WHERE k.diff_type = 1" , "AND k.diff_uid BETWEEN ~{rng_bgn} AND ~{rng_end};" ); - private static final String[] Update__keys = String_.Ary("tbl", "flds", "join", "rng_bgn", "rng_end"); - private static final String Update__fmt = String_.Concat_lines_nl_skip_last + private static final String[] Update__keys = String_.Ary("tbl", "flds", "join", "rng_bgn", "rng_end"); + private static final String Update__fmt = String_.Concat_lines_nl_skip_last ( "REPLACE INTO db_curr.~{tbl}" , "SELECT ~{flds}" , "FROM db_temp.~{tbl}_pkey k" @@ -289,8 +289,8 @@ class Gfdb_diff_cmd_sql_bldr { , "WHERE k.diff_type = 2" , "AND k.diff_uid BETWEEN ~{rng_bgn} AND ~{rng_end};" ); - private static final String[] Delete__keys = String_.Ary("tbl", "pkey_where", "pkey_select", "join", "rng_bgn", "rng_end"); - private static final String Delete__fmt = String_.Concat_lines_nl_skip_last + private static final String[] Delete__keys = String_.Ary("tbl", "pkey_where", "pkey_select", "join", "rng_bgn", "rng_end"); + private static final String Delete__fmt = String_.Concat_lines_nl_skip_last ( "DELETE db_curr.~{tbl}" , "WHERE ~{pkey_where} IN" , "( SELECT ~{pkey_select}" diff --git a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd__idx__create.java b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd__idx__create.java index 2411adcd6..12f035bc7 100644 --- a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd__idx__create.java +++ b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd__idx__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs.cmds; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.*; import gplx.core.srls.*; import gplx.dbs.metas.*; @@ -65,7 +65,7 @@ class Gfdb_diff_cmd__idx__fld implements Gfo_srl_itm { rdr.Itm_end(); } - public static final Gfdb_diff_cmd__idx__fld Instance = new Gfdb_diff_cmd__idx__fld(); + public static final Gfdb_diff_cmd__idx__fld Instance = new Gfdb_diff_cmd__idx__fld(); } // class Gfdb_diff_cmd__tbl__fld : Gfo_srl_itm { // public Gfdb_diff_cmd__tbl__fld(Dbmeta_fld_itm cur) {this.cur = cur;} @@ -111,5 +111,5 @@ class Gfdb_diff_cmd__idx__fld implements Gfo_srl_itm { //// Dbmeta_fld_tid tid = tbl.Flds().Get_by(name).Type(); // } // -// public static final Gfdb_diff_cmd__tbl__fld Instance = new Gfdb_diff_cmd__tbl__fld(); +// public static final Gfdb_diff_cmd__tbl__fld Instance = new Gfdb_diff_cmd__tbl__fld(); // } diff --git a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd_sql_bldr_tst.java b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd_sql_bldr_tst.java index 5a643b71d..1719de491 100644 --- a/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd_sql_bldr_tst.java +++ b/140_dbs/src/gplx/dbs/diffs/cmds/Gfdb_diff_cmd_sql_bldr_tst.java @@ -17,7 +17,7 @@ package gplx.dbs.diffs.cmds; import gplx.*; import gplx.dbs.*; import gplx.dbs.d import org.junit.*; import gplx.dbs.*; import gplx.dbs.engines.mems.*; public class Gfdb_diff_cmd_sql_bldr_tst { - private final Gfdb_diff_cmd_sql_bldr_fxt fxt = new Gfdb_diff_cmd_sql_bldr_fxt(); + private final Gfdb_diff_cmd_sql_bldr_fxt fxt = new Gfdb_diff_cmd_sql_bldr_fxt(); @Test public void Insert() { fxt.Test__insert("tbl1", String_.Ary("key1", "key2"), String_.Ary("fld1", "fld2"), 0, 99, String_.Concat_lines_nl_skip_last ( "INSERT INTO db_curr.tbl1" @@ -53,7 +53,7 @@ public class Gfdb_diff_cmd_sql_bldr_tst { } class Gfdb_diff_cmd_sql_bldr_fxt { private Gfdb_diff_cmd_sql_bldr bldr = new Gfdb_diff_cmd_sql_bldr(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Test__insert(String tbl_name, String[] keys, String[] flds, int rng_bgn, int rng_end, String expd) { bldr.Bld_insert(bfr, tbl_name, keys, flds, 0, 99); Tfds.Eq_str_lines(expd, bfr.To_str_and_clear()); diff --git a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_cmd_tbl.java b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_cmd_tbl.java index e0050efae..29a467bc0 100644 --- a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_cmd_tbl.java +++ b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_cmd_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.*; public class Gdif_cmd_tbl implements Rls_able { private String tbl_name = "gdif_cmd"; private String fld_grp_id, fld_cmd_id, fld_tid, fld_data; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final Db_conn conn; private Db_stmt stmt_insert; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final Db_conn conn; private Db_stmt stmt_insert; public Gdif_cmd_tbl(Db_conn conn) { this.conn = conn; fld_grp_id = flds.Add_int("grp_id"); fld_cmd_id = flds.Add_int("cmd_id"); fld_tid = flds.Add_int("tid"); fld_data = flds.Add_text("data"); diff --git a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_job_tbl.java b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_job_tbl.java index ca176c4fd..dbe886f3f 100644 --- a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_job_tbl.java +++ b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_job_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.*; public class Gdif_job_tbl implements Rls_able { private String tbl_name = "gdif_job"; private String fld_job_id, fld_name, fld_made_by, fld_made_on, fld_data; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final Db_conn conn; private Db_stmt stmt_insert; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final Db_conn conn; private Db_stmt stmt_insert; public Gdif_job_tbl(Db_conn conn) { this.conn = conn; fld_job_id = flds.Add_int_pkey("job_id"); fld_name = flds.Add_str("name", 255); fld_made_by = flds.Add_str("made_by", 255); fld_made_on = flds.Add_date("made_on"); fld_data = flds.Add_text("data"); diff --git a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_txn_tbl.java b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_txn_tbl.java index 427148274..2dc4dd597 100644 --- a/140_dbs/src/gplx/dbs/diffs/itms/Gdif_txn_tbl.java +++ b/140_dbs/src/gplx/dbs/diffs/itms/Gdif_txn_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.diffs.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.diffs.*; public class Gdif_txn_tbl implements Rls_able { private String tbl_name = "gdif_txn"; private String fld_job_id, fld_txn_id, fld_cmd_id, fld_owner_txn; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final Db_conn conn; private Db_stmt stmt_insert; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final Db_conn conn; private Db_stmt stmt_insert; public Gdif_txn_tbl(Db_conn conn) { this.conn = conn; fld_job_id = flds.Add_int("job_id"); fld_txn_id = flds.Add_int("txn_id"); fld_cmd_id = flds.Add_int("cmd_id"); fld_owner_txn = flds.Add_int("owner_txn"); diff --git a/140_dbs/src/gplx/dbs/engines/Db_engine.java b/140_dbs/src/gplx/dbs/engines/Db_engine.java index d8d27403b..b512071df 100644 --- a/140_dbs/src/gplx/dbs/engines/Db_engine.java +++ b/140_dbs/src/gplx/dbs/engines/Db_engine.java @@ -29,7 +29,7 @@ import gplx.dbs.Dbmeta_tbl_itm; import gplx.dbs.conn_props.Db_conn_props_mgr; import gplx.dbs.metas.Dbmeta_tbl_mgr; import gplx.dbs.qrys.bats.Db_batch_mgr; -import gplx.dbs.sqls.Sql_qry_wtr; +import gplx.dbs.sqls.SqlQryWtr; import gplx.dbs.wkrs.SqlWkrMgr; public interface Db_engine { @@ -37,7 +37,7 @@ public interface Db_engine { Db_conn_info Conn_info(); Db_conn_props_mgr Props(); Db_batch_mgr Batch_mgr(); - Sql_qry_wtr Sql_wtr(); + SqlQryWtr Sql_wtr(); void CtorConn(SqlWkrMgr wkrMgr); Db_engine New_clone(Db_conn_info conn_info); void Conn_open(); diff --git a/140_dbs/src/gplx/dbs/engines/Db_engine_sql_base.java b/140_dbs/src/gplx/dbs/engines/Db_engine_sql_base.java index 6a7de7342..fae8163ef 100644 --- a/140_dbs/src/gplx/dbs/engines/Db_engine_sql_base.java +++ b/140_dbs/src/gplx/dbs/engines/Db_engine_sql_base.java @@ -34,7 +34,7 @@ import gplx.dbs.metas.Dbmeta_tbl_mgr; import gplx.dbs.qrys.Db_qry_sql; import gplx.dbs.qrys.Db_stmt_cmd; import gplx.dbs.qrys.bats.Db_batch_mgr; -import gplx.dbs.sqls.Sql_qry_wtr; +import gplx.dbs.sqls.SqlQryWtr; import java.sql.Connection; import java.sql.DriverManager; @@ -45,9 +45,9 @@ public abstract class Db_engine_sql_base implements Db_engine { @gplx.Internal protected void Ctor(Db_conn_info conn_info) {this.conn_info = conn_info;} public abstract String Tid(); public Db_conn_info Conn_info() {return conn_info;} protected Db_conn_info conn_info; - public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); - public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); - public abstract Sql_qry_wtr Sql_wtr(); + public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); + public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); + public abstract SqlQryWtr Sql_wtr(); public abstract Db_engine New_clone(Db_conn_info conn_info); public Db_rdr Exec_as_rdr__rls_manual(Object rdr_obj, String sql) {return New_rdr(null, rdr_obj, sql);} public Db_rdr Exec_as_rdr__rls_auto(Db_stmt stmt, Object rdr_obj, String sql) {return New_rdr(stmt, rdr_obj, sql);} @@ -64,7 +64,7 @@ public abstract class Db_engine_sql_base implements Db_engine { } public Object Exec_as_obj(Db_qry qry) { if (qry.Tid() == Db_qry_.Tid_flush) return null; // ignore flush (delete-db) statements - String sql = this.Sql_wtr().To_sql_str(qry, false); // DBG: Tfds.Write(sql); + String sql = this.Sql_wtr().ToSqlStr(qry, false); // DBG: Tfds.Write(sql); return qry.Exec_is_rdr() ? (Object)this.Exec_as_rdr(sql) : this.Exec_as_int(sql); } protected int Exec_as_int(String sql) { diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_engine.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_engine.java index 56b95fd44..aabbf9e34 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_engine.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_engine.java @@ -18,17 +18,17 @@ import gplx.core.stores.*; import gplx.dbs.metas.*; import gplx.dbs.sqls.*; impo import gplx.dbs.wkrs.SqlWkrMgr; public class Mem_engine implements Db_engine { - private final Hash_adp tbl_hash = Hash_adp_.New(); + private final Hash_adp tbl_hash = Hash_adp_.New(); Mem_engine(Db_conn_info conn_info) { this.conn_info = conn_info; this.qry_runner = new Mem_exec_select(this); } public String Tid() {return Mem_conn_info.Tid_const;} public Db_conn_info Conn_info() {return conn_info;} private Db_conn_info conn_info; - public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); - public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); + public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); + public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); public Mem_exec_select Qry_runner() {return qry_runner;} private Mem_exec_select qry_runner; - public Sql_qry_wtr Sql_wtr() {return sql_wtr;} private final Sql_qry_wtr sql_wtr = Sql_qry_wtr_.New__basic(); + public SqlQryWtr Sql_wtr() {return sql_wtr;} private final SqlQryWtr sql_wtr = SqlQryWtrUtl.NewBasic(); @Override public void CtorConn(SqlWkrMgr wkrMgr) {} public Db_engine New_clone(Db_conn_info conn_info) {return new Mem_engine(conn_info);} public Db_stmt Stmt_by_qry(Db_qry qry) {return new Mem_stmt(this, qry);} @@ -59,7 +59,7 @@ public class Mem_engine implements Db_engine { public void Meta_idx_create(Gfo_usr_dlg usr_dlg, Dbmeta_idx_itm... ary) {} // TODO_OLD: implement unique index public void Meta_idx_delete(String idx) {} public void Meta_fld_append(String tbl, Dbmeta_fld_itm fld) {} - public Dbmeta_tbl_mgr Meta_mgr() {return meta_mgr;} private final Dbmeta_tbl_mgr meta_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); + public Dbmeta_tbl_mgr Meta_mgr() {return meta_mgr;} private final Dbmeta_tbl_mgr meta_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); public boolean Meta_tbl_exists(String tbl) {return tbl_hash.Has(tbl);} public boolean Meta_fld_exists(String tbl, String fld) { Mem_tbl mem_tbl = (Mem_tbl)tbl_hash.Get_by(tbl); if (mem_tbl == null) return false; @@ -69,5 +69,5 @@ public class Mem_engine implements Db_engine { public void Env_db_attach(String alias, Db_conn conn) {} public void Env_db_attach(String alias, Io_url db_url) {} public void Env_db_detach(String alias) {} - public static final Mem_engine Instance = new Mem_engine(); Mem_engine() {} + public static final Mem_engine Instance = new Mem_engine(); Mem_engine() {} } diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_exec_select.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_exec_select.java index b2ccd89d5..d2eff1d6d 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_exec_select.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_exec_select.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.core.criterias.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.itms.*; public class Mem_exec_select { - private final Mem_engine engine; - private final List_adp tmp_where_rows = List_adp_.New(); + private final Mem_engine engine; + private final List_adp tmp_where_rows = List_adp_.New(); public Mem_exec_select(Mem_engine engine) {this.engine = engine;} public Db_rdr Select(Mem_stmt stmt) { Db_qry stmt_qry = stmt.Qry(); @@ -71,7 +71,7 @@ public class Mem_exec_select { } } class Mem_sorter implements gplx.core.lists.ComparerAble { - private final Sql_order_fld[] flds; + private final Sql_order_fld[] flds; public Mem_sorter(Sql_order_fld[] flds) { this.flds = flds; } diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_qry_set.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_qry_set.java index bba045def..52aaad5f2 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_qry_set.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_qry_set.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; -public class Mem_qry_set { - private final List_adp rows = List_adp_.New(); - public int Len() {return rows.Count();} - public Mem_row Get_at(int i) {return (Mem_row)rows.Get_at(i);} - public void Add(Mem_row row) {rows.Add(row);} -} +package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; +public class Mem_qry_set { + private final List_adp rows = List_adp_.New(); + public int Len() {return rows.Count();} + public Mem_row Get_at(int i) {return (Mem_row)rows.Get_at(i);} + public void Add(Mem_row row) {rows.Add(row);} +} diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_rdr.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_rdr.java index 0dffab638..6b485ffbd 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_rdr.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_rdr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; public class Mem_rdr implements Db_rdr { - private final Mem_row[] rows; private int row_idx = -1; private final int rows_len; + private final Mem_row[] rows; private int row_idx = -1; private final int rows_len; private Mem_row row; public Mem_rdr(String[] cols, Mem_row[] rows) { this.rows = rows; this.rows_len = rows.length; @@ -29,7 +29,7 @@ public class Mem_rdr implements Db_rdr { public byte[] Read_bry(String k) {return (byte[])row.Get_by(k);} public String Read_str(String k) {return (String)row.Get_by(k);} public byte[] Read_bry_by_str(String k) {return Bry_.new_u8_safe((String)row.Get_by(k));} // NOTE: null b/c db can have NULL - @gplx.Virtual public void Save_bry_in_parts(Io_url url, String tbl, String fld, String crt_key, Object crt_val) {throw Err_.new_unimplemented();} + public void Save_bry_in_parts(Io_url url, String tbl, String fld, String crt_key, Object crt_val) {throw Err_.new_unimplemented();} public DateAdp Read_date_by_str(String k) {return DateAdp_.parse_iso8561((String)row.Get_by(k));} public byte Read_byte(String k) {return Byte_.Cast(row.Get_by(k));} public int Read_int(String k) {return Int_.Cast(row.Get_by(k));} diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_row.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_row.java index fdb2d3528..dd5a1cba2 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_row.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_row.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; public class Mem_row implements Gfo_invk { - private final Ordered_hash hash = Ordered_hash_.New(); - private final Ordered_hash flds = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash flds = Ordered_hash_.New(); public int Len() {return hash.Len();} public String Fld_at(int i) {return (String)flds.Get_at(i);} public Object Get_at(int i) {return hash.Get_at(i);} @@ -32,6 +32,6 @@ public class Mem_row implements Gfo_invk { if (rv == null) return Gfo_invk_.Rv_unhandled; return rv; } - public static final Mem_row[] Ary_empty = new Mem_row[0]; - public static final Mem_row Null_row = new Mem_row(); + public static final Mem_row[] Ary_empty = new Mem_row[0]; + public static final Mem_row Null_row = new Mem_row(); } diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt.java index 139a1e8c5..9b9c3c5cd 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.core.stores.*; public class Mem_stmt implements Db_stmt { private static final String Key_na = ""; // key is not_available; only called by procs with signature of Val( v); - private final Ordered_hash val_list = Ordered_hash_.New(); + private final Ordered_hash val_list = Ordered_hash_.New(); public Mem_stmt(Mem_engine engine, Db_qry qry) {Ctor_stmt(engine, qry);} private Mem_engine engine; public void Ctor_stmt(Db_engine engine, Db_qry qry) {this.engine = (Mem_engine)engine; this.qry = qry;} - public Mem_stmt_args Stmt_args() {return stmt_args;} private final Mem_stmt_args stmt_args = new Mem_stmt_args(); + public Mem_stmt_args Stmt_args() {return stmt_args;} private final Mem_stmt_args stmt_args = new Mem_stmt_args(); public int Args_len() {return val_list.Count();} public Object Args_get_at(int i) {return val_list.Get_at(i);} public Object Args_get_by(String k) {return val_list.Get_by(k);} diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt_args.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt_args.java index 388107b68..3c0a1db5e 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt_args.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_stmt_args.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.core.criterias.*; public class Mem_stmt_args { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); private int cur_idx = -1; public void Clear() {list.Clear(); cur_idx = -1;} public void Add(String k, Object v) {list.Add(Keyval_.new_(k, v));} diff --git a/140_dbs/src/gplx/dbs/engines/mems/Mem_tbl.java b/140_dbs/src/gplx/dbs/engines/mems/Mem_tbl.java index 1fa4d9b2e..e8a447456 100644 --- a/140_dbs/src/gplx/dbs/engines/mems/Mem_tbl.java +++ b/140_dbs/src/gplx/dbs/engines/mems/Mem_tbl.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.mems; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.core.primitives.*; import gplx.core.criterias.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.itms.*; import gplx.dbs.metas.*; public class Mem_tbl { - private final List_adp where_rows = List_adp_.New(); - private final Hash_adp autonum_hash = Hash_adp_.New(); + private final List_adp where_rows = List_adp_.New(); + private final Hash_adp autonum_hash = Hash_adp_.New(); public Mem_tbl(Dbmeta_tbl_itm meta) {this.meta = meta;} - public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; - public final List_adp rows = List_adp_.New(); + public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; + public final List_adp rows = List_adp_.New(); public int Insert(Mem_stmt stmt) { Mem_row itm = new Mem_row(); Dbmeta_fld_mgr flds = meta.Flds(); diff --git a/140_dbs/src/gplx/dbs/engines/mysql/Mysql_engine.java b/140_dbs/src/gplx/dbs/engines/mysql/Mysql_engine.java index 7fa298c8e..339f643c0 100644 --- a/140_dbs/src/gplx/dbs/engines/mysql/Mysql_engine.java +++ b/140_dbs/src/gplx/dbs/engines/mysql/Mysql_engine.java @@ -21,15 +21,15 @@ import gplx.dbs.Db_conn_info; import gplx.dbs.engines.Db_engine; import gplx.dbs.engines.Db_engine_sql_base; import gplx.dbs.metas.Dbmeta_tbl_mgr; -import gplx.dbs.sqls.Sql_qry_wtr; -import gplx.dbs.sqls.Sql_qry_wtr_; +import gplx.dbs.sqls.SqlQryWtr; +import gplx.dbs.sqls.SqlQryWtrUtl; import gplx.dbs.wkrs.SqlWkrMgr; import java.sql.Connection; import java.sql.ResultSet; public class Mysql_engine extends Db_engine_sql_base { @Override public String Tid() {return Mysql_conn_info.Tid_const;} - @Override public Sql_qry_wtr Sql_wtr() {return Sql_qry_wtr_.New__mysql();} + @Override public SqlQryWtr Sql_wtr() {return SqlQryWtrUtl.NewMysql();} @Override public void CtorConn(SqlWkrMgr wkrMgr) {} @Override protected String Txn_bgn_str() {return "START TRANSACTION;";} @Override protected String Txn_end_str() {return "COMMIT;";} @@ -45,7 +45,7 @@ public class Mysql_engine extends Db_engine_sql_base { Connection rv = Conn_make_by_url("jdbc:mysql://localhost/" + conn_info_as_mysql.Database() + "?characterEncoding=UTF8&useSSL=false", conn_info_as_mysql.Uid(), conn_info_as_mysql.Pwd()); return rv; } - public static final Mysql_engine Instance = new Mysql_engine(); Mysql_engine() {} + public static final Mysql_engine Instance = new Mysql_engine(); Mysql_engine() {} } class Mysql_rdr extends Db_data_rdr { //PATCH:MYSQL:byte actually returned as int by Jdbc ResultSet (or MYSQL impmentation); convert to byte diff --git a/140_dbs/src/gplx/dbs/engines/noops/Noop_conn_info.java b/140_dbs/src/gplx/dbs/engines/noops/Noop_conn_info.java index b25caf51d..38661ba33 100644 --- a/140_dbs/src/gplx/dbs/engines/noops/Noop_conn_info.java +++ b/140_dbs/src/gplx/dbs/engines/noops/Noop_conn_info.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.engines.noops; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; -public class Noop_conn_info extends Db_conn_info__base { - public Noop_conn_info(String raw, String db_api, String database) {super(raw, db_api, database);} - @Override public String Key() {return Tid_const;} public static final String Tid_const = "null_db"; - @Override public Db_conn_info New_self(String raw, Keyval_hash hash) {return this;} - public static final Noop_conn_info Instance = new Noop_conn_info("gplx_key=null_db", "", ""); -} +package gplx.dbs.engines.noops; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; +public class Noop_conn_info extends Db_conn_info__base { + public Noop_conn_info(String raw, String db_api, String database) {super(raw, db_api, database);} + @Override public String Key() {return Tid_const;} public static final String Tid_const = "null_db"; + @Override public Db_conn_info New_self(String raw, Keyval_hash hash) {return this;} + public static final Noop_conn_info Instance = new Noop_conn_info("gplx_key=null_db", "", ""); +} diff --git a/140_dbs/src/gplx/dbs/engines/noops/Noop_engine.java b/140_dbs/src/gplx/dbs/engines/noops/Noop_engine.java index 61af33d7c..d65d56cfc 100644 --- a/140_dbs/src/gplx/dbs/engines/noops/Noop_engine.java +++ b/140_dbs/src/gplx/dbs/engines/noops/Noop_engine.java @@ -20,9 +20,9 @@ import gplx.dbs.wkrs.SqlWkrMgr; public class Noop_engine implements Db_engine { public String Tid() {return Noop_conn_info.Tid_const;} public Db_conn_info Conn_info() {return Db_conn_info_.Null;} - public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); - public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); - public Sql_qry_wtr Sql_wtr() {return sql_wtr;} private final Sql_qry_wtr sql_wtr = Sql_qry_wtr_.New__basic(); + public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); + public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); + public SqlQryWtr Sql_wtr() {return sql_wtr;} private final SqlQryWtr sql_wtr = SqlQryWtrUtl.NewBasic(); @Override public void CtorConn(SqlWkrMgr wkrMgr) {} public void Conn_open() {} public void Conn_term() {} @@ -48,6 +48,6 @@ public class Noop_engine implements Db_engine { public boolean Meta_tbl_exists(String tbl) {return false;} public boolean Meta_fld_exists(String tbl, String fld) {return false;} public boolean Meta_idx_exists(String idx) {return false;} - public Dbmeta_tbl_mgr Meta_mgr() {return meta_tbl_mgr;} private final Dbmeta_tbl_mgr meta_tbl_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); - public static final Noop_engine Instance = new Noop_engine(); Noop_engine() {} + public Dbmeta_tbl_mgr Meta_mgr() {return meta_tbl_mgr;} private final Dbmeta_tbl_mgr meta_tbl_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); + public static final Noop_engine Instance = new Noop_engine(); Noop_engine() {} } diff --git a/140_dbs/src/gplx/dbs/engines/postgres/Postgres_engine.java b/140_dbs/src/gplx/dbs/engines/postgres/Postgres_engine.java index 8fb90918d..28e3a74ae 100644 --- a/140_dbs/src/gplx/dbs/engines/postgres/Postgres_engine.java +++ b/140_dbs/src/gplx/dbs/engines/postgres/Postgres_engine.java @@ -14,7 +14,8 @@ GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.dbs.engines.postgres; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; -import gplx.core.stores.*; import gplx.dbs.engines.*; import gplx.dbs.sqls.*; import gplx.dbs.metas.*; +import gplx.core.stores.*; +import gplx.dbs.sqls.*; import gplx.dbs.metas.*; import gplx.dbs.wkrs.SqlWkrMgr; import java.sql.Connection; @@ -22,7 +23,7 @@ import java.sql.ResultSet; public class Postgres_engine extends Db_engine_sql_base { @Override public String Tid() {return Postgres_conn_info.Tid_const;} - @Override public Sql_qry_wtr Sql_wtr() {return Sql_qry_wtr_.New__mysql();} + @Override public SqlQryWtr Sql_wtr() {return SqlQryWtrUtl.NewMysql();} @Override public void CtorConn(SqlWkrMgr wkrMgr) {} @Override public Db_engine New_clone(Db_conn_info connectInfo) { Postgres_engine rv = new Postgres_engine(); @@ -35,5 +36,5 @@ public class Postgres_engine extends Db_engine_sql_base { Postgres_conn_info conn_info_as_postgres = (Postgres_conn_info)conn_info; return Conn_make_by_url("jdbc:" + conn_info_as_postgres.Key() + "://localhost/" + conn_info_as_postgres.Database(), conn_info_as_postgres.Uid(), conn_info_as_postgres.Pwd()); } - public static final Postgres_engine Instance = new Postgres_engine(); Postgres_engine() {} + public static final Postgres_engine Instance = new Postgres_engine(); Postgres_engine() {} } diff --git a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine.java b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine.java index b1bd0bbf3..722732284 100644 --- a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine.java +++ b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine.java @@ -43,7 +43,8 @@ import gplx.dbs.Dbmeta_fld_itm; import gplx.dbs.engines.Db_engine; import gplx.dbs.engines.Db_engine_sql_base; import gplx.dbs.metas.Dbmeta_tbl_mgr; -import gplx.dbs.sqls.Sql_qry_wtr_; +import gplx.dbs.sqls.SqlQryWtr; +import gplx.dbs.sqls.SqlQryWtrUtl; import gplx.dbs.wkrs.SqlWkrMgr; import gplx.dbs.wkrs.randoms.SqliteRandomWkr; import org.sqlite.SQLiteConnection; @@ -52,13 +53,13 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; public class Sqlite_engine extends Db_engine_sql_base { - private final Sqlite_txn_mgr txn_mgr; private final Sqlite_schema_mgr schema_mgr; + private final Sqlite_txn_mgr txn_mgr; private final Sqlite_schema_mgr schema_mgr; Sqlite_engine() { this.txn_mgr = new Sqlite_txn_mgr(this); this.schema_mgr = new Sqlite_schema_mgr(this); } @Override public String Tid() {return Sqlite_conn_info.Key_const;} - @Override public gplx.dbs.sqls.Sql_qry_wtr Sql_wtr() {return Sql_qry_wtr_.New__sqlite();} + @Override public SqlQryWtr Sql_wtr() {return SqlQryWtrUtl.NewSqlite();} public void CtorConn(SqlWkrMgr wkrMgr) { wkrMgr.Set(new SqliteRandomWkr()); } @@ -122,7 +123,7 @@ public class Sqlite_engine extends Db_engine_sql_base { catch (SQLException e) {Gfo_usr_dlg_.Instance.Warn_many("", "", "failed to set busy timeout; err=~{0}", Err_.Message_gplx_log(e));} return rv; } - public static final Sqlite_engine Instance = new Sqlite_engine(); + public static final Sqlite_engine Instance = new Sqlite_engine(); } class Db_rdr__sqlite extends Db_rdr__basic { @Override public byte Read_byte(String k) {try {return (byte)Int_.Cast(rdr.getObject(k));} catch (Exception e) {throw Err_.new_exc(e, "db", "read failed", "k", k, "type", Byte_.Cls_val_name);}} @Override public boolean Read_bool_by_byte(String k) { diff --git a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine_.java b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine_.java index d6d9175a4..a93125ed2 100644 --- a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine_.java +++ b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_engine_.java @@ -73,7 +73,7 @@ public class Sqlite_engine_ { public static final boolean Supports_read_binary_stream = false; public static final boolean Supports_indexed_by = true; public static String X_date_to_str(DateAdp v) {return v == Date_null ? "" : v.XtoStr_fmt_iso_8561();} - public static final DateAdp Date_null = null; + public static final DateAdp Date_null = null; public static final byte Wildcard_byte = Byte_ascii.Hash; public static final String Wildcard_str = "%"; public static int Read_only_detection = Io_mgr.Read_only__basic__file; diff --git a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_pragma.java b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_pragma.java index 306ae95c5..7fff0c0a0 100644 --- a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_pragma.java +++ b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_pragma.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.dbs.engines.sqlite; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; -import gplx.core.primitives.*; import gplx.dbs.qrys.*; import gplx.dbs.utls.*; import gplx.dbs.engines.*; import gplx.dbs.engines.sqlite.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.dbs.engines.sqlite; import gplx.*; import gplx.dbs.*; +import gplx.dbs.sqls.SqlQryWtr; public class Sqlite_pragma implements Db_qry { - private final String sql; + private final String sql; public Sqlite_pragma(boolean parens, String key, String val) { String fmt = parens ? "PRAGMA {0}({1});" : "PRAGMA {0} = {1};"; this.sql = String_.Format(fmt, key, val); @@ -24,7 +24,7 @@ public class Sqlite_pragma implements Db_qry { public int Tid() {return Db_qry_.Tid_pragma;} public boolean Exec_is_rdr() {return false;} public String Base_table() {return "";} - public String To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr wtr) {return sql;} + public String To_sql__exec(SqlQryWtr wtr) {return sql;} public static final String Const__journal_mode = "journal_mode", Const__journal_mode__wal = "wal", Const__journal_mode__off = "off"; public static Sqlite_pragma New__journal__delete() {return new Sqlite_pragma(Bool_.N, Const__journal_mode , "delete");} // default diff --git a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_schema_mgr.java b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_schema_mgr.java index a39a2db40..ecd8abc78 100644 --- a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_schema_mgr.java +++ b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_schema_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.sqlite; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.dbs.qrys.*; import gplx.dbs.metas.*; import gplx.dbs.metas.parsers.*; public class Sqlite_schema_mgr implements Dbmeta_reload_cmd { - private final Db_engine engine; private boolean init = true; - private final Dbmeta_idx_mgr idx_mgr = new Dbmeta_idx_mgr(); + private final Db_engine engine; private boolean init = true; + private final Dbmeta_idx_mgr idx_mgr = new Dbmeta_idx_mgr(); public Sqlite_schema_mgr(Db_engine engine) { this.engine = engine; this.tbl_mgr = new Dbmeta_tbl_mgr(this); @@ -26,7 +26,7 @@ public class Sqlite_schema_mgr implements Dbmeta_reload_cmd { public Dbmeta_tbl_mgr Tbl_mgr() { if (init) Init(engine); return tbl_mgr; - } private final Dbmeta_tbl_mgr tbl_mgr; + } private final Dbmeta_tbl_mgr tbl_mgr; public boolean Tbl_exists(String name) { if (init) Init(engine); return tbl_mgr.Has(name); diff --git a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_txn_mgr.java b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_txn_mgr.java index 0200f6ab5..e6d85c4ca 100644 --- a/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_txn_mgr.java +++ b/140_dbs/src/gplx/dbs/engines/sqlite/Sqlite_txn_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.engines.sqlite; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*; import gplx.dbs.qrys.*; public class Sqlite_txn_mgr { - private final List_adp txn_list = List_adp_.New(); - public Sqlite_txn_mgr(Db_engine engine) {this.engine = engine;} private final Db_engine engine; + private final List_adp txn_list = List_adp_.New(); + public Sqlite_txn_mgr(Db_engine engine) {this.engine = engine;} private final Db_engine engine; private boolean pragma_needed = Bool_.Y, txn_started = Bool_.N; // NOTE: txns only support 1 level; SQLite fails when nesting transactions; DATE:2015-03-11 public void Txn_bgn(String name) { if (String_.Len_eq_0(name)) name = "unnamed"; diff --git a/140_dbs/src/gplx/dbs/engines/tdbs/TdbEngine.java b/140_dbs/src/gplx/dbs/engines/tdbs/TdbEngine.java index b63444e40..c221e0470 100644 --- a/140_dbs/src/gplx/dbs/engines/tdbs/TdbEngine.java +++ b/140_dbs/src/gplx/dbs/engines/tdbs/TdbEngine.java @@ -20,9 +20,9 @@ import gplx.dbs.wkrs.SqlWkrMgr; public class TdbEngine implements Db_engine { public String Tid() {return Tdb_conn_info.Tid_const;} public Db_conn_info Conn_info() {return conn_info;} private Db_conn_info conn_info; - public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); - public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); - public Sql_qry_wtr Sql_wtr() {return sql_wtr;} private final Sql_qry_wtr sql_wtr = Sql_qry_wtr_.New__basic(); + public Db_conn_props_mgr Props() {return props;} private final Db_conn_props_mgr props = new Db_conn_props_mgr(); + public Db_batch_mgr Batch_mgr() {return batch_mgr;} private final Db_batch_mgr batch_mgr = new Db_batch_mgr(); + public SqlQryWtr Sql_wtr() {return sql_wtr;} private final SqlQryWtr sql_wtr = SqlQryWtrUtl.NewBasic(); public TdbDatabase Db() {return db;} TdbDatabase db; @Override public void CtorConn(SqlWkrMgr wkrMgr) {} public void Conn_open() { @@ -45,7 +45,7 @@ public class TdbEngine implements Db_engine { Db_qryWkr wkr = (Db_qryWkr)wkrs.Get_by_or_fail(qry.Tid()); return wkr.Exec(this, qry); } - public Db_stmt Stmt_by_qry(Db_qry qry) {return new Db_stmt_sql().Parse(qry, sql_wtr.To_sql_str(qry, true));} + public Db_stmt Stmt_by_qry(Db_qry qry) {return new Db_stmt_sql().Parse(qry, sql_wtr.ToSqlStr(qry, true));} public Object Stmt_by_sql(String sql) {throw Err_.new_unimplemented();} public Db_rdr Exec_as_rdr__rls_manual(Object rdr_obj, String sql) {return Db_rdr_.Empty;} public Db_rdr Exec_as_rdr__rls_auto(Db_stmt stmt, Object rdr_obj, String sql) {return Db_rdr_.Empty;} @@ -72,10 +72,10 @@ public class TdbEngine implements Db_engine { public void Env_db_attach(String alias, Db_conn conn) {} public void Env_db_attach(String alias, Io_url db_url) {} public void Env_db_detach(String alias) {} - public Dbmeta_tbl_mgr Meta_mgr() {return meta_mgr;} private final Dbmeta_tbl_mgr meta_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); + public Dbmeta_tbl_mgr Meta_mgr() {return meta_mgr;} private final Dbmeta_tbl_mgr meta_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); Hash_adp wkrs = Hash_adp_.New(); TdbDbLoadMgr loadMgr = TdbDbLoadMgr.new_(); TdbDbSaveMgr saveMgr = TdbDbSaveMgr.new_(); - public static final TdbEngine Instance = new TdbEngine(); + public static final TdbEngine Instance = new TdbEngine(); void CtorTdbEngine(Db_conn_info conn_info) { this.conn_info = conn_info; wkrs.Add(Db_qry_.Tid_select, TdbSelectWkr.Instance); @@ -91,7 +91,7 @@ interface Db_qryWkr { Object Exec(Db_engine engine, Db_qry cmd); } class Db_qryWkr_ { - public static final Db_qryWkr Null = new Db_qryWrk_null(); + public static final Db_qryWkr Null = new Db_qryWrk_null(); } class Db_qryWrk_null implements Db_qryWkr { public Object Exec(Db_engine engine, Db_qry cmd) {return null;} diff --git a/140_dbs/src/gplx/dbs/metas/Dbmeta_fld_mgr.java b/140_dbs/src/gplx/dbs/metas/Dbmeta_fld_mgr.java index 6000da610..959567002 100644 --- a/140_dbs/src/gplx/dbs/metas/Dbmeta_fld_mgr.java +++ b/140_dbs/src/gplx/dbs/metas/Dbmeta_fld_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; public class Dbmeta_fld_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public int Len() {return hash.Count();} public void Clear() {hash.Clear();} public void Add(Dbmeta_fld_itm itm) {hash.Add(itm.Name(), itm);} diff --git a/140_dbs/src/gplx/dbs/metas/Dbmeta_idx_fld.java b/140_dbs/src/gplx/dbs/metas/Dbmeta_idx_fld.java index 3fa0ad349..99da963a9 100644 --- a/140_dbs/src/gplx/dbs/metas/Dbmeta_idx_fld.java +++ b/140_dbs/src/gplx/dbs/metas/Dbmeta_idx_fld.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; public class Dbmeta_idx_fld { public Dbmeta_idx_fld(String name, int sort_tid) {this.Name = name; this.Sort_tid = sort_tid;} @@ -23,7 +23,7 @@ public class Dbmeta_idx_fld { && Sort_tid == comp.Sort_tid; } - public static final Dbmeta_idx_fld[] Ary_empty = new Dbmeta_idx_fld[0]; + public static final Dbmeta_idx_fld[] Ary_empty = new Dbmeta_idx_fld[0]; public static final int Sort_tid__none = 0, Sort_tid__asc = 1, Sort_tid__desc = 2; public static boolean Ary_eq(Dbmeta_idx_fld[] lhs_ary, Dbmeta_idx_fld[] rhs_ary) { int lhs_len = lhs_ary.length, rhs_len = rhs_ary.length; diff --git a/140_dbs/src/gplx/dbs/metas/Dbmeta_reload_cmd_.java b/140_dbs/src/gplx/dbs/metas/Dbmeta_reload_cmd_.java index da7883e06..66abef92b 100644 --- a/140_dbs/src/gplx/dbs/metas/Dbmeta_reload_cmd_.java +++ b/140_dbs/src/gplx/dbs/metas/Dbmeta_reload_cmd_.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; -public class Dbmeta_reload_cmd_ { - public static final Dbmeta_reload_cmd Noop = new Dbmeta_reload_cmd__noop(); -} -class Dbmeta_reload_cmd__noop implements Dbmeta_reload_cmd { - public void Load_all() {} -} +package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; +public class Dbmeta_reload_cmd_ { + public static final Dbmeta_reload_cmd Noop = new Dbmeta_reload_cmd__noop(); +} +class Dbmeta_reload_cmd__noop implements Dbmeta_reload_cmd { + public void Load_all() {} +} diff --git a/140_dbs/src/gplx/dbs/metas/Dbmeta_tbl_mgr.java b/140_dbs/src/gplx/dbs/metas/Dbmeta_tbl_mgr.java index f71ce2676..40a3f4aa1 100644 --- a/140_dbs/src/gplx/dbs/metas/Dbmeta_tbl_mgr.java +++ b/140_dbs/src/gplx/dbs/metas/Dbmeta_tbl_mgr.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; -public class Dbmeta_tbl_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); - private final Dbmeta_reload_cmd load_cmd; - public Dbmeta_tbl_mgr(Dbmeta_reload_cmd load_cmd) {this.load_cmd = load_cmd;} - public int Len() {return hash.Count();} - public boolean Has(String name) {return hash.Has(name);} - public Dbmeta_tbl_itm Get_at(int i) {return (Dbmeta_tbl_itm)hash.Get_at(i);} - public Dbmeta_tbl_itm Get_by(String name) {return (Dbmeta_tbl_itm)hash.Get_by(name);} - public void Add(Dbmeta_tbl_itm itm) {hash.Add_if_dupe_use_nth(itm.Name(), itm);} - public void Clear() {hash.Clear();} - public Dbmeta_tbl_mgr Load_all() {load_cmd.Load_all(); return this;} -} +package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; +public class Dbmeta_tbl_mgr { + private final Ordered_hash hash = Ordered_hash_.New(); + private final Dbmeta_reload_cmd load_cmd; + public Dbmeta_tbl_mgr(Dbmeta_reload_cmd load_cmd) {this.load_cmd = load_cmd;} + public int Len() {return hash.Count();} + public boolean Has(String name) {return hash.Has(name);} + public Dbmeta_tbl_itm Get_at(int i) {return (Dbmeta_tbl_itm)hash.Get_at(i);} + public Dbmeta_tbl_itm Get_by(String name) {return (Dbmeta_tbl_itm)hash.Get_by(name);} + public void Add(Dbmeta_tbl_itm itm) {hash.Add_if_dupe_use_nth(itm.Name(), itm);} + public void Clear() {hash.Clear();} + public Dbmeta_tbl_mgr Load_all() {load_cmd.Load_all(); return this;} +} diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_fld_wkr__base.java b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_fld_wkr__base.java index 06cd6f201..6f0be92a9 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_fld_wkr__base.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_fld_wkr__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.metas.parsers; import gplx.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.core.brys.*; import gplx.core.btries.*; abstract class Dbmeta_fld_wkr__base { private byte[] hook; - private final Btrie_slim_mgr words_trie = Btrie_slim_mgr.ci_a7(); + private final Btrie_slim_mgr words_trie = Btrie_slim_mgr.ci_a7(); private int words_len; - @gplx.Virtual public int Tid() {return Tid_other;} + public int Tid() {return Tid_other;} public void Ctor(byte[] hook, byte[]... words_ary) { this.hook = hook; this.words_len = words_ary.length; @@ -29,7 +29,7 @@ abstract class Dbmeta_fld_wkr__base { public void Reg(Btrie_slim_mgr trie) { trie.Add_obj(hook, this); } - @gplx.Virtual public void Match(Bry_rdr rdr, Dbmeta_fld_itm fld) { + public void Match(Bry_rdr rdr, Dbmeta_fld_itm fld) { int words_len = words_trie.Count(); for (int i = 0; i < words_len; ++i) { rdr.Skip_ws(); @@ -44,47 +44,47 @@ class Dbmeta_fld_wkr__end_comma extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__end_comma() {this.Ctor(Hook);} @Override public int Tid() {return Tid_end_comma;} @Override protected void When_match(Dbmeta_fld_itm fld) {} - private static final byte[] Hook = Bry_.new_a7(","); - public static final Dbmeta_fld_wkr__end_comma Instance = new Dbmeta_fld_wkr__end_comma(); + private static final byte[] Hook = Bry_.new_a7(","); + public static final Dbmeta_fld_wkr__end_comma Instance = new Dbmeta_fld_wkr__end_comma(); } class Dbmeta_fld_wkr__end_paren extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__end_paren() {this.Ctor(Hook);} @Override public int Tid() {return Tid_end_paren;} @Override protected void When_match(Dbmeta_fld_itm fld) {} - private static final byte[] Hook = Bry_.new_a7(")"); - public static final Dbmeta_fld_wkr__end_paren Instance = new Dbmeta_fld_wkr__end_paren(); + private static final byte[] Hook = Bry_.new_a7(")"); + public static final Dbmeta_fld_wkr__end_paren Instance = new Dbmeta_fld_wkr__end_paren(); } class Dbmeta_fld_wkr__nullable_null extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__nullable_null() {this.Ctor(Hook);} @Override protected void When_match(Dbmeta_fld_itm fld) { fld.Nullable_tid_(Dbmeta_fld_itm.Nullable_null); } - private static final byte[] Hook = Bry_.new_a7("null"); - public static final Dbmeta_fld_wkr__nullable_null Instance = new Dbmeta_fld_wkr__nullable_null(); + private static final byte[] Hook = Bry_.new_a7("null"); + public static final Dbmeta_fld_wkr__nullable_null Instance = new Dbmeta_fld_wkr__nullable_null(); } class Dbmeta_fld_wkr__nullable_not extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__nullable_not() {this.Ctor(Hook, Bry_null);} @Override protected void When_match(Dbmeta_fld_itm fld) { fld.Nullable_tid_(Dbmeta_fld_itm.Nullable_not_null); } - private static final byte[] Hook = Bry_.new_a7("not"), Bry_null = Bry_.new_a7("null"); - public static final Dbmeta_fld_wkr__nullable_not Instance = new Dbmeta_fld_wkr__nullable_not(); + private static final byte[] Hook = Bry_.new_a7("not"), Bry_null = Bry_.new_a7("null"); + public static final Dbmeta_fld_wkr__nullable_not Instance = new Dbmeta_fld_wkr__nullable_not(); } class Dbmeta_fld_wkr__primary_key extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__primary_key() {this.Ctor(Hook, Bry_key);} @Override protected void When_match(Dbmeta_fld_itm fld) { fld.Primary_y_(); } - private static final byte[] Hook = Bry_.new_a7("primary"), Bry_key = Bry_.new_a7("key"); - public static final Dbmeta_fld_wkr__primary_key Instance = new Dbmeta_fld_wkr__primary_key(); + private static final byte[] Hook = Bry_.new_a7("primary"), Bry_key = Bry_.new_a7("key"); + public static final Dbmeta_fld_wkr__primary_key Instance = new Dbmeta_fld_wkr__primary_key(); } class Dbmeta_fld_wkr__autonumber extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__autonumber() {this.Ctor(Hook);} @Override protected void When_match(Dbmeta_fld_itm fld) { fld.Autonum_y_(); } - private static final byte[] Hook = Bry_.new_a7("autoincrement"); - public static final Dbmeta_fld_wkr__autonumber Instance = new Dbmeta_fld_wkr__autonumber(); + private static final byte[] Hook = Bry_.new_a7("autoincrement"); + public static final Dbmeta_fld_wkr__autonumber Instance = new Dbmeta_fld_wkr__autonumber(); } class Dbmeta_fld_wkr__default extends Dbmeta_fld_wkr__base { public Dbmeta_fld_wkr__default() {this.Ctor(Hook);} @@ -141,6 +141,6 @@ class Dbmeta_fld_wkr__default extends Dbmeta_fld_wkr__base { return String_.new_a7(src, bgn, end); } @Override protected void When_match(Dbmeta_fld_itm fld) {} - private static final byte[] Hook = Bry_.new_a7("default"); - public static final Dbmeta_fld_wkr__default Instance = new Dbmeta_fld_wkr__default(); + private static final byte[] Hook = Bry_.new_a7("default"); + public static final Dbmeta_fld_wkr__default Instance = new Dbmeta_fld_wkr__default(); } diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld.java b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld.java index 36a3e9d58..ff63bbba6 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.metas.parsers; import gplx.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.dbs.engines.sqlite.*; public class Dbmeta_parser__fld { - private final Btrie_rv trv = new Btrie_rv(); + private final Btrie_rv trv = new Btrie_rv(); public Dbmeta_fld_itm Parse_fld(Sql_bry_rdr rdr) { // starts after "(" or ","; EX: "(fld1 int", ", fld2 int"; ends at ")" byte[] name = rdr.Read_sql_identifier(); Dbmeta_fld_tid type = this.Parse_type(rdr); @@ -68,7 +68,7 @@ public class Dbmeta_parser__fld { } return new Dbmeta_fld_tid(type_itm.Tid_ansi(), type_itm.Tid_sqlite(), type_itm.Word(), len_1, len_2); } - private static final Btrie_slim_mgr fld_trie = fld_trie_init + private static final Btrie_slim_mgr fld_trie = fld_trie_init ( Dbmeta_fld_wkr__nullable_null.Instance , Dbmeta_fld_wkr__nullable_not.Instance , Dbmeta_fld_wkr__autonumber.Instance @@ -81,7 +81,7 @@ public class Dbmeta_parser__fld { wkr.Reg(rv); return rv; } - private static final Btrie_slim_mgr type_trie = type_trie_init(); + private static final Btrie_slim_mgr type_trie = type_trie_init(); private static Btrie_slim_mgr type_trie_init() { Btrie_slim_mgr rv = Btrie_slim_mgr.ci_a7(); Dbmeta_parser__fld_itm.reg_many(rv, Dbmeta_fld_tid.Tid__byte , Sqlite_tid.Tid_int , 0, "tinyint", "int2"); @@ -106,10 +106,10 @@ class Dbmeta_parser__fld_itm { this.tid_ansi = tid_ansi; this.tid_sqlite = tid_sqlite; this.word = word; this.paren_itms_count = paren_itms_count; } - public int Tid_ansi() {return tid_ansi;} private final int tid_ansi; - public int Tid_sqlite() {return tid_sqlite;} private final int tid_sqlite; - public byte[] Word() {return word;} private final byte[] word; - public int Paren_itms_count() {return paren_itms_count;} private final int paren_itms_count; + public int Tid_ansi() {return tid_ansi;} private final int tid_ansi; + public int Tid_sqlite() {return tid_sqlite;} private final int tid_sqlite; + public byte[] Word() {return word;} private final byte[] word; + public int Paren_itms_count() {return paren_itms_count;} private final int paren_itms_count; public static void reg_many(Btrie_slim_mgr trie, int tid_ansi, int tid_sqlite, int paren_itms_count, String... names_str) { int len = names_str.length; for (int i = 0; i < len; ++i) { diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld_tst.java b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld_tst.java index 4e287ec11..73e4ff771 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld_tst.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__fld_tst.java @@ -38,8 +38,8 @@ public class Dbmeta_parser__fld_tst { } } class Dbmeta_parser__fld_fxt { - private final Dbmeta_parser__fld fld_parser = new Dbmeta_parser__fld(); - private final Sql_bry_rdr rdr = new Sql_bry_rdr(); + private final Dbmeta_parser__fld fld_parser = new Dbmeta_parser__fld(); + private final Sql_bry_rdr rdr = new Sql_bry_rdr(); public void Clear() {} public Dbmeta_fld_tid Make_type(int tid_ansi) {return new Dbmeta_fld_tid(tid_ansi, -1, null, Int_.Min_value, Int_.Min_value);} public Dbmeta_fld_tid Make_type(int tid_ansi, int len_1) {return new Dbmeta_fld_tid(tid_ansi, -1, null, len_1, Int_.Min_value);} diff --git a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__idx.java b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__idx.java index 5fa3db215..d39839378 100644 --- a/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__idx.java +++ b/140_dbs/src/gplx/dbs/metas/parsers/Dbmeta_parser__idx.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.metas.parsers; import gplx.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.core.brys.*; import gplx.core.btries.*; public class Dbmeta_parser__idx { - private final Sql_bry_rdr rdr = new Sql_bry_rdr(); - private final List_adp tmp_list = List_adp_.New(); + private final Sql_bry_rdr rdr = new Sql_bry_rdr(); + private final List_adp tmp_list = List_adp_.New(); public Dbmeta_idx_itm Parse(byte[] src) { rdr.Init_by_page(Bry_.Empty, src, src.length); rdr.Skip_ws().Chk_trie_val(trie, Tid__create); @@ -43,12 +43,12 @@ public class Dbmeta_parser__idx { return new Dbmeta_idx_itm(unique, String_.new_u8(tbl_name), String_.new_u8(idx_name), (Dbmeta_idx_fld[])tmp_list.To_ary_and_clear(Dbmeta_idx_fld.class)); } private static final byte Tid__create = 0, Tid__unique = 1, Tid__index = 2, Tid__on = 3; - private static final byte[] + private static final byte[] Bry__create = Bry_.new_a7("create") , Bry__unique = Bry_.new_a7("unique") , Bry__index = Bry_.new_a7("index") , Bry__on = Bry_.new_a7("on"); - private static final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7() .Add_bry_byte(Bry__create , Tid__create) .Add_bry_byte(Bry__unique , Tid__unique) .Add_bry_byte(Bry__index , Tid__index) diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry__select_cmd.java b/140_dbs/src/gplx/dbs/qrys/Db_qry__select_cmd.java index cba9937ab..33d9bbc6d 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry__select_cmd.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry__select_cmd.java @@ -15,6 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.core.criterias.*; +import gplx.dbs.sqls.SqlQryWtr; import gplx.dbs.sqls.itms.*; public class Db_qry__select_cmd implements Db_qry { public int Tid() {return Db_qry_.Tid_select;} @@ -107,6 +108,6 @@ public class Db_qry__select_cmd implements Db_qry { return this; } - public String To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr wtr) {return wtr.To_sql_str(this, Bool_.N);} - public String To_sql__prep(gplx.dbs.sqls.Sql_qry_wtr wtr) {return wtr.To_sql_str(this, Bool_.Y);} + public String To_sql__exec(SqlQryWtr wtr) {return wtr.ToSqlStr(this, Bool_.N);} + public String To_sql__prep(SqlQryWtr wtr) {return wtr.ToSqlStr(this, Bool_.Y);} } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry__select_in_tbl.java b/140_dbs/src/gplx/dbs/qrys/Db_qry__select_in_tbl.java index 1fa33c174..fc5d1aba8 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry__select_in_tbl.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry__select_in_tbl.java @@ -1,31 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.core.strings.*; import gplx.core.criterias.*; +import gplx.dbs.sqls.SqlQryWtr; public class Db_qry__select_in_tbl implements Db_qry { public Db_qry__select_in_tbl(String base_table, String[] select_flds, String[] where_flds, String group_by_sql, String having_sql, String order_by_sql, String limit_sql) { this.base_table = base_table; this.select_flds = select_flds; this.where_flds = where_flds; this.group_by_sql = group_by_sql; this.having_sql = having_sql; this.order_by_sql = order_by_sql; this.limit_sql = limit_sql; } public int Tid() {return Db_qry_.Tid_select_in_tbl;} public boolean Exec_is_rdr() {return true;} - public String Base_table() {return base_table;} private final String base_table; + public String Base_table() {return base_table;} private final String base_table; public Criteria Where() {return where;} private Criteria where; public void Where_(Criteria v) {this.where = v;} - public String[] Select_flds() {return select_flds;} private final String[] select_flds; - private final String[] where_flds; + public String[] Select_flds() {return select_flds;} private final String[] select_flds; + private final String[] where_flds; public void Where_sql(String_bldr sb) { if (where_flds == null) return; int where_flds_len = where_flds.length; @@ -35,11 +36,11 @@ public class Db_qry__select_in_tbl implements Db_qry { sb.Add(where_flds[i]).Add(" = ? "); } } - public String Group_by_sql() {return group_by_sql;} private final String group_by_sql; - public String Having_sql() {return having_sql;} private final String having_sql; + public String Group_by_sql() {return group_by_sql;} private final String group_by_sql; + public String Having_sql() {return having_sql;} private final String having_sql; public String Order_by_sql() {return order_by_sql;} public Db_qry__select_in_tbl Order_by_sql_(String v) {order_by_sql = v; return this;} private String order_by_sql; - public String Limit_sql() {return limit_sql;} private final String limit_sql; - public String To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr wtr) { + public String Limit_sql() {return limit_sql;} private final String limit_sql; + public String To_sql__exec(SqlQryWtr wtr) { synchronized (this) { String_bldr sb = String_bldr_.new_(); sb.Add("SELECT "); @@ -80,6 +81,6 @@ public class Db_qry__select_in_tbl implements Db_qry { return rv; } public static Db_qry__select_in_tbl as_(Object obj) {return obj instanceof Db_qry__select_in_tbl ? (Db_qry__select_in_tbl)obj : null;} - public static final String[] Where_flds__all = String_.Ary_empty; - public static final String[] Order_by_null = null; + public static final String[] Where_flds__all = String_.Ary_empty; + public static final String[] Order_by_null = null; } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_delete.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_delete.java index 5099e3f75..a42d35440 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_delete.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_delete.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; -import gplx.core.criterias.*; import gplx.dbs.sqls.*; -public class Db_qry_delete implements Db_qry { - Db_qry_delete(String base_table, Criteria where) {this.base_table = base_table; this.where = where;} - public int Tid() {return Db_qry_.Tid_delete;} - public boolean Exec_is_rdr() {return Bool_.N;} - public String Base_table() {return base_table;} private final String base_table; - public String To_sql__exec(Sql_qry_wtr wtr) {return wtr.To_sql_str(this, false);} - public Criteria Where() {return where;} private final Criteria where; - public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} - public static Db_qry_delete new_all_(String tbl) {return new Db_qry_delete(tbl, Criteria_.All);} - public static Db_qry_delete new_(String tbl, String... where) {return new Db_qry_delete(tbl, Db_crt_.eq_many_(where));} - public static Db_qry_delete new_(String tbl, Criteria where) {return new Db_qry_delete(tbl, where);} - public static final Criteria Where__null = null; -} +package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; +import gplx.core.criterias.*; import gplx.dbs.sqls.*; +public class Db_qry_delete implements Db_qry { + Db_qry_delete(String base_table, Criteria where) {this.base_table = base_table; this.where = where;} + public int Tid() {return Db_qry_.Tid_delete;} + public boolean Exec_is_rdr() {return Bool_.N;} + public String Base_table() {return base_table;} private final String base_table; + public String To_sql__exec(SqlQryWtr wtr) {return wtr.ToSqlStr(this, false);} + public Criteria Where() {return where;} private final Criteria where; + public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} + public static Db_qry_delete new_all_(String tbl) {return new Db_qry_delete(tbl, Criteria_.All);} + public static Db_qry_delete new_(String tbl, String... where) {return new Db_qry_delete(tbl, Db_crt_.eq_many_(where));} + public static Db_qry_delete new_(String tbl, Criteria where) {return new Db_qry_delete(tbl, where);} + public static final Criteria Where__null = null; +} diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_dml_tst.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_dml_tst.java index 6a07ef248..114a23af3 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_dml_tst.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_dml_tst.java @@ -14,6 +14,7 @@ GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; +import gplx.dbs.sqls.SqlQryWtrUtl; import org.junit.*; import gplx.core.criterias.*; public class Db_qry_dml_tst { @@ -38,5 +39,5 @@ public class Db_qry_dml_tst { qry.Where_(Criteria_.And(Db_crt_.New_eq("id", 0), Db_crt_.New_mt("startTime", DateAdp_.parse_gplx("2005-01-01")))); tst_XtoSql(qry, "UPDATE tbl0 SET id=1, name='me', startTime='2007-12-23 00:00:00.000' WHERE (id = 0 AND startTime > '2005-01-01 00:00:00.000')"); } - void tst_XtoSql(Db_qry qry, String expd) {Tfds.Eq(expd, qry.To_sql__exec(gplx.dbs.sqls.Sql_qry_wtr_.New__basic()));} + void tst_XtoSql(Db_qry qry, String expd) {Tfds.Eq(expd, qry.To_sql__exec(SqlQryWtrUtl.NewBasic()));} } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_flush.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_flush.java index 99c874311..b74e68d3f 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_flush.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_flush.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; public class Db_qry_flush implements Db_qry { public int Tid() {return Db_qry_.Tid_flush;} public boolean Exec_is_rdr() {return false;} public String Base_table() {return tableNames[0];} - public String To_sql__exec(Sql_qry_wtr wtr) {return wtr.To_sql_str(this, false);} + public String To_sql__exec(SqlQryWtr wtr) {return wtr.ToSqlStr(this, false);} public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} public String[] TableNames() {return tableNames;} private String[] tableNames; diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_insert.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_insert.java index 12f6fd30e..028277e4b 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_insert.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_insert.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.itms.*; -public class Db_qry_insert implements Db_arg_owner { +public class Db_qry_insert implements Db_arg_owner { public Db_qry_insert(String base_table) {this.base_table = base_table;} public int Tid() {return Db_qry_.Tid_insert;} public boolean Exec_is_rdr() {return false;} - public String To_sql__exec(Sql_qry_wtr wtr) {return wtr.To_sql_str(this, false);} + public String To_sql__exec(SqlQryWtr wtr) {return wtr.ToSqlStr(this, false);} public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} public String Base_table() {return base_table;} private String base_table; public String[] Cols_for_insert() {return cols_for_insert;} private String[] cols_for_insert; diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_select_tst.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_select_tst.java index 6286110e4..3379398aa 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_select_tst.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_select_tst.java @@ -83,5 +83,5 @@ public class Db_qry_select_tst { // expd = "SELECT fld0, fld1 FROM tbl0 GROUP BY fld0, fld1 HAVING Count(fld0) > 1"; // Tfds.Eq(cmd.To_str(), expd); // } - void tst_XtoStr(Db_qry qry, String expd) {Tfds.Eq(expd, cmd.To_sql__exec(Sql_qry_wtr_.New__basic()));} + void tst_XtoStr(Db_qry qry, String expd) {Tfds.Eq(expd, cmd.To_sql__exec(SqlQryWtrUtl.NewBasic()));} } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java index b89915563..d4d79bb18 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; public class Db_qry_sql implements Db_qry { public int Tid() {return Db_qry_.Tid_sql;} public boolean Exec_is_rdr() {return isReader;} private boolean isReader; public String Base_table() {throw Err_.new_unimplemented();} - public String To_sql__exec(Sql_qry_wtr wtr) {return sql;} private String sql; + public String To_sql__exec(SqlQryWtr wtr) {return sql;} private String sql; public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} public static Db_qry_sql dml_(String sql) {return sql_(sql);} public static Db_qry_sql ddl_(String sql) {return sql_(sql);} @@ -36,8 +36,8 @@ public class Db_qry_sql implements Db_qry { } public static Db_qry_sql as_(Object obj) {return obj instanceof Db_qry_sql ? (Db_qry_sql)obj : null;} public static Db_qry_sql cast(Object obj) {try {return (Db_qry_sql)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, Db_qry_sql.class, obj);}} - public static String Gen_sql(Sql_qry_wtr qry_wtr, Db_qry qry, Object... args) { - byte[] src = Bry_.new_u8(qry_wtr.To_sql_str(qry, true)); + public static String Gen_sql(SqlQryWtr qry_wtr, Db_qry qry, Object... args) { + byte[] src = Bry_.new_u8(qry_wtr.ToSqlStr(qry, true)); int src_len = src.length; int args_idx = 0, args_len = args.length, pos = 0; Bry_bfr bfr = Bry_bfr_.New_w_size(src_len); @@ -76,5 +76,5 @@ public class Db_qry_sql implements Db_qry { val_bry = Bry_.Replace(val_bry, Byte_ascii.Apos_bry, Bry_escape_apos); bfr.Add_byte_apos().Add(val_bry).Add_byte_apos(); } - } private static final byte[] Bry_null = Bry_.new_u8("NULL"), Bry_escape_apos = Bry_.new_a7("''"); + } private static final byte[] Bry_null = Bry_.new_u8("NULL"), Bry_escape_apos = Bry_.new_a7("''"); } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql_tst.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql_tst.java index 77698500b..d984a1d02 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_sql_tst.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_sql_tst.java @@ -40,7 +40,7 @@ public class Db_qry_sql_tst { } } class Db_qry_sql_fxt { - private final Sql_qry_wtr qry_wtr = Sql_qry_wtr_.New__sqlite(); + private final SqlQryWtr qry_wtr = SqlQryWtrUtl.NewSqlite(); public void Clear() {} public void Test_qry(Db_qry qry, Object[] vals, String expd) {Tfds.Eq(expd, Db_qry_sql.Gen_sql(qry_wtr, qry, vals));} } diff --git a/140_dbs/src/gplx/dbs/qrys/Db_qry_update.java b/140_dbs/src/gplx/dbs/qrys/Db_qry_update.java index bcd368f74..e0eea3b50 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_qry_update.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_qry_update.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.core.criterias.*; import gplx.dbs.sqls.*; public class Db_qry_update implements Db_arg_owner { public int Tid() {return Db_qry_.Tid_update;} public boolean Exec_is_rdr() {return false;} - public String To_sql__exec(Sql_qry_wtr wtr) {return wtr.To_sql_str(this, false);} + public String To_sql__exec(SqlQryWtr wtr) {return wtr.ToSqlStr(this, false);} public int Exec_qry(Db_conn conn) {return conn.Exec_qry(this);} public String Base_table() {return base_table;} private String base_table; public String[] Cols_for_update() {return cols_for_update;} private String[] cols_for_update; diff --git a/140_dbs/src/gplx/dbs/qrys/Db_stmt_cmd.java b/140_dbs/src/gplx/dbs/qrys/Db_stmt_cmd.java index 3c65f0c96..c8775262e 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_stmt_cmd.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_stmt_cmd.java @@ -42,7 +42,7 @@ public class Db_stmt_cmd implements Db_stmt { public Db_stmt_cmd(Db_engine engine, Db_qry qry) {Ctor_stmt(engine, qry);} public void Ctor_stmt(Db_engine engine, Db_qry qry) { this.engine = engine; - sql = qry.Tid() == Db_qry_.Tid_select_in_tbl ? ((Db_qry__select_in_tbl)qry).To_sql__exec(engine.Sql_wtr()) : engine.Sql_wtr().To_sql_str(qry, true); + sql = qry.Tid() == Db_qry_.Tid_select_in_tbl ? ((Db_qry__select_in_tbl)qry).To_sql__exec(engine.Sql_wtr()) : engine.Sql_wtr().ToSqlStr(qry, true); Reset_stmt(); } public Db_stmt Reset_stmt() { diff --git a/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java b/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java index a87979656..c756eef82 100644 --- a/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java +++ b/140_dbs/src/gplx/dbs/qrys/Db_stmt_sql.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*; import gplx.core.brys.fmtrs.*; import gplx.core.stores.*; import gplx.dbs.engines.*; public class Db_stmt_sql implements Db_stmt {// used for formatting SQL statements; not used for actual insert into database private static final String Key_na = ""; // key is not_available; only called by procs with signature of Val( v); - private final List_adp args = List_adp_.New(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private final Bry_fmtr tmp_fmtr = Bry_fmtr.new_(); + private final List_adp args = List_adp_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_fmtr tmp_fmtr = Bry_fmtr.new_(); public void Ctor_stmt(Db_engine engine, Db_qry qry) {} public Db_conn Conn() {return conn;} public void Conn_(Db_conn v) {this.conn = v;} Db_conn conn; public Db_stmt Reset_stmt() {return this;} diff --git a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_off.java b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_off.java index 2bf46f2c4..c500d7c12 100644 --- a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_off.java +++ b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_off.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys.bats; import gplx.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.*; import gplx.dbs.engines.sqlite.*; public class Db_batch__journal_off { @@ -32,7 +32,7 @@ class Db_batch__journal_off__conn_bgn implements Db_batch_itm { engine.Exec_as_obj(Sqlite_pragma.New__journal__off()); // off b/c failure and corruption doesn't matter to import engine.Exec_as_obj(Sqlite_pragma.New__synchronous__off()); // off b/c failure and corruption doesn't matter to import } - public static final Db_batch__journal_off__conn_bgn Instance = new Db_batch__journal_off__conn_bgn(); Db_batch__journal_off__conn_bgn() {} + public static final Db_batch__journal_off__conn_bgn Instance = new Db_batch__journal_off__conn_bgn(); Db_batch__journal_off__conn_bgn() {} } class Db_batch__journal_off__conn_end implements Db_batch_itm { public String Key() {return KEY;} public static final String KEY = "journal_off.conn_end"; @@ -42,5 +42,5 @@ class Db_batch__journal_off__conn_end implements Db_batch_itm { engine.Exec_as_obj(Sqlite_pragma.New__synchronous__full()); engine.Props().Del(Sqlite_pragma.Const__journal_mode); } - public static final Db_batch__journal_off__conn_end Instance = new Db_batch__journal_off__conn_end(); Db_batch__journal_off__conn_end() {} + public static final Db_batch__journal_off__conn_end Instance = new Db_batch__journal_off__conn_end(); Db_batch__journal_off__conn_end() {} } diff --git a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_wal.java b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_wal.java index 140b45696..acaa7d4d0 100644 --- a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_wal.java +++ b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch__journal_wal.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys.bats; import gplx.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.*; import gplx.dbs.engines.sqlite.*; public class Db_batch__journal_wal { @@ -37,7 +37,7 @@ class Db_batch__journal_wal__conn_bgn implements Db_batch_itm { engine.Exec_as_obj(Sqlite_pragma.New__synchronous__normal()); engine.Exec_as_obj(Sqlite_pragma.New__wal_autocheckpoint(0)); } - public static final Db_batch__journal_wal__conn_bgn Instance = new Db_batch__journal_wal__conn_bgn(); Db_batch__journal_wal__conn_bgn() {} + public static final Db_batch__journal_wal__conn_bgn Instance = new Db_batch__journal_wal__conn_bgn(); Db_batch__journal_wal__conn_bgn() {} } class Db_batch__journal_wal__conn_end implements Db_batch_itm { public String Key() {return KEY;} public static final String KEY = "journal_wal.conn_end"; @@ -48,7 +48,7 @@ class Db_batch__journal_wal__conn_end implements Db_batch_itm { engine.Exec_as_obj(Sqlite_pragma.New__synchronous__full()); engine.Props().Del(Sqlite_pragma.Const__journal_mode); } - public static final Db_batch__journal_wal__conn_end Instance = new Db_batch__journal_wal__conn_end(); Db_batch__journal_wal__conn_end() {} + public static final Db_batch__journal_wal__conn_end Instance = new Db_batch__journal_wal__conn_end(); Db_batch__journal_wal__conn_end() {} } class Db_batch__journal_wal__txn_end implements Db_batch_itm { public String Key() {return KEY;} public static final String KEY = "journal_wal.txn_end"; @@ -56,5 +56,5 @@ class Db_batch__journal_wal__txn_end implements Db_batch_itm { if (!engine.Props().Match(Sqlite_pragma.Const__journal_mode, Sqlite_pragma.Const__journal_mode__wal)) return; // if in off mode, don't enable wal engine.Exec_as_obj(Sqlite_pragma.New__wal_checkpoint__truncate()); } - public static final Db_batch__journal_wal__txn_end Instance = new Db_batch__journal_wal__txn_end(); Db_batch__journal_wal__txn_end() {} + public static final Db_batch__journal_wal__txn_end Instance = new Db_batch__journal_wal__txn_end(); Db_batch__journal_wal__txn_end() {} } diff --git a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_grp.java b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_grp.java index 60fa225ce..157076114 100644 --- a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_grp.java +++ b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_grp.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.qrys.bats; import gplx.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.*; public class Db_batch_grp { - public final Ordered_hash hash = Ordered_hash_.New(); + public final Ordered_hash hash = Ordered_hash_.New(); public Db_batch_grp(byte tid) {this.tid = tid;} - public byte Tid() {return tid;} private final byte tid; + public byte Tid() {return tid;} private final byte tid; public int Len() {return hash.Len();} public Db_batch_itm Get_at(int idx) {return (Db_batch_itm)hash.Get_at(idx); } public void Add(Db_batch_itm itm) {hash.Add(itm.Key(), itm);} diff --git a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_mgr.java b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_mgr.java index d763304f3..e8838a0de 100644 --- a/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_mgr.java +++ b/140_dbs/src/gplx/dbs/qrys/bats/Db_batch_mgr.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.qrys.bats; import gplx.*; import gplx.dbs.*; import gplx.dbs.qrys.*; -public class Db_batch_mgr { - public Db_batch_grp Conn_bgn() {return conn_bgn;} private final Db_batch_grp conn_bgn = new Db_batch_grp(Db_batch_grp.Tid__conn_bgn); - public Db_batch_grp Conn_end() {return conn_end;} private final Db_batch_grp conn_end = new Db_batch_grp(Db_batch_grp.Tid__conn_end); - public Db_batch_grp Txn_end () {return txn_end;} private final Db_batch_grp txn_end = new Db_batch_grp(Db_batch_grp.Tid__txn_end); - public void Copy(String src_tid, Db_batch_mgr src) { - conn_bgn.Copy(src.conn_bgn); - conn_end.Copy(src.conn_end); - txn_end.Copy(src.txn_end); - } -} +package gplx.dbs.qrys.bats; import gplx.*; import gplx.dbs.*; import gplx.dbs.qrys.*; +public class Db_batch_mgr { + public Db_batch_grp Conn_bgn() {return conn_bgn;} private final Db_batch_grp conn_bgn = new Db_batch_grp(Db_batch_grp.Tid__conn_bgn); + public Db_batch_grp Conn_end() {return conn_end;} private final Db_batch_grp conn_end = new Db_batch_grp(Db_batch_grp.Tid__conn_end); + public Db_batch_grp Txn_end () {return txn_end;} private final Db_batch_grp txn_end = new Db_batch_grp(Db_batch_grp.Tid__txn_end); + public void Copy(String src_tid, Db_batch_mgr src) { + conn_bgn.Copy(src.conn_bgn); + conn_end.Copy(src.conn_end); + txn_end.Copy(src.txn_end); + } +} diff --git a/140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr.java b/140_dbs/src/gplx/dbs/sqls/SqlQryWtr.java similarity index 77% rename from 140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr.java rename to 140_dbs/src/gplx/dbs/sqls/SqlQryWtr.java index c983214ab..57c8c11e7 100644 --- a/140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/SqlQryWtr.java @@ -13,9 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*; -import gplx.dbs.sqls.wtrs.*; -public interface Sql_qry_wtr { - String To_sql_str(Db_qry qry, boolean mode_is_prep); - Sql_schema_wtr Schema_wtr(); -} +package gplx.dbs.sqls; +import gplx.dbs.Db_qry; +import gplx.dbs.sqls.wtrs.Sql_schema_wtr; +public interface SqlQryWtr { + String ToSqlStr(Db_qry qry, boolean mode_is_prep); + Sql_schema_wtr Schema_wtr(); +} diff --git a/140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr_.java b/140_dbs/src/gplx/dbs/sqls/SqlQryWtrUtl.java similarity index 57% rename from 140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr_.java rename to 140_dbs/src/gplx/dbs/sqls/SqlQryWtrUtl.java index c1a1f8633..5afcb359d 100644 --- a/140_dbs/src/gplx/dbs/sqls/Sql_qry_wtr_.java +++ b/140_dbs/src/gplx/dbs/sqls/SqlQryWtrUtl.java @@ -13,15 +13,19 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*; -import gplx.dbs.sqls.wtrs.*; -public class Sql_qry_wtr_ { - public static Sql_qry_wtr New__basic() {return new Sql_core_wtr();} - public static Sql_qry_wtr New__mysql() {return new Sql_core_wtr__mysql();} - public static Sql_qry_wtr New__sqlite() {return new Sql_core_wtr__sqlite();} - - public static final byte Like_wildcard = Byte_ascii.Percent; - public static String Quote_arg(String s) { // only for constructing DEBUG SQL strings - return "'" + String_.Replace(s, "'", "''") + "'"; - } -} +package gplx.dbs.sqls; +import gplx.Byte_ascii; +import gplx.String_; +import gplx.dbs.sqls.wtrs.Sql_core_wtr; +import gplx.dbs.sqls.wtrs.Sql_core_wtr__mysql; +import gplx.dbs.sqls.wtrs.Sql_core_wtr__sqlite; +public class SqlQryWtrUtl { + public static SqlQryWtr NewBasic() {return new Sql_core_wtr();} + public static SqlQryWtr NewMysql() {return new Sql_core_wtr__mysql();} + public static SqlQryWtr NewSqlite() {return new Sql_core_wtr__sqlite();} + + public static final byte Like_wildcard = Byte_ascii.Percent; + public static String QuoteArg(String s) { // only for constructing DEBUG SQL strings + return "'" + String_.Replace(s, "'", "''") + "'"; + } +} diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Db_obj_ary_tst.java b/140_dbs/src/gplx/dbs/sqls/itms/Db_obj_ary_tst.java index 16f69a66c..fcd6ec2fb 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Db_obj_ary_tst.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Db_obj_ary_tst.java @@ -13,8 +13,9 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import org.junit.*; import gplx.core.strings.*; import gplx.dbs.sqls.*; +package gplx.dbs.sqls.itms; import gplx.*; +import gplx.dbs.sqls.*; +import org.junit.*; import gplx.dbs.sqls.wtrs.*; public class Db_obj_ary_tst { @Before public void init() {} private Db_obj_ary_fxt fxt = new Db_obj_ary_fxt(); @@ -26,12 +27,12 @@ public class Db_obj_ary_tst { } } class Db_obj_ary_fxt { - private final Db_obj_ary_crt crt = new Db_obj_ary_crt(); - private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); + private final Db_obj_ary_crt crt = new Db_obj_ary_crt(); + private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); public Db_obj_ary_fxt Init_fld(String name, int tid) {flds_list.Add(new Db_obj_ary_fld(name, tid)); return this;} private List_adp flds_list = List_adp_.New(); public Db_obj_ary_fxt Init_vals(Object... ary) {vals_list.Add(ary); return this;} private List_adp vals_list = List_adp_.New(); public Db_obj_ary_fxt Test_sql(String expd) { - Sql_core_wtr cmd_wtr = (Sql_core_wtr)Sql_qry_wtr_.New__basic(); + Sql_core_wtr cmd_wtr = (Sql_core_wtr)SqlQryWtrUtl.NewBasic(); crt.Flds_((Db_obj_ary_fld[])flds_list.To_ary_and_clear(Db_obj_ary_fld.class)); crt.Vals_((Object[][])vals_list.To_ary_and_clear(Object[].class)); Bry_bfr bfr = Bry_bfr_.New(); diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_from_clause.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_from_clause.java index e21cb4e2b..d461fe254 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_from_clause.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_from_clause.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -public class Sql_from_clause { - public Sql_from_clause(Sql_tbl_itm base_tbl) { - this.Base_tbl = base_tbl; - Tbls.Add(base_tbl); - } - public final List_adp Tbls = List_adp_.New(); - public final Sql_tbl_itm Base_tbl; -} +package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; +public class Sql_from_clause { + public Sql_from_clause(Sql_tbl_itm base_tbl) { + this.Base_tbl = base_tbl; + Tbls.Add(base_tbl); + } + public final List_adp Tbls = List_adp_.New(); + public final Sql_tbl_itm Base_tbl; +} diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_clause.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_clause.java index 9528fd623..38b72c12c 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_clause.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_clause.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -public class Sql_order_clause { - private final List_adp list = List_adp_.New(); - private Sql_order_fld[] ary; - public void Flds__add(Sql_order_fld fld) {list.Add(fld);} - public Sql_order_fld[] Flds() { - if (ary == null) ary = (Sql_order_fld[])list.To_ary_and_clear(Sql_order_fld.class); - return ary; - } -} +package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; +public class Sql_order_clause { + private final List_adp list = List_adp_.New(); + private Sql_order_fld[] ary; + public void Flds__add(Sql_order_fld fld) {list.Add(fld);} + public Sql_order_fld[] Flds() { + if (ary == null) ary = (Sql_order_fld[])list.To_ary_and_clear(Sql_order_fld.class); + return ary; + } +} diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_fld.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_fld.java index bb794dfa7..1e08f74f8 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_fld.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_order_fld.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; public class Sql_order_fld { public Sql_order_fld(String tbl, String name, byte sort) {this.Tbl = tbl; this.Name = name; this.Sort = sort;} - public final String Tbl; - public final String Name; - public final byte Sort; + public final String Tbl; + public final String Name; + public final byte Sort; public String To_sql() { String rv = this.Name; if (Tbl != null) rv = Tbl + "." + rv; diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld.java index 8ea013457..f0f49ae93 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import gplx.core.gfo_ndes.*; import gplx.core.type_xtns.*; public abstract class Sql_select_fld { @@ -38,7 +38,7 @@ public abstract class Sql_select_fld { // tdb related functions public ClassXtn Val_type() {return val_type;} public void Val_type_(ClassXtn val) {val_type = val;} private ClassXtn val_type = ObjectClassXtn.Instance; public abstract Object GroupBy_eval(Object groupByVal, Object curVal, ClassXtn type); - @gplx.Virtual public void GroupBy_type(ClassXtn type) {this.Val_type_(type);} + public void GroupBy_type(ClassXtn type) {this.Val_type_(type);} } class Sql_select_fld_wild extends Sql_select_fld { Sql_select_fld_wild() {super(Sql_select_fld.Tbl__null, Fld__wildcard, Fld__wildcard);} @Override public String To_fld_sql() {return Fld__wildcard;} diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld_func.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld_func.java index 2797dce25..0a825fad5 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld_func.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_select_fld_func.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import gplx.core.type_xtns.*; abstract class Sql_select_fld_func extends Sql_select_fld { public Sql_select_fld_func(String tbl, String fld, String alias) {super(tbl, fld, alias);} @@ -37,7 +37,7 @@ class Sql_select_fld_sum extends Sql_select_fld_func { public Sql_select_fld_s return Int_.Cast(groupByVal) + Int_.Cast(curVal); } } -class Sql_select_fld_minMax extends Sql_select_fld_func { private final int compareType; +class Sql_select_fld_minMax extends Sql_select_fld_func { private final int compareType; public Sql_select_fld_minMax(int compareType, String tbl, String fld, String alias) {super(tbl, fld, alias); this.compareType = compareType; } diff --git a/140_dbs/src/gplx/dbs/sqls/itms/Sql_tbl_itm.java b/140_dbs/src/gplx/dbs/sqls/itms/Sql_tbl_itm.java index 84f7b299d..9fec2f431 100644 --- a/140_dbs/src/gplx/dbs/sqls/itms/Sql_tbl_itm.java +++ b/140_dbs/src/gplx/dbs/sqls/itms/Sql_tbl_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.itms; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; public class Sql_tbl_itm { public Sql_tbl_itm(int join_tid, String db, String name, String alias, Sql_join_fld[] join_flds) { @@ -22,12 +22,12 @@ public class Sql_tbl_itm { this.Alias = alias; this.Join_flds = join_flds; } - public final int Join_tid; - public final String Db; - public final String Name; - public final String Alias; + public final int Join_tid; + public final String Db; + public final String Name; + public final String Alias; public boolean Db_enabled = true; - public final Sql_join_fld[] Join_flds; + public final Sql_join_fld[] Join_flds; public static final String Alias__null = null; public static final String Db__null = null; diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr.java index 38804c284..34731ee4c 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr.java @@ -13,91 +13,105 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import gplx.core.criterias.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.wtrs.*; import gplx.dbs.sqls.itms.*; -public class Sql_core_wtr implements Sql_qry_wtr { - private final Bry_bfr bfr = Bry_bfr_.New_w_size(64); - public byte[] Seq__nl = Byte_ascii.Space_bry; - public byte Seq__quote = Byte_ascii.Apos, Seq__escape = Byte_ascii.Backslash; - public Sql_core_wtr() { - this.val_wtr = Make__val_wtr(); - this.from_wtr = Make__from_wtr(); - this.where_wtr = Make__where_wtr(this, val_wtr); - this.select_wtr = Make__select_wtr(this); - this.schema_wtr = Make__schema_wtr(); - } - public Sql_schema_wtr Schema_wtr() {return schema_wtr;} private final Sql_schema_wtr schema_wtr; - public Sql_val_wtr Val_wtr() {return val_wtr;} private final Sql_val_wtr val_wtr; - public Sql_from_wtr From_wtr() {return from_wtr;} private final Sql_from_wtr from_wtr; - public Sql_where_wtr Where_wtr() {return where_wtr;} private final Sql_where_wtr where_wtr; - public Sql_select_wtr Select_wtr() {return select_wtr;} private final Sql_select_wtr select_wtr; - public String To_sql_str(Db_qry qry, boolean mode_is_prep) { - synchronized (bfr) { - Sql_wtr_ctx ctx = new Sql_wtr_ctx(mode_is_prep); - switch (qry.Tid()) { - case Db_qry_.Tid_insert: return Bld_qry_insert(ctx, (Db_qry_insert)qry); - case Db_qry_.Tid_delete: return Bld_qry_delete(ctx, (Db_qry_delete)qry); - case Db_qry_.Tid_update: return Bld_qry_update(ctx, (Db_qry_update)qry); - case Db_qry_.Tid_select_in_tbl: - case Db_qry_.Tid_select: select_wtr.Bld_qry_select(bfr, ctx, (Db_qry__select_cmd)qry); return bfr.To_str_and_clear(); - case Db_qry_.Tid_pragma: return ((gplx.dbs.engines.sqlite.Sqlite_pragma)qry).To_sql__exec(this); - case Db_qry_.Tid_sql: return ((Db_qry_sql)qry).To_sql__exec(this); - default: throw Err_.new_unhandled(qry.Tid()); - } - } - } - private String Bld_qry_delete(Sql_wtr_ctx ctx, Db_qry_delete qry) { - bfr.Add_str_u8_many("DELETE FROM ", qry.Base_table()); - where_wtr.Bld_where(bfr, ctx, qry.Where()); - return bfr.To_str_and_clear(); - } - private String Bld_qry_insert(Sql_wtr_ctx ctx, Db_qry_insert qry) { - if (qry.Select() != null) { - bfr.Add_str_u8_many("INSERT INTO ", qry.Base_table(), " ("); - int cols_len = qry.Cols().Len(); - for (int i = 0; i < cols_len; i++) { - Sql_select_fld fld = qry.Cols().Get_at(i); - bfr.Add_str_a7(fld.Alias); - bfr.Add_str_a7(i == cols_len - 1 ? ") " : ", "); - } - select_wtr.Bld_qry_select(bfr, ctx, qry.Select()); - return bfr.To_str_and_clear(); - } - int arg_count = qry.Args().Count(); if (arg_count == 0) throw Err_.new_wo_type("Db_qry_insert has no columns", "base_table", qry.Base_table()); - int last = arg_count - 1; - bfr.Add_str_u8_many("INSERT INTO ", qry.Base_table(), " ("); - for (int i = 0; i < arg_count; i++) { - Keyval pair = qry.Args().Get_at(i); - this.Bld_col_name(bfr, pair.Key()); - bfr.Add_str_a7(i == last ? ")" : ", "); - } - bfr.Add_str_a7(" VALUES ("); - for (int i = 0; i < arg_count; i++) { - Keyval pair = qry.Args().Get_at(i); - Db_arg arg = (Db_arg)pair.Val(); - val_wtr.Bld_val(bfr, ctx, arg.Val); - bfr.Add_str_a7(i == last ? ")" : ", "); - } - return bfr.To_str_and_clear(); - } - private String Bld_qry_update(Sql_wtr_ctx ctx, Db_qry_update qry) { - int arg_count = qry.Args().Count(); if (arg_count == 0) throw Err_.new_wo_type("Db_qry_update has no columns", "base_table", qry.Base_table()); - bfr.Add_str_u8_many("UPDATE ", qry.Base_table(), " SET "); - for (int i = 0; i < arg_count; i++) { - Keyval pair = qry.Args().Get_at(i); - if (i > 0) bfr.Add_str_a7(", "); - this.Bld_col_name(bfr, pair.Key()); - bfr.Add_str_a7("="); - Db_arg arg = (Db_arg)pair.Val(); - val_wtr.Bld_val(bfr, ctx, arg.Val); - } - where_wtr.Bld_where(bfr, ctx, qry.Where()); - return bfr.To_str_and_clear(); - } - public void Bld_col_name(Bry_bfr bfr, String key) {bfr.Add_str_u8(key);} - @gplx.Virtual protected Sql_val_wtr Make__val_wtr () {return new Sql_val_wtr();} - @gplx.Virtual protected Sql_from_wtr Make__from_wtr () {return new Sql_from_wtr();} - @gplx.Virtual protected Sql_select_wtr Make__select_wtr(Sql_core_wtr qry_wtr) {return new Sql_select_wtr(qry_wtr);} - @gplx.Virtual protected Sql_where_wtr Make__where_wtr (Sql_core_wtr qry_wtr, Sql_val_wtr val_wtr) {return new Sql_where_wtr(qry_wtr, val_wtr);} - @gplx.Virtual protected Sql_schema_wtr Make__schema_wtr() {return new Sql_schema_wtr();} -} +package gplx.dbs.sqls.wtrs; +import gplx.Bry_bfr; +import gplx.Bry_bfr_; +import gplx.Byte_ascii; +import gplx.Err_; +import gplx.Keyval; +import gplx.dbs.Db_qry; +import gplx.dbs.Db_qry_; +import gplx.dbs.qrys.Db_arg; +import gplx.dbs.qrys.Db_qry__select_cmd; +import gplx.dbs.qrys.Db_qry_delete; +import gplx.dbs.qrys.Db_qry_insert; +import gplx.dbs.qrys.Db_qry_sql; +import gplx.dbs.qrys.Db_qry_update; +import gplx.dbs.sqls.SqlQryWtr; +import gplx.dbs.sqls.itms.Sql_select_fld; +public class Sql_core_wtr implements SqlQryWtr { + private final Bry_bfr bfr = Bry_bfr_.New_w_size(64); + public byte[] Seq__nl = Byte_ascii.Space_bry; + public byte Seq__quote = Byte_ascii.Apos, Seq__escape = Byte_ascii.Backslash; + public Sql_core_wtr() { + this.val_wtr = Make__val_wtr(); + this.from_wtr = Make__from_wtr(); + this.where_wtr = Make__where_wtr(this, val_wtr); + this.select_wtr = Make__select_wtr(this); + this.schema_wtr = Make__schema_wtr(); + } + public Sql_schema_wtr Schema_wtr() {return schema_wtr;} private final Sql_schema_wtr schema_wtr; + public Sql_val_wtr Val_wtr() {return val_wtr;} private final Sql_val_wtr val_wtr; + public Sql_from_wtr From_wtr() {return from_wtr;} private final Sql_from_wtr from_wtr; + public Sql_where_wtr Where_wtr() {return where_wtr;} private final Sql_where_wtr where_wtr; + public Sql_select_wtr Select_wtr() {return select_wtr;} private final Sql_select_wtr select_wtr; + public String ToSqlStr(Db_qry qry, boolean mode_is_prep) { + synchronized (bfr) { + Sql_wtr_ctx ctx = new Sql_wtr_ctx(mode_is_prep); + switch (qry.Tid()) { + case Db_qry_.Tid_insert: return Bld_qry_insert(ctx, (Db_qry_insert)qry); + case Db_qry_.Tid_delete: return Bld_qry_delete(ctx, (Db_qry_delete)qry); + case Db_qry_.Tid_update: return Bld_qry_update(ctx, (Db_qry_update)qry); + case Db_qry_.Tid_select_in_tbl: + case Db_qry_.Tid_select: select_wtr.Bld_qry_select(bfr, ctx, (Db_qry__select_cmd)qry); return bfr.To_str_and_clear(); + case Db_qry_.Tid_pragma: return ((gplx.dbs.engines.sqlite.Sqlite_pragma)qry).To_sql__exec(this); + case Db_qry_.Tid_sql: return ((Db_qry_sql)qry).To_sql__exec(this); + default: throw Err_.new_unhandled(qry.Tid()); + } + } + } + private String Bld_qry_delete(Sql_wtr_ctx ctx, Db_qry_delete qry) { + bfr.Add_str_u8_many("DELETE FROM ", qry.Base_table()); + where_wtr.Bld_where(bfr, ctx, qry.Where()); + return bfr.To_str_and_clear(); + } + private String Bld_qry_insert(Sql_wtr_ctx ctx, Db_qry_insert qry) { + if (qry.Select() != null) { + bfr.Add_str_u8_many("INSERT INTO ", qry.Base_table(), " ("); + int cols_len = qry.Cols().Len(); + for (int i = 0; i < cols_len; i++) { + Sql_select_fld fld = qry.Cols().Get_at(i); + bfr.Add_str_a7(fld.Alias); + bfr.Add_str_a7(i == cols_len - 1 ? ") " : ", "); + } + select_wtr.Bld_qry_select(bfr, ctx, qry.Select()); + return bfr.To_str_and_clear(); + } + int arg_count = qry.Args().Count(); if (arg_count == 0) throw Err_.new_wo_type("Db_qry_insert has no columns", "base_table", qry.Base_table()); + int last = arg_count - 1; + bfr.Add_str_u8_many("INSERT INTO ", qry.Base_table(), " ("); + for (int i = 0; i < arg_count; i++) { + Keyval pair = qry.Args().Get_at(i); + this.Bld_col_name(bfr, pair.Key()); + bfr.Add_str_a7(i == last ? ")" : ", "); + } + bfr.Add_str_a7(" VALUES ("); + for (int i = 0; i < arg_count; i++) { + Keyval pair = qry.Args().Get_at(i); + Db_arg arg = (Db_arg)pair.Val(); + val_wtr.Bld_val(bfr, ctx, arg.Val); + bfr.Add_str_a7(i == last ? ")" : ", "); + } + return bfr.To_str_and_clear(); + } + private String Bld_qry_update(Sql_wtr_ctx ctx, Db_qry_update qry) { + int arg_count = qry.Args().Count(); if (arg_count == 0) throw Err_.new_wo_type("Db_qry_update has no columns", "base_table", qry.Base_table()); + bfr.Add_str_u8_many("UPDATE ", qry.Base_table(), " SET "); + for (int i = 0; i < arg_count; i++) { + Keyval pair = qry.Args().Get_at(i); + if (i > 0) bfr.Add_str_a7(", "); + this.Bld_col_name(bfr, pair.Key()); + bfr.Add_str_a7("="); + Db_arg arg = (Db_arg)pair.Val(); + val_wtr.Bld_val(bfr, ctx, arg.Val); + } + where_wtr.Bld_where(bfr, ctx, qry.Where()); + return bfr.To_str_and_clear(); + } + public void Bld_col_name(Bry_bfr bfr, String key) {bfr.Add_str_u8(key);} + protected Sql_val_wtr Make__val_wtr() {return new Sql_val_wtr();} + protected Sql_from_wtr Make__from_wtr() {return new Sql_from_wtr();} + protected Sql_select_wtr Make__select_wtr(Sql_core_wtr qry_wtr) {return new Sql_select_wtr(qry_wtr);} + protected Sql_where_wtr Make__where_wtr(Sql_core_wtr qry_wtr, Sql_val_wtr val_wtr) {return new Sql_where_wtr(qry_wtr, val_wtr);} + protected Sql_schema_wtr Make__schema_wtr() {return new Sql_schema_wtr();} +} diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr__sqlite.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr__sqlite.java index 37df26a6b..b720acdc5 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr__sqlite.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr__sqlite.java @@ -13,7 +13,8 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -public class Sql_core_wtr__sqlite extends Sql_core_wtr { @Override protected Sql_val_wtr Make__val_wtr() {return new Sql_val_wtr_sqlite();} - @Override protected Sql_select_wtr Make__select_wtr(Sql_core_wtr qry_wtr) {return new Sql_select_wtr_sqlite(qry_wtr);} -} +package gplx.dbs.sqls.wtrs; +public class Sql_core_wtr__sqlite extends Sql_core_wtr { + @Override protected Sql_val_wtr Make__val_wtr() {return new Sql_val_wtr_sqlite();} + @Override protected Sql_select_wtr Make__select_wtr(Sql_core_wtr qry_wtr) {return new Sql_select_wtr_sqlite(qry_wtr);} +} diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr.java index fde58a678..cf45d5c10 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr.java @@ -1,20 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import gplx.dbs.metas.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.dbs.sqls.wtrs; import gplx.Bool_; +import gplx.Bry_bfr; +import gplx.Bry_bfr_; +import gplx.Byte_ascii; +import gplx.Err_; +import gplx.Object_; +import gplx.String_; +import gplx.dbs.Dbmeta_fld_itm; +import gplx.dbs.Dbmeta_fld_tid; +import gplx.dbs.Dbmeta_idx_itm; +import gplx.dbs.Dbmeta_tbl_itm; +import gplx.dbs.metas.Dbmeta_fld_mgr; +import gplx.dbs.metas.Dbmeta_idx_fld; public class Sql_schema_wtr { private Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); public Sql_schema_wtr Bfr_(Bry_bfr bfr) {this.tmp_bfr = bfr; return this;} @@ -99,5 +110,5 @@ public class Sql_schema_wtr { default: throw Err_.new_unhandled(tid); } } -// public static final Sql_schema_wtr Instance = new Sql_schema_wtr(); +// public static final Sql_schema_wtr Instance = new Sql_schema_wtr(); } diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr.java index 602bec53c..fdcea6418 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr.java @@ -1,20 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import gplx.dbs.qrys.*; import gplx.dbs.sqls.itms.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.dbs.sqls.wtrs; import gplx.Bry_bfr; +import gplx.dbs.qrys.Db_qry__select_cmd; +import gplx.dbs.sqls.itms.Sql_group_clause; +import gplx.dbs.sqls.itms.Sql_order_clause; +import gplx.dbs.sqls.itms.Sql_order_fld; +import gplx.dbs.sqls.itms.Sql_select_fld; +import gplx.dbs.sqls.itms.Sql_select_fld_list; public class Sql_select_wtr { private final Sql_core_wtr qry_wtr; public Sql_select_wtr(Sql_core_wtr qry_wtr) {this.qry_wtr = qry_wtr;} @@ -61,7 +66,7 @@ public class Sql_select_wtr { if (limit == Db_qry__select_cmd.Limit__disabled) return; bfr.Add_str_a7(" LIMIT ").Add_int_variable(limit); } - @gplx.Virtual protected void Bld_offset(Bry_bfr bfr, Sql_wtr_ctx ctx, Db_qry__select_cmd qry, int offset) { + protected void Bld_offset(Bry_bfr bfr, Sql_wtr_ctx ctx, Db_qry__select_cmd qry, int offset) { bfr.Add_str_a7(" OFFSET ").Add_int_variable(offset); } private void Bld_indexed_by(Bry_bfr bfr, Sql_wtr_ctx ctx, Db_qry__select_cmd qry, String idx_name) { diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr.java index fa5e56c26..31b3e16ae 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; public class Sql_val_wtr { -// private final Bry_bfr tmp_bfr = Bry_bfr_.New(32); +// private final Bry_bfr tmp_bfr = Bry_bfr_.New(32); public byte Seq__quote = Byte_ascii.Apos, Seq__escape = Byte_ascii.Backslash; public void Bld_val(Bry_bfr bfr, Sql_wtr_ctx ctx, Object val) { if (ctx.Mode_is_prep) { @@ -41,16 +41,16 @@ public class Sql_val_wtr { case Type_ids_.Id__obj: Bld_val__str (bfr, Object_.Xto_str_strict_or_null(val)); break; } } - @gplx.Virtual public void Bld_val__bool (Bry_bfr bfr, boolean val) {bfr.Add_int_digits(1, val ? 1 : 0);} // NOTE: save boolean to 0 or 1 b/c sqlite doesn't support true / false //{bfr.Add_str_a7(val ? "true" : "false");} - @gplx.Virtual public void Bld_val__byte (Bry_bfr bfr, byte val) {bfr.Add_byte_variable(val);} - @gplx.Virtual public void Bld_val__short (Bry_bfr bfr, short val) {bfr.Add_short_variable(val);} - @gplx.Virtual public void Bld_val__int (Bry_bfr bfr, int val) {bfr.Add_int_variable(val);} - @gplx.Virtual public void Bld_val__long (Bry_bfr bfr, long val) {bfr.Add_long_variable(val);} - @gplx.Virtual public void Bld_val__float (Bry_bfr bfr, float val) {bfr.Add_float(val);} - @gplx.Virtual public void Bld_val__double (Bry_bfr bfr, double val) {bfr.Add_double(val);} - @gplx.Virtual public void Bld_val__date (Bry_bfr bfr, DateAdp val) {bfr.Add_str_u8_many("'", val.XtoStr_gplx_long(), "'");} - @gplx.Virtual public void Bld_val__decimal (Bry_bfr bfr, Decimal_adp val) {bfr.Add_str_u8_many("'", val.To_str(), "'");} - @gplx.Virtual public void Bld_val__str (Bry_bfr bfr, String val) { + public void Bld_val__bool (Bry_bfr bfr, boolean val) {bfr.Add_int_digits(1, val ? 1 : 0);} // NOTE: save boolean to 0 or 1 b/c sqlite doesn't support true / false //{bfr.Add_str_a7(val ? "true" : "false");} + public void Bld_val__byte (Bry_bfr bfr, byte val) {bfr.Add_byte_variable(val);} + public void Bld_val__short (Bry_bfr bfr, short val) {bfr.Add_short_variable(val);} + public void Bld_val__int (Bry_bfr bfr, int val) {bfr.Add_int_variable(val);} + public void Bld_val__long (Bry_bfr bfr, long val) {bfr.Add_long_variable(val);} + public void Bld_val__float (Bry_bfr bfr, float val) {bfr.Add_float(val);} + public void Bld_val__double (Bry_bfr bfr, double val) {bfr.Add_double(val);} + public void Bld_val__date (Bry_bfr bfr, DateAdp val) {bfr.Add_str_u8_many("'", val.XtoStr_gplx_long(), "'");} + public void Bld_val__decimal (Bry_bfr bfr, Decimal_adp val) {bfr.Add_str_u8_many("'", val.To_str(), "'");} + public void Bld_val__str (Bry_bfr bfr, String val) { // byte[] bry = Bry_.new_u8(val); int len = bry.length; int pos = 0; int prv = -1; boolean dirty = false; // while (true) { // if (pos == len) break; diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr.java b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr.java index 7367654dc..a943f26e6 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr.java +++ b/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr.java @@ -1,23 +1,41 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import gplx.core.criterias.*; import gplx.dbs.sqls.itms.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.dbs.sqls.wtrs; import gplx.Bry_bfr; +import gplx.Byte_ascii; +import gplx.CompareAble_; +import gplx.Err_; +import gplx.Object_; +import gplx.String_; +import gplx.Type_ids_; +import gplx.core.criterias.Criteria; +import gplx.core.criterias.Criteria_; +import gplx.core.criterias.Criteria_between; +import gplx.core.criterias.Criteria_bool_base; +import gplx.core.criterias.Criteria_comp; +import gplx.core.criterias.Criteria_eq; +import gplx.core.criterias.Criteria_fld; +import gplx.core.criterias.Criteria_in; +import gplx.core.criterias.Criteria_ioMatch; +import gplx.core.criterias.Criteria_like; +import gplx.dbs.sqls.itms.Db_obj_ary_crt; +import gplx.dbs.sqls.itms.Db_obj_ary_fld; +import gplx.dbs.sqls.itms.Sql_where_clause; public class Sql_where_wtr { - private final Sql_core_wtr qry_wtr; - private final Sql_val_wtr val_wtr; + private final Sql_core_wtr qry_wtr; + private final Sql_val_wtr val_wtr; public Sql_where_wtr(Sql_core_wtr qry_wtr, Sql_val_wtr val_wtr) {this.qry_wtr = qry_wtr; this.val_wtr = val_wtr;} public void Bld_where(Bry_bfr bfr, Sql_wtr_ctx ctx, Sql_where_clause where_itm) { if (where_itm == Sql_where_clause.Where__null) return; diff --git a/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg.java b/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg.java index 7c4b67ab6..b48ffef5b 100644 --- a/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg.java +++ b/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.stmts; import gplx.*; import gplx.dbs.*; -public class Db_stmt_arg { - public Db_stmt_arg(boolean crt, int tid, String key, Object val) {this.Crt = crt; this.Tid = tid; this.Key = key; this.Val = val;} - public final boolean Crt; - public final int Tid; - public final String Key; - public Object Val; -} +package gplx.dbs.stmts; import gplx.*; import gplx.dbs.*; +public class Db_stmt_arg { + public Db_stmt_arg(boolean crt, int tid, String key, Object val) {this.Crt = crt; this.Tid = tid; this.Key = key; this.Val = val;} + public final boolean Crt; + public final int Tid; + public final String Key; + public Object Val; +} diff --git a/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg_list.java b/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg_list.java index 472ce3bd5..089724471 100644 --- a/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg_list.java +++ b/140_dbs/src/gplx/dbs/stmts/Db_stmt_arg_list.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.stmts; import gplx.*; import gplx.dbs.*; public class Db_stmt_arg_list { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public void Clear() {list.Clear();} public int Len() {return list.Len();} public Db_stmt_arg Get_at(int i) {return (Db_stmt_arg)list.Get_at(i);} diff --git a/140_dbs/src/gplx/dbs/stmts/Db_stmt_mgr.java b/140_dbs/src/gplx/dbs/stmts/Db_stmt_mgr.java index d836b38c0..b940b2f29 100644 --- a/140_dbs/src/gplx/dbs/stmts/Db_stmt_mgr.java +++ b/140_dbs/src/gplx/dbs/stmts/Db_stmt_mgr.java @@ -1,31 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.stmts; import gplx.*; import gplx.dbs.*; +import gplx.dbs.sqls.SqlQryWtrUtl; public class Db_stmt_mgr { - private final List_adp fmt_list = List_adp_.New(); - private final Db_stmt_arg_list arg_list = new Db_stmt_arg_list(); + private final List_adp fmt_list = List_adp_.New(); + private final Db_stmt_arg_list arg_list = new Db_stmt_arg_list(); public boolean Mode_is_stmt() {return mode_is_stmt;} public Db_stmt_mgr Mode_is_stmt_(boolean v) {mode_is_stmt = v; return this;} private boolean mode_is_stmt = true; public void Clear() {arg_list.Clear(); fmt_list.Clear(); bfr.Clear();} - public Bry_bfr Bfr() {return bfr;} private final Bry_bfr bfr = Bry_bfr_.New(); + public Bry_bfr Bfr() {return bfr;} private final Bry_bfr bfr = Bry_bfr_.New(); public void Add_var_many(Object... ary) { for (Object o : ary) fmt_list.Add(o); } public void Add_crt_str(String key, String val) { - fmt_list.Add(mode_is_stmt ? stmt_arg_placeholder : gplx.dbs.sqls.Sql_qry_wtr_.Quote_arg(val)); + fmt_list.Add(mode_is_stmt ? stmt_arg_placeholder : SqlQryWtrUtl.QuoteArg(val)); arg_list.Add(Bool_.Y, Dbmeta_fld_tid.Tid__str, key, val); } public void Add_crt_int(String key, int val) { diff --git a/140_dbs/src/gplx/dbs/sys/Db_sys_mgr.java b/140_dbs/src/gplx/dbs/sys/Db_sys_mgr.java index e4c399c53..1e77834bc 100644 --- a/140_dbs/src/gplx/dbs/sys/Db_sys_mgr.java +++ b/140_dbs/src/gplx/dbs/sys/Db_sys_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sys; import gplx.*; import gplx.dbs.*; public class Db_sys_mgr { - private final Db_conn conn; - private final Db_sys_tbl sys_tbl; + private final Db_conn conn; + private final Db_sys_tbl sys_tbl; private boolean assert_exists = true; public Db_sys_mgr(Db_conn conn) { this.conn = conn; diff --git a/140_dbs/src/gplx/dbs/sys/Db_sys_tbl.java b/140_dbs/src/gplx/dbs/sys/Db_sys_tbl.java index 7547a7819..daf28b813 100644 --- a/140_dbs/src/gplx/dbs/sys/Db_sys_tbl.java +++ b/140_dbs/src/gplx/dbs/sys/Db_sys_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sys; import gplx.*; import gplx.dbs.*; class Db_sys_tbl implements Rls_able { - private final String tbl_name = "gfdb_sys"; + private final String tbl_name = "gfdb_sys"; private String fld_key, fld_val; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final Db_conn conn; private Db_stmt stmt_insert, stmt_update, stmt_select; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final Db_conn conn; private Db_stmt stmt_insert, stmt_update, stmt_select; public Db_sys_tbl(Db_conn conn) { this.conn = conn; fld_key = flds.Add_str_pkey("sys_key", 255); fld_val = flds.Add_text("sys_val"); diff --git a/140_dbs/src/gplx/dbs/utls/Db_cmd_backup.java b/140_dbs/src/gplx/dbs/utls/Db_cmd_backup.java index 8870fd693..f16144aa1 100644 --- a/140_dbs/src/gplx/dbs/utls/Db_cmd_backup.java +++ b/140_dbs/src/gplx/dbs/utls/Db_cmd_backup.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.utls; import gplx.*; import gplx.dbs.*; import gplx.core.envs.*; public class Db_cmd_backup implements Gfo_invk { @@ -41,7 +41,7 @@ public class Db_cmd_backup implements Gfo_invk { else if (ctx.Match(k, Invk_BkpFilNameFmt_)) bkpFilNameFmt = GfoMsgUtl.SetStr(ctx, m, bkpFilNameFmt); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String + } public static final String Invk_ExeUrl = "ExeUrl", Invk_BkpDir = "BkpDir", Invk_Usr = "Usr", Invk_Pwd = "Pwd", Invk_DteFmt = "DteFmt", Invk_BkpFilNameFmt = "BkpFilNameFmt" , Invk_ExeUrl_ = "ExeUrl_", Invk_BkpDir_ = "BkpDir_", Invk_Usr_ = "Usr_", Invk_Pwd_ = "Pwd_", Invk_DteFmt_ = "DteFmt_", Invk_BkpFilNameFmt_ = "BkpFilNameFmt_" ; diff --git a/140_dbs/src/gplx/dbs/utls/Db_in_wkr__base.java b/140_dbs/src/gplx/dbs/utls/Db_in_wkr__base.java index bb1f2fdf0..5d217af90 100644 --- a/140_dbs/src/gplx/dbs/utls/Db_in_wkr__base.java +++ b/140_dbs/src/gplx/dbs/utls/Db_in_wkr__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.utls; import gplx.*; import gplx.dbs.*; public abstract class Db_in_wkr__base { - @gplx.Virtual protected int Interval() {return gplx.dbs.engines.sqlite.Sqlite_engine_.Stmt_arg_max - 10;} // -10 for safety's sake + protected int Interval() {return gplx.dbs.engines.sqlite.Sqlite_engine_.Stmt_arg_max - 10;} // -10 for safety's sake protected abstract Db_qry Make_qry (int bgn, int end); protected abstract void Fill_stmt (Db_stmt stmt, int bgn, int end); protected abstract void Read_data (Cancelable cancelable, Db_rdr rdr); - @gplx.Virtual protected boolean Show_progress() {return false;} + protected boolean Show_progress() {return false;} public void Select_in(Cancelable cancelable, Db_conn conn, int full_bgn, int full_end) { int part_len = Interval(); Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.Instance; diff --git a/140_dbs/src/gplx/dbs/utls/PoolIds.java b/140_dbs/src/gplx/dbs/utls/PoolIds.java index 920a8341f..04cc30327 100644 --- a/140_dbs/src/gplx/dbs/utls/PoolIds.java +++ b/140_dbs/src/gplx/dbs/utls/PoolIds.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.utls; import gplx.*; import gplx.dbs.*; import gplx.core.stores.*; import gplx.dbs.qrys.*; @@ -43,8 +43,8 @@ public class PoolIds { } if (rv != 1) throw Err_.new_wo_type("failed to update nextId", "url", url, "nextId", val); } - public static final String Tbl_Name = "pool_ids"; - @gplx.Internal protected static final String Fld_id_path = "id_path"; - @gplx.Internal protected static final String Fld_id_next_id = "id_next_id"; - public static final PoolIds Instance = new PoolIds(); PoolIds() {} + public static final String Tbl_Name = "pool_ids"; + @gplx.Internal protected static final String Fld_id_path = "id_path"; + @gplx.Internal protected static final String Fld_id_next_id = "id_next_id"; + public static final PoolIds Instance = new PoolIds(); PoolIds() {} } diff --git a/140_dbs/tst/gplx/dbs/Db_conn_fxt.java b/140_dbs/tst/gplx/dbs/Db_conn_fxt.java index 1044f8a21..533b0d896 100644 --- a/140_dbs/tst/gplx/dbs/Db_conn_fxt.java +++ b/140_dbs/tst/gplx/dbs/Db_conn_fxt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.core.stores.*; import gplx.dbs.engines.sqlite.*; import gplx.dbs.engines.mysql.*; import gplx.dbs.engines.postgres.*; import gplx.core.gfo_ndes.*; @@ -49,5 +49,5 @@ public class Db_conn_fxt implements Rls_able { public static Db_conn Tdb(String fileName) {return Db_conn_pool.Instance.Get_or_new(Db_conn_info_.tdb_(Tfds.RscDir.GenSubDir_nest("140_dbs", "tdbs").GenSubFil(fileName)));} public static Db_conn Postgres() {return Db_conn_pool.Instance.Get_or_new(Postgres_conn_info.new_("127.0.0.1", "unit_tests", "gplx_user", "gplx_password"));} public static Db_conn Sqlite() {return Db_conn_pool.Instance.Get_or_new(Sqlite_conn_info.load_(Tfds.RscDir.GenSubFil_nest("140_dbs", "sqlite", "unit_tests.db")));} - public static final boolean SkipPostgres = Tfds.SkipDb || true; + public static final boolean SkipPostgres = Tfds.SkipDb || true; } \ No newline at end of file diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java similarity index 73% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java index 375e05cd0..f44d11dbc 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java +++ b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_core_wtr_fxt.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import gplx.core.criterias.*; class Sql_core_wtr_fxt { - private final Sql_core_wtr__sqlite wtr = new Sql_core_wtr__sqlite(); - private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); - private final Bry_bfr bfr = Bry_bfr_.New(); - public Sql_core_wtr_fxt Sql_wtr_(Sql_qry_wtr v) {sql_wtr = v; return this;} private Sql_qry_wtr sql_wtr = Sql_qry_wtr_.New__sqlite(); + private final Sql_core_wtr__sqlite wtr = new Sql_core_wtr__sqlite(); + private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); + private final Bry_bfr bfr = Bry_bfr_.New(); + public Sql_core_wtr_fxt Sql_wtr_(SqlQryWtr v) {sql_wtr = v; return this;} private SqlQryWtr sql_wtr = SqlQryWtrUtl.NewSqlite(); public void Test__val(Object val, String expd) { wtr.Val_wtr().Bld_val(bfr, ctx, val); Tfds.Eq_str(expd, bfr.To_str_and_clear()); @@ -29,6 +29,6 @@ class Sql_core_wtr_fxt { Tfds.Eq_str_lines(String_.Concat_lines_nl_skip_last(expd), bfr.To_str_and_clear()); } public void Test__qry(Db_qry qry, String expd) { - Tfds.Eq_str_lines(expd, sql_wtr.To_sql_str(qry, Bool_.N)); + Tfds.Eq_str_lines(expd, sql_wtr.ToSqlStr(qry, Bool_.N)); } } diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_from_wtr_tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_from_wtr_tst.java similarity index 100% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_from_wtr_tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_from_wtr_tst.java diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java similarity index 92% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java index 9330c86d8..8b6d5aecb 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java +++ b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__ansi__tst.java @@ -15,9 +15,9 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import org.junit.*; -import gplx.core.criterias.*; import gplx.dbs.sqls.*; +import gplx.core.criterias.*; public class Sql_qry_wtr__ansi__tst { - Sql_qry_wtr sqlWtr = Sql_qry_wtr_.New__basic(); + SqlQryWtr sqlWtr = SqlQryWtrUtl.NewBasic(); @Test public void Insert() { tst_XtoSql ( Db_qry_.insert_("people").Val_int("id", 1).Val_str("name", "me") @@ -93,5 +93,5 @@ public class Sql_qry_wtr__ansi__tst { ); } void tst_XtoSql(Db_qry cmd, String expd) {tst_XtoSql(cmd, expd, false);} - void tst_XtoSql(Db_qry cmd, String expd, boolean prepare) {Tfds.Eq(expd, sqlWtr.To_sql_str(cmd, prepare));} + void tst_XtoSql(Db_qry cmd, String expd, boolean prepare) {Tfds.Eq(expd, sqlWtr.ToSqlStr(cmd, prepare));} } diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java similarity index 84% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java index 1a3f9f228..1d3c2172d 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java +++ b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_qry_wtr__iosql__tst.java @@ -13,10 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; -import org.junit.*; import gplx.core.strings.*; +package gplx.dbs.sqls.wtrs; import gplx.*; +import gplx.dbs.sqls.*; +import org.junit.*; import gplx.core.criterias.*; /*Criteria_base*/ -import gplx.core.ios.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.wtrs.*; +import gplx.core.ios.*; public class Sql_qry_wtr__iosql__tst { @Test public void Type() { fld = IoItm_base_.Prop_Type; @@ -49,9 +50,9 @@ public class Sql_qry_wtr__iosql__tst { } Criteria ioCrt_(String fld, Criteria crt) {return Criteria_fld.new_(fld, crt);} String fld; - private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); + private final Sql_wtr_ctx ctx = new Sql_wtr_ctx(false); void tst_Write(String expd, Criteria crt) { - Sql_where_wtr where_wtr = ((Sql_core_wtr)Sql_qry_wtr_.New__basic()).Where_wtr(); + Sql_where_wtr where_wtr = ((Sql_core_wtr)SqlQryWtrUtl.NewBasic()).Where_wtr(); Bry_bfr bfr = Bry_bfr_.New(); where_wtr.Bld_where_elem(bfr, ctx, crt); Tfds.Eq(expd, bfr.To_str_and_clear()); diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java similarity index 91% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java index a49041f2a..8235368dd 100644 --- a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java +++ b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_schema_wtr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.dbs.sqls.wtrs; import gplx.*; import gplx.dbs.*; import gplx.dbs.sqls.*; import org.junit.*; public class Sql_schema_wtr_tst { - @Before public void setup() {} private final Sql_schema_wtr_fxt fxt = new Sql_schema_wtr_fxt(); + @Before public void setup() {} private final Sql_schema_wtr_fxt fxt = new Sql_schema_wtr_fxt(); @Test public void Idx_unique() { fxt.Test_create_idx(Dbmeta_idx_itm.new_unique_by_tbl("tbl_name", "idx_name", "fld_1", "fld_2") , "CREATE UNIQUE INDEX IF NOT EXISTS tbl_name__idx_name ON tbl_name (fld_1, fld_2);" @@ -59,7 +59,7 @@ public class Sql_schema_wtr_tst { } } class Sql_schema_wtr_fxt { - private Sql_schema_wtr sqlbldr = Sql_qry_wtr_.New__sqlite().Schema_wtr(); + private Sql_schema_wtr sqlbldr = SqlQryWtrUtl.NewSqlite().Schema_wtr(); public void Test_create_idx(Dbmeta_idx_itm idx, String expd) {Tfds.Eq(expd, sqlbldr.Bld_create_idx(idx));} public void Test_create_tbl(Dbmeta_tbl_itm tbl, String expd) {Tfds.Eq_str_lines(expd, sqlbldr.Bld_create_tbl(tbl));} public void Test_alter_tbl_add(String tbl, Dbmeta_fld_itm fld, String expd) {Tfds.Eq_str_lines(expd, sqlbldr.Bld_alter_tbl_add(tbl, fld));} diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr_tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_select_wtr_tst.java similarity index 100% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_select_wtr_tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_select_wtr_tst.java diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr_tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_val_wtr_tst.java similarity index 100% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_val_wtr_tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_val_wtr_tst.java diff --git a/140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr_tst.java b/140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_where_wtr_tst.java similarity index 100% rename from 140_dbs/src/gplx/dbs/sqls/wtrs/Sql_where_wtr_tst.java rename to 140_dbs/tst/gplx/dbs/sqls/wtrs/Sql_where_wtr_tst.java diff --git a/150_gfui/src/gplx/gfui/DirInt.java b/150_gfui/src/gplx/gfui/DirInt.java index a07943a92..c3dcc2504 100644 --- a/150_gfui/src/gplx/gfui/DirInt.java +++ b/150_gfui/src/gplx/gfui/DirInt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; public class DirInt { public int Val() {return val;} int val; @@ -27,7 +27,7 @@ public class DirInt { } public boolean BoundFail(int i, int bound) {return this == Bwd ? i < bound : i > bound;} DirInt(int v) {this.val = v;} - public static final DirInt + public static final DirInt Fwd = new DirInt(1) , Bwd = new DirInt(-1); } diff --git a/150_gfui/src/gplx/gfui/GfuiAlign_.java b/150_gfui/src/gplx/gfui/GfuiAlign_.java index 6de8860c5..8846495fc 100644 --- a/150_gfui/src/gplx/gfui/GfuiAlign_.java +++ b/150_gfui/src/gplx/gfui/GfuiAlign_.java @@ -1,35 +1,35 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; import gplx.core.interfaces.*; -public class GfuiAlign_ implements ParseAble { +public class GfuiAlign_ implements ParseAble { public static GfuiAlign as_(Object obj) {return obj instanceof GfuiAlign ? (GfuiAlign)obj : null;} public static GfuiAlign cast(Object obj) {try {return (GfuiAlign)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiAlign.class, obj);}} - public static final GfuiAlign + public static final GfuiAlign Null = new_(0, "nil") , Lo = new_(1, "lo") , Mid = new_(2, "mid") , Hi = new_(3, "hi"); - public static final GfuiAlign + public static final GfuiAlign Top = Lo , Bot = Hi , Left = Lo , Right = Hi; static GfuiAlign new_(int v, String s) {return new GfuiAlign(v, s);} - public static final GfuiAlign_ Parser = new GfuiAlign_(); + public static final GfuiAlign_ Parser = new GfuiAlign_(); public Object ParseAsObj(String raw) {return parse(raw);} public static GfuiAlign val_(int v) { if (v == Lo.Val()) return Lo; diff --git a/150_gfui/src/gplx/gfui/GfuiAxisType.java b/150_gfui/src/gplx/gfui/GfuiAxisType.java index 153ea5087..b3e6ed15a 100644 --- a/150_gfui/src/gplx/gfui/GfuiAxisType.java +++ b/150_gfui/src/gplx/gfui/GfuiAxisType.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui; import gplx.*; +package gplx.gfui; import gplx.*; public class GfuiAxisType { - public int Val() {return val;} int val; - public GfuiAxisType CrossAxis() {return val == GfuiAxisType.X.val ? GfuiAxisType.Y : GfuiAxisType.X;} - GfuiAxisType(int v) {this.val = v;} - public static final GfuiAxisType X = new GfuiAxisType(1); - public static final GfuiAxisType Y = new GfuiAxisType(2); -} + public int Val() {return val;} int val; + public GfuiAxisType CrossAxis() {return val == GfuiAxisType.X.val ? GfuiAxisType.Y : GfuiAxisType.X;} + GfuiAxisType(int v) {this.val = v;} + public static final GfuiAxisType X = new GfuiAxisType(1); + public static final GfuiAxisType Y = new GfuiAxisType(2); +} diff --git a/150_gfui/src/gplx/gfui/GfuiBorderEdge.java b/150_gfui/src/gplx/gfui/GfuiBorderEdge.java index 691c26ed7..04f0ade95 100644 --- a/150_gfui/src/gplx/gfui/GfuiBorderEdge.java +++ b/150_gfui/src/gplx/gfui/GfuiBorderEdge.java @@ -1,34 +1,34 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; import gplx.core.bits.*; -public class GfuiBorderEdge { +public class GfuiBorderEdge { public int Val() {return val;} int val; public boolean Has(GfuiBorderEdge comp) {return Bitmask_.Has_int(val, comp.val);} public GfuiBorderEdge Add(GfuiBorderEdge comp) { return new GfuiBorderEdge(comp.val + val); } @gplx.Internal protected GfuiBorderEdge(int v) {this.val = v;} - public static final GfuiBorderEdge Left = new GfuiBorderEdge(1); - public static final GfuiBorderEdge Right = new GfuiBorderEdge(2); - public static final GfuiBorderEdge Top = new GfuiBorderEdge(4); - public static final GfuiBorderEdge Bot = new GfuiBorderEdge(8); - public static final GfuiBorderEdge All = new GfuiBorderEdge(15); + public static final GfuiBorderEdge Left = new GfuiBorderEdge(1); + public static final GfuiBorderEdge Right = new GfuiBorderEdge(2); + public static final GfuiBorderEdge Top = new GfuiBorderEdge(4); + public static final GfuiBorderEdge Bot = new GfuiBorderEdge(8); + public static final GfuiBorderEdge All = new GfuiBorderEdge(15); } -class GfuiBorderEdge_ { +class GfuiBorderEdge_ { public static String To_str(GfuiBorderEdge edge) { int val = edge.Val(); if (val == GfuiBorderEdge.Left.Val()) return Left_raw; @@ -46,7 +46,7 @@ class GfuiBorderEdge_ { else if (String_.Eq(raw, All_raw)) return GfuiBorderEdge.All; else throw Err_.new_unhandled(raw); } - public static final String + public static final String All_raw = "all" , Top_raw = "top" , Left_raw = "left" diff --git a/150_gfui/src/gplx/gfui/PointAdp.java b/150_gfui/src/gplx/gfui/PointAdp.java index c96c821cd..28046db89 100644 --- a/150_gfui/src/gplx/gfui/PointAdp.java +++ b/150_gfui/src/gplx/gfui/PointAdp.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; -public class PointAdp implements To_str_able { - public int X() {return x;} final int x; - public int Y() {return y;} final int y; +public class PointAdp implements To_str_able { + public int X() {return x;} final int x; + public int Y() {return y;} final int y; public PointAdp Op_add(PointAdp val) {return new PointAdp(x + val.x, y + val.y);} public PointAdp Op_add(int xv, int yv) {return new PointAdp(x + xv, y + yv);} public PointAdp Op_add(int i) {return new PointAdp(x + i, y + i);} diff --git a/150_gfui/src/gplx/gfui/PointAdp_.java b/150_gfui/src/gplx/gfui/PointAdp_.java index fd1b8a787..141848b80 100644 --- a/150_gfui/src/gplx/gfui/PointAdp_.java +++ b/150_gfui/src/gplx/gfui/PointAdp_.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui; import gplx.*; +package gplx.gfui; import gplx.*; public class PointAdp_ { - public static final PointAdp Null = new PointAdp(Int_.Min_value, Int_.Min_value); - public static final PointAdp Zero = new PointAdp(0, 0); - public static PointAdp as_(Object obj) {return obj instanceof PointAdp ? (PointAdp)obj : null;} - public static PointAdp cast(Object obj) {try {return (PointAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, PointAdp.class, obj);}} - public static PointAdp new_(int x, int y) {return new PointAdp(x, y);} - public static PointAdp coerce_(Object o) {PointAdp rv = PointAdp_.as_(o); return (rv == null) ? parse((String)o) : rv;} - public static PointAdp parse(String raw) { - try { - String[] ary = String_.Split(raw, ","); - return new PointAdp(Int_.Parse(ary[0]), Int_.Parse(ary[1])); - } catch (Exception exc) {throw Err_.new_parse_exc(exc, PointAdp.class, raw);} - } -} + public static final PointAdp Null = new PointAdp(Int_.Min_value, Int_.Min_value); + public static final PointAdp Zero = new PointAdp(0, 0); + public static PointAdp as_(Object obj) {return obj instanceof PointAdp ? (PointAdp)obj : null;} + public static PointAdp cast(Object obj) {try {return (PointAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, PointAdp.class, obj);}} + public static PointAdp new_(int x, int y) {return new PointAdp(x, y);} + public static PointAdp coerce_(Object o) {PointAdp rv = PointAdp_.as_(o); return (rv == null) ? parse((String)o) : rv;} + public static PointAdp parse(String raw) { + try { + String[] ary = String_.Split(raw, ","); + return new PointAdp(Int_.Parse(ary[0]), Int_.Parse(ary[1])); + } catch (Exception exc) {throw Err_.new_parse_exc(exc, PointAdp.class, raw);} + } +} diff --git a/150_gfui/src/gplx/gfui/RectAdpF.java b/150_gfui/src/gplx/gfui/RectAdpF.java index 1391910cf..a6d45ecd9 100644 --- a/150_gfui/src/gplx/gfui/RectAdpF.java +++ b/150_gfui/src/gplx/gfui/RectAdpF.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; public class RectAdpF { //_20101206 // supports Graphics.MeasureString public float X() {return x;} float x; public float Y() {return y;} float y; @@ -22,7 +22,7 @@ public class RectAdpF { //_20101206 // supports Graphics.MeasureString return comp.x == x && comp.y == y && comp.width == width && comp.height == height; } - public static final RectAdpF Null = new_(Int_.Min_value, Int_.Min_value, Int_.Min_value, Int_.Min_value); + public static final RectAdpF Null = new_(Int_.Min_value, Int_.Min_value, Int_.Min_value, Int_.Min_value); public static RectAdpF new_(float x, float y, float width, float height) { RectAdpF rv = new RectAdpF(); rv.x = x; rv.y = y; rv.width = width; rv.height = height; diff --git a/150_gfui/src/gplx/gfui/RectAdp_.java b/150_gfui/src/gplx/gfui/RectAdp_.java index d8abe69a5..3ef70a607 100644 --- a/150_gfui/src/gplx/gfui/RectAdp_.java +++ b/150_gfui/src/gplx/gfui/RectAdp_.java @@ -13,20 +13,20 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui; import gplx.*; +package gplx.gfui; import gplx.*; public class RectAdp_ { - public static final RectAdp Zero = new RectAdp(PointAdp_.Zero, SizeAdp_.Zero); - public static RectAdp new_(int x, int y, int width, int height) {return new RectAdp(PointAdp_.new_(x, y), SizeAdp_.new_(width, height));} - public static RectAdp corners_(PointAdp upperLeft, PointAdp bottomRight) {return new RectAdp(upperLeft, SizeAdp_.corners_(upperLeft, bottomRight));} - public static RectAdp vector_(PointAdp pos, SizeAdp size) {return new RectAdp(pos, size);} - public static RectAdp size_(int w, int h) {return new_(0, 0, w, h);} - public static RectAdp size_(SizeAdp size) {return new RectAdp(PointAdp_.Zero, size);} - public static RectAdp parse_ws_(String raw) {return parse(String_.Replace(raw, " ", ""));} - public static RectAdp parse(String raw) { - try { - String[] ary = String_.Split(raw, ","); - return RectAdp_.new_(Int_.Parse(ary[0]), Int_.Parse(ary[1]), Int_.Parse(ary[2]), Int_.Parse(ary[3])); - } catch(Exception exc) {throw Err_.new_parse_exc(exc, RectAdp.class, raw);} - } - public static String Xto_str(RectAdp rect) {return String_.Format("{0},{1},{2},{3}", rect.X(), rect.Y(), rect.Width(), rect.Height());} -} + public static final RectAdp Zero = new RectAdp(PointAdp_.Zero, SizeAdp_.Zero); + public static RectAdp new_(int x, int y, int width, int height) {return new RectAdp(PointAdp_.new_(x, y), SizeAdp_.new_(width, height));} + public static RectAdp corners_(PointAdp upperLeft, PointAdp bottomRight) {return new RectAdp(upperLeft, SizeAdp_.corners_(upperLeft, bottomRight));} + public static RectAdp vector_(PointAdp pos, SizeAdp size) {return new RectAdp(pos, size);} + public static RectAdp size_(int w, int h) {return new_(0, 0, w, h);} + public static RectAdp size_(SizeAdp size) {return new RectAdp(PointAdp_.Zero, size);} + public static RectAdp parse_ws_(String raw) {return parse(String_.Replace(raw, " ", ""));} + public static RectAdp parse(String raw) { + try { + String[] ary = String_.Split(raw, ","); + return RectAdp_.new_(Int_.Parse(ary[0]), Int_.Parse(ary[1]), Int_.Parse(ary[2]), Int_.Parse(ary[3])); + } catch(Exception exc) {throw Err_.new_parse_exc(exc, RectAdp.class, raw);} + } + public static String Xto_str(RectAdp rect) {return String_.Format("{0},{1},{2},{3}", rect.X(), rect.Y(), rect.Width(), rect.Height());} +} diff --git a/150_gfui/src/gplx/gfui/SizeAdpF_.java b/150_gfui/src/gplx/gfui/SizeAdpF_.java index 78cc513dc..b623f7328 100644 --- a/150_gfui/src/gplx/gfui/SizeAdpF_.java +++ b/150_gfui/src/gplx/gfui/SizeAdpF_.java @@ -13,20 +13,20 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui; import gplx.*; +package gplx.gfui; import gplx.*; public class SizeAdpF_ { - public static final SizeAdpF Null = new_(Int_.Min_value, Int_.Min_value); - public static final SizeAdpF Zero = new_(0, 0); - public static final SizeAdpF Parser = new SizeAdpF(0, 0); - public static SizeAdpF as_(Object obj) {return obj instanceof SizeAdpF ? (SizeAdpF)obj : null;} - public static SizeAdpF new_(float width, float height) {return new SizeAdpF(width, height);} - public static SizeAdpF coerce_(Object obj) {SizeAdpF rv = as_(obj); return rv == null ? parse((String)obj) : rv;} - public static SizeAdpF parse(String s) { - try { - String[] ary = String_.Split(s, ","); if (ary.length != 2) throw Err_.new_wo_type("SizeAdf should only have 2 numbers separated by 1 comma"); - float val1 = Float_.parse(ary[0]); - float val2 = Float_.parse(ary[1]); - return new_(val1, val2); - } catch (Exception e) {throw Err_.new_parse_exc(e, SizeAdpF.class, s);} - } -} + public static final SizeAdpF Null = new_(Int_.Min_value, Int_.Min_value); + public static final SizeAdpF Zero = new_(0, 0); + public static final SizeAdpF Parser = new SizeAdpF(0, 0); + public static SizeAdpF as_(Object obj) {return obj instanceof SizeAdpF ? (SizeAdpF)obj : null;} + public static SizeAdpF new_(float width, float height) {return new SizeAdpF(width, height);} + public static SizeAdpF coerce_(Object obj) {SizeAdpF rv = as_(obj); return rv == null ? parse((String)obj) : rv;} + public static SizeAdpF parse(String s) { + try { + String[] ary = String_.Split(s, ","); if (ary.length != 2) throw Err_.new_wo_type("SizeAdf should only have 2 numbers separated by 1 comma"); + float val1 = Float_.parse(ary[0]); + float val2 = Float_.parse(ary[1]); + return new_(val1, val2); + } catch (Exception e) {throw Err_.new_parse_exc(e, SizeAdpF.class, s);} + } +} diff --git a/150_gfui/src/gplx/gfui/SizeAdp_.java b/150_gfui/src/gplx/gfui/SizeAdp_.java index 7d530d3c0..bf64fc592 100644 --- a/150_gfui/src/gplx/gfui/SizeAdp_.java +++ b/150_gfui/src/gplx/gfui/SizeAdp_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; -public class SizeAdp_ { - public static final SizeAdp Null = new SizeAdp(Int_.Min_value, Int_.Min_value); - public static final SizeAdp Zero = new SizeAdp(0, 0); - public static final SizeAdp[] Ary_empty = new SizeAdp[0]; +public class SizeAdp_ { + public static final SizeAdp Null = new SizeAdp(Int_.Min_value, Int_.Min_value); + public static final SizeAdp Zero = new SizeAdp(0, 0); + public static final SizeAdp[] Ary_empty = new SizeAdp[0]; public static SizeAdp cast(Object obj) {try {return (SizeAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, SizeAdp.class, obj);}} public static SizeAdp new_(int width, int height) {return new SizeAdp(width, height);} public static SizeAdp parse(String raw) {return parse_or(raw, SizeAdp_.Null);} diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiBnd_box_status.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiBnd_box_status.java index 51985c05d..d36726309 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiBnd_box_status.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiBnd_box_status.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.customs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.draws.*; import gplx.gfui.kits.core.*; import gplx.gfui.envs.*; import gplx.gfui.controls.windows.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; public class GfuiBnd_box_status implements Gfo_invk, UsrMsgWkr { @@ -40,7 +40,7 @@ public class GfuiBnd_box_status implements Gfo_invk, UsrMsgWkr { if (ctx.Match(k, WriteText_cmd)) WriteText(m.ReadStr("v")); else if (ctx.Match(k, TimerTick_evt)) HideWin(); return this; - } static final String TimerTick_evt = "TimerTick", WriteText_cmd = "WriteText"; + } static final String TimerTick_evt = "TimerTick", WriteText_cmd = "WriteText"; TimerAdp timer; public static GfuiBnd_box_status new_(String key) { GfuiBnd_box_status rv = new GfuiBnd_box_status(); diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiCheckListPanel.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiCheckListPanel.java index 973ac498a..584f1e7e8 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiCheckListPanel.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiCheckListPanel.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.customs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.layouts.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; public class GfuiCheckListPanel extends GfuiElemBase { @@ -48,7 +48,7 @@ public class GfuiCheckListPanel extends GfuiElemBase { else if (ctx.Match(k, ReverseChks_cmd)) listBox.Items_reverse(); else return super.Invk(ctx, ikey, k, m); return this; - } public static final String ToggleChecks_cmd = "ToggleChecks", ReverseChks_cmd = "ReverseChks"; + } public static final String ToggleChecks_cmd = "ToggleChecks", ReverseChks_cmd = "ReverseChks"; GfuiChkBox toggle; GfuiCheckListBox listBox = GfuiCheckListBox.new_(); public static GfuiCheckListPanel new_() { diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiIoUrlSelectBox.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiIoUrlSelectBox.java index 8db62316a..3e9ae801d 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiIoUrlSelectBox.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiIoUrlSelectBox.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.customs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.layouts.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; public abstract class GfuiIoUrlSelectBox extends GfuiElemBase { @@ -25,7 +25,7 @@ public abstract class GfuiIoUrlSelectBox extends GfuiElemBase { this.Lyt_activate(); this.Lyt().Bands_add(GftBand.new_().Cell_abs_(60).Cell_pct_(100).Cell_abs_(30)); } - public static final String PathSelected_evt = "PathSelected_evt"; + public static final String PathSelected_evt = "PathSelected_evt"; public GfuiLbl Label() {return label;} GfuiLbl label; public Io_url Url() {return Io_url_.new_any_(pathBox.TextMgr().Val());} public Io_url StartingFolder() {return startingFolder;} @@ -43,7 +43,7 @@ public abstract class GfuiIoUrlSelectBox extends GfuiElemBase { if (ctx.Match(k, SelectAction_cmd)) SelectAction(); else return super.Invk(ctx, ikey, k, m); return this; - } public static final String SelectAction_cmd = "SelectAction"; + } public static final String SelectAction_cmd = "SelectAction"; GfuiComboBox pathBox = GfuiComboBox.new_(); } diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBnd.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBnd.java index 3f6698c1d..49901ea9a 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBnd.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBnd.java @@ -46,7 +46,7 @@ public class GfuiMoveElemBnd implements IptBnd, Gfo_invk, InjectAble { else if (val == IptEventType_.MouseMove.Val()) ExecMouseMove(iptData); } public GfuiElem TargetElem() {return targetElem;} public void TargetElem_set(GfuiElem v) {this.targetElem = v;} GfuiElem targetElem; - public static final String target_idk = "target"; + public static final String target_idk = "target"; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, target_idk)) return targetElem; else if (ctx.Match(k, "key")) return key; diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBtn.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBtn.java index 01be8a4a6..f527f969c 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBtn.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiMoveElemBtn.java @@ -50,7 +50,7 @@ public class GfuiMoveElemBtn extends GfuiBtn { @Override public GxwElem UnderEl } public void TargetElem_set(GfuiElem v) {moveBinding.TargetElem_set(v);} - final GfuiMoveElemBnd moveBinding = GfuiMoveElemBnd.new_(); + final GfuiMoveElemBnd moveBinding = GfuiMoveElemBnd.new_(); public static GfuiMoveElemBtn new_() { GfuiMoveElemBtn rv = new GfuiMoveElemBtn(); rv.ctor_GfuiBox_base(GfuiElem_.init_focusAble_true_()); diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBar.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBar.java index e184687b8..f449607c4 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBar.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBar.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.customs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.layouts.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.elems.*; public class GfuiStatusBar extends GfuiElemBase { @@ -27,7 +27,7 @@ public class GfuiStatusBar extends GfuiElemBase { if (ctx.Match(k, StatusBarFocus_cmd)) StatusBar_Focus(); else return super.Invk(ctx, ikey, k, m); return this; - } public static final String StatusBarFocus_cmd = "StatusBarFocus"; + } public static final String StatusBarFocus_cmd = "StatusBarFocus"; @Override public void ctor_GfuiBox_base(Keyval_hash ctorArgs) { super.ctor_GfuiBox_base(ctorArgs); moveBtn = GfuiMoveElemBtn.new_(); diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBox.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBox.java index 15263fd3c..36b01251a 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBox.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBox.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.customs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.core.envs.*; import gplx.gfui.kits.core.*; import gplx.gfui.envs.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.standards.*; public class GfuiStatusBox extends GfuiTextBox implements UsrMsgWkr { public GfuiStatusBox Active_(boolean v) {active = v; return this;} private boolean active = true; @@ -64,7 +64,7 @@ public class GfuiStatusBox extends GfuiTextBox implements UsrMsgWkr { public Gf else if (ctx.Match(k, Invk_WriteText)) WriteText(m.ReadStr("v")); else return super.Invk(ctx, ikey, k, m); return this; - } static final String Invk_HideWindow = "HideWindow", Invk_WriteText = "WriteText", Invk_Text_empty = "Text_empty"; + } static final String Invk_HideWindow = "HideWindow", Invk_WriteText = "WriteText", Invk_Text_empty = "Text_empty"; TimerAdp timer; @Override public void ctor_GfuiBox_base(Keyval_hash ctorArgs) { super.ctor_GfuiBox_base(ctorArgs); diff --git a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBoxBnd.java b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBoxBnd.java index 5f1a23853..1451660d0 100644 --- a/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBoxBnd.java +++ b/150_gfui/src/gplx/gfui/controls/customs/GfuiStatusBoxBnd.java @@ -37,7 +37,7 @@ public class GfuiStatusBoxBnd implements Gfo_invk { if (ctx.Match(k, Invk_ShowTime)) ShowTime(); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_ShowTime = "ShowTime"; + } public static final String Invk_ShowTime = "ShowTime"; public static GfuiStatusBoxBnd gft_(GfuiWin owner) { GfuiStatusBoxBnd rv = new GfuiStatusBoxBnd(); rv.ctor_GfuiStatusBoxBnd(owner); diff --git a/150_gfui/src/gplx/gfui/controls/elems/GfuiElemBase.java b/150_gfui/src/gplx/gfui/controls/elems/GfuiElemBase.java index 026458cef..209fc9e74 100644 --- a/150_gfui/src/gplx/gfui/controls/elems/GfuiElemBase.java +++ b/150_gfui/src/gplx/gfui/controls/elems/GfuiElemBase.java @@ -310,7 +310,7 @@ public class GfuiElemBase implements GfuiElem { // } } return this; - } public static final String Invk_OwnerWin_cmd = "ownerWin"; + } public static final String Invk_OwnerWin_cmd = "ownerWin"; public void Invoke(Gfo_invk_cmd cmd) { cmd.Exec(); diff --git a/150_gfui/src/gplx/gfui/controls/elems/GfuiElemKeys.java b/150_gfui/src/gplx/gfui/controls/elems/GfuiElemKeys.java index 2f4011abd..f05780d9a 100644 --- a/150_gfui/src/gplx/gfui/controls/elems/GfuiElemKeys.java +++ b/150_gfui/src/gplx/gfui/controls/elems/GfuiElemKeys.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.elems; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; public class GfuiElemKeys { - public static final String + public static final String ActionExec_cmd = "actionExec" , Focus_cmd = "focus" , Redraw_cmd = "redraw" @@ -24,7 +24,7 @@ public class GfuiElemKeys { , IptRcvd_evt = "IptRcvd_evt" , Evt_menu_detected = "menu_detected" ; - @gplx.Internal protected static final String + @gplx.Internal protected static final String Key_set = "Key_" , TipText = "TipText" , TipText_ = "TipText_" diff --git a/150_gfui/src/gplx/gfui/controls/elems/GfuiElem_.java b/150_gfui/src/gplx/gfui/controls/elems/GfuiElem_.java index 66431eed8..83b396134 100644 --- a/150_gfui/src/gplx/gfui/controls/elems/GfuiElem_.java +++ b/150_gfui/src/gplx/gfui/controls/elems/GfuiElem_.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.elems; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; public class GfuiElem_ { - public static final String + public static final String InitKey_focusAble = "focusAble" , InitKey_ownerWin = "ownerForm"; public static GfuiElem as_(Object obj) {return obj instanceof GfuiElem ? (GfuiElem)obj : null;} diff --git a/150_gfui/src/gplx/gfui/controls/gxws/GxwCbkHost_.java b/150_gfui/src/gplx/gfui/controls/gxws/GxwCbkHost_.java index 2a92869aa..a5690befb 100644 --- a/150_gfui/src/gplx/gfui/controls/gxws/GxwCbkHost_.java +++ b/150_gfui/src/gplx/gfui/controls/gxws/GxwCbkHost_.java @@ -27,7 +27,7 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; public class GxwCbkHost_ { - public static final GxwCbkHost Null = new GfuiHost_cls_null(); + public static final GxwCbkHost Null = new GfuiHost_cls_null(); public static final boolean ExecKeyEvent(GxwCbkHost host, KeyEvent e) { boolean rv = true; int id = e.getID(), val = e.getKeyCode(); boolean isAltF4 = false; diff --git a/150_gfui/src/gplx/gfui/controls/gxws/GxwElem_mock_base.java b/150_gfui/src/gplx/gfui/controls/gxws/GxwElem_mock_base.java index 900d86fb6..dddd2709e 100644 --- a/150_gfui/src/gplx/gfui/controls/gxws/GxwElem_mock_base.java +++ b/150_gfui/src/gplx/gfui/controls/gxws/GxwElem_mock_base.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.gxws; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.ipts.*; import gplx.gfui.draws.*; public class GxwElem_mock_base implements GxwElem { - public GxwCore_base Core() {return ctrlMgr;} final GxwCore_mock ctrlMgr = new GxwCore_mock(); + public GxwCore_base Core() {return ctrlMgr;} final GxwCore_mock ctrlMgr = new GxwCore_mock(); public GxwCbkHost Host() {return host;} public void Host_set(GxwCbkHost host) {this.host = host;} GxwCbkHost host = GxwCbkHost_.Null; public String TextVal() {return text;} public void TextVal_set(String v) {text = v;} private String text = ""; public void SendKeyDown(IptKey key) {} diff --git a/150_gfui/src/gplx/gfui/controls/gxws/MockForm.java b/150_gfui/src/gplx/gfui/controls/gxws/MockForm.java index b7596b7f3..3a52d0956 100644 --- a/150_gfui/src/gplx/gfui/controls/gxws/MockForm.java +++ b/150_gfui/src/gplx/gfui/controls/gxws/MockForm.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.controls.gxws; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; -import gplx.gfui.imgs.*; -public class MockForm extends GxwElem_mock_base implements GxwWin { - public IconAdp IconWin() {return null;} public void IconWin_set(IconAdp v) {} - public void ShowWin() {} - public void CloseWin() {} - public void HideWin() {} - public boolean Maximized() {return false;} public void Maximized_(boolean v) {} - public boolean Minimized() {return false;} public void Minimized_(boolean v) {} - public boolean Pin() {return pin;} public void Pin_set(boolean val) {pin = val;} private boolean pin; - public void OpenedCmd_set(Gfo_invk_cmd v) {} - public void TaskbarVisible_set(boolean val) {} - public void TaskbarParkingWindowFix(GxwElem form) {} - public static final MockForm Instance = new MockForm(); MockForm() {} -} +package gplx.gfui.controls.gxws; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; +import gplx.gfui.imgs.*; +public class MockForm extends GxwElem_mock_base implements GxwWin { + public IconAdp IconWin() {return null;} public void IconWin_set(IconAdp v) {} + public void ShowWin() {} + public void CloseWin() {} + public void HideWin() {} + public boolean Maximized() {return false;} public void Maximized_(boolean v) {} + public boolean Minimized() {return false;} public void Minimized_(boolean v) {} + public boolean Pin() {return pin;} public void Pin_set(boolean val) {pin = val;} private boolean pin; + public void OpenedCmd_set(Gfo_invk_cmd v) {} + public void TaskbarVisible_set(boolean val) {} + public void TaskbarParkingWindowFix(GxwElem form) {} + public static final MockForm Instance = new MockForm(); MockForm() {} +} diff --git a/150_gfui/src/gplx/gfui/controls/standards/GfuiBtnClickBnd.java b/150_gfui/src/gplx/gfui/controls/standards/GfuiBtnClickBnd.java index 5ceef749b..c94f0b7bd 100644 --- a/150_gfui/src/gplx/gfui/controls/standards/GfuiBtnClickBnd.java +++ b/150_gfui/src/gplx/gfui/controls/standards/GfuiBtnClickBnd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.standards; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.ipts.*; import gplx.gfui.controls.elems.*; import gplx.core.interfaces.*; @@ -35,6 +35,6 @@ class GfuiBtnClickBnd implements InjectAble, Gfo_invk { if (ctx.Match(k, ExecMouseUp_cmd)) ExecMouseUp(IptEventData.ctx_(ctx, m)); else return Gfo_invk_.Rv_unhandled; return this; - } static final String ExecMouseUp_cmd = "ExecMouseUp"; - public static final GfuiBtnClickBnd Instance = new GfuiBtnClickBnd(); GfuiBtnClickBnd() {} + } static final String ExecMouseUp_cmd = "ExecMouseUp"; + public static final GfuiBtnClickBnd Instance = new GfuiBtnClickBnd(); GfuiBtnClickBnd() {} } diff --git a/150_gfui/src/gplx/gfui/controls/standards/GfuiLbl_.java b/150_gfui/src/gplx/gfui/controls/standards/GfuiLbl_.java index 58fcf6f4f..28f7a9704 100644 --- a/150_gfui/src/gplx/gfui/controls/standards/GfuiLbl_.java +++ b/150_gfui/src/gplx/gfui/controls/standards/GfuiLbl_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.standards; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.draws.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; public class GfuiLbl_ { @@ -41,7 +41,7 @@ public class GfuiLbl_ { rv.Border().All_(PenAdp_.black_()); return rv; } - public static final String Text_Null = null; + public static final String Text_Null = null; @gplx.Internal protected static GfuiLbl new_() { GfuiLbl rv = new GfuiLbl(); rv.ctor_GfuiBox_base(GfuiElem_.init_focusAble_false_()); diff --git a/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox.java b/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox.java index e3e11b6b9..a7b69e1fc 100644 --- a/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox.java +++ b/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.standards; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.draws.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; public class GfuiTextBox extends GfuiElemBase { - public static final String SelectionStartChanged_evt = "SelectionStartChanged"; + public static final String SelectionStartChanged_evt = "SelectionStartChanged"; public boolean Border_on() {return textBox.Border_on();} public void Border_on_(boolean v) {BorderOn_set(v);} public ColorAdp Border_color() {return textBox.Border_color();} public void Border_color_(ColorAdp v) {textBox.Border_color_(v);} diff --git a/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox_.java b/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox_.java index c34189728..cba93c99b 100644 --- a/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox_.java +++ b/150_gfui/src/gplx/gfui/controls/standards/GfuiTextBox_.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.standards; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; public class GfuiTextBox_ { public static GfuiTextBox as_(Object obj) {return obj instanceof GfuiTextBox ? (GfuiTextBox)obj : null;} public static GfuiTextBox cast(Object obj) {try {return (GfuiTextBox)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfuiTextBox.class, obj);}} - public static final String NewLine = "\n"; - public static final String Ctor_Memo = "TextBox_Memo"; + public static final String NewLine = "\n"; + public static final String Ctor_Memo = "TextBox_Memo"; public static GfuiTextBox new_() { GfuiTextBox rv = new GfuiTextBox(); diff --git a/150_gfui/src/gplx/gfui/controls/tabs/TabBnd.java b/150_gfui/src/gplx/gfui/controls/tabs/TabBnd.java index 8ede14e28..e7de21f7f 100644 --- a/150_gfui/src/gplx/gfui/controls/tabs/TabBnd.java +++ b/150_gfui/src/gplx/gfui/controls/tabs/TabBnd.java @@ -61,7 +61,7 @@ class TabBnd_selectTab implements InjectAble, Gfo_invk { else if (ctx.Match(k, SelectPrev_cmd)) Select(m, -1); else return Gfo_invk_.Rv_unhandled; return this; - } static final String SelectNext_cmd = "SelectNext", SelectPrev_cmd = "SelectPrev"; + } static final String SelectNext_cmd = "SelectNext", SelectPrev_cmd = "SelectPrev"; TabBox tabBox; public static TabBnd_selectTab new_() {return new TabBnd_selectTab();} TabBnd_selectTab() {} } @@ -87,7 +87,7 @@ class TabBnd_reorderTab implements InjectAble, Gfo_invk { else if (ctx.Match(k, MovePrev_cmd)) MoveTab(GfuiBtn_.cast(ctx.MsgSrc()), -1); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String MoveNext_cmd = "MoveNext", MovePrev_cmd = "MovePrev"; + } public static final String MoveNext_cmd = "MoveNext", MovePrev_cmd = "MovePrev"; public static TabBnd_reorderTab new_(TabBox tabBox) { TabBnd_reorderTab rv = new TabBnd_reorderTab(); rv.tabBox = tabBox; diff --git a/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_orderChanged.java b/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_orderChanged.java index 52ce6f18b..b7752917e 100644 --- a/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_orderChanged.java +++ b/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_orderChanged.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.tabs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; public class TabBoxEvt_orderChanged { public int CurIdx() {return curIdx;} public TabBoxEvt_orderChanged CurIdx_(int v) {curIdx = v; return this;} int curIdx; public int NewIdx() {return newIdx;} public TabBoxEvt_orderChanged NewIdx_(int v) {newIdx = v; return this;} int newIdx; - public static final String OrderChanged_evt = "OrderChanged_evt"; + public static final String OrderChanged_evt = "OrderChanged_evt"; public static void Publish(TabBox tabBox, int curIdx, int newIdx) { Gfo_evt_mgr_.Pub_vals(tabBox, OrderChanged_evt, Keyval_.new_("curIdx", curIdx), Keyval_.new_("newIdx", newIdx)); } diff --git a/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_tabSelect.java b/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_tabSelect.java index 805abd305..3070b3ea2 100644 --- a/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_tabSelect.java +++ b/150_gfui/src/gplx/gfui/controls/tabs/TabBoxEvt_tabSelect.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.tabs; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; public class TabBoxEvt_tabSelect { public static String Key = "TabBoxEvt_tabSelect"; - public static final String SelectedChanged_evt = "SelectedChanged_evt"; + public static final String SelectedChanged_evt = "SelectedChanged_evt"; public static void Send(TabBoxMgr tabBoxMgr, TabPnlItm oldTab, TabPnlItm newTab) { Gfo_evt_mgr_.Pub_val(tabBoxMgr, Key, new TabPnlItm[] {oldTab, newTab}); } diff --git a/150_gfui/src/gplx/gfui/controls/tabs/TabBox_tst.java b/150_gfui/src/gplx/gfui/controls/tabs/TabBox_tst.java index cccbffcbf..25930bd68 100644 --- a/150_gfui/src/gplx/gfui/controls/tabs/TabBox_tst.java +++ b/150_gfui/src/gplx/gfui/controls/tabs/TabBox_tst.java @@ -117,7 +117,7 @@ class TabBoxFxt implements Gfo_invk { if (ctx.Match(k, OrderChangedReceived_cmd)) OrderChangedReceived(m); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String OrderChangedReceived_cmd = "OrderChangedReceived"; + } public static final String OrderChangedReceived_cmd = "OrderChangedReceived"; TabBox tabBox; public static TabBoxFxt new_() { TabBoxFxt rv = new TabBoxFxt(); diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfoConsoleWin.java b/150_gfui/src/gplx/gfui/controls/windows/GfoConsoleWin.java index 3387b159e..d8354618b 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfoConsoleWin.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfoConsoleWin.java @@ -110,9 +110,9 @@ public class GfoConsoleWin implements Gfo_invk, UsrMsgWkr { if (ctx.Match(k, Invk_Show)) Show(); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_Show = "Show" + } public static final String Invk_Show = "Show" ; - public static final GfoConsoleWin Instance = new GfoConsoleWin(); GfoConsoleWin() {} + public static final GfoConsoleWin Instance = new GfoConsoleWin(); GfoConsoleWin() {} } class GfoConsoleWinCmds implements Gfo_invk { GfuiWin win; GfuiTextBox consoleFilBox, consoleBox, statusBox, resultBox; @@ -227,7 +227,7 @@ class GfoConsoleWinCmds implements Gfo_invk { } else return win.Invk(ctx, ikey, k, m); return this; - } public static final String Invk_Exec = "Exec", Invk_Hide = "Hide", Invk_Save = "Save", Invk_Load = "Load", Invk_Help = "Help", Invk_Clear = "Clear" + } public static final String Invk_Exec = "Exec", Invk_Hide = "Hide", Invk_Save = "Save", Invk_Load = "Load", Invk_Help = "Help", Invk_Clear = "Clear" , Invk_X_ = "X_", Invk_Y_ = "Y_", Invk_Width_ = "Width_", Invk_Height_ = "Height_", Invk_Enabled_ = "Enabled_", Invk_SaveUrl_ = "SaveUrl_" ; GfoConsoleWin owner; diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiCmdForm.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiCmdForm.java index 439cfdeda..c3ef47492 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiCmdForm.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiCmdForm.java @@ -45,7 +45,7 @@ public class GfuiCmdForm implements Gfo_invk, InjectAble { } GfuiWin cmdForm; - static final String DoStuff = "doStuff", HideMe_cmd = "HideMe"; + static final String DoStuff = "doStuff", HideMe_cmd = "HideMe"; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, DoStuff)) ActivateMe((GfuiElem)ctx.MsgSrc()); else if (ctx.Match(k, HideMe_cmd)) ((GfuiWin)ctx.MsgSrc()).Hide(); diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusMgr.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusMgr.java index cdb6bf282..578a5ce26 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusMgr.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusMgr.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; -import gplx.gfui.controls.elems.*; -public class GfuiFocusMgr implements Gfo_evt_mgr_owner { - public static final String FocusChanged_evt = "focusChanged_evt"; - public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; - public GfuiElem FocusedElem() {return focusedElem;} GfuiElem focusedElem; - public GfuiElem FocusedElemPrev() {return focusedElemPrev;} GfuiElem focusedElemPrev; - public void FocusedElem_set(GfuiElem focused) { - focusedElemPrev = focusedElem; - this.focusedElem = focused; - Gfo_evt_mgr_.Pub_val(this, FocusChanged_evt, focused); - } - public static final GfuiFocusMgr Instance = new GfuiFocusMgr(); GfuiFocusMgr() {} -} +package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; +import gplx.gfui.controls.elems.*; +public class GfuiFocusMgr implements Gfo_evt_mgr_owner { + public static final String FocusChanged_evt = "focusChanged_evt"; + public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr; + public GfuiElem FocusedElem() {return focusedElem;} GfuiElem focusedElem; + public GfuiElem FocusedElemPrev() {return focusedElemPrev;} GfuiElem focusedElemPrev; + public void FocusedElem_set(GfuiElem focused) { + focusedElemPrev = focusedElem; + this.focusedElem = focused; + Gfo_evt_mgr_.Pub_val(this, FocusChanged_evt, focused); + } + public static final GfuiFocusMgr Instance = new GfuiFocusMgr(); GfuiFocusMgr() {} +} diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusOrderer.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusOrderer.java index af8de8673..8c82cd2e2 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusOrderer.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusOrderer.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.core.lists.*; /*ComparerAble*/ import gplx.gfui.controls.elems.*; @@ -37,7 +37,7 @@ public class GfuiFocusOrderer { return order; } static GfuiFocusOrderer_cls_x xcomparer = new GfuiFocusOrderer_cls_x(); static GfuiFocusOrderer_cls_y ycomparer = new GfuiFocusOrderer_cls_y(); - public static final int NullVal = -1; + public static final int NullVal = -1; } class GfuiFocusOrderer_cls_x implements ComparerAble { public int compare(Object lhsObj, Object rhsObj) { diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusXferBnd.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusXferBnd.java index b7a0bb630..1d0bbb159 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusXferBnd.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiFocusXferBnd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.core.interfaces.*; import gplx.gfui.ipts.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.tabs.*; -public class GfuiFocusXferBnd implements InjectAble, Gfo_invk { +public class GfuiFocusXferBnd implements InjectAble, Gfo_invk { public void Inject(Object owner) { GfuiElem elem = GfuiElem_.cast(owner); IptBnd_.cmd_to_(IptCfg_.Null, elem, this, Invk_FocusNext, IptKey_.Down); @@ -47,6 +47,6 @@ public class GfuiFocusXferBnd implements InjectAble, Gfo_invk { else if (ctx.Match(k, Invk_FocusPrev)) Focus(GfuiElem_.cast(ctx.MsgSrc()), false); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_FocusNext = "FocusNext", Invk_FocusPrev = "FocusPrev"; - public static final GfuiFocusXferBnd Instance = new GfuiFocusXferBnd(); GfuiFocusXferBnd() {} + } public static final String Invk_FocusNext = "FocusNext", Invk_FocusPrev = "FocusPrev"; + public static final GfuiFocusXferBnd Instance = new GfuiFocusXferBnd(); GfuiFocusXferBnd() {} } \ No newline at end of file diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiForm_menu.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiForm_menu.java index e7469f309..eb2acc76a 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiForm_menu.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiForm_menu.java @@ -62,7 +62,7 @@ public class GfuiForm_menu implements Gfo_invk { form.TaskbarParkingWindowFix(owner.OwnerWin()); // else ContextMenu shows up as WindowsFormsParkingWindow form.QuitMode_(GfuiQuitMode.Suspend); } - public static final String Msg_menu_Visible_toggle = "menu.visible_toggle"; + public static final String Msg_menu_Visible_toggle = "menu.visible_toggle"; public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { @@ -70,7 +70,7 @@ public class GfuiForm_menu implements Gfo_invk { else if (ctx.Match(k, Visible_toggle_cmd)) Visible_toggle(m); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Visible_hide_cmd = "Visible_hide", Visible_toggle_cmd = "Visible_toggle"; + } public static final String Visible_hide_cmd = "Visible_hide", Visible_toggle_cmd = "Visible_toggle"; public static GfuiWin new_(GfuiElem owner, GfuiElem sub, SizeAdp size) { GfuiForm_menu rv = new GfuiForm_menu(); rv.ctor_GfuiForm_menu(owner, sub, size); diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiMenuBar.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiMenuBar.java index 5119bd403..8267c8a18 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiMenuBar.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiMenuBar.java @@ -108,7 +108,7 @@ public class GfuiMenuBar implements Gfo_invk { } else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_visible_toggle = "MenuBar_toggle" + } public static final String Invk_visible_toggle = "MenuBar_toggle" , Invk_Visible_ = "Visible_", Invk_SeparatorText_ = "SeparatorText_", Invk_MnemonicPrefix_ = "MnemonicPrefix_" , Invk_RegTop = "RegTop", Invk_RegCmd = "RegCmd", Invk_RegSpr = "RegSpr" ; @@ -144,7 +144,7 @@ public class GfuiMenuBar implements Gfo_invk { win.SubItms_add(SubItms_key, this); } Hash_adp itms = Hash_adp_.New(); GfuiWin win; - public static final String SubItms_key = "menuBar"; + public static final String SubItms_key = "menuBar"; public static GfuiMenuBar new_(GfuiWin win) { GfuiMenuBar rv = new GfuiMenuBar(); rv.Init(win); @@ -256,9 +256,9 @@ class GfuiMenuBarItmType { catch (Exception e) {Err_.Noop(e); throw Err_.new_parse("GfuiMenuBarItmType", raw);} } static Hash_adp regy = Hash_adp_.New(); - public static final GfuiMenuBarItmType Root = new GfuiMenuBarItmType(1, "root"); - public static final GfuiMenuBarItmType Top = new GfuiMenuBarItmType(2, "top"); - public static final GfuiMenuBarItmType Mnu = new GfuiMenuBarItmType(3, "mnu"); - public static final GfuiMenuBarItmType Cmd = new GfuiMenuBarItmType(4, "cmd"); - public static final GfuiMenuBarItmType Spr = new GfuiMenuBarItmType(5, "spr"); + public static final GfuiMenuBarItmType Root = new GfuiMenuBarItmType(1, "root"); + public static final GfuiMenuBarItmType Top = new GfuiMenuBarItmType(2, "top"); + public static final GfuiMenuBarItmType Mnu = new GfuiMenuBarItmType(3, "mnu"); + public static final GfuiMenuBarItmType Cmd = new GfuiMenuBarItmType(4, "cmd"); + public static final GfuiMenuBarItmType Spr = new GfuiMenuBarItmType(5, "spr"); } diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiQuitMode.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiQuitMode.java index 9ed6e4965..50fc3ec70 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiQuitMode.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiQuitMode.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.kits.core.*; public class GfuiQuitMode { public int Val() {return val;} int val; GfuiQuitMode(int val) {this.val = val;} - public static final GfuiQuitMode ExitApp = new GfuiQuitMode(1); - public static final GfuiQuitMode Destroy = new GfuiQuitMode(2); - public static final GfuiQuitMode Suspend = new GfuiQuitMode(3); - public static final String + public static final GfuiQuitMode ExitApp = new GfuiQuitMode(1); + public static final GfuiQuitMode Destroy = new GfuiQuitMode(2); + public static final GfuiQuitMode Suspend = new GfuiQuitMode(3); + public static final String Destroy_cmd = "destroy" , Suspend_cmd = "suspend" , SuspendApp_cmd = "suspendApp" // TODO_OLD: merge with suspend; needs Msg Addressing (*.suspend vs app.suspend) diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiTipTextMgr.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiTipTextMgr.java index 1b9a4ed6e..0cf70c10f 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiTipTextMgr.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiTipTextMgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import javax.swing.JComponent; import javax.swing.ToolTipManager; @@ -28,5 +28,5 @@ class GfuiTipTextMgr implements GfuiWinOpenAble { ToolTipManager.sharedInstance().setReshowDelay(0); jcomp.setToolTipText(sub.TipText()); } - public static final GfuiTipTextMgr Instance = new GfuiTipTextMgr(); + public static final GfuiTipTextMgr Instance = new GfuiTipTextMgr(); } diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin.java index 65a9ab45e..13b783883 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin.java @@ -144,7 +144,7 @@ public class GfuiWin extends GfuiElemBase { return (rv == Gfo_invk_cmd_mgr.Unhandled) ? super.Invk(ctx, ikey, k, m) : rv; } return this; - } public static final String Invk_Show = "Show", Invk_Hide = "Hide", Invk_Close = "Close", Invk_Quit = "Quit", Invk_Minimize = "Minimize" + } public static final String Invk_Show = "Show", Invk_Hide = "Hide", Invk_Close = "Close", Invk_Quit = "Quit", Invk_Minimize = "Minimize" , Invk_Pin_toggle = "Pin_toggle", Invk_Zorder_front = "Zorder_front", Invk_ShowFocusOwner = "ShowFocusOwner" , Evt_VisibleChanged = "VisibleChanged", Evt_Opened = "Opened_evt", Evt_Quited = "Quited_evt" , StopAppByAltF4_evt = "StopAppByAltF4_evt"; diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiWinKeyCmdMgr.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiWinKeyCmdMgr.java index 61db87298..9817f2777 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiWinKeyCmdMgr.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiWinKeyCmdMgr.java @@ -44,7 +44,7 @@ public class GfuiWinKeyCmdMgr implements GfuiWinOpenAble, Gfo_invk, Gfo_evt_itm CheckForHotKey(IptEventData.ctx_(ctx, m)); //boolean handled = CheckForHotKey(IptEventData.cast(msg.Val())); msg.Fwd_set(!handled); // TOMBSTONE: somehow cause alt-F4 to continue processing and dispose form return this; - } @gplx.Internal protected static final String CheckForHotKey_cmd = "CheckForHotKey_cmd"; + } @gplx.Internal protected static final String CheckForHotKey_cmd = "CheckForHotKey_cmd"; public static GfuiWinKeyCmdMgr new_() {return new GfuiWinKeyCmdMgr();} GfuiWinKeyCmdMgr() {} public static int ExtractPosFromText(String raw) { diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_.java index 045264fa9..9acd38b12 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; -public class GfuiWin_ { - public static final String +public class GfuiWin_ { + public static final String InitKey_winType = "winType" , InitKey_winType_toaster = "toaster" , InitKey_winType_app = "app" @@ -46,7 +46,7 @@ public class GfuiWin_ { return rv; } } -class GfuiWinUtl { +class GfuiWinUtl { @gplx.Internal protected static void Open_exec(GfuiWin win, List_adp loadList, GfuiElemBase owner) { for (int i = 0; i < owner.SubElems().Count(); i++) { GfuiElemBase sub = (GfuiElemBase)owner.SubElems().Get_at(i); @@ -66,6 +66,6 @@ class GfuiWinUtl { } } } -interface GfuiWinOpenAble { +interface GfuiWinOpenAble { void Open_exec(GfuiWin win, GfuiElemBase owner, GfuiElemBase sub); } diff --git a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_toaster.java b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_toaster.java index bb03e306b..7a0e25173 100644 --- a/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_toaster.java +++ b/150_gfui/src/gplx/gfui/controls/windows/GfuiWin_toaster.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.controls.windows; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.*; import gplx.core.envs.*; import gplx.gfui.draws.*; import gplx.gfui.envs.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; import gplx.gfui.controls.windows.*; @@ -118,7 +118,7 @@ public class GfuiWin_toaster extends GfuiWin { public void ShowPopup(GfuiWin own } } } - static final int PopupAnchorTop = -1; // HACK: wxp1 showed obvious flickering with top edge + static final int PopupAnchorTop = -1; // HACK: wxp1 showed obvious flickering with top edge void ChangeBounds(boolean isGrowing, int increment) { increment = isGrowing ? increment : -increment; this.Pos_(this.X(), PopupAnchorTop); //this.Top - increment @@ -149,7 +149,7 @@ public class GfuiWin_toaster extends GfuiWin { public void ShowPopup(GfuiWin own if (ctx.Match(k, Tmr_cmd)) WhenTick(); else super.Invk(ctx, ikey, k, m); return this; - } public static final String Tmr_cmd = "Tmr"; + } public static final String Tmr_cmd = "Tmr"; GfuiTextMemo messageLabel; TimerAdp timer; SizeAdp fullyGrown = SizeAdp_.Zero; @@ -171,7 +171,7 @@ public class GfuiWin_toaster extends GfuiWin { public void ShowPopup(GfuiWin own class PopupState { public int Val() {return val;} int val; public PopupState(int v) {this.val = v;} - public static final PopupState + public static final PopupState FullyShrunk = new PopupState(1) , Growing = new PopupState(2) , FullyGrown = new PopupState(3) diff --git a/150_gfui/src/gplx/gfui/draws/ColorAdpCache.java b/150_gfui/src/gplx/gfui/draws/ColorAdpCache.java index c7d7a597d..4605cd442 100644 --- a/150_gfui/src/gplx/gfui/draws/ColorAdpCache.java +++ b/150_gfui/src/gplx/gfui/draws/ColorAdpCache.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; +package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; public class ColorAdpCache { - public java.awt.Color GetNativeColor(ColorAdp color) { - Object rv = hash.Get_by(color.Value()); if (rv != null) return (java.awt.Color)rv; - rv = new java.awt.Color(color.Red(), color.Green(), color.Blue(), color.Alpha()); - hash.Add(color.Value(), rv); - return (java.awt.Color)rv; - } - Hash_adp hash = Hash_adp_.New(); - public static final ColorAdpCache Instance = new ColorAdpCache(); ColorAdpCache() {} -} + public java.awt.Color GetNativeColor(ColorAdp color) { + Object rv = hash.Get_by(color.Value()); if (rv != null) return (java.awt.Color)rv; + rv = new java.awt.Color(color.Red(), color.Green(), color.Blue(), color.Alpha()); + hash.Add(color.Value(), rv); + return (java.awt.Color)rv; + } + Hash_adp hash = Hash_adp_.New(); + public static final ColorAdpCache Instance = new ColorAdpCache(); ColorAdpCache() {} +} diff --git a/150_gfui/src/gplx/gfui/draws/ColorAdp_.java b/150_gfui/src/gplx/gfui/draws/ColorAdp_.java index b02ee0a0b..578f29f43 100644 --- a/150_gfui/src/gplx/gfui/draws/ColorAdp_.java +++ b/150_gfui/src/gplx/gfui/draws/ColorAdp_.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; import gplx.core.encoders.*; import gplx.core.interfaces.*; -public class ColorAdp_ implements ParseAble { +public class ColorAdp_ implements ParseAble { public static ColorAdp as_(Object obj) {return obj instanceof ColorAdp ? (ColorAdp)obj : null;} public static ColorAdp cast(Object obj) {try {return (ColorAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, ColorAdp.class, obj);}} public static ColorAdp new_(int a, int r, int g, int b) {return ColorAdp.new_((int)a, (int)r, (int)g, (int)b);} - public static final ColorAdp_ Parser = new ColorAdp_(); + public static final ColorAdp_ Parser = new ColorAdp_(); public Object ParseAsObj(String raw) {return ColorAdp_.parse(raw);} public static ColorAdp parseOr_(String raw, ColorAdp or) { ColorAdp rv = parse_internal_(raw); if (rv == null) return or; @@ -93,7 +93,7 @@ public class ColorAdp_ implements ParseAble { return ColorAdp.new_(a, r, g, b); } public static ColorAdp read_(Object o) {String s = String_.as_(o); return s != null ? ColorAdp_.parse(s) : ColorAdp_.cast(o);} - public static final ColorAdp + public static final ColorAdp Null = new_( 0, 0, 0, 0) , Black = new_(255, 0, 0, 0) , White = new_(255, 255, 255, 255) diff --git a/150_gfui/src/gplx/gfui/draws/FontAdp.java b/150_gfui/src/gplx/gfui/draws/FontAdp.java index b4337fc0d..4aa112622 100644 --- a/150_gfui/src/gplx/gfui/draws/FontAdp.java +++ b/150_gfui/src/gplx/gfui/draws/FontAdp.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; import java.awt.Font; import java.awt.Toolkit; import gplx.core.strings.*; import gplx.core.envs.*; import gplx.gfui.controls.gxws.*; -public class FontAdp implements Gfo_invk { +public class FontAdp implements Gfo_invk { public String Name() {return name;} public FontAdp Name_(String val) {name = val; InitUnder(); return this;} private String name; public float Size() {return size;} public FontAdp Size_(float val) {size = val; InitUnder(); return this;} float size; public FontStyleAdp Style() {return style;} public FontAdp Style_(FontStyleAdp val) {style = val; InitUnder(); return this;} FontStyleAdp style; @@ -52,7 +52,7 @@ public class FontAdp implements Gfo_invk { } static final String Invk_name_ = "name_", Invk_size_ = "size_", Invk_style_ = "style_"; @Override public String toString() {return String_bldr_.new_().Add_kv("name", name).Add_kv_obj("size", size).Add_kv_obj("style", style).To_str();} - public static final FontAdp NullPtr = null; + public static final FontAdp NullPtr = null; public static FontAdp as_(Object obj) {return obj instanceof FontAdp ? (FontAdp)obj : null;} public static FontAdp cast(Object obj) {try {return (FontAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, FontAdp.class, obj);}} public static FontAdp new_(String name, float size, FontStyleAdp style) { diff --git a/150_gfui/src/gplx/gfui/draws/FontAdpCache.java b/150_gfui/src/gplx/gfui/draws/FontAdpCache.java index ca9a10385..eebf1211c 100644 --- a/150_gfui/src/gplx/gfui/draws/FontAdpCache.java +++ b/150_gfui/src/gplx/gfui/draws/FontAdpCache.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; import java.awt.Font; import java.awt.Toolkit; -public class FontAdpCache { +public class FontAdpCache { public Font GetNativeFont(FontAdp fontAdp) { String key = fontAdp.toString(); Font rv = (Font)hash.Get_by(key); if (rv != null) return rv; @@ -30,5 +30,5 @@ public class FontAdpCache { public static int XtoOsDpi(float v) {return Math.round((v * 72) / screenResolutionInDpi);} // WORKAROUND/JAVA: Java needs 72 dpi screen resolution; wnt uses 96 or 120 dpi public static int XtoJavaDpi(float v) {return Math.round((v * screenResolutionInDpi) / 72);} static int screenResolutionInDpi = -1; - public static final FontAdpCache Instance = new FontAdpCache(); FontAdpCache() {} + public static final FontAdpCache Instance = new FontAdpCache(); FontAdpCache() {} } diff --git a/150_gfui/src/gplx/gfui/draws/FontStyleAdp_.java b/150_gfui/src/gplx/gfui/draws/FontStyleAdp_.java index 012cf9721..1deae40f3 100644 --- a/150_gfui/src/gplx/gfui/draws/FontStyleAdp_.java +++ b/150_gfui/src/gplx/gfui/draws/FontStyleAdp_.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; import gplx.core.primitives.*; import gplx.core.interfaces.*; -public class FontStyleAdp_ implements ParseAble { - public static final FontStyleAdp +public class FontStyleAdp_ implements ParseAble { + public static final FontStyleAdp Plain = new FontStyleAdp(0) , Bold = new FontStyleAdp(1) , Italic = new FontStyleAdp(2) , BoldItalic = new FontStyleAdp(3) ; - public static final FontStyleAdp_ Parser = new FontStyleAdp_(); + public static final FontStyleAdp_ Parser = new FontStyleAdp_(); public Object ParseAsObj(String raw) {return FontStyleAdp_.parse(raw);} public static FontStyleAdp cast(Object obj) {try {return (FontStyleAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, FontStyleAdp.class, obj);}} diff --git a/150_gfui/src/gplx/gfui/draws/PenAdp.java b/150_gfui/src/gplx/gfui/draws/PenAdp.java index 529f00f5c..2639e5190 100644 --- a/150_gfui/src/gplx/gfui/draws/PenAdp.java +++ b/150_gfui/src/gplx/gfui/draws/PenAdp.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; import java.awt.BasicStroke; import java.awt.Stroke; import gplx.core.strings.*; -public class PenAdp implements Gfo_invk { +public class PenAdp implements Gfo_invk { public float Width() {return width;} public void Width_set(float v) {width = v; InitUnder();} float width; public ColorAdp Color() {return color;} public void Color_set(ColorAdp v) {color = v; InitUnder();} ColorAdp color; public BasicStroke UnderStroke() {if (underStroke == null) InitUnder(); return underStroke;} BasicStroke underStroke; @@ -28,7 +28,7 @@ public class PenAdp implements Gfo_invk { else if (ctx.Match(k, Invk_Color_)) Color_set((ColorAdp)m.ReadObj(Invk_Color_, ColorAdp_.Parser)); else return Gfo_invk_.Rv_unhandled; return this; - } static final String Invk_Width_ = "Width_", Invk_Color_ = "Color_"; + } static final String Invk_Width_ = "Width_", Invk_Color_ = "Color_"; @Override public String toString() {return String_bldr_.new_().Add_kv_obj("width", width).Add_kv("color", color.XtoHexStr()).To_str();} @Override public int hashCode() {return color.Value() ^ (int)width;} @Override public boolean equals(Object obj) { // cannot use Eq b/c of difficulty in comparing null instances @@ -37,7 +37,7 @@ public class PenAdp implements Gfo_invk { } @gplx.Internal protected PenAdp(ColorAdp color, float width) {this.color = color; this.width = width;} } -class PenAdpCache { +class PenAdpCache { public BasicStroke Fetch(float width) { Object rv = hash.Get_by(width); if (rv == null) { @@ -47,5 +47,5 @@ class PenAdpCache { return (BasicStroke)rv; } Hash_adp hash = Hash_adp_.New(); - public static final PenAdpCache Instance = new PenAdpCache(); PenAdpCache() {} + public static final PenAdpCache Instance = new PenAdpCache(); PenAdpCache() {} } diff --git a/150_gfui/src/gplx/gfui/draws/SolidBrushAdp_.java b/150_gfui/src/gplx/gfui/draws/SolidBrushAdp_.java index 837af6d61..069b3160b 100644 --- a/150_gfui/src/gplx/gfui/draws/SolidBrushAdp_.java +++ b/150_gfui/src/gplx/gfui/draws/SolidBrushAdp_.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.draws; import gplx.*; import gplx.gfui.*; -public class SolidBrushAdp_ { +public class SolidBrushAdp_ { public static SolidBrushAdp as_(Object obj) {return obj instanceof SolidBrushAdp ? (SolidBrushAdp)obj : null;} public static SolidBrushAdp cast(Object obj) {try {return (SolidBrushAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, SolidBrushAdp.class, obj);}} - public static final SolidBrushAdp Black = new_(ColorAdp_.Black); - public static final SolidBrushAdp White = new_(ColorAdp_.White); - public static final SolidBrushAdp Null = new_(ColorAdp_.Null); + public static final SolidBrushAdp Black = new_(ColorAdp_.Black); + public static final SolidBrushAdp White = new_(ColorAdp_.White); + public static final SolidBrushAdp Null = new_(ColorAdp_.Null); public static SolidBrushAdp new_(ColorAdp color) {return SolidBrushAdpCache.Instance.Get_by(color);} } -class SolidBrushAdpCache { +class SolidBrushAdpCache { public SolidBrushAdp Get_by(ColorAdp color) { SolidBrushAdp rv = (SolidBrushAdp)hash.Get_by(color.Value()); if (rv == null) { @@ -32,5 +32,5 @@ class SolidBrushAdpCache { return rv; } Hash_adp hash = Hash_adp_.New(); - public static final SolidBrushAdpCache Instance = new SolidBrushAdpCache(); SolidBrushAdpCache() {} + public static final SolidBrushAdpCache Instance = new SolidBrushAdpCache(); SolidBrushAdpCache() {} } diff --git a/150_gfui/src/gplx/gfui/envs/ScreenAdp_.java b/150_gfui/src/gplx/gfui/envs/ScreenAdp_.java index cf5ad91d9..2b4989865 100644 --- a/150_gfui/src/gplx/gfui/envs/ScreenAdp_.java +++ b/150_gfui/src/gplx/gfui/envs/ScreenAdp_.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.envs; import gplx.*; import gplx.gfui.*; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import gplx.gfui.controls.gxws.*; -public class ScreenAdp_ { - public static final ScreenAdp Primary = screen_(0); +public class ScreenAdp_ { + public static final ScreenAdp Primary = screen_(0); public static ScreenAdp as_(Object obj) {return obj instanceof ScreenAdp ? (ScreenAdp)obj : null;} public static ScreenAdp cast(Object obj) {try {return (ScreenAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, ScreenAdp.class, obj);}} public static ScreenAdp parse(String raw) { // ex: {screen{1} diff --git a/150_gfui/src/gplx/gfui/gfxs/GfxStringData.java b/150_gfui/src/gplx/gfui/gfxs/GfxStringData.java index fe86cc734..f6c72a311 100644 --- a/150_gfui/src/gplx/gfui/gfxs/GfxStringData.java +++ b/150_gfui/src/gplx/gfui/gfxs/GfxStringData.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.gfxs; import gplx.*; import gplx.gfui.*; import java.awt.font.TextAttribute; import java.text.AttributedString; @@ -111,5 +111,5 @@ public class GfxStringData { rv.Font_(FontAdp.new_("Arial", 8, FontStyleAdp_.Plain)); // needed for TextBox, since its Paint is not overriden, and .Font property must be set return rv; } GfxStringData() {} - public static final GfxStringData Null = null; + public static final GfxStringData Null = null; } diff --git a/150_gfui/src/gplx/gfui/imgs/IconAdp.java b/150_gfui/src/gplx/gfui/imgs/IconAdp.java index a3d67f8bf..3dfb25522 100644 --- a/150_gfui/src/gplx/gfui/imgs/IconAdp.java +++ b/150_gfui/src/gplx/gfui/imgs/IconAdp.java @@ -23,7 +23,7 @@ import javax.swing.Icon; import javax.swing.ImageIcon; import java.awt.Image; public class IconAdp { - public Icon UnderIcon() {return icon;} private final Icon icon; + public Icon UnderIcon() {return icon;} private final Icon icon; public Image XtoImage() {return ((ImageIcon)icon).getImage();} public Io_url Url() {return url;} private Io_url url = Io_url_.Empty; IconAdp(Icon icon) {this.icon = icon;} diff --git a/150_gfui/src/gplx/gfui/imgs/ImageAdp_.java b/150_gfui/src/gplx/gfui/imgs/ImageAdp_.java index 3001eaf17..4076ed6c4 100644 --- a/150_gfui/src/gplx/gfui/imgs/ImageAdp_.java +++ b/150_gfui/src/gplx/gfui/imgs/ImageAdp_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.imgs; import gplx.*; import gplx.gfui.*; import gplx.core.primitives.*; import gplx.core.ios.*; /*IoStream*/ import gplx.core.ios.streams.*; @@ -30,7 +30,7 @@ import javax.imageio.ImageIO; public class ImageAdp_ { public static ImageAdp as_(Object obj) {return obj instanceof ImageAdp ? (ImageAdp)obj : null;} public static ImageAdp cast(Object obj) {try {return (ImageAdp)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, ImageAdp.class, obj);}} - public static final ImageAdp Null = new_(10, 10); + public static final ImageAdp Null = new_(10, 10); public static ImageAdp new_(int width, int height) { // BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // JAVA: must be TYPE_INT_RGB or else ImageIO.write("bmp") will fail BufferedImage img = getCompatibleImage(width, height); diff --git a/150_gfui/src/gplx/gfui/imgs/ImageAdp_null.java b/150_gfui/src/gplx/gfui/imgs/ImageAdp_null.java index 56fb56edf..572bf416b 100644 --- a/150_gfui/src/gplx/gfui/imgs/ImageAdp_null.java +++ b/150_gfui/src/gplx/gfui/imgs/ImageAdp_null.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.imgs; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; public class ImageAdp_null implements ImageAdp { @@ -29,5 +29,5 @@ public class ImageAdp_null implements ImageAdp { public ImageAdp Extract_image(RectAdp src_rect, SizeAdp trg_size) {return Extract_image(src_rect.X(), src_rect.Y(), src_rect.Width(), src_rect.Height(), trg_size.Width(), trg_size.Height());} public ImageAdp Extract_image(int src_x, int src_y, int src_w, int src_h, int trg_w, int trg_h) {return this;} public ImageAdp Resize(int width, int height) {return this;} - public static final ImageAdp_null Instance = new ImageAdp_null(); ImageAdp_null() {} + public static final ImageAdp_null Instance = new ImageAdp_null(); ImageAdp_null() {} } diff --git a/150_gfui/src/gplx/gfui/ipts/IptArg_.java b/150_gfui/src/gplx/gfui/ipts/IptArg_.java index 524c59a5f..fc3d782ed 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptArg_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptArg_.java @@ -20,8 +20,8 @@ import gplx.Ordered_hash; import gplx.Ordered_hash_; import gplx.String_; public class IptArg_ { - public static final IptArg[] Ary_empty = new IptArg[0]; - public static final IptArg Null = null; + public static final IptArg[] Ary_empty = new IptArg[0]; + public static final IptArg Null = null; public static final String Wildcard_key = "wildcard"; public static IptArg Wildcard = new IptKey(Int_.Max_value, Wildcard_key); public static boolean Is_null_or_none(IptArg arg) {return arg == Null || arg == IptKey_.None;} @@ -118,5 +118,5 @@ class IptMacro { } Ordered_hash regy; static Err parse_err(String raw, String loc) {return Err_.new_("gfui", "could not parse IptArg", "raw", raw, "loc", loc).Trace_ignore_add_1_();} - public static final IptMacro Instance = new IptMacro(); IptMacro() {} + public static final IptMacro Instance = new IptMacro(); IptMacro() {} } diff --git a/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_cmd.java b/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_cmd.java index 3101e85ce..2dea431ad 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_cmd.java +++ b/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; import gplx.core.type_xtns.*; import gplx.core.interfaces.*; import gplx.gfui.controls.standards.*; @@ -32,7 +32,7 @@ public class IptBnd_txt_cmd implements InjectAble, Gfo_invk, Gfo_evt_itm { } else return Gfo_invk_.Rv_unhandled; return Gfo_invk_.Rv_handled; - } static final String TxtBox_exec = "TxtBox_exec"; + } static final String TxtBox_exec = "TxtBox_exec"; GfuiTextBox txtBox; Gfo_invk src; Gfo_evt_itm fwd; String setCmd, setEvt; ClassXtn cls; public static IptBnd_txt_cmd new_(Gfo_evt_itm fwd, String setCmd, String setEvt, ClassXtn cls) { IptBnd_txt_cmd rv = new IptBnd_txt_cmd(); diff --git a/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_range.java b/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_range.java index e57f12572..25cc0b3d1 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_range.java +++ b/150_gfui/src/gplx/gfui/ipts/IptBnd_txt_range.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; import gplx.core.interfaces.*; import gplx.gfui.controls.standards.*; @@ -45,7 +45,7 @@ public class IptBnd_txt_range implements InjectAble, Gfo_invk, Gfo_evt_itm { else if (ctx.MatchPriv(k, initEvt)) ReadyEvtCmd(); else return Gfo_invk_.Rv_unhandled; return Gfo_invk_.Rv_handled; - } static final String Invk_dec = "txtBox_dec", Invk_inc = "txtBox_inc", Invk_upd = "txtBox_exec"; + } static final String Invk_dec = "txtBox_dec", Invk_inc = "txtBox_inc", Invk_upd = "txtBox_exec"; void PreviewCmd(int delta) { int newVal = previewIdx + delta; if (!Int_.RangeCheck(newVal, list.length)) return; diff --git a/150_gfui/src/gplx/gfui/ipts/IptBnd_upDownRange.java b/150_gfui/src/gplx/gfui/ipts/IptBnd_upDownRange.java index 6067dd579..4a13c387d 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptBnd_upDownRange.java +++ b/150_gfui/src/gplx/gfui/ipts/IptBnd_upDownRange.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; import gplx.core.type_xtns.*; import gplx.core.interfaces.*; import gplx.gfui.controls.standards.*; @@ -37,7 +37,7 @@ public class IptBnd_upDownRange implements InjectAble, Gfo_invk, Gfo_evt_itm { else if (ctx.Match(k, evt)) WhenEvt(ctx, m); else return Gfo_invk_.Rv_unhandled; return Gfo_invk_.Rv_handled; - } static final String Invk_TxtBox_dec = "txtBox_dec", Invk_TxtBox_inc = "txtBox_inc", Invk_TxtBox_exec = "txtBox_exec"; + } static final String Invk_TxtBox_dec = "txtBox_dec", Invk_TxtBox_inc = "txtBox_inc", Invk_TxtBox_exec = "txtBox_exec"; public int Adj() {return adj;} public IptBnd_upDownRange Adj_(int v) {adj = v; return this;} int adj; void WhenEvt(GfsCtx ctx, GfoMsg m) { curVal = m.ReadInt(arg) + adj; diff --git a/150_gfui/src/gplx/gfui/ipts/IptCfg.java b/150_gfui/src/gplx/gfui/ipts/IptCfg.java index 04ea6129f..c3432465e 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptCfg.java +++ b/150_gfui/src/gplx/gfui/ipts/IptCfg.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; public interface IptCfg extends Gfo_invk { String CfgKey(); @@ -79,10 +79,10 @@ class IptCfg_base implements IptCfg { Set(bndKey, gplx.gfml.GfmlDataNde.XtoMsgNoRoot(cmd), IptArg_.parse_ary_(iptStr)); } return this; - } public static final String Invk_Add = "Add", Invk_set = "set"; + } public static final String Invk_Add = "Add", Invk_set = "set"; public IptCfg_base(String cfgKey) {this.cfgKey = cfgKey;} Ordered_hash hash = Ordered_hash_.New(); - public Object NewByKey(Object o) {return new IptCfg_base((String)o);} @gplx.Internal protected static final IptCfg HashProto = new IptCfg_base(); @gplx.Internal protected IptCfg_base() {} + public Object NewByKey(Object o) {return new IptCfg_base((String)o);} @gplx.Internal protected static final IptCfg HashProto = new IptCfg_base(); @gplx.Internal protected IptCfg_base() {} } class IptCfgPtr { public String CfgKey() {return cfgKey;} private String cfgKey; diff --git a/150_gfui/src/gplx/gfui/ipts/IptCfgRegy.java b/150_gfui/src/gplx/gfui/ipts/IptCfgRegy.java index e63c87cbd..51a6c10fe 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptCfgRegy.java +++ b/150_gfui/src/gplx/gfui/ipts/IptCfgRegy.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; public class IptCfgRegy implements Gfo_invk { public void Clear() {hash.Clear();} @@ -31,8 +31,8 @@ public class IptCfgRegy implements Gfo_invk { return GetOrNew(key); } return this; - } public static final String Invk_Get = "Get", Invk_get = "get"; + } public static final String Invk_Get = "Get", Invk_get = "get"; Ordered_hash hash = Ordered_hash_.New(); - public static final IptCfgRegy Instance = new IptCfgRegy(); + public static final IptCfgRegy Instance = new IptCfgRegy(); public IptCfgRegy() {} } diff --git a/150_gfui/src/gplx/gfui/ipts/IptCfg_.java b/150_gfui/src/gplx/gfui/ipts/IptCfg_.java index a9b73ad7b..d128a64f1 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptCfg_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptCfg_.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -public class IptCfg_ { - public static final IptCfg Null = IptCfg_null.Instance; - public static IptCfg new_(String key) {return IptCfgRegy.Instance.GetOrNew(key);} -} -class IptCfg_null implements IptCfg { - public String CfgKey() {return "<>";} - public IptCfgItm GetOrDefaultArgs(String bndKey, GfoMsg m, IptArg[] argAry) {return IptCfgItm.new_().Key_(bndKey).Ipt_(List_adp_.New_by_many((Object[])argAry)).Msg_(m);} - public void Owners_add(String key, IptBndsOwner owner) {} - public void Owners_del(String key) {} - public Object NewByKey(Object o) {return this;} - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;} - public static final IptCfg_null Instance = new IptCfg_null(); IptCfg_null() {} -} +package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; +public class IptCfg_ { + public static final IptCfg Null = IptCfg_null.Instance; + public static IptCfg new_(String key) {return IptCfgRegy.Instance.GetOrNew(key);} +} +class IptCfg_null implements IptCfg { + public String CfgKey() {return "<>";} + public IptCfgItm GetOrDefaultArgs(String bndKey, GfoMsg m, IptArg[] argAry) {return IptCfgItm.new_().Key_(bndKey).Ipt_(List_adp_.New_by_many((Object[])argAry)).Msg_(m);} + public void Owners_add(String key, IptBndsOwner owner) {} + public void Owners_del(String key) {} + public Object NewByKey(Object o) {return this;} + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;} + public static final IptCfg_null Instance = new IptCfg_null(); IptCfg_null() {} +} diff --git a/150_gfui/src/gplx/gfui/ipts/IptCfg_tst.java b/150_gfui/src/gplx/gfui/ipts/IptCfg_tst.java index 59b1b0efd..8b0840d80 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptCfg_tst.java +++ b/150_gfui/src/gplx/gfui/ipts/IptCfg_tst.java @@ -77,6 +77,6 @@ public class IptCfg_tst { if (ctx.Match(k, Invk_Reg)) {actl = m.ReadIntOr("val", 0);} else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_Reg = "Reg"; + } public static final String Invk_Reg = "Reg"; } } diff --git a/150_gfui/src/gplx/gfui/ipts/IptEventMgr.java b/150_gfui/src/gplx/gfui/ipts/IptEventMgr.java index daa5150b3..9ca32603b 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptEventMgr.java +++ b/150_gfui/src/gplx/gfui/ipts/IptEventMgr.java @@ -92,10 +92,10 @@ public class IptEventMgr implements Gfo_invk { } static boolean keyHandled = false; static IptEvtDataKey keyStateCur = IptEvtDataKey.Null; static IptEvtDataMouse mouseStateCur = IptEvtDataMouse.Null; static TimerAdp mousePressTimer; static GfuiElem senderCur; - public static final IptEventMgr EventSink2 = new IptEventMgr(); IptEventMgr() {} + public static final IptEventMgr EventSink2 = new IptEventMgr(); IptEventMgr() {} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Tmr_cmd)) MousePressTick(); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Tmr_cmd = "Tmr"; + } public static final String Tmr_cmd = "Tmr"; } diff --git a/150_gfui/src/gplx/gfui/ipts/IptEventType_.java b/150_gfui/src/gplx/gfui/ipts/IptEventType_.java index 70bd13cc8..30585af7b 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptEventType_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptEventType_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; import gplx.core.bits.*; import gplx.core.primitives.*; -public class IptEventType_ { +public class IptEventType_ { static EnmMgr enmMgr = EnmMgr.new_().BitRngEnd_(128); - public static final IptEventType + public static final IptEventType None = new_( 0, "none") , KeyDown = new_( 1, "keyDown") , KeyUp = new_( 2, "keyUp") diff --git a/150_gfui/src/gplx/gfui/ipts/IptEvtDataKey.java b/150_gfui/src/gplx/gfui/ipts/IptEvtDataKey.java index 104fd2e58..8d713e9b0 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptEvtDataKey.java +++ b/150_gfui/src/gplx/gfui/ipts/IptEvtDataKey.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -public class IptEvtDataKey { +public class IptEvtDataKey { public IptKey Key() {return key;} IptKey key; public boolean Handled() {return handled;} public void Handled_set(boolean v) {handled = v;} private boolean handled; public static IptEvtDataKey as_(Object obj) {return obj instanceof IptEvtDataKey ? (IptEvtDataKey)obj : null;} public static IptEvtDataKey cast(Object obj) {try {return (IptEvtDataKey)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptEvtDataKey.class, obj);}} - public static final IptEvtDataKey Null = new_(IptKey_.None); + public static final IptEvtDataKey Null = new_(IptKey_.None); public static IptEvtDataKey test_(IptKey keyArg) {return new_(keyArg);} public static IptEvtDataKey int_(int val) { IptKey keyArg = IptKey_.api_(val); diff --git a/150_gfui/src/gplx/gfui/ipts/IptEvtDataKeyHeld.java b/150_gfui/src/gplx/gfui/ipts/IptEvtDataKeyHeld.java index 9c8121e22..403022e61 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptEvtDataKeyHeld.java +++ b/150_gfui/src/gplx/gfui/ipts/IptEvtDataKeyHeld.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; +package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; public class IptEvtDataKeyHeld { - public char KeyChar() {return c;} char c; - public boolean Handled() {return handled;} public void Handled_set(boolean v) {handled = v;} private boolean handled; - - public static IptEvtDataKeyHeld as_(Object obj) {return obj instanceof IptEvtDataKeyHeld ? (IptEvtDataKeyHeld)obj : null;} - public static IptEvtDataKeyHeld cast(Object obj) {try {return (IptEvtDataKeyHeld)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptEvtDataKeyHeld.class, obj);}} - public static final IptEvtDataKeyHeld Null = char_((char)0); - public static IptEvtDataKeyHeld char_(char c) { - IptEvtDataKeyHeld rv = new IptEvtDataKeyHeld(); - rv.c = c; - return rv; - } -} + public char KeyChar() {return c;} char c; + public boolean Handled() {return handled;} public void Handled_set(boolean v) {handled = v;} private boolean handled; + + public static IptEvtDataKeyHeld as_(Object obj) {return obj instanceof IptEvtDataKeyHeld ? (IptEvtDataKeyHeld)obj : null;} + public static IptEvtDataKeyHeld cast(Object obj) {try {return (IptEvtDataKeyHeld)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptEvtDataKeyHeld.class, obj);}} + public static final IptEvtDataKeyHeld Null = char_((char)0); + public static IptEvtDataKeyHeld char_(char c) { + IptEvtDataKeyHeld rv = new IptEvtDataKeyHeld(); + rv.c = c; + return rv; + } +} diff --git a/150_gfui/src/gplx/gfui/ipts/IptEvtDataMouse.java b/150_gfui/src/gplx/gfui/ipts/IptEvtDataMouse.java index 0263dd7d8..e44ad50a2 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptEvtDataMouse.java +++ b/150_gfui/src/gplx/gfui/ipts/IptEvtDataMouse.java @@ -13,20 +13,20 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; +package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; public class IptEvtDataMouse { - public IptMouseBtn Button() {return button;} IptMouseBtn button; - public IptMouseWheel Wheel() {return wheel;} IptMouseWheel wheel; - public PointAdp Pos() {return location;} PointAdp location; - - public static IptEvtDataMouse as_(Object obj) {return obj instanceof IptEvtDataMouse ? (IptEvtDataMouse)obj : null;} - public static IptEvtDataMouse cast(Object obj) {try {return (IptEvtDataMouse)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptEvtDataMouse.class, obj);}} - public static final IptEvtDataMouse Null = IptEvtDataMouse.new_(IptMouseBtn_.None, IptMouseWheel_.None, 0, 0); - public static IptEvtDataMouse new_(IptMouseBtn button, IptMouseWheel wheel, int x, int y) { - IptEvtDataMouse rv = new IptEvtDataMouse(); - rv.button = button; - rv.wheel = wheel; - rv.location = PointAdp_.new_(x, y); - return rv; - } -} + public IptMouseBtn Button() {return button;} IptMouseBtn button; + public IptMouseWheel Wheel() {return wheel;} IptMouseWheel wheel; + public PointAdp Pos() {return location;} PointAdp location; + + public static IptEvtDataMouse as_(Object obj) {return obj instanceof IptEvtDataMouse ? (IptEvtDataMouse)obj : null;} + public static IptEvtDataMouse cast(Object obj) {try {return (IptEvtDataMouse)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptEvtDataMouse.class, obj);}} + public static final IptEvtDataMouse Null = IptEvtDataMouse.new_(IptMouseBtn_.None, IptMouseWheel_.None, 0, 0); + public static IptEvtDataMouse new_(IptMouseBtn button, IptMouseWheel wheel, int x, int y) { + IptEvtDataMouse rv = new IptEvtDataMouse(); + rv.button = button; + rv.wheel = wheel; + rv.location = PointAdp_.new_(x, y); + return rv; + } +} diff --git a/150_gfui/src/gplx/gfui/ipts/IptKey.java b/150_gfui/src/gplx/gfui/ipts/IptKey.java index 7077ba378..b48604c9d 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptKey.java +++ b/150_gfui/src/gplx/gfui/ipts/IptKey.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -import gplx.core.bits.*; +package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; +import gplx.core.bits.*; public class IptKey implements IptArg { - @gplx.Internal protected IptKey(int val, String key) {this.val = val; this.key = key;} - public String Key() {return key;} private final String key; - public int Val() {return val;} private final int val; - public boolean Eq(IptArg comp) {return String_.Eq(key, comp.Key());} - public String XtoUiStr() {return IptKeyStrMgr.Instance.To_str(this);} - public IptKey Add(IptKey comp) {return IptKey_.add_(this, comp);} - public boolean Mod_shift() {return Bitmask_.Has_int(val, IptKey_.Shift.Val());} - public boolean Mod_ctrl() {return Bitmask_.Has_int(val, IptKey_.Ctrl.Val());} - public boolean Mod_alt() {return Bitmask_.Has_int(val, IptKey_.Alt.Val());} -} + @gplx.Internal protected IptKey(int val, String key) {this.val = val; this.key = key;} + public String Key() {return key;} private final String key; + public int Val() {return val;} private final int val; + public boolean Eq(IptArg comp) {return String_.Eq(key, comp.Key());} + public String XtoUiStr() {return IptKeyStrMgr.Instance.To_str(this);} + public IptKey Add(IptKey comp) {return IptKey_.add_(this, comp);} + public boolean Mod_shift() {return Bitmask_.Has_int(val, IptKey_.Shift.Val());} + public boolean Mod_ctrl() {return Bitmask_.Has_int(val, IptKey_.Ctrl.Val());} + public boolean Mod_alt() {return Bitmask_.Has_int(val, IptKey_.Alt.Val());} +} diff --git a/150_gfui/src/gplx/gfui/ipts/IptKeyStrMgr.java b/150_gfui/src/gplx/gfui/ipts/IptKeyStrMgr.java index bbd03f73c..f290b7298 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptKeyStrMgr.java +++ b/150_gfui/src/gplx/gfui/ipts/IptKeyStrMgr.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -class IptKeyStrMgr { +class IptKeyStrMgr { public IptKey FetchByKeyPress(int charVal) { if (literals == null) Init(); IptKey rv = charKeys[charVal]; @@ -69,5 +69,5 @@ class IptKeyStrMgr { } IptKey[] charKeys; Hash_adp literals; Ordered_hash keys = Ordered_hash_.New(); - public static final IptKeyStrMgr Instance = new IptKeyStrMgr(); IptKeyStrMgr() {} + public static final IptKeyStrMgr Instance = new IptKeyStrMgr(); IptKeyStrMgr() {} } diff --git a/150_gfui/src/gplx/gfui/ipts/IptKey_.java b/150_gfui/src/gplx/gfui/ipts/IptKey_.java index aa3d2f422..a2a1d2f9a 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptKey_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptKey_.java @@ -32,7 +32,7 @@ public class IptKey_ { public static final int KeyCode_Shift = 65536, KeyCode_Ctrl = 131072, KeyCode_Alt = 262144, KeyCode_Meta = 524288; private static EnmMgr enm_mgr = EnmMgr.new_().BitRngBgn_(KeyCode_Shift).BitRngEnd_(KeyCode_Meta).Prefix_("key."); public static IptKey[] Ary(IptKey... ary) {return ary;} - public static final IptKey[] Ary_empty = new IptKey[0]; + public static final IptKey[] Ary_empty = new IptKey[0]; public static IptKey as_(Object obj) {return obj instanceof IptKey ? (IptKey)obj : null;} public static IptKey cast(Object obj) {try {return (IptKey)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, IptKey.class, obj);}} public static IptKey add_(IptKey... ary) { @@ -88,7 +88,7 @@ public class IptKey_ { enm_mgr.RegObj(val, name, rv); return rv; } - public static final IptKey + public static final IptKey // NOTE: integer values represent .NET keycodes; NOTE: SWT keycodes are converted to SWING keycodes in Swt_core_lnrs // none None = new_( 0, "none") diff --git a/150_gfui/src/gplx/gfui/ipts/IptKey__tst.java b/150_gfui/src/gplx/gfui/ipts/IptKey__tst.java index 7fcc9088e..ce186f12e 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptKey__tst.java +++ b/150_gfui/src/gplx/gfui/ipts/IptKey__tst.java @@ -17,7 +17,7 @@ package gplx.gfui.ipts; import gplx.Tfds; import org.junit.Test; public class IptKey__tst { - private final IptKey__fxt fxt = new IptKey__fxt(); + private final IptKey__fxt fxt = new IptKey__fxt(); @Test public void To_str() { fxt.Test_to_str(196608, "mod.cs"); } diff --git a/150_gfui/src/gplx/gfui/ipts/IptMouseBtn_.java b/150_gfui/src/gplx/gfui/ipts/IptMouseBtn_.java index 63a5e3212..b5bfd735f 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptMouseBtn_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptMouseBtn_.java @@ -1,20 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -public class IptMouseBtn_ { +public class IptMouseBtn_ { public static final int Tid_none = 0x00000000 , Tid_left = 0x00100000 @@ -23,7 +23,7 @@ public class IptMouseBtn_ { , Tid_x1 = 0x00400000 , Tid_x2 = 0x01000000 ; - public static final IptMouseBtn // REF: System.Windows.Forms.MouseButtons + public static final IptMouseBtn // REF: System.Windows.Forms.MouseButtons None = new IptMouseBtn(Tid_none , "mouse.none") , Left = new IptMouseBtn(Tid_left , "mouse.left") , Right = new IptMouseBtn(Tid_right , "mouse.right") diff --git a/150_gfui/src/gplx/gfui/ipts/IptMouseMove.java b/150_gfui/src/gplx/gfui/ipts/IptMouseMove.java index fce76518f..0dda7ce32 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptMouseMove.java +++ b/150_gfui/src/gplx/gfui/ipts/IptMouseMove.java @@ -13,9 +13,9 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; +package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; public class IptMouseMove implements IptArg { - public String Key() {return key;} private String key = "move.any"; - public boolean Eq(IptArg comp) {return String_.Eq(this.Key(), comp.Key());} - public static final IptMouseMove AnyDirection = new IptMouseMove(); IptMouseMove() {} -} + public String Key() {return key;} private String key = "move.any"; + public boolean Eq(IptArg comp) {return String_.Eq(this.Key(), comp.Key());} + public static final IptMouseMove AnyDirection = new IptMouseMove(); IptMouseMove() {} +} diff --git a/150_gfui/src/gplx/gfui/ipts/IptMouseWheel_.java b/150_gfui/src/gplx/gfui/ipts/IptMouseWheel_.java index 1d4943d26..0c0032f8a 100644 --- a/150_gfui/src/gplx/gfui/ipts/IptMouseWheel_.java +++ b/150_gfui/src/gplx/gfui/ipts/IptMouseWheel_.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.ipts; import gplx.*; import gplx.gfui.*; -public class IptMouseWheel_ { - public static final IptMouseWheel +public class IptMouseWheel_ { + public static final IptMouseWheel None = new IptMouseWheel("wheel.none") , Up = new IptMouseWheel("wheel.up") , Down = new IptMouseWheel("wheel.down"); diff --git a/150_gfui/src/gplx/gfui/kits/core/GfoFactory_gfui.java b/150_gfui/src/gplx/gfui/kits/core/GfoFactory_gfui.java index 3bde18bb9..2c9c00af6 100644 --- a/150_gfui/src/gplx/gfui/kits/core/GfoFactory_gfui.java +++ b/150_gfui/src/gplx/gfui/kits/core/GfoFactory_gfui.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.controls.windows.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; import gplx.gfui.controls.customs.*; public class GfoFactory_gfui { @@ -34,5 +34,5 @@ public class GfoFactory_gfui { public static void Btn_QuitWin2(GfuiElem owner, GfoMsg quitMsg) { GfuiBtn_.msg_("quitWin", owner, quitMsg).Text_("X").TipText_("quit win").Width_(20); } - public static final GfoFactory_gfui Instance = new GfoFactory_gfui(); GfoFactory_gfui() {} + public static final GfoFactory_gfui Instance = new GfoFactory_gfui(); GfoFactory_gfui() {} } diff --git a/150_gfui/src/gplx/gfui/kits/core/GfsLibIni_gfui.java b/150_gfui/src/gplx/gfui/kits/core/GfsLibIni_gfui.java index 1f9e9c65c..7d7268273 100644 --- a/150_gfui/src/gplx/gfui/kits/core/GfsLibIni_gfui.java +++ b/150_gfui/src/gplx/gfui/kits/core/GfsLibIni_gfui.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -import gplx.langs.gfs.*; -import gplx.gfui.ipts.*; -public class GfsLibIni_gfui implements GfsLibIni { - public void Ini(GfsCore core) { - core.AddCmd(IptCfgRegy.Instance, "IptBndMgr_"); - } - public static final GfsLibIni_gfui Instance = new GfsLibIni_gfui(); GfsLibIni_gfui() {} -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +import gplx.langs.gfs.*; +import gplx.gfui.ipts.*; +public class GfsLibIni_gfui implements GfsLibIni { + public void Ini(GfsCore core) { + core.AddCmd(IptCfgRegy.Instance, "IptBndMgr_"); + } + public static final GfsLibIni_gfui Instance = new GfsLibIni_gfui(); GfsLibIni_gfui() {} +} diff --git a/150_gfui/src/gplx/gfui/kits/core/GfuiEnv_.java b/150_gfui/src/gplx/gfui/kits/core/GfuiEnv_.java index a3bccd97d..3026652f9 100644 --- a/150_gfui/src/gplx/gfui/kits/core/GfuiEnv_.java +++ b/150_gfui/src/gplx/gfui/kits/core/GfuiEnv_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.draws.*; import gplx.gfui.ipts.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.windows.*; import gplx.gfml.*; import gplx.langs.gfs.*; import gplx.core.envs.*; @@ -95,8 +95,8 @@ public class GfuiEnv_ { return system_font; } catch (Exception e) {return FontAdp.new_("Arial", 8, FontStyleAdp_.Plain);} } - public static final String Quit_commit_evt = "quit_commit_evt", Quit_notify_evt = "quit_notify_evt"; - public static final String Err_GfuiException = "gplx.dbs.GfuiException"; // TODO_OLD: used in JAVA. move + public static final String Quit_commit_evt = "quit_commit_evt", Quit_notify_evt = "quit_notify_evt"; + public static final String Err_GfuiException = "gplx.dbs.GfuiException"; // TODO_OLD: used in JAVA. move } class GfuiInterruptLnr implements UsrMsgWkr { public void ExecUsrMsg(int type, UsrMsg umsg) {GfuiEnv_.ShowMsg(umsg.To_str());} diff --git a/150_gfui/src/gplx/gfui/kits/core/GfuiInvkCmd_.java b/150_gfui/src/gplx/gfui/kits/core/GfuiInvkCmd_.java index 6e72dd0a3..9d6f75a18 100644 --- a/150_gfui/src/gplx/gfui/kits/core/GfuiInvkCmd_.java +++ b/150_gfui/src/gplx/gfui/kits/core/GfuiInvkCmd_.java @@ -13,7 +13,7 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class GfuiInvkCmd_ { - public static final String Invk_sync = "Sync"; -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class GfuiInvkCmd_ { + public static final String Invk_sync = "Sync"; +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_clipboard_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_clipboard_.java index 0b51cfe26..3e6bdf21c 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_clipboard_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_clipboard_.java @@ -13,8 +13,8 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class Gfui_clipboard_ { - public static final Gfui_clipboard Null = new Gfui_clipboard_null(); - public static final String Invk_copy = "copy", Invk_select_all = "select_all"; -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class Gfui_clipboard_ { + public static final Gfui_clipboard Null = new Gfui_clipboard_null(); + public static final String Invk_copy = "copy", Invk_select_all = "select_all"; +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_dir_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_dir_.java index d6a99b0bd..09eeb2ad8 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_dir_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_dir_.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class Gfui_dlg_dir_ { - public static final Gfui_dlg_dir Noop = new Gfui_dlg_dir__noop(); -} -class Gfui_dlg_dir__noop implements Gfui_dlg_dir { - public String Ask() {return "";} - public Gfui_dlg_dir Init_msg_(String v) {return this;} - public Gfui_dlg_dir Init_text_(String v) {return this;} - public Gfui_dlg_dir Init_dir_(Io_url v) {return this;} -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class Gfui_dlg_dir_ { + public static final Gfui_dlg_dir Noop = new Gfui_dlg_dir__noop(); +} +class Gfui_dlg_dir__noop implements Gfui_dlg_dir { + public String Ask() {return "";} + public Gfui_dlg_dir Init_msg_(String v) {return this;} + public Gfui_dlg_dir Init_text_(String v) {return this;} + public Gfui_dlg_dir Init_dir_(Io_url v) {return this;} +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_file_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_file_.java index a99e78d3d..39023ad59 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_file_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_file_.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class Gfui_dlg_file_ { - public static final Gfui_dlg_file Noop = new Gfui_dlg_file_noop(); -} -class Gfui_dlg_file_noop implements Gfui_dlg_file { - public Gfui_dlg_file Init_msg_(String v) {return this;} - public Gfui_dlg_file Init_file_(String v) {return this;} - public Gfui_dlg_file Init_dir_(Io_url v) {return this;} - public Gfui_dlg_file Init_exts_(String... v) {return this;} - public String Ask() {return "";} -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class Gfui_dlg_file_ { + public static final Gfui_dlg_file Noop = new Gfui_dlg_file_noop(); +} +class Gfui_dlg_file_noop implements Gfui_dlg_file { + public Gfui_dlg_file Init_msg_(String v) {return this;} + public Gfui_dlg_file Init_file_(String v) {return this;} + public Gfui_dlg_file Init_dir_(Io_url v) {return this;} + public Gfui_dlg_file Init_exts_(String... v) {return this;} + public String Ask() {return "";} +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_msg_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_msg_.java index 5f7f92216..3ef7b5b79 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_msg_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_dlg_msg_.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class Gfui_dlg_msg_ { - public static final Gfui_dlg_msg Noop = new Gfui_dlg_msg_noop(); - public static final int Ico_error = 0, Ico_information = 1, Ico_question = 2, Ico_warning = 3, Ico_working = 4; - public static final int Btn_ok = 0, Btn_cancel = 1, Btn_yes = 2, Btn_no = 3, Retry = 4, Btn_abort = 5, Btn_ignore = 6; -} -class Gfui_dlg_msg_noop implements Gfui_dlg_msg { - public Gfui_dlg_msg Init_msg_(String v) {return this;} - public Gfui_dlg_msg Init_ico_(int v) {return this;} - public Gfui_dlg_msg Init_btns_(int... ary) {return this;} - public boolean Ask(int expd) {return false;} - public int Ask() {return Int_.Min_value;} -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class Gfui_dlg_msg_ { + public static final Gfui_dlg_msg Noop = new Gfui_dlg_msg_noop(); + public static final int Ico_error = 0, Ico_information = 1, Ico_question = 2, Ico_warning = 3, Ico_working = 4; + public static final int Btn_ok = 0, Btn_cancel = 1, Btn_yes = 2, Btn_no = 3, Retry = 4, Btn_abort = 5, Btn_ignore = 6; +} +class Gfui_dlg_msg_noop implements Gfui_dlg_msg { + public Gfui_dlg_msg Init_msg_(String v) {return this;} + public Gfui_dlg_msg Init_ico_(int v) {return this;} + public Gfui_dlg_msg Init_btns_(int... ary) {return this;} + public boolean Ask(int expd) {return false;} + public int Ask() {return Int_.Min_value;} +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_kit_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_kit_.java index e9b4a04f0..108347290 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_kit_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_kit_.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; -public class Gfui_kit_ { - public static final byte Mem_tid = 0, Swing_tid = 1, Swt_tid = 2, Android_tid = 3; - public static Gfui_kit Mem() {return mem_kit;} private static final Gfui_kit mem_kit = Mem_kit.Instance; - public static Gfui_kit Swt() {if (swt_kit == null) swt_kit = Swt_kit.Instance; return swt_kit;} private static Gfui_kit swt_kit; // NOTE: late-binding else swing apps will fail (since swt jar is not deployed) - public static Gfui_kit Swing() {if (swing_kit == null) swing_kit = Swing_kit.Instance; return swing_kit;} private static Gfui_kit swing_kit; - public static Gfui_kit Get_by_key(String key) { - if (String_.Eq(key, Mem().Key())) return Mem(); - else if (String_.Eq(key, Swt().Key())) return Swt(); - else if (String_.Eq(key, Swing().Key())) return Swing(); - else throw Err_.new_unhandled(key); - } - public static final String Cfg_HtmlBox = "HtmlBox"; - public static final byte File_dlg_type_open = 0, File_dlg_type_save = 1; -} +package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; +public class Gfui_kit_ { + public static final byte Mem_tid = 0, Swing_tid = 1, Swt_tid = 2, Android_tid = 3; + public static Gfui_kit Mem() {return mem_kit;} private static final Gfui_kit mem_kit = Mem_kit.Instance; + public static Gfui_kit Swt() {if (swt_kit == null) swt_kit = Swt_kit.Instance; return swt_kit;} private static Gfui_kit swt_kit; // NOTE: late-binding else swing apps will fail (since swt jar is not deployed) + public static Gfui_kit Swing() {if (swing_kit == null) swing_kit = Swing_kit.Instance; return swing_kit;} private static Gfui_kit swing_kit; + public static Gfui_kit Get_by_key(String key) { + if (String_.Eq(key, Mem().Key())) return Mem(); + else if (String_.Eq(key, Swt().Key())) return Swt(); + else if (String_.Eq(key, Swing().Key())) return Swing(); + else throw Err_.new_unhandled(key); + } + public static final String Cfg_HtmlBox = "HtmlBox"; + public static final byte File_dlg_type_open = 0, File_dlg_type_save = 1; +} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_grp_.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_grp_.java index b723887bf..3d03b9404 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_grp_.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_grp_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.imgs.*; public class Gfui_mnu_grp_ { - public static final Gfui_mnu_grp Noop = new Gfui_mnu_grp_noop(); + public static final Gfui_mnu_grp Noop = new Gfui_mnu_grp_noop(); } class Gfui_mnu_grp_noop implements Gfui_mnu_grp { public String Uid() {return "";} diff --git a/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_itm.java b/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_itm.java index f7f18205e..e9a03b5ee 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_itm.java +++ b/150_gfui/src/gplx/gfui/kits/core/Gfui_mnu_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.imgs.*; public interface Gfui_mnu_itm { @@ -32,5 +32,5 @@ class Gfui_mnu_itm_null implements Gfui_mnu_itm { public ImageAdp Img() {return img;} public void Img_(ImageAdp v) {img = v;} private ImageAdp img; public boolean Selected() {return true;} public void Selected_(boolean v) {} public Object Under() {return null;} - public static final Gfui_mnu_itm_null Null = new Gfui_mnu_itm_null(); Gfui_mnu_itm_null() {} + public static final Gfui_mnu_itm_null Null = new Gfui_mnu_itm_null(); Gfui_mnu_itm_null() {} } diff --git a/150_gfui/src/gplx/gfui/kits/core/Mem_kit.java b/150_gfui/src/gplx/gfui/kits/core/Mem_kit.java index 92dca7459..b0af32c34 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Mem_kit.java +++ b/150_gfui/src/gplx/gfui/kits/core/Mem_kit.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.imgs.*; import gplx.gfui.controls.gxws.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; public class Mem_kit extends Gfui_kit_base { @@ -35,5 +35,5 @@ public class Mem_kit extends Gfui_kit_base { @Override protected GxwElem New_btn_impl() {return factory.control_();} @Override protected GxwElem New_combo_impl() {return factory.comboBox_();} @Override public ImageAdp New_img_load(Io_url url) {return ImageAdp_null.Instance;} - public static final Mem_kit Instance = new Mem_kit(); Mem_kit() {} + public static final Mem_kit Instance = new Mem_kit(); Mem_kit() {} } diff --git a/150_gfui/src/gplx/gfui/kits/core/Swing_kit.java b/150_gfui/src/gplx/gfui/kits/core/Swing_kit.java index 2715446a9..2978e7096 100644 --- a/150_gfui/src/gplx/gfui/kits/core/Swing_kit.java +++ b/150_gfui/src/gplx/gfui/kits/core/Swing_kit.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.kits.core; import gplx.*; import gplx.gfui.*; import gplx.gfui.kits.*; import gplx.gfui.imgs.*; import gplx.gfui.controls.gxws.*; import gplx.core.brys.fmtrs.*; @@ -31,5 +31,5 @@ public class Swing_kit extends Gfui_kit_base { @Override protected GxwElem New_grp_impl() {return factory.control_();} @Override protected GxwElem New_btn_impl() {return factory.control_();} @Override protected GxwElem New_combo_impl() {return factory.control_();} - public static final Swing_kit Instance = new Swing_kit(); Swing_kit() {} + public static final Swing_kit Instance = new Swing_kit(); Swing_kit() {} } diff --git a/150_gfui/src/gplx/gfui/layouts/GftSizeCalc.java b/150_gfui/src/gplx/gfui/layouts/GftSizeCalc.java index bda5cf0fa..43f8439aa 100644 --- a/150_gfui/src/gplx/gfui/layouts/GftSizeCalc.java +++ b/150_gfui/src/gplx/gfui/layouts/GftSizeCalc.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui.layouts; import gplx.*; import gplx.gfui.*; import gplx.gfui.controls.elems.*; public interface GftSizeCalc { @@ -21,7 +21,7 @@ public interface GftSizeCalc { GftSizeCalc Clone(); } class GftSizeCalc_pct implements GftSizeCalc { - public int Key() {return KEY;} public static final int KEY = 1; + public int Key() {return KEY;} public static final int KEY = 1; public float Val() {return pct;} float pct; public int Calc(GftGrid grid, GftBand band, GftItem owner, GftItem item, int ownerWidth) { return Int_.Mult(ownerWidth, pct / 100); @@ -30,7 +30,7 @@ class GftSizeCalc_pct implements GftSizeCalc { public GftSizeCalc_pct(float v) {pct = v;} } class GftSizeCalc_abs implements GftSizeCalc { - public int Key() {return KEY;} public static final int KEY = 2; + public int Key() {return KEY;} public static final int KEY = 2; public int Val() {return abs;} int abs; public int Calc(GftGrid grid, GftBand band, GftItem owner, GftItem item, int ownerWidth) { return abs; @@ -39,7 +39,7 @@ class GftSizeCalc_abs implements GftSizeCalc { public GftSizeCalc_abs(int v) {abs = v;} } class GftSizeCalc_num implements GftSizeCalc { - public int Key() {return KEY;} public static final int KEY = 3; + public int Key() {return KEY;} public static final int KEY = 3; public int Val() {return num;} int num; public int Calc(GftGrid grid, GftBand band, GftItem owner, GftItem item, int ownerWidth) { return owner.Gft_w() / num; @@ -48,7 +48,7 @@ class GftSizeCalc_num implements GftSizeCalc { public GftSizeCalc_num(int num) {this.num = num;} } class GftSizeCalc_var implements GftSizeCalc { - public int Key() {return KEY;} public static final int KEY = 4; + public int Key() {return KEY;} public static final int KEY = 4; public int Val() {return num;} int num; public int Calc(GftGrid grid, GftBand band, GftItem owner, GftItem item, int ownerWidth) { GfuiElem elem = GfuiElem_.as_(item); diff --git a/400_xowa/src/gplx/core/brys/Bit_heap_wtr.java b/400_xowa/src/gplx/core/brys/Bit_heap_wtr.java index a3dba74b7..a6970447b 100644 --- a/400_xowa/src/gplx/core/brys/Bit_heap_wtr.java +++ b/400_xowa/src/gplx/core/brys/Bit_heap_wtr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys; import gplx.*; import gplx.core.*; public class Bit_heap_wtr { - private final gplx.xowa.htmls.core.hzips.Xoh_hzip_int hzip_int = new gplx.xowa.htmls.core.hzips.Xoh_hzip_int().Mode_is_b256_(true); - private final Bry_bfr hzip_int_bfr = Bry_bfr_.Reset(5); + private final gplx.xowa.htmls.core.hzips.Xoh_hzip_int hzip_int = new gplx.xowa.htmls.core.hzips.Xoh_hzip_int().Mode_is_b256_(true); + private final Bry_bfr hzip_int_bfr = Bry_bfr_.Reset(5); public int Cur() {return cur;} private int cur; public int Cur_bits() {return cur_bits;} private int cur_bits; - public Bry_bfr Heap() {return heap;} private final Bry_bfr heap = Bry_bfr_.New(); + public Bry_bfr Heap() {return heap;} private final Bry_bfr heap = Bry_bfr_.New(); public void Clear() {heap.Clear(); cur = 0; cur_bits = 0;} public void Add_bool(boolean v) { if (v) @@ -65,5 +65,5 @@ public class Bit_heap_wtr { hzip_int_bfr.Clear(); } public void Save(Bry_bfr bfr) {} - public static final int[] Pow_ary = new int[] {1, 2, 4, 8, 16, 32, 64, 128, 256}; + public static final int[] Pow_ary = new int[] {1, 2, 4, 8, 16, 32, 64, 128, 256}; } diff --git a/400_xowa/src/gplx/core/brys/Bry_comparer.java b/400_xowa/src/gplx/core/brys/Bry_comparer.java index 55842f0fa..b7dea5a5d 100644 --- a/400_xowa/src/gplx/core/brys/Bry_comparer.java +++ b/400_xowa/src/gplx/core/brys/Bry_comparer.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.brys; import gplx.*; import gplx.core.*; -import gplx.core.lists.*; -public class Bry_comparer implements ComparerAble { - public int compare(Object lhsObj, Object rhsObj) { - byte[] lhs = (byte[])lhsObj, rhs = (byte[])rhsObj; - return Bry_.Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); - } - public static final Bry_comparer Instance = new Bry_comparer(); Bry_comparer() {} // TS.static -} +package gplx.core.brys; import gplx.*; import gplx.core.*; +import gplx.core.lists.*; +public class Bry_comparer implements ComparerAble { + public int compare(Object lhsObj, Object rhsObj) { + byte[] lhs = (byte[])lhsObj, rhs = (byte[])rhsObj; + return Bry_.Compare(lhs, 0, lhs.length, rhs, 0, rhs.length); + } + public static final Bry_comparer Instance = new Bry_comparer(); Bry_comparer() {} // TS.static +} diff --git a/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr.java b/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr.java index a26ae3e55..e992260e3 100644 --- a/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr.java +++ b/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys.evals; import gplx.*; import gplx.core.*; import gplx.core.brys.*; public class Bry_eval_mgr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); - private final byte sym_escape, sym_key_end, sym_grp_bgn, sym_grp_end; + private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final byte sym_escape, sym_key_end, sym_grp_bgn, sym_grp_end; public Bry_eval_mgr(byte sym_escape, byte sym_key_end, byte sym_grp_bgn, byte sym_grp_end) { this.sym_escape = sym_escape; this.sym_key_end = sym_key_end; @@ -101,6 +101,6 @@ class Bry_eval_rslt { public Bry_eval_rslt(byte[] bry, int pos) { this.bry = bry; this.pos = pos; } - public byte[] Bry() {return bry;} private final byte[] bry; - public int Pos() {return pos;} private final int pos; + public byte[] Bry() {return bry;} private final byte[] bry; + public int Pos() {return pos;} private final int pos; } diff --git a/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr__tst.java b/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr__tst.java index 30531fb92..09c4c7ad3 100644 --- a/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr__tst.java +++ b/400_xowa/src/gplx/core/brys/evals/Bry_eval_mgr__tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.brys.evals; import gplx.*; import gplx.core.*; import gplx.core.brys.*; import org.junit.*; import gplx.core.tests.*; public class Bry_eval_mgr__tst { - private final Bry_eval_mgr__fxt fxt = new Bry_eval_mgr__fxt(); + private final Bry_eval_mgr__fxt fxt = new Bry_eval_mgr__fxt(); @Test public void Text() {fxt.Test__eval("abc" , "abc");} @Test public void Args_0() {fxt.Test__eval("abc~{test}xyz" , "abctestxyz");} @Test public void Args_n() {fxt.Test__eval("abc~{concat|d|e|f}xyz" , "abcdefxyz");} @@ -27,7 +27,7 @@ public class Bry_eval_mgr__tst { // @Test public void Eos() {fxt.Test__eval("a~" , "a~");} } class Bry_eval_mgr__fxt { - private final Bry_eval_mgr mgr = Bry_eval_mgr.Dflt().Add_many(new Bry_eval_wkr__test(), new Bry_eval_wkr__concat()); + private final Bry_eval_mgr mgr = Bry_eval_mgr.Dflt().Add_many(new Bry_eval_wkr__test(), new Bry_eval_wkr__concat()); public Bry_eval_mgr__fxt Test__eval(String raw, String expd) { Gftest.Eq__bry(Bry_.new_u8(expd), mgr.Eval(Bry_.new_u8(raw))); return this; diff --git a/400_xowa/src/gplx/core/caches/Gfo_cache_data.java b/400_xowa/src/gplx/core/caches/Gfo_cache_data.java index d08bb79de..a696bbd0f 100644 --- a/400_xowa/src/gplx/core/caches/Gfo_cache_data.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; import gplx.core.envs.*; class Gfo_cache_data implements gplx.CompareAble, Rls_able { @@ -22,7 +22,7 @@ class Gfo_cache_data implements gplx.CompareAble, Rls_able { this.size = size; this.count = 1; } - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public Rls_able Val() {return val;} private Rls_able val; public int Size() {return size;} private int size; diff --git a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java index af0f30dc7..e475680bc 100644 --- a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; public class Gfo_cache_mgr { - private final Ordered_hash hash = Ordered_hash_.New_bry(); - private final List_adp tmp_delete = List_adp_.New(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final List_adp tmp_delete = List_adp_.New(); public int Cur_size() {return cur_size;} private int cur_size; public int Max_size() {return max_size;} public Gfo_cache_mgr Max_size_(int v) {max_size = v; return this;} private int max_size; public int Reduce_by() {return reduce_by;} public Gfo_cache_mgr Reduce_by_(int v) {reduce_by = v; return this;} private int reduce_by; diff --git a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java index 7acdcd386..5adbdd3f4 100644 --- a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_base.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; public class Gfo_cache_mgr_base { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public int Compress_max() {return compress_max;} public void Compress_max_(int v) {compress_max = v;} private int compress_max = 16; public int Compress_to() {return compress_to;} public void Compress_to_(int v) {compress_to = v;} private int compress_to = 8; protected Object Base_get_or_null(byte[] key) { diff --git a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java index f2511cedd..3745b0bdf 100644 --- a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_bry.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.caches; import gplx.*; import gplx.core.*; import gplx.core.primitives.*; import gplx.core.envs.*; public class Gfo_cache_mgr_bry extends Gfo_cache_mgr_base { @@ -33,7 +33,7 @@ class Gfo_cache_itm_comparer implements gplx.core.lists.ComparerAble { Gfo_cache_itm_bry rhs = (Gfo_cache_itm_bry)rhsObj; return Long_.Compare(lhs.Touched(), rhs.Touched()); } - public static final Gfo_cache_itm_comparer Touched_asc = new Gfo_cache_itm_comparer(); // TS.static + public static final Gfo_cache_itm_comparer Touched_asc = new Gfo_cache_itm_comparer(); // TS.static } class Io_url_exists_mgr { private gplx.core.caches.Gfo_cache_mgr_bry cache_mgr = new gplx.core.caches.Gfo_cache_mgr_bry(); diff --git a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_tst.java b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_tst.java index 63c24be72..f3cf57efc 100644 --- a/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_tst.java +++ b/400_xowa/src/gplx/core/caches/Gfo_cache_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.caches; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*; public class Gfo_cache_mgr_tst { - @Before public void init() {fxt.Clear();} private final Gfo_cache_mgr_fxt fxt = new Gfo_cache_mgr_fxt(); + @Before public void init() {fxt.Clear();} private final Gfo_cache_mgr_fxt fxt = new Gfo_cache_mgr_fxt(); @Test public void Basic() { fxt.Exec__add("a"); fxt.Test__cur_size(1); @@ -35,7 +35,7 @@ public class Gfo_cache_mgr_tst { } } class Gfo_cache_mgr_fxt { - private final Gfo_cache_mgr mgr = new Gfo_cache_mgr().Max_size_(4).Reduce_by_(2); + private final Gfo_cache_mgr mgr = new Gfo_cache_mgr().Max_size_(4).Reduce_by_(2); public void Clear() {mgr.Clear();} public Gfo_cache_mgr_fxt Exec__add(String... ary) { int len = ary.length; diff --git a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_itm.java b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_itm.java index 8a13cf4f9..562888587 100644 --- a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_itm.java +++ b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_itm.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.consoles; import gplx.*; import gplx.core.*; public class Gfo_cmd_arg_itm { public Gfo_cmd_arg_itm(int tid, boolean reqd, String key, int val_tid) {this.tid = tid; this.reqd = reqd; this.key = key; this.val_tid = val_tid;} - public int Tid() {return tid;} private final int tid; - public boolean Reqd() {return reqd;} private final boolean reqd; - public String Key() {return key;} private final String key; + public int Tid() {return tid;} private final int tid; + public boolean Reqd() {return reqd;} private final boolean reqd; + public String Key() {return key;} private final String key; public int Val_tid() {return val_tid;} private int val_tid; public Object Val() {return val;} public Gfo_cmd_arg_itm Val_(Object v) {this.val = v; dirty = true; return this;} private Object val; public String Note() {return note;} public Gfo_cmd_arg_itm Note_(String v) {note = v; return this;} private String note = ""; diff --git a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr.java b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr.java index 4c88a7220..f1141a868 100644 --- a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr.java +++ b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.consoles; import gplx.*; import gplx.core.*; public class Gfo_cmd_arg_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); - private final List_adp err_list = List_adp_.New(), tmp_vals = List_adp_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); + private final List_adp err_list = List_adp_.New(), tmp_vals = List_adp_.New(); public String[] Orig_ary() {return orig_ary;} private String[] orig_ary; public void Reset() { hash.Clear(); diff --git a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_printer.java b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_printer.java index 41b11d43e..b79297d9e 100644 --- a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_printer.java +++ b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_printer.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.consoles; import gplx.*; import gplx.core.*; public class Gfo_cmd_arg_mgr_printer { - private final Gfo_cmd_arg_mgr arg_mgr; - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Gfo_cmd_arg_mgr arg_mgr; + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Gfo_cmd_arg_mgr_printer(Gfo_cmd_arg_mgr arg_mgr) {this.arg_mgr = arg_mgr;} public boolean Print(Gfo_usr_dlg usr_dlg, String header, String app_name, String key__print_help, String key__print_header, String key__print_args) { if (arg_mgr.Get_by_as_bool(key__print_header)) diff --git a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_tst.java b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_tst.java index 1a12a1364..bf1201cbb 100644 --- a/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_tst.java +++ b/400_xowa/src/gplx/core/consoles/Gfo_cmd_arg_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.consoles; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*; public class Gfo_cmd_arg_mgr_tst { - @Before public void init() {fxt.Clear();} private final Gfo_cmd_arg_mgr_fxt fxt = new Gfo_cmd_arg_mgr_fxt(); + @Before public void init() {fxt.Clear();} private final Gfo_cmd_arg_mgr_fxt fxt = new Gfo_cmd_arg_mgr_fxt(); @Test public void Val__many() { fxt.Init_args(fxt.Make_arg("a"), fxt.Make_arg("b")); fxt.Exec_process("--a", "0", "--b", "1"); @@ -67,9 +67,9 @@ public class Gfo_cmd_arg_mgr_tst { } } class Gfo_cmd_arg_mgr_fxt { - private final Tst_mgr tst_mgr = new Tst_mgr(); + private final Tst_mgr tst_mgr = new Tst_mgr(); public Gfo_usr_dlg Usr_dlg() {return usr_dlg;} Gfo_usr_dlg usr_dlg; - public Gfo_cmd_arg_mgr Mgr() {return mgr;} private final Gfo_cmd_arg_mgr mgr = new Gfo_cmd_arg_mgr(); + public Gfo_cmd_arg_mgr Mgr() {return mgr;} private final Gfo_cmd_arg_mgr mgr = new Gfo_cmd_arg_mgr(); public Gfo_cmd_arg_mgr_fxt Clear() { if (usr_dlg == null) usr_dlg = Gfo_usr_dlg_.Test(); diff --git a/400_xowa/src/gplx/core/data_stores/Gfo_data_store.java b/400_xowa/src/gplx/core/data_stores/Gfo_data_store.java index 9b56cd0f0..a3f57f8c0 100644 --- a/400_xowa/src/gplx/core/data_stores/Gfo_data_store.java +++ b/400_xowa/src/gplx/core/data_stores/Gfo_data_store.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.data_stores; import gplx.*; import gplx.core.*; -public class Gfo_data_store { - private final Hash_adp hash = Hash_adp_.New(); - public Gfo_data_itm Get_or_null(String key) { - return (Gfo_data_itm)hash.Get_by(key); - } - public void Set(Gfo_data_itm itm) { - hash.Add_if_dupe_use_nth(itm.Key(), itm); - } - public void Clear() { - hash.Clear(); - } -} +package gplx.core.data_stores; import gplx.*; import gplx.core.*; +public class Gfo_data_store { + private final Hash_adp hash = Hash_adp_.New(); + public Gfo_data_itm Get_or_null(String key) { + return (Gfo_data_itm)hash.Get_by(key); + } + public void Set(Gfo_data_itm itm) { + hash.Add_if_dupe_use_nth(itm.Key(), itm); + } + public void Clear() { + hash.Clear(); + } +} diff --git a/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java b/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java index bd4983be5..febb4f390 100644 --- a/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java +++ b/400_xowa/src/gplx/core/flds/Gfo_fld_rdr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.flds; import gplx.*; import gplx.core.*; import gplx.core.encoders.*; public class Gfo_fld_rdr extends Gfo_fld_base { @@ -120,5 +120,5 @@ public class Gfo_fld_rdr extends Gfo_fld_base { public Gfo_fld_rdr Ctor_sql() {return (Gfo_fld_rdr)super.Ctor_sql_base();} public static Gfo_fld_rdr xowa_() {return new Gfo_fld_rdr().Ctor_xdat();} public static Gfo_fld_rdr sql_() {return new Gfo_fld_rdr().Ctor_sql();} - private static final byte[] Bry_nil = Bry_.new_a7("\\0"); + private static final byte[] Bry_nil = Bry_.new_a7("\\0"); } diff --git a/400_xowa/src/gplx/core/gfobjs/Gfobj_fld.java b/400_xowa/src/gplx/core/gfobjs/Gfobj_fld.java index dc8d9a93a..8581c0ac8 100644 --- a/400_xowa/src/gplx/core/gfobjs/Gfobj_fld.java +++ b/400_xowa/src/gplx/core/gfobjs/Gfobj_fld.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfobjs; import gplx.*; import gplx.core.*; public interface Gfobj_fld { byte Fld_tid(); @@ -33,56 +33,56 @@ class Gfobj_fld_ { } class Gfobj_fld_str implements Gfobj_fld { public Gfobj_fld_str(String key, String val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__str;} public Object As_obj() {return val;} public String As_str() {return val;} private String val; } class Gfobj_fld_bry implements Gfobj_fld { public Gfobj_fld_bry(String key, byte[] val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__bry;} public Object As_obj() {return val;} public byte[] As_bry() {return val;} private byte[] val; } class Gfobj_fld_bool implements Gfobj_fld { public Gfobj_fld_bool(String key, boolean val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__bool;} public Object As_obj() {return val;} public boolean As_bool() {return val;} private boolean val; } class Gfobj_fld_int implements Gfobj_fld { public Gfobj_fld_int(String key, int val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__int;} public Object As_obj() {return val;} public int As_int() {return val;} private int val; } class Gfobj_fld_long implements Gfobj_fld { public Gfobj_fld_long(String key, long val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__long;} public Object As_obj() {return val;} public long As_long() {return val;} private long val; } class Gfobj_fld_double implements Gfobj_fld { public Gfobj_fld_double(String key, double val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__double;} public Object As_obj() {return val;} public double As_double() {return val;} private double val; } class Gfobj_fld_nde implements Gfobj_fld { public Gfobj_fld_nde(String key, Gfobj_nde val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__nde;} public Object As_obj() {return val;} public Gfobj_nde As_nde() {return val;} private Gfobj_nde val; } class Gfobj_fld_ary implements Gfobj_fld { public Gfobj_fld_ary(String key, Gfobj_ary val) {this.key = key; this.val = val;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public byte Fld_tid() {return Gfobj_fld_.Fld_tid__ary;} public Object As_obj() {return val;} public Gfobj_ary As_ary() {return val;} private Gfobj_ary val; diff --git a/400_xowa/src/gplx/core/gfobjs/Gfobj_rdr__json_tst.java b/400_xowa/src/gplx/core/gfobjs/Gfobj_rdr__json_tst.java index 640b6d150..de6abd71d 100644 --- a/400_xowa/src/gplx/core/gfobjs/Gfobj_rdr__json_tst.java +++ b/400_xowa/src/gplx/core/gfobjs/Gfobj_rdr__json_tst.java @@ -17,7 +17,7 @@ package gplx.core.gfobjs; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; import gplx.langs.jsons.*; public class Gfobj_rdr__json_tst { - private final Gfobj_wtr__json_fxt fxt = new Gfobj_wtr__json_fxt(); + private final Gfobj_wtr__json_fxt fxt = new Gfobj_wtr__json_fxt(); @Test public void Type() { fxt.Test__parse(String_.Concat_lines_nl_skip_last ( "{ 'k1':true" diff --git a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json.java b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json.java index c45798497..aa92dc0be 100644 --- a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json.java +++ b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfobjs; import gplx.*; import gplx.core.*; import gplx.langs.jsons.*; public class Gfobj_wtr__json { - private final Json_wtr wtr = new Json_wtr(); + private final Json_wtr wtr = new Json_wtr(); public Gfobj_wtr__json Opt_ws_(boolean v) {wtr.Opt_ws_(v); return this;} public Gfobj_wtr__json Opt_backslash_2x_(boolean v) {wtr.Opt_backslash_2x_(v); return this;} public Bry_bfr Bfr() {return wtr.Bfr();} diff --git a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_fxt.java b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_fxt.java index 67244e13d..fdabd6646 100644 --- a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_fxt.java +++ b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_fxt.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfobjs; import gplx.*; import gplx.core.*; import gplx.core.tests.*; import gplx.langs.jsons.*; public class Gfobj_wtr__json_fxt { - protected final Gfobj_wtr__json mgr = new Gfobj_wtr__json(); + protected final Gfobj_wtr__json mgr = new Gfobj_wtr__json(); public Gfobj_nde Make__nde(Gfobj_fld... ary) {return Make__nde(Gfobj_nde.New(), ary);} private Gfobj_nde Make__nde(Gfobj_nde nde, Gfobj_fld[] ary) { int len = ary.length; diff --git a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_tst.java b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_tst.java index f06873f8a..0892297f0 100644 --- a/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_tst.java +++ b/400_xowa/src/gplx/core/gfobjs/Gfobj_wtr__json_tst.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.gfobjs; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; import gplx.langs.jsons.*; public class Gfobj_wtr__json_tst { - private final Gfobj_wtr__json_fxt fxt = new Gfobj_wtr__json_fxt(); + private final Gfobj_wtr__json_fxt fxt = new Gfobj_wtr__json_fxt(); @Test public void Flds() { fxt.Test__write ( fxt.Make__nde diff --git a/400_xowa/src/gplx/core/intls/ucas/Uca_ltr_extractor.java b/400_xowa/src/gplx/core/intls/ucas/Uca_ltr_extractor.java index 398c42e8d..7a6d21970 100644 --- a/400_xowa/src/gplx/core/intls/ucas/Uca_ltr_extractor.java +++ b/400_xowa/src/gplx/core/intls/ucas/Uca_ltr_extractor.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.intls.ucas; import gplx.*; import gplx.core.*; import gplx.core.intls.*; public class Uca_ltr_extractor { - private final boolean numeric; - private final byte[] numeric_heading; - private final Hash_adp_bry numeric_hash; + private final boolean numeric; + private final byte[] numeric_heading; + private final Hash_adp_bry numeric_hash; public Uca_ltr_extractor(boolean numeric) { this.numeric = numeric; if (numeric) { diff --git a/400_xowa/src/gplx/core/ios/Io_buffer_rdr.java b/400_xowa/src/gplx/core/ios/Io_buffer_rdr.java index 9485ee319..255f33fe7 100644 --- a/400_xowa/src/gplx/core/ios/Io_buffer_rdr.java +++ b/400_xowa/src/gplx/core/ios/Io_buffer_rdr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.ios; import gplx.*; import gplx.core.*; import gplx.core.ios.streams.*;/*IoStream*/ public class Io_buffer_rdr implements Rls_able { @@ -67,5 +67,5 @@ public class Io_buffer_rdr implements Rls_able { rv.Bfr_load(0, bfr_len); return rv; } - public static final Io_buffer_rdr Null = new Io_buffer_rdr(); Io_buffer_rdr() {} + public static final Io_buffer_rdr Null = new Io_buffer_rdr(); Io_buffer_rdr() {} } diff --git a/400_xowa/src/gplx/core/ios/Io_sort_filCmd.java b/400_xowa/src/gplx/core/ios/Io_sort_filCmd.java index 9a6ea2ee6..85bc53464 100644 --- a/400_xowa/src/gplx/core/ios/Io_sort_filCmd.java +++ b/400_xowa/src/gplx/core/ios/Io_sort_filCmd.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.ios; import gplx.*; import gplx.core.*; -public interface Io_sort_filCmd { - void Bfr_add(Io_line_rdr stream); - void Fil_bgn(Io_line_rdr stream); - void Fil_end(); -} -class Io_sort_filCmd_null implements Io_sort_filCmd { - public void Bfr_add(Io_line_rdr stream) {} - public void Fil_bgn(Io_line_rdr stream) {} - public void Fil_end() {} - public static final Io_sort_filCmd_null Instance = new Io_sort_filCmd_null(); Io_sort_filCmd_null() {} // TS.static -} +package gplx.core.ios; import gplx.*; import gplx.core.*; +public interface Io_sort_filCmd { + void Bfr_add(Io_line_rdr stream); + void Fil_bgn(Io_line_rdr stream); + void Fil_end(); +} +class Io_sort_filCmd_null implements Io_sort_filCmd { + public void Bfr_add(Io_line_rdr stream) {} + public void Fil_bgn(Io_line_rdr stream) {} + public void Fil_end() {} + public static final Io_sort_filCmd_null Instance = new Io_sort_filCmd_null(); Io_sort_filCmd_null() {} // TS.static +} diff --git a/400_xowa/src/gplx/core/ios/Io_sort_split_itm_sorter.java b/400_xowa/src/gplx/core/ios/Io_sort_split_itm_sorter.java index 9fa787d5f..25434d1e6 100644 --- a/400_xowa/src/gplx/core/ios/Io_sort_split_itm_sorter.java +++ b/400_xowa/src/gplx/core/ios/Io_sort_split_itm_sorter.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.ios; import gplx.*; import gplx.core.*; -public class Io_sort_split_itm_sorter implements gplx.core.lists.ComparerAble { - public int compare(Object lhsObj, Object rhsObj) { - Io_sort_split_itm lhs = (Io_sort_split_itm)lhsObj, rhs = (Io_sort_split_itm)rhsObj; - return Bry_.Compare(lhs.Bfr(), lhs.Key_bgn(), lhs.Key_end(), rhs.Bfr(), rhs.Key_bgn(), rhs.Key_end()); - } - public static final Io_sort_split_itm_sorter Instance = new Io_sort_split_itm_sorter(); Io_sort_split_itm_sorter() {} // TS.static -} +package gplx.core.ios; import gplx.*; import gplx.core.*; +public class Io_sort_split_itm_sorter implements gplx.core.lists.ComparerAble { + public int compare(Object lhsObj, Object rhsObj) { + Io_sort_split_itm lhs = (Io_sort_split_itm)lhsObj, rhs = (Io_sort_split_itm)rhsObj; + return Bry_.Compare(lhs.Bfr(), lhs.Key_bgn(), lhs.Key_end(), rhs.Bfr(), rhs.Key_bgn(), rhs.Key_end()); + } + public static final Io_sort_split_itm_sorter Instance = new Io_sort_split_itm_sorter(); Io_sort_split_itm_sorter() {} // TS.static +} diff --git a/400_xowa/src/gplx/core/lists/Binary_heap.java b/400_xowa/src/gplx/core/lists/Binary_heap.java index 3f949026c..0f2b1a4bf 100644 --- a/400_xowa/src/gplx/core/lists/Binary_heap.java +++ b/400_xowa/src/gplx/core/lists/Binary_heap.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; public class Binary_heap { - private final ComparerAble comparer; + private final ComparerAble comparer; private boolean is_max; private Object[] heap; private int size; diff --git a/400_xowa/src/gplx/core/lists/Binary_heap_tst.java b/400_xowa/src/gplx/core/lists/Binary_heap_tst.java index 0b59ca63d..07ea762ad 100644 --- a/400_xowa/src/gplx/core/lists/Binary_heap_tst.java +++ b/400_xowa/src/gplx/core/lists/Binary_heap_tst.java @@ -17,7 +17,7 @@ package gplx.core.lists; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.primitives.*; public class Binary_heap_tst { - private final Binary_heap_fxt fxt = new Binary_heap_fxt(); + private final Binary_heap_fxt fxt = new Binary_heap_fxt(); @Test public void Max() { fxt.Init(Bool_.Y); fxt.Exec__add(4, 3, 5, 7, 1, 6, 9, 8, 2); diff --git a/400_xowa/src/gplx/core/lists/HashByInt.java b/400_xowa/src/gplx/core/lists/HashByInt.java index 281c777ae..cd536f3d6 100644 --- a/400_xowa/src/gplx/core/lists/HashByInt.java +++ b/400_xowa/src/gplx/core/lists/HashByInt.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; import gplx.core.primitives.*; public class HashByInt { - private final Ordered_hash hash = Ordered_hash_.New(); - private final Int_obj_ref tmp_key = Int_obj_ref.New_neg1(); + private final Ordered_hash hash = Ordered_hash_.New(); + private final Int_obj_ref tmp_key = Int_obj_ref.New_neg1(); public void Clear() { hash.Clear(); } @@ -58,8 +58,8 @@ public class HashByInt { } } class HashByIntItem { - public final int key; - public final Object val; + public final int key; + public final Object val; public HashByIntItem(int key, Object val) { this.key = key; this.val = val; diff --git a/400_xowa/src/gplx/core/lists/Queue_adp.java b/400_xowa/src/gplx/core/lists/Queue_adp.java index 94db92ebd..2db629281 100644 --- a/400_xowa/src/gplx/core/lists/Queue_adp.java +++ b/400_xowa/src/gplx/core/lists/Queue_adp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; public class Queue_adp { private int count; @@ -44,7 +44,7 @@ public class Queue_adp { } } class Queue_itm { - private final Object data; + private final Object data; public Queue_itm next; public Queue_itm(Object data) { this.data = data; diff --git a/400_xowa/src/gplx/core/lists/Queue_adp_tst.java b/400_xowa/src/gplx/core/lists/Queue_adp_tst.java index 0e3d372b8..279393646 100644 --- a/400_xowa/src/gplx/core/lists/Queue_adp_tst.java +++ b/400_xowa/src/gplx/core/lists/Queue_adp_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.lists; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; public class Queue_adp_tst { - private final Queue_adp_fxt fxt = new Queue_adp_fxt(); + private final Queue_adp_fxt fxt = new Queue_adp_fxt(); @Test public void Empty() { boolean pass = true; try { @@ -50,7 +50,7 @@ public class Queue_adp_tst { } } class Queue_adp_fxt { - private final Queue_adp queue = new Queue_adp(); + private final Queue_adp queue = new Queue_adp(); public void Exec__enqueue(String s) {queue.Enqueue(s);} public void Test__dequeue(String expd_data, int expd_len) { Gftest.Eq__str(expd_data, (String)queue.Dequeue()); diff --git a/400_xowa/src/gplx/core/lists/StatRng.java b/400_xowa/src/gplx/core/lists/StatRng.java index e0fe5b792..a4c8eb695 100644 --- a/400_xowa/src/gplx/core/lists/StatRng.java +++ b/400_xowa/src/gplx/core/lists/StatRng.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists; import gplx.*; import gplx.core.*; class StatRng_fxt { // UNUSED:useful for stat processing StatRng rng; @@ -61,10 +61,10 @@ class StatRng { public long Sum = 0; public int Count = 0; public float Avg() {return Sum / Count;} - public final StatItm[] Lo_ary; + public final StatItm[] Lo_ary; public int Lo_ary_bound; public int Lo_ary_len; - public final StatItm[] Hi_ary; + public final StatItm[] Hi_ary; public int Hi_ary_bound; public int Hi_ary_len; public StatRng[] Slot_ary; diff --git a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search__tst.java b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search__tst.java index dfc4f9fd5..1b7202a26 100644 --- a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search__tst.java +++ b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.lists.binary_searches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import org.junit.*; import gplx.core.primitives.*; public class Binary_search__tst { - private final Binary_search__fxt fxt = new Binary_search__fxt(); + private final Binary_search__fxt fxt = new Binary_search__fxt(); @Test public void Basic() { fxt.Init__ary("", "e", "j", "o", "t", "y"); fxt.Test__binary_search("a", 0); diff --git a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_cmp.java b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_cmp.java index 77beb8f9f..415638974 100644 --- a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_cmp.java +++ b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_cmp.java @@ -1,32 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists.binary_searches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import gplx.core.lists.*; interface Binary_search_cmp { int Compare(Object comp); } class Binary_search_cmp__comparable implements Binary_search_cmp { - private final CompareAble val; + private final CompareAble val; public Binary_search_cmp__comparable(CompareAble val) {this.val = val;} public int Compare(Object comp) { return val.compareTo((CompareAble)comp); } } class Binary_search_cmp__comparer implements Binary_search_cmp { - private final Binary_comparer comparer; private final Object val; + private final Binary_comparer comparer; private final Object val; public Binary_search_cmp__comparer(Binary_comparer comparer, Object val) {this.comparer = comparer; this.val = val;} public int Compare(Object comp) { return comparer.Compare_val_to_obj(val, comp); diff --git a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_grp.java b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_grp.java index 181434ab8..85a1dedd2 100644 --- a/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_grp.java +++ b/400_xowa/src/gplx/core/lists/binary_searches/Binary_search_grp.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists.binary_searches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; interface Binary_search_grp { int Len(); Object Get_at(int i); } class Binary_search_grp__ary implements Binary_search_grp { - private final Object[] ary; + private final Object[] ary; public Binary_search_grp__ary(Object[] ary) {this.ary = ary;} public int Len() {return ary.length;} public Object Get_at(int i) {return ary[i];} } class Binary_search_grp__list implements Binary_search_grp { - private final List_adp list; + private final List_adp list; public Binary_search_grp__list(List_adp list) {this.list = list;} public int Len() {return list.Len();} public Object Get_at(int i) {return list.Get_at(i);} diff --git a/400_xowa/src/gplx/core/lists/caches/Mru_cache_itm.java b/400_xowa/src/gplx/core/lists/caches/Mru_cache_itm.java index 6b415c9f4..bf63c6513 100644 --- a/400_xowa/src/gplx/core/lists/caches/Mru_cache_itm.java +++ b/400_xowa/src/gplx/core/lists/caches/Mru_cache_itm.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists.caches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; class Mru_cache_itm { - private final long time_bgn; + private final long time_bgn; private long time_dirty; private long used_dirty = -1; public Mru_cache_itm(Object key, Object val, long size, long time) { @@ -24,8 +24,8 @@ class Mru_cache_itm { this.size = size; this.time_bgn = this.time_cur = time; } - public Object Key() {return key;} private final Object key; - public Object Val() {return val;} private final Object val; + public Object Key() {return key;} private final Object key; + public Object Val() {return val;} private final Object val; public long Size() {return size;} private long size; public long Time_cur() {return time_cur;} private long time_cur; public long Time_dif() {return time_cur - time_bgn;} diff --git a/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr.java b/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr.java index 32f4defec..b20c14817 100644 --- a/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr.java +++ b/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.lists.caches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import gplx.core.logs.*; public class Mru_cache_mgr { - private final Mru_cache_time_mgr time_mgr; - private final Gfo_log_wtr log_wtr; - private final Hash_adp key_hash = Hash_adp_.New(); - private final Sorted_hash val_hash; - private final Bry_bfr log_bfr = Bry_bfr_.New_w_size(255); - private final Mru_cache_itm_comparer comparer; - private final Ordered_hash dirty = Ordered_hash_.New(); + private final Mru_cache_time_mgr time_mgr; + private final Gfo_log_wtr log_wtr; + private final Hash_adp key_hash = Hash_adp_.New(); + private final Sorted_hash val_hash; + private final Bry_bfr log_bfr = Bry_bfr_.New_w_size(255); + private final Mru_cache_itm_comparer comparer; + private final Ordered_hash dirty = Ordered_hash_.New(); private long cache_max, cache_size, compress_size; Mru_cache_mgr(Mru_cache_time_mgr time_mgr, Gfo_log_wtr log_wtr, long cache_max, long compress_size, long used_weight) { this.time_mgr = time_mgr; diff --git a/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr_tst.java b/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr_tst.java index 1902654c0..8519ed8cb 100644 --- a/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr_tst.java +++ b/400_xowa/src/gplx/core/lists/caches/Mru_cache_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.lists.caches; import gplx.*; import gplx.core.*; import gplx.core.lists.*; import org.junit.*; import gplx.core.tests.*; public class Mru_cache_mgr_tst { - private final Mru_cache_mgr_fxt fxt = new Mru_cache_mgr_fxt(); + private final Mru_cache_mgr_fxt fxt = new Mru_cache_mgr_fxt(); @Before public void init() { fxt.Init__New_cache_mgr(3, 3, 2); } @@ -50,7 +50,7 @@ public class Mru_cache_mgr_tst { } } class Mru_cache_mgr_fxt { - private final Mru_cache_time_mgr__mock time_mgr = new Mru_cache_time_mgr__mock(); + private final Mru_cache_time_mgr__mock time_mgr = new Mru_cache_time_mgr__mock(); private Mru_cache_mgr cache_mgr; public void Init__New_cache_mgr(long cache_max, long used_weight, long compress_size) { cache_mgr = Mru_cache_mgr.New_test(time_mgr, null, cache_max, used_weight, compress_size); diff --git a/400_xowa/src/gplx/core/logs/Gfo_log_wtr.java b/400_xowa/src/gplx/core/logs/Gfo_log_wtr.java index 435d0444a..1538b7904 100644 --- a/400_xowa/src/gplx/core/logs/Gfo_log_wtr.java +++ b/400_xowa/src/gplx/core/logs/Gfo_log_wtr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.logs; import gplx.*; import gplx.core.*; public class Gfo_log_wtr { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final int bfr_max; - private final int fil_max; - private final Io_url fil_dir; - private final String fil_fmt; - private final int fil_idx_places; + private final Bry_bfr bfr = Bry_bfr_.New(); + private final int bfr_max; + private final int fil_max; + private final Io_url fil_dir; + private final String fil_fmt; + private final int fil_idx_places; private Io_url fil_url; private int fil_idx = -1, fil_len; public Gfo_log_wtr(int bfr_max, int fil_max, Io_url fil_dir, String fil_fmt, int fil_idx_places) { diff --git a/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java b/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java index 71ca651bc..5f681c035 100644 --- a/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java +++ b/400_xowa/src/gplx/core/net/Gfo_inet_conn_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; public class Gfo_inet_conn_ { public static final int Tid__http = 1, Tid__mem__hash = 2, Tid__mem__pile = 3; @@ -30,14 +30,14 @@ public class Gfo_inet_conn_ { public static void new_prototype_(int v) {new_prototype = v;} private static int new_prototype = Tid__http; } class Gfo_inet_conn__mem__hash implements Gfo_inet_conn { - private final Hash_adp hash = Hash_adp_.New(); + private final Hash_adp hash = Hash_adp_.New(); public int Tid() {return Gfo_inet_conn_.Tid__mem__hash;} public void Clear() {hash.Clear();} public void Upload_by_bytes(String url, byte[] data) {hash.Add(url, data);} public byte[] Download_as_bytes_or_null(String url) {return (byte[])hash.Get_by(url);} } class Gfo_inet_conn__mem__pile implements Gfo_inet_conn { - private final List_adp pile = List_adp_.New(); + private final List_adp pile = List_adp_.New(); public int Tid() {return Gfo_inet_conn_.Tid__mem__hash;} public void Clear() {pile.Clear();} public void Upload_by_bytes(String url, byte[] data) {pile.Add(data);} diff --git a/400_xowa/src/gplx/core/net/Gfo_url.java b/400_xowa/src/gplx/core/net/Gfo_url.java index fbcaf118b..81d792be9 100644 --- a/400_xowa/src/gplx/core/net/Gfo_url.java +++ b/400_xowa/src/gplx/core/net/Gfo_url.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; import gplx.core.net.qargs.*; public class Gfo_url { - private final int segs__len; + private final int segs__len; public Gfo_url(byte[] raw, byte protocol_tid, byte[] protocol_bry, byte[][] segs, Gfo_qarg_itm[] qargs, byte[] anch) { this.raw = raw; this.protocol_tid = protocol_tid; this.protocol_bry = protocol_bry; @@ -24,15 +24,15 @@ public class Gfo_url { this.qargs = qargs; this.anch = anch; } - public byte[] Raw() {return raw;} private final byte[] raw; - public byte Protocol_tid() {return protocol_tid;} private final byte protocol_tid; - public byte[] Protocol_bry() {return protocol_bry;} private final byte[] protocol_bry; - public byte[] Anch() {return anch;} private final byte[] anch; - public Gfo_qarg_itm[] Qargs() {return qargs;} private final Gfo_qarg_itm[] qargs; - public byte[][] Segs() {return segs;} private final byte[][] segs; + public byte[] Raw() {return raw;} private final byte[] raw; + public byte Protocol_tid() {return protocol_tid;} private final byte protocol_tid; + public byte[] Protocol_bry() {return protocol_bry;} private final byte[] protocol_bry; + public byte[] Anch() {return anch;} private final byte[] anch; + public Gfo_qarg_itm[] Qargs() {return qargs;} private final Gfo_qarg_itm[] qargs; + public byte[][] Segs() {return segs;} private final byte[][] segs; public byte[] Segs__get_at(int i) {return i < segs__len ? segs[i] : null;} public byte[] Segs__get_at_1st() {return segs__len > 0 ? segs[0] : null;} public byte[] Segs__get_at_nth() {return segs__len > 1 ? segs[segs__len - 1] : null;} - public static final Gfo_url Empty = new Gfo_url(Bry_.Empty, Gfo_protocol_itm.Tid_unknown, Bry_.Empty, Bry_.Ary_empty, null, null); + public static final Gfo_url Empty = new Gfo_url(Bry_.Empty, Gfo_protocol_itm.Tid_unknown, Bry_.Empty, Bry_.Ary_empty, null, null); } diff --git a/400_xowa/src/gplx/core/net/Gfo_url_parser.java b/400_xowa/src/gplx/core/net/Gfo_url_parser.java index 39cc0b1a0..1108f608f 100644 --- a/400_xowa/src/gplx/core/net/Gfo_url_parser.java +++ b/400_xowa/src/gplx/core/net/Gfo_url_parser.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; import gplx.core.btries.*; import gplx.core.net.qargs.*; import gplx.langs.htmls.encoders.*; public class Gfo_url_parser { - private final Btrie_slim_mgr protocols = Btrie_slim_mgr.ci_a7(); // ASCII:url_protocol; EX:"http:", "ftp:", etc - private final Btrie_rv trv = new Btrie_rv(); - private final List_adp segs_list = List_adp_.New(), qargs_list = List_adp_.New(); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(500); + private final Btrie_slim_mgr protocols = Btrie_slim_mgr.ci_a7(); // ASCII:url_protocol; EX:"http:", "ftp:", etc + private final Btrie_rv trv = new Btrie_rv(); + private final List_adp segs_list = List_adp_.New(), qargs_list = List_adp_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(500); public Gfo_url_parser() { Init_protocols(Gfo_protocol_itm.Ary()); Init_protocol_itm(Gfo_protocol_itm.Bry_relative, Gfo_protocol_itm.Tid_relative_1); @@ -180,5 +180,5 @@ public class Gfo_url_parser { return encoded ? Gfo_url_encoder_.Xourl.Decode(tmp_bfr, Bool_.N, src, bgn, end).To_bry_and_clear() : Bry_.Mid(src, bgn, end); } - public static final byte[] Bry_double_slash = new byte[] {Byte_ascii.Slash, Byte_ascii.Slash}; + public static final byte[] Bry_double_slash = new byte[] {Byte_ascii.Slash, Byte_ascii.Slash}; } diff --git a/400_xowa/src/gplx/core/net/Gfo_url_parser_fxt.java b/400_xowa/src/gplx/core/net/Gfo_url_parser_fxt.java index f96bea174..98aa88ae3 100644 --- a/400_xowa/src/gplx/core/net/Gfo_url_parser_fxt.java +++ b/400_xowa/src/gplx/core/net/Gfo_url_parser_fxt.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; import gplx.core.net.qargs.*; class Gfo_url_parser_fxt { - private final Gfo_url_parser parser = new Gfo_url_parser(); + private final Gfo_url_parser parser = new Gfo_url_parser(); private Gfo_url actl; public Gfo_url_parser_fxt Test__protocol_tid(byte v) {Tfds.Eq_byte(v, actl.Protocol_tid(), "protocol_tid"); return this;} public Gfo_url_parser_fxt Test__protocol_bry(String v) {Tfds.Eq_str(v, actl.Protocol_bry(), "protocol_bry"); return this;} @@ -38,7 +38,7 @@ class Gfo_url_parser_fxt { parser.Parse_site_fast(site_data, raw_bry, 0, raw_bry.length); String actl = String_.new_u8(raw_bry, site_data.Site_bgn(), site_data.Site_end()); Tfds.Eq(expd, actl); - } private final Gfo_url_site_data site_data = new Gfo_url_site_data(); + } private final Gfo_url_site_data site_data = new Gfo_url_site_data(); private static String Qargs__To_str(Gfo_qarg_itm[] ary) { int len = ary.length; Bry_bfr bfr = Bry_bfr_.New(); diff --git a/400_xowa/src/gplx/core/net/Gfo_url_parser_tst.java b/400_xowa/src/gplx/core/net/Gfo_url_parser_tst.java index 2ad24d463..6e117555c 100644 --- a/400_xowa/src/gplx/core/net/Gfo_url_parser_tst.java +++ b/400_xowa/src/gplx/core/net/Gfo_url_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.net; import gplx.*; import gplx.core.*; import org.junit.*; public class Gfo_url_parser_tst { - private final Gfo_url_parser_fxt tstr = new Gfo_url_parser_fxt(); + private final Gfo_url_parser_fxt tstr = new Gfo_url_parser_fxt(); @Test public void Protocol__relative() { tstr.Exec__parse("//en.wikipedia.org").Test__protocol_tid(Gfo_protocol_itm.Tid_relative_1).Test__protocol_bry("//").Test__site("en.wikipedia.org"); } diff --git a/400_xowa/src/gplx/core/net/Http_client_wtr__stream.java b/400_xowa/src/gplx/core/net/Http_client_wtr__stream.java index b6486652b..a6bd98194 100644 --- a/400_xowa/src/gplx/core/net/Http_client_wtr__stream.java +++ b/400_xowa/src/gplx/core/net/Http_client_wtr__stream.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import java.io.*; class Http_client_wtr__stream implements Http_client_wtr { - private final byte[] tmp_stream_bry = new byte[1024]; + private final byte[] tmp_stream_bry = new byte[1024]; private DataOutputStream stream; public void Stream_(Object o) { this.stream = new DataOutputStream((OutputStream)o); diff --git a/400_xowa/src/gplx/core/net/Http_request_parser.java b/400_xowa/src/gplx/core/net/Http_request_parser.java index 57b26920e..b7d98f998 100644 --- a/400_xowa/src/gplx/core/net/Http_request_parser.java +++ b/400_xowa/src/gplx/core/net/Http_request_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net; import gplx.*; import gplx.core.*; import gplx.core.primitives.*; import gplx.core.btries.*; public class Http_request_parser { @@ -22,8 +22,8 @@ public class Http_request_parser { accept_encoding, x_requested_with, cookie, referer, content_type, content_type_boundary, connection, pragma, cache_control, origin; private Http_post_data_hash post_data_hash; - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); private final Btrie_rv trv = new Btrie_rv(); - private final Http_server_wtr server_wtr; private final boolean log; + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); private final Btrie_rv trv = new Btrie_rv(); + private final Http_server_wtr server_wtr; private final boolean log; public Http_request_parser(Http_server_wtr server_wtr, boolean log) {this.server_wtr = server_wtr; this.log = log;} public void Clear() { this.dnt = false; @@ -161,7 +161,7 @@ public class Http_request_parser { private static final int Tid_get = 1, Tid_post = 2, Tid_host = 3, Tid_user_agent = 4, Tid_accept = 5, Tid_accept_language = 6, Tid_accept_encoding = 7, Tid_dnt = 8 , Tid_x_requested_with = 9, Tid_cookie = 10, Tid_referer = 11, Tid_content_length = 12, Tid_content_type = 13, Tid_connection = 14, Tid_pragma = 15, Tid_cache_control = 16 , Tid_origin = 17, Tid_accept_charset = 188, Tid_upgrade_request = 19, Tid_x_host = 20, Tid_x_real_ip = 21, Tid_sec_fetch_mode = 22, Tid_sec_fetch_site = 23; - private static final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7() .Add_str_int("GET" , Tid_get) .Add_str_int("POST" , Tid_post) .Add_str_int("Host:" , Tid_host) @@ -186,7 +186,7 @@ public class Http_request_parser { .Add_str_int("Sec-Fetch-Mode:" , Tid_sec_fetch_mode) .Add_str_int("Sec-Fetch-Site:" , Tid_sec_fetch_site) ; - private static final byte[] Tkn_boundary = Bry_.new_a7("boundary="), Tkn_content_type_boundary_end = Bry_.new_a7("--") + private static final byte[] Tkn_boundary = Bry_.new_a7("boundary="), Tkn_content_type_boundary_end = Bry_.new_a7("--") , Tkn_content_disposition = Bry_.new_a7("Content-Disposition:"), Tkn_form_data = Bry_.new_a7("form-data;") , Tkn_name = Bry_.new_a7("name=") ; diff --git a/400_xowa/src/gplx/core/net/Http_request_parser_tst.java b/400_xowa/src/gplx/core/net/Http_request_parser_tst.java index 9e8c4832a..b586078d7 100644 --- a/400_xowa/src/gplx/core/net/Http_request_parser_tst.java +++ b/400_xowa/src/gplx/core/net/Http_request_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.net; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; public class Http_request_parser_tst { - @Before public void init() {fxt.Clear();} private final Http_request_parser_fxt fxt = new Http_request_parser_fxt(); + @Before public void init() {fxt.Clear();} private final Http_request_parser_fxt fxt = new Http_request_parser_fxt(); @Test public void Type_post() { fxt.Test_type_post("POST /url HTTP/1.1", Http_request_itm.Type_post, "/url", "HTTP/1.1"); } @@ -53,9 +53,9 @@ public class Http_request_parser_tst { } } class Http_request_parser_fxt { - private final Http_request_parser parser; - private final Http_client_rdr client_rdr = Http_client_rdr_.new_mem(); - private final Http_server_wtr__mock server_wtr = new Http_server_wtr__mock(); + private final Http_request_parser parser; + private final Http_client_rdr client_rdr = Http_client_rdr_.new_mem(); + private final Http_server_wtr__mock server_wtr = new Http_server_wtr__mock(); public Http_request_parser_fxt() { this.parser = new Http_request_parser(server_wtr, false); } diff --git a/400_xowa/src/gplx/core/net/Http_server_wtr_.java b/400_xowa/src/gplx/core/net/Http_server_wtr_.java index 526d25670..024365718 100644 --- a/400_xowa/src/gplx/core/net/Http_server_wtr_.java +++ b/400_xowa/src/gplx/core/net/Http_server_wtr_.java @@ -13,8 +13,8 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.net; import gplx.*; import gplx.core.*; -public class Http_server_wtr_ { - public static Http_server_wtr New__console() {return new Http_server_wtr__console();} - public static final Http_server_wtr Noop = new Http_server_wtr__noop(); -} +package gplx.core.net; import gplx.*; import gplx.core.*; +public class Http_server_wtr_ { + public static Http_server_wtr New__console() {return new Http_server_wtr__console();} + public static final Http_server_wtr Noop = new Http_server_wtr__noop(); +} diff --git a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_itm.java b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_itm.java index 841c6f378..2c3e31dca 100644 --- a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_itm.java +++ b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_itm.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; -public class Gfo_qarg_enum_itm { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); - public Gfo_qarg_enum_itm(String key) {this.key = Bry_.new_u8(key);} - public Gfo_qarg_enum_itm(byte[] key) {this.key = key;} - public byte[] Key() {return key;} private final byte[] key; - public Gfo_qarg_enum_itm Add(String key, int val) { - hash.Add_bry_int(Bry_.new_u8(key), val); - return this; - } - public int Get_as_int_or(byte[] val, int or) {return hash.Get_as_int_or(val, or);} -} +package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; +public class Gfo_qarg_enum_itm { + private final Hash_adp_bry hash = Hash_adp_bry.cs(); + public Gfo_qarg_enum_itm(String key) {this.key = Bry_.new_u8(key);} + public Gfo_qarg_enum_itm(byte[] key) {this.key = key;} + public byte[] Key() {return key;} private final byte[] key; + public Gfo_qarg_enum_itm Add(String key, int val) { + hash.Add_bry_int(Bry_.new_u8(key), val); + return this; + } + public int Get_as_int_or(byte[] val, int or) {return hash.Get_as_int_or(val, or);} +} diff --git a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_mgr.java b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_mgr.java index b0c3babfe..65254608c 100644 --- a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_mgr.java +++ b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_enum_mgr.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; -public class Gfo_qarg_enum_mgr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); - public Gfo_qarg_enum_mgr(Gfo_qarg_enum_itm... ary) { - int len = ary.length; - for (int i = 0; i < len; ++i) { - Gfo_qarg_enum_itm itm = ary[i]; - hash.Add_bry_obj(itm.Key(), itm); - } - } - public Gfo_qarg_enum_itm Get(byte[] key) {return (Gfo_qarg_enum_itm)hash.Get_by_bry(key);} -} +package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; +public class Gfo_qarg_enum_mgr { + private final Hash_adp_bry hash = Hash_adp_bry.cs(); + public Gfo_qarg_enum_mgr(Gfo_qarg_enum_itm... ary) { + int len = ary.length; + for (int i = 0; i < len; ++i) { + Gfo_qarg_enum_itm itm = ary[i]; + hash.Add_bry_obj(itm.Key(), itm); + } + } + public Gfo_qarg_enum_itm Get(byte[] key) {return (Gfo_qarg_enum_itm)hash.Get_by_bry(key);} +} diff --git a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_itm.java b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_itm.java index 7c8216f45..1da06a328 100644 --- a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_itm.java +++ b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_itm.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; -public class Gfo_qarg_itm { - public Gfo_qarg_itm(byte[] key_bry, byte[] val_bry) { - this.key_bry = key_bry; - this.val_bry = val_bry; - } - public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; - public byte[] Val_bry() {return val_bry;} private byte[] val_bry; - public void Val_bry_(byte[] v) {val_bry = v;} - - public static final Gfo_qarg_itm[] Ary_empty = new Gfo_qarg_itm[0]; -} +package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; +public class Gfo_qarg_itm { + public Gfo_qarg_itm(byte[] key_bry, byte[] val_bry) { + this.key_bry = key_bry; + this.val_bry = val_bry; + } + public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; + public byte[] Val_bry() {return val_bry;} private byte[] val_bry; + public void Val_bry_(byte[] v) {val_bry = v;} + + public static final Gfo_qarg_itm[] Ary_empty = new Gfo_qarg_itm[0]; +} diff --git a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr.java b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr.java index e03ecd637..d18c00db5 100644 --- a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr.java +++ b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; public class Gfo_qarg_mgr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); public Gfo_qarg_mgr Init(Gfo_qarg_itm[] args) { hash.Clear(); int len = args.length; diff --git a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr_old.java b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr_old.java index 377ba95cf..2c3163925 100644 --- a/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr_old.java +++ b/400_xowa/src/gplx/core/net/qargs/Gfo_qarg_mgr_old.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.net.qargs; import gplx.*; import gplx.core.*; import gplx.core.net.*; import gplx.langs.htmls.encoders.*; public class Gfo_qarg_mgr_old { - private final List_adp list = List_adp_.New(); - private final Hash_adp hash = Hash_adp_bry.cs(); + private final List_adp list = List_adp_.New(); + private final Hash_adp hash = Hash_adp_bry.cs(); public int Len() {return list.Count();} public boolean Match(byte[] key, byte[] val) { Gfo_qarg_itm arg = (Gfo_qarg_itm)hash.Get_by(key); diff --git a/400_xowa/src/gplx/core/primitives/Bool_ary_bldr.java b/400_xowa/src/gplx/core/primitives/Bool_ary_bldr.java index 04a97cd11..29994cabf 100644 --- a/400_xowa/src/gplx/core/primitives/Bool_ary_bldr.java +++ b/400_xowa/src/gplx/core/primitives/Bool_ary_bldr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Bool_ary_bldr { - private final boolean[] ary; + private final boolean[] ary; public Bool_ary_bldr(int len) { this.ary = new boolean[len]; } diff --git a/400_xowa/src/gplx/core/primitives/Bry_cache.java b/400_xowa/src/gplx/core/primitives/Bry_cache.java index b0e32449e..9d05c1e6e 100644 --- a/400_xowa/src/gplx/core/primitives/Bry_cache.java +++ b/400_xowa/src/gplx/core/primitives/Bry_cache.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.primitives; import gplx.*; import gplx.core.*; import gplx.core.brys.*; public class Bry_cache { - private final Hash_adp hash = Hash_adp_.New(); private final Bry_obj_ref hash_ref = Bry_obj_ref.New_empty(); + private final Hash_adp hash = Hash_adp_.New(); private final Bry_obj_ref hash_ref = Bry_obj_ref.New_empty(); public byte[] Get_or_new(String v) {return Get_or_new(Bry_.new_u8(v));} public byte[] Get_or_new(byte[] v) { if (v.length == 0) return Bry_.Empty; @@ -29,5 +29,5 @@ public class Bry_cache { else return ((Bry_obj_ref)rv).Val(); } - public static final Bry_cache Instance = new Bry_cache(); Bry_cache() {} + public static final Bry_cache Instance = new Bry_cache(); Bry_cache() {} } diff --git a/400_xowa/src/gplx/core/primitives/Hash_adp__primitive.java b/400_xowa/src/gplx/core/primitives/Hash_adp__primitive.java index 3f8a907bb..72f4c98e4 100644 --- a/400_xowa/src/gplx/core/primitives/Hash_adp__primitive.java +++ b/400_xowa/src/gplx/core/primitives/Hash_adp__primitive.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.primitives; import gplx.*; import gplx.core.*; -public class Hash_adp__primitive { - private final Hash_adp hash = Hash_adp_.New(); - public byte Get_by_str_or_max(String key) { - Byte_obj_val rv = (Byte_obj_val)hash.Get_by(key); - return rv == null ? Byte_.Max_value_127 : rv.Val(); - } - public Hash_adp__primitive Add_byte(String key, byte val) { - hash.Add(key, Byte_obj_val.new_(val)); - return this; - } -} +package gplx.core.primitives; import gplx.*; import gplx.core.*; +public class Hash_adp__primitive { + private final Hash_adp hash = Hash_adp_.New(); + public byte Get_by_str_or_max(String key) { + Byte_obj_val rv = (Byte_obj_val)hash.Get_by(key); + return rv == null ? Byte_.Max_value_127 : rv.Val(); + } + public Hash_adp__primitive Add_byte(String key, byte val) { + hash.Add(key, Byte_obj_val.new_(val)); + return this; + } +} diff --git a/400_xowa/src/gplx/core/primitives/Int_2_val.java b/400_xowa/src/gplx/core/primitives/Int_2_val.java index 1ffcfff32..429c1691d 100644 --- a/400_xowa/src/gplx/core/primitives/Int_2_val.java +++ b/400_xowa/src/gplx/core/primitives/Int_2_val.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Int_2_val { public Int_2_val(int v0, int v1) {val_0 = v0; val_1 = v1;} - public int Val_0() {return val_0;} final int val_0; - public int Val_1() {return val_1;} final int val_1; + public int Val_0() {return val_0;} final int val_0; + public int Val_1() {return val_1;} final int val_1; public String Xto_str(Bry_bfr bfr) {return Xto_str(bfr, val_0, val_1);} - public static final Int_2_val Null_ptr = null; + public static final Int_2_val Null_ptr = null; public static Int_2_val parse(String raw) { String[] itms = String_.Split(raw, ','); if (itms.length != 2) return Null_ptr; diff --git a/400_xowa/src/gplx/core/primitives/Int_ary_parser.java b/400_xowa/src/gplx/core/primitives/Int_ary_parser.java index be9cc9a4c..21ea1f6d3 100644 --- a/400_xowa/src/gplx/core/primitives/Int_ary_parser.java +++ b/400_xowa/src/gplx/core/primitives/Int_ary_parser.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Int_ary_parser extends Obj_ary_parser_base { - private final Gfo_number_parser parser = new Gfo_number_parser(); + private final Gfo_number_parser parser = new Gfo_number_parser(); private int[] ary; private int ary_idx; public int[] Parse_ary(String str, byte dlm) {byte[] bry = Bry_.new_u8(str); return Parse_ary(bry, 0, bry.length, dlm);} public int[] Parse_ary(byte[] bry, int bgn, int end, byte dlm) { diff --git a/400_xowa/src/gplx/core/primitives/Int_ary_parser_tst.java b/400_xowa/src/gplx/core/primitives/Int_ary_parser_tst.java index 0a5f4b1c4..9bdc7a3e9 100644 --- a/400_xowa/src/gplx/core/primitives/Int_ary_parser_tst.java +++ b/400_xowa/src/gplx/core/primitives/Int_ary_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.core.primitives; import gplx.*; import gplx.core.*; import org.junit.*; import gplx.core.tests.*; public class Int_ary_parser_tst { - private final Int_ary_parser_fxt fxt = new Int_ary_parser_fxt(); + private final Int_ary_parser_fxt fxt = new Int_ary_parser_fxt(); @Test public void Many() {fxt.Test__Parse_ary("1,2,3,4,5" , 0, 9, Int_ary_.New(1, 2, 3, 4, 5));} @Test public void One() {fxt.Test__Parse_ary("1" , 0, 1, Int_ary_.New(1));} @Test public void None() {fxt.Test__Parse_ary("" , 0, 0, Int_ary_.New());} diff --git a/400_xowa/src/gplx/core/primitives/Int_pool.java b/400_xowa/src/gplx/core/primitives/Int_pool.java index cd2d2877b..0e385eaa0 100644 --- a/400_xowa/src/gplx/core/primitives/Int_pool.java +++ b/400_xowa/src/gplx/core/primitives/Int_pool.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.primitives; import gplx.*; import gplx.core.*; public class Int_pool { - private final List_adp available_list = List_adp_.New(); private int available_len; - // private final Bry_bfr dbg_bfr = Bry_bfr_.New(); + private final List_adp available_list = List_adp_.New(); private int available_len; + // private final Bry_bfr dbg_bfr = Bry_bfr_.New(); private int uid_max = -1; public void Clear() { synchronized (available_list) { diff --git a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list.java b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list.java index f5da9df66..898810e6a 100644 --- a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list.java +++ b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.progs.rates; import gplx.*; import gplx.core.*; import gplx.core.progs.*; import gplx.core.lists.rings.*; public class Gfo_rate_list { - private final Ring__long ring; + private final Ring__long ring; public Gfo_rate_list(int size) { this.ring = new Ring__long(size * 2); // *2 to store both data and time } diff --git a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list_tst.java b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list_tst.java index 7b24db9e4..cef9bbe3e 100644 --- a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list_tst.java +++ b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_list_tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.progs.rates; import gplx.*; import gplx.core.*; import gplx.core.progs.*; import org.junit.*; import gplx.core.tests.*; public class Gfo_rate_list_tst { - private final Gfo_rate_list_fxt fxt = new Gfo_rate_list_fxt(); + private final Gfo_rate_list_fxt fxt = new Gfo_rate_list_fxt(); @Before public void init() {fxt.Clear();} @Test public void Add__1() {fxt.Add(100, 20).Test(5, 5);} @Test public void Add__2() {fxt.Add(100, 20).Add(100, 30).Test(4, .20d);} @@ -24,7 +24,7 @@ public class Gfo_rate_list_tst { @Test public void Add__4() {fxt.Add(100, 20).Add(100, 30).Add(100, 50).Add(600, 0).Test(9, 2);} } class Gfo_rate_list_fxt { - private final Gfo_rate_list list = new Gfo_rate_list(6); + private final Gfo_rate_list list = new Gfo_rate_list(6); public void Clear() {list.Clear();} public Gfo_rate_list_fxt Add(long data, long time) {list.Add(data, time); return this;} public void Test(double expd_rate, double expd_delta) { diff --git a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_mgr.java b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_mgr.java index be143c2cb..ae951a1b7 100644 --- a/400_xowa/src/gplx/core/progs/rates/Gfo_rate_mgr.java +++ b/400_xowa/src/gplx/core/progs/rates/Gfo_rate_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.progs.rates; import gplx.*; import gplx.core.*; import gplx.core.progs.*; public class Gfo_rate_mgr { - private final Hash_adp hash = Hash_adp_.New(); - private final int dflt_size; + private final Hash_adp hash = Hash_adp_.New(); + private final int dflt_size; public Gfo_rate_mgr(int dflt_size) {this.dflt_size = dflt_size;} public void Clear() {hash.Clear();} public int Len() {return hash.Count();} diff --git a/400_xowa/src/gplx/core/security/algos/bouncy_castle/Bouncy_castle_factory.java b/400_xowa/src/gplx/core/security/algos/bouncy_castle/Bouncy_castle_factory.java index 2ed1536fc..aea76ee3e 100644 --- a/400_xowa/src/gplx/core/security/algos/bouncy_castle/Bouncy_castle_factory.java +++ b/400_xowa/src/gplx/core/security/algos/bouncy_castle/Bouncy_castle_factory.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.security.algos.bouncy_castle; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; -public class Bouncy_castle_factory implements Hash_algo_factory { - public Hash_algo New_hash_algo(String key) { - return new Bouncy_castle_algo(key); - } - public static String - Key__md2 = "md2", Key__md4 = "md4", Key__md5 = "md5" - , Key__sha1 = "sha1", Key__sha224 = "sha224", Key__sha256 = "sha256", Key__sha384 = "sha384" - , Key__sha_512_224 = "sha-512/224", Key__sha_512_256 = "sha-512/256", Key__sha512 = "sha512" - , Key__sha3_224 = "sha3-224", Key__sha3_256 = "sha3-256", Key__sha3_384 = "sha3-384", Key__sha3_512 = "sha3-512" - , Key__ripemd128 = "ripemd128", Key__ripemd160 = "ripemd160", Key__ripemd256 = "ripemd256", Key__ripemd320 = "ripemd320" - , Key__whirlpool = "whirlpool" - ; - public static final Bouncy_castle_factory Instance = new Bouncy_castle_factory(); Bouncy_castle_factory() {} -} +package gplx.core.security.algos.bouncy_castle; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; +public class Bouncy_castle_factory implements Hash_algo_factory { + public Hash_algo New_hash_algo(String key) { + return new Bouncy_castle_algo(key); + } + public static String + Key__md2 = "md2", Key__md4 = "md4", Key__md5 = "md5" + , Key__sha1 = "sha1", Key__sha224 = "sha224", Key__sha256 = "sha256", Key__sha384 = "sha384" + , Key__sha_512_224 = "sha-512/224", Key__sha_512_256 = "sha-512/256", Key__sha512 = "sha512" + , Key__sha3_224 = "sha3-224", Key__sha3_256 = "sha3-256", Key__sha3_384 = "sha3-384", Key__sha3_512 = "sha3-512" + , Key__ripemd128 = "ripemd128", Key__ripemd160 = "ripemd160", Key__ripemd256 = "ripemd256", Key__ripemd320 = "ripemd320" + , Key__whirlpool = "whirlpool" + ; + public static final Bouncy_castle_factory Instance = new Bouncy_castle_factory(); Bouncy_castle_factory() {} +} diff --git a/400_xowa/src/gplx/core/security/algos/getopt/Getopt_factory.java b/400_xowa/src/gplx/core/security/algos/getopt/Getopt_factory.java index f52c35627..1c3e21e9d 100644 --- a/400_xowa/src/gplx/core/security/algos/getopt/Getopt_factory.java +++ b/400_xowa/src/gplx/core/security/algos/getopt/Getopt_factory.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.getopt; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import org.getopt.util.hash.*; public class Getopt_factory implements Hash_algo_factory { @@ -29,5 +29,5 @@ public class Getopt_factory implements Hash_algo_factory { public static String Key__fnv132 = "fnv132", Key__fnv164 = "fnv164", Key__fnv1a32 = "fnv1a32", Key__fnv1a64 = "fnv1a64" ; - public static final Getopt_factory Instance = new Getopt_factory(); Getopt_factory() {} + public static final Getopt_factory Instance = new Getopt_factory(); Getopt_factory() {} } diff --git a/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_algo.java b/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_algo.java index 37f147379..e763f9a34 100644 --- a/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_algo.java +++ b/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_algo.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.gnu_crypto; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import gnu.crypto.hash.Haval; import gnu.crypto.hash.Tiger; public class Gnu_haval_algo implements Hash_algo { - private final Gnu_haval_factory factory; + private final Gnu_haval_factory factory; private final Haval haval; public Gnu_haval_algo(Gnu_haval_factory factory, String key) { this.factory = factory; diff --git a/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_factory.java b/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_factory.java index 03c95422e..770e18bf1 100644 --- a/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_factory.java +++ b/400_xowa/src/gplx/core/security/algos/gnu_crypto/Gnu_haval_factory.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.gnu_crypto; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import gnu.crypto.hash.Haval; public class Gnu_haval_factory implements Hash_algo_factory { @@ -48,5 +48,5 @@ public class Gnu_haval_factory implements Hash_algo_factory { , Key__haval128_4 = "haval128,4", Key__haval160_4 = "haval160,4", Key__haval192_4 = "haval192,4", Key__haval224_4 = "haval224,4", Key__haval256_4 = "haval256,4" , Key__haval128_5 = "haval128,5", Key__haval160_5 = "haval160,5", Key__haval192_5 = "haval192,5", Key__haval224_5 = "haval224,5", Key__haval256_5 = "haval256,5" ; - public static final Gnu_haval_factory Instance = new Gnu_haval_factory(); Gnu_haval_factory() {} + public static final Gnu_haval_factory Instance = new Gnu_haval_factory(); Gnu_haval_factory() {} } diff --git a/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_algo.java b/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_algo.java index 8e485918a..56d5d0c07 100644 --- a/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_algo.java +++ b/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_algo.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.algos.jacksum; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; import gplx.core.encoders.*; import java.security.NoSuchAlgorithmException; @@ -28,7 +28,7 @@ public class Jacksum_algo implements Hash_algo { throw Err_.new_wo_type("jacksum algo doesn't exist: key=" + key); } } - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public Hash_algo Clone_hash_algo() {return new Jacksum_algo(key);} public void Update_digest(byte[] bry, int bgn, int end) {checksum.update(bry, bgn, end - bgn);} public byte[] To_hash_bry() { diff --git a/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_factory.java b/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_factory.java index 931263935..cf1c90128 100644 --- a/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_factory.java +++ b/400_xowa/src/gplx/core/security/algos/jacksum/Jacksum_factory.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.security.algos.jacksum; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; -public class Jacksum_factory implements Hash_algo_factory { - public Hash_algo New_hash_algo(String key) { - return new Jacksum_algo(key); - } - -public Object New_Checksum(String key) { - return null; -} - public static String // REF: /source/jonelo/jacksum/JacksumAPI.java - Key__tiger_128 = "tiger-128", Key__tiger_160 = "tiger-160", Key__tiger_192= "tiger-192", Key__gost = "gost" - ; - public static final Jacksum_factory Instance = new Jacksum_factory(); Jacksum_factory() {} -} +package gplx.core.security.algos.jacksum; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; +public class Jacksum_factory implements Hash_algo_factory { + public Hash_algo New_hash_algo(String key) { + return new Jacksum_algo(key); + } + +public Object New_Checksum(String key) { + return null; +} + public static String // REF: /source/jonelo/jacksum/JacksumAPI.java + Key__tiger_128 = "tiger-128", Key__tiger_160 = "tiger-160", Key__tiger_192= "tiger-192", Key__gost = "gost" + ; + public static final Jacksum_factory Instance = new Jacksum_factory(); Jacksum_factory() {} +} diff --git a/400_xowa/src/gplx/core/security/files/Cksum_itm.java b/400_xowa/src/gplx/core/security/files/Cksum_itm.java index 772f665bc..14113764c 100644 --- a/400_xowa/src/gplx/core/security/files/Cksum_itm.java +++ b/400_xowa/src/gplx/core/security/files/Cksum_itm.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.core.security.files; import gplx.*; import gplx.core.*; import gplx.core.security.*; -public class Cksum_itm implements gplx.core.brys.Bry_bfr_able { - public Cksum_itm(byte[] hash, Io_url file_url, long file_size) { - this.Hash = hash; this.File_url = file_url; this.File_size = file_size; - } - public final byte[] Hash; - public final Io_url File_url; - public final long File_size; - public void To_bfr(Bry_bfr bfr) { - bfr.Add(Hash).Add_byte_pipe(); - bfr.Add_str_u8(File_url.Raw()).Add_byte_pipe(); - bfr.Add_long_variable(File_size); - } -} +package gplx.core.security.files; import gplx.*; import gplx.core.*; import gplx.core.security.*; +public class Cksum_itm implements gplx.core.brys.Bry_bfr_able { + public Cksum_itm(byte[] hash, Io_url file_url, long file_size) { + this.Hash = hash; this.File_url = file_url; this.File_size = file_size; + } + public final byte[] Hash; + public final Io_url File_url; + public final long File_size; + public void To_bfr(Bry_bfr bfr) { + bfr.Add(Hash).Add_byte_pipe(); + bfr.Add_str_u8(File_url.Raw()).Add_byte_pipe(); + bfr.Add_long_variable(File_size); + } +} diff --git a/400_xowa/src/gplx/core/security/files/Cksum_list.java b/400_xowa/src/gplx/core/security/files/Cksum_list.java index 08a75b743..8cbfc4f18 100644 --- a/400_xowa/src/gplx/core/security/files/Cksum_list.java +++ b/400_xowa/src/gplx/core/security/files/Cksum_list.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.files; import gplx.*; import gplx.core.*; import gplx.core.security.*; import gplx.core.security.algos.*; public class Cksum_list { public Cksum_list(byte type, Cksum_itm[] itms, long itms_size) { this.Type = type; this.Itms = itms; this.Itms_size = itms_size; } - public final byte Type; - public final Cksum_itm[] Itms; + public final byte Type; + public final Cksum_itm[] Itms; public long Itms_size; public Io_url[] Itms_ary() { int len = Itms.length; diff --git a/400_xowa/src/gplx/core/security/files/Cksum_list_tst.java b/400_xowa/src/gplx/core/security/files/Cksum_list_tst.java index fb3897cfc..b724acd4f 100644 --- a/400_xowa/src/gplx/core/security/files/Cksum_list_tst.java +++ b/400_xowa/src/gplx/core/security/files/Cksum_list_tst.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.security.files; import gplx.*; import gplx.core.*; import gplx.core.security.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.security.algos.*; public class Cksum_list_tst { - private final Cksum_list_fxt fxt = new Cksum_list_fxt(); + private final Cksum_list_fxt fxt = new Cksum_list_fxt(); @Test public void Basic() { fxt.Init__file("a.txt").Init__file("ab.txt"); fxt.Test__parse(String_.Concat_lines_nl_skip_last @@ -30,7 +30,7 @@ public class Cksum_list_tst { } } class Cksum_list_fxt { - private final Io_url dir = Io_url_.mem_dir_("mem/dir/"); + private final Io_url dir = Io_url_.mem_dir_("mem/dir/"); public Cksum_list_fxt() { Io_mgr.Instance.InitEngine_mem(); } diff --git a/400_xowa/src/gplx/core/tests/Tst_mgr.java b/400_xowa/src/gplx/core/tests/Tst_mgr.java index 836a897a9..e28fff9d9 100644 --- a/400_xowa/src/gplx/core/tests/Tst_mgr.java +++ b/400_xowa/src/gplx/core/tests/Tst_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.tests; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class Tst_mgr { @@ -105,7 +105,7 @@ public class Tst_mgr { return sb.To_str_and_clear(); } int Max(int max, String s) {int len = String_.Len(s); return len > max ? len : max;} - public static final Tst_chkr Null_chkr = new Tst_chkr_null(); + public static final Tst_chkr Null_chkr = new Tst_chkr_null(); } class Tst_itm { public boolean Pass() {return pass;} private boolean pass; diff --git a/400_xowa/src/gplx/core/threads/Gfo_async_cmd_itm.java b/400_xowa/src/gplx/core/threads/Gfo_async_cmd_itm.java index 0db2b541d..a2f6c94ec 100644 --- a/400_xowa/src/gplx/core/threads/Gfo_async_cmd_itm.java +++ b/400_xowa/src/gplx/core/threads/Gfo_async_cmd_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads; import gplx.*; import gplx.core.*; public class Gfo_async_cmd_itm implements Gfo_invk { private Gfo_invk invk; private String invk_key; private GfoMsg msg = GfoMsg_.new_cast_(""); @@ -36,5 +36,5 @@ public class Gfo_async_cmd_itm implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } private static final String Invk_exec = "exec"; - public static final Gfo_async_cmd_itm[] Ary_empty = new Gfo_async_cmd_itm[0]; + public static final Gfo_async_cmd_itm[] Ary_empty = new Gfo_async_cmd_itm[0]; } diff --git a/400_xowa/src/gplx/core/threads/Gfo_thread_grp.java b/400_xowa/src/gplx/core/threads/Gfo_thread_grp.java index ef47dfc2a..4ddaa47ee 100644 --- a/400_xowa/src/gplx/core/threads/Gfo_thread_grp.java +++ b/400_xowa/src/gplx/core/threads/Gfo_thread_grp.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads; import gplx.*; import gplx.core.*; public class Gfo_thread_grp implements Gfo_invk { - private final Object thread_lock = new Object(); - private final List_adp list = List_adp_.New(); + private final Object thread_lock = new Object(); + private final List_adp list = List_adp_.New(); private int active_cur; public Gfo_thread_grp(String key) {this.key = key;} - public String Key() {return key;} private final String key; + public String Key() {return key;} private final String key; public boolean Autorun() {return autorun;} public Gfo_thread_grp Autorun_(boolean v) {autorun = v; return this;} private boolean autorun = true; public int Active_max() {return active_max;} public Gfo_thread_grp Active_max_(int v) {active_max = v; return this;} private int active_max = 1; public void Add(Gfo_thread_itm... ary) { diff --git a/400_xowa/src/gplx/core/threads/Gfo_thread_mgr.java b/400_xowa/src/gplx/core/threads/Gfo_thread_mgr.java index a774f6eeb..f56422cc9 100644 --- a/400_xowa/src/gplx/core/threads/Gfo_thread_mgr.java +++ b/400_xowa/src/gplx/core/threads/Gfo_thread_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.core.threads; import gplx.*; import gplx.core.*; public class Gfo_thread_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public Gfo_thread_grp Get_by_or_new(String k) { Gfo_thread_grp rv = (Gfo_thread_grp)hash.Get_by(k); if (rv == null) { diff --git a/400_xowa/src/gplx/dbs/Db_diff_bldr.java b/400_xowa/src/gplx/dbs/Db_diff_bldr.java index 86d3541a7..58ce66b83 100644 --- a/400_xowa/src/gplx/dbs/Db_diff_bldr.java +++ b/400_xowa/src/gplx/dbs/Db_diff_bldr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs; import gplx.*; import gplx.dbs.metas.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.wtrs.*; class Db_diff_bldr { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Sql_schema_wtr sql_bldr = new Sql_schema_wtr(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Sql_schema_wtr sql_bldr = new Sql_schema_wtr(); public Db_diff_bldr() {sql_bldr.Bfr_(bfr);} public String Compare_db(String src_str, String trg_str) { // Io_url src_url = Io_url_.new_fil_(src_str); diff --git a/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy.java b/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy.java index ede1222df..597f619ef 100644 --- a/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy.java +++ b/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.bulks; import gplx.*; import gplx.dbs.*; import gplx.dbs.*; import gplx.dbs.metas.*; public class Db_tbl_copy { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); public void Copy_many(Db_conn src_conn, Db_conn trg_conn, String... tbl_names) { for (String tbl_name : tbl_names) Copy_one(src_conn, trg_conn, tbl_name, tbl_name); diff --git a/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy_tst.java b/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy_tst.java index 50a91904a..47d543355 100644 --- a/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy_tst.java +++ b/400_xowa/src/gplx/dbs/bulks/Db_tbl_copy_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.dbs.bulks; import gplx.*; import gplx.dbs.*; import org.junit.*; import gplx.core.tests.*; import gplx.dbs.metas.*; public class Db_tbl_copy_tst { - private final Db_tbl_copy_fxt fxt = new Db_tbl_copy_fxt(); + private final Db_tbl_copy_fxt fxt = new Db_tbl_copy_fxt(); @Test public void Basic() { fxt.Test__bld_sql(fxt.Make_tbl("tbl_1", Dbmeta_fld_itm.new_int("fld_1"), Dbmeta_fld_itm.new_int("fld_2")), String_.Concat_lines_nl_skip_last @@ -29,7 +29,7 @@ public class Db_tbl_copy_tst { } } class Db_tbl_copy_fxt { - private final Db_tbl_copy mgr = new Db_tbl_copy(); + private final Db_tbl_copy mgr = new Db_tbl_copy(); public Dbmeta_tbl_itm Make_tbl(String name, Dbmeta_fld_itm... flds) {return Dbmeta_tbl_itm.New(name, flds);} public void Test__bld_sql(Dbmeta_tbl_itm tbl, String expd) { Gftest.Eq__ary__lines(expd, mgr.Bld_sql(tbl, "src", "trg"), "sql"); diff --git a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_hash.java b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_hash.java index 646983f43..6c94e7285 100644 --- a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_hash.java +++ b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_hash.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.cfgs; import gplx.*; import gplx.dbs.*; public class Db_cfg_hash { - private final String grp; private final Ordered_hash hash = Ordered_hash_.New(); + private final String grp; private final Ordered_hash hash = Ordered_hash_.New(); public Db_cfg_hash(String grp) {this.grp = grp;} public int Len() {return hash.Count();} public Db_cfg_itm Get_at(int i) {return (Db_cfg_itm)hash.Get_at(i);} diff --git a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_itm.java b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_itm.java index 1cf7449dc..e86a043c4 100644 --- a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_itm.java +++ b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_itm.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.cfgs; import gplx.*; import gplx.dbs.*; public class Db_cfg_itm { public Db_cfg_itm(String grp, String key, String val) {this.grp = grp; this.key = key; this.val = val;} - public String Grp() {return grp;} private final String grp; - public String Key() {return key;} private final String key; + public String Grp() {return grp;} private final String grp; + public String Key() {return key;} private final String key; public String Val() {return val;} public Db_cfg_itm Val_(String v) {val = v; return this;} private String val; public String To_str_or(String or) {return val == null ? or : val;} public byte[] To_bry_or(byte[] or) {try {return val == null ? or : Bry_.new_u8(val) ;} catch (Exception e) {throw err_parse(e, Bry_.Cls_val_name);}} @@ -51,5 +51,5 @@ public class Db_cfg_itm { public static Db_cfg_itm new_DateAdp (String grp, String key, DateAdp val) {return new Db_cfg_itm(grp , key, val.XtoStr_fmt_yyyyMMdd_HHmmss());} public static Db_cfg_itm new_guid (String key, Guid_adp val) {return new Db_cfg_itm(Grp_none , key, val.To_str());} public static Db_cfg_itm new_guid (String grp, String key, Guid_adp val) {return new Db_cfg_itm(grp , key, val.To_str());} - public static final Db_cfg_itm Empty = new Db_cfg_itm("empty", "empty", null); + public static final Db_cfg_itm Empty = new Db_cfg_itm("empty", "empty", null); } diff --git a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_tbl.java b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_tbl.java index 9b6eb1f3a..dd88fd416 100644 --- a/400_xowa/src/gplx/dbs/cfgs/Db_cfg_tbl.java +++ b/400_xowa/src/gplx/dbs/cfgs/Db_cfg_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.cfgs; import gplx.*; import gplx.dbs.*; import gplx.core.primitives.*; public class Db_cfg_tbl implements Db_tbl { - private final String tbl_name; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_grp, fld_key, fld_val; + private final String tbl_name; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_grp, fld_key, fld_val; private Db_stmt stmt_insert, stmt_update, stmt_select; - public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_conn Conn() {return conn;} private final Db_conn conn; public Db_cfg_tbl(Db_conn conn, String tbl_name) { this.conn = conn; this.tbl_name = tbl_name; this.fld_grp = flds.Add_str("cfg_grp", 255); diff --git a/400_xowa/src/gplx/dbs/metas/Schema_db_mgr.java b/400_xowa/src/gplx/dbs/metas/Schema_db_mgr.java index 3e18ea537..2230d4b0a 100644 --- a/400_xowa/src/gplx/dbs/metas/Schema_db_mgr.java +++ b/400_xowa/src/gplx/dbs/metas/Schema_db_mgr.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; -import gplx.dbs.metas.updates.*; -public class Schema_db_mgr { - public Schema_loader_mgr Loader() {return loader;} public void Loader_(Schema_loader_mgr v) {loader = v;} private Schema_loader_mgr loader; - public Schema_update_mgr Updater() {return updater;} private final Schema_update_mgr updater = new Schema_update_mgr(); - public Dbmeta_tbl_mgr Tbl_mgr() {return tbl_mgr;} private final Dbmeta_tbl_mgr tbl_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); - public void Init(Db_conn conn) { - loader.Load(this, conn); - updater.Update(this, conn); - } -} +package gplx.dbs.metas; import gplx.*; import gplx.dbs.*; +import gplx.dbs.metas.updates.*; +public class Schema_db_mgr { + public Schema_loader_mgr Loader() {return loader;} public void Loader_(Schema_loader_mgr v) {loader = v;} private Schema_loader_mgr loader; + public Schema_update_mgr Updater() {return updater;} private final Schema_update_mgr updater = new Schema_update_mgr(); + public Dbmeta_tbl_mgr Tbl_mgr() {return tbl_mgr;} private final Dbmeta_tbl_mgr tbl_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop); + public void Init(Db_conn conn) { + loader.Load(this, conn); + updater.Update(this, conn); + } +} diff --git a/400_xowa/src/gplx/dbs/percentiles/Log_tbl_fmtr.java b/400_xowa/src/gplx/dbs/percentiles/Log_tbl_fmtr.java index d188b200a..a76b14e00 100644 --- a/400_xowa/src/gplx/dbs/percentiles/Log_tbl_fmtr.java +++ b/400_xowa/src/gplx/dbs/percentiles/Log_tbl_fmtr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.percentiles; import gplx.*; import gplx.dbs.*; class Log_tbl_fmtr { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final List_adp itms = List_adp_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final List_adp itms = List_adp_.New(); private Log_fld_itm[] ary; public Log_tbl_fmtr Add_str(String key, int len) {ary = null; itms.Add(new Log_fld_itm__bry(Type_ids_.Id__bry, key, len)); return this;} public Log_tbl_fmtr Add_int(String key, int bgn, int end) {ary = null; itms.Add(new Log_fld_itm__int(Type_ids_.Id__int, key, bgn, end)); return this;} @@ -41,8 +41,8 @@ abstract class Log_fld_itm__base implements Log_fld_itm { public Log_fld_itm__base(int tid, String key, int len) { this.tid = tid; this.key = key; this.len = len; } - public int Tid() {return tid;} private final int tid; - public String Key() {return key;} private final String key; + public int Tid() {return tid;} private final int tid; + public String Key() {return key;} private final String key; public int Len() {return len;} protected int len; public abstract void Fmt(Bry_bfr bfr, Object val); } @@ -62,8 +62,8 @@ class Log_fld_itm__int extends Log_fld_itm__base { this.bgn = bgn; this.end = end; this.len = Int_.DigitCount(end); } - public int Bgn() {return bgn;} private final int bgn; - public int End() {return end;} private final int end; + public int Bgn() {return bgn;} private final int bgn; + public int End() {return end;} private final int end; @Override public void Fmt(Bry_bfr bfr, Object val) { int val_int = Int_.Cast(val); String val_str = String_.PadBgn(Int_.To_str(val_int), this.Len(), " "); diff --git a/400_xowa/src/gplx/dbs/percentiles/Percentile_rng_tst.java b/400_xowa/src/gplx/dbs/percentiles/Percentile_rng_tst.java index 5558520ef..ca7da51f9 100644 --- a/400_xowa/src/gplx/dbs/percentiles/Percentile_rng_tst.java +++ b/400_xowa/src/gplx/dbs/percentiles/Percentile_rng_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.dbs.percentiles; import gplx.*; import gplx.dbs.*; import org.junit.*; public class Percentile_rng_tst { - private final Percentile_rng_fxt fxt = new Percentile_rng_fxt(); + private final Percentile_rng_fxt fxt = new Percentile_rng_fxt(); @Before public void init() {fxt.Clear();} @Test public void Found__000() { fxt.Test__rng(999994, 1000001); @@ -37,7 +37,7 @@ public class Percentile_rng_tst { } } class Percentile_rng_fxt { - private final Percentile_rng rng = new Percentile_rng(); + private final Percentile_rng rng = new Percentile_rng(); public void Clear() { this.Exec__init_for_wiki(16000000, 1000000); this.Exec__init_for_search(100, 0); diff --git a/400_xowa/src/gplx/dbs/updates/Sql_runner.java b/400_xowa/src/gplx/dbs/updates/Sql_runner.java index 9f74b754d..104724efb 100644 --- a/400_xowa/src/gplx/dbs/updates/Sql_runner.java +++ b/400_xowa/src/gplx/dbs/updates/Sql_runner.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.dbs.updates; import gplx.*; import gplx.dbs.*; import gplx.dbs.stmts.*; /* @@ -24,7 +24,7 @@ AND page_id < ? state = -1|100000 */ public class Sql_runner { - private final Db_stmt_arg_list list = new Db_stmt_arg_list(); + private final Db_stmt_arg_list list = new Db_stmt_arg_list(); public Db_conn Conn() {return conn;} public void Conn_(Db_conn v) {conn = v;} private Db_conn conn; public boolean Quiet() {return quiet;} public void Quiet_(boolean v) {quiet = v;} private boolean quiet; public String Sql_fmt() {return sql_fmt;} public void Sql_fmt_(String v) {sql_fmt = v;} private String sql_fmt; diff --git a/400_xowa/src/gplx/fsdb/Fsdb_db_file.java b/400_xowa/src/gplx/fsdb/Fsdb_db_file.java index e60c72e2d..ece741b90 100644 --- a/400_xowa/src/gplx/fsdb/Fsdb_db_file.java +++ b/400_xowa/src/gplx/fsdb/Fsdb_db_file.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.fsdb; import gplx.*; -import gplx.dbs.*; import gplx.dbs.cfgs.*; -public class Fsdb_db_file { - public Fsdb_db_file(Io_url url, Db_conn conn) { - this.url = url; this.conn = conn; - this.tbl__core_cfg = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(conn); - } - public Io_url Url() {return url;} private final Io_url url; - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Db_cfg_tbl Tbl__cfg() {return tbl__core_cfg;} private final Db_cfg_tbl tbl__core_cfg; -} +package gplx.fsdb; import gplx.*; +import gplx.dbs.*; import gplx.dbs.cfgs.*; +public class Fsdb_db_file { + public Fsdb_db_file(Io_url url, Db_conn conn) { + this.url = url; this.conn = conn; + this.tbl__core_cfg = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(conn); + } + public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_cfg_tbl Tbl__cfg() {return tbl__core_cfg;} private final Db_cfg_tbl tbl__core_cfg; +} diff --git a/400_xowa/src/gplx/fsdb/Fsdb_db_mgr__v2.java b/400_xowa/src/gplx/fsdb/Fsdb_db_mgr__v2.java index 9aecfa189..4f2f9b17b 100644 --- a/400_xowa/src/gplx/fsdb/Fsdb_db_mgr__v2.java +++ b/400_xowa/src/gplx/fsdb/Fsdb_db_mgr__v2.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb; import gplx.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.fsdb.meta.*; import gplx.xowa.files.origs.*; import gplx.xowa.wikis.data.*; public class Fsdb_db_mgr__v2 implements Fsdb_db_mgr { - private final Xow_db_layout layout; private final Io_url wiki_dir; - private final Fsdb_db_file file_main_core, file_user_core; - private final Xof_orig_tbl[] orig_tbl_ary; + private final Xow_db_layout layout; private final Io_url wiki_dir; + private final Fsdb_db_file file_main_core, file_user_core; + private final Xof_orig_tbl[] orig_tbl_ary; public Fsdb_db_mgr__v2(Xow_db_layout layout, Io_url wiki_dir, Fsdb_db_file file_main_core, Fsdb_db_file file_user_core) { this.layout = layout; this.wiki_dir = wiki_dir; this.file_main_core = file_main_core; this.file_user_core = file_user_core; diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_bin_itm.java b/400_xowa/src/gplx/fsdb/data/Fsd_bin_itm.java index 963b6ee2b..17a1fda97 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_bin_itm.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_bin_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; public class Fsd_bin_itm { public Fsd_bin_itm(int bin_owner_id, byte bin_owner_tid, int bin_part_id, String bin_data_url, byte[] bin_data) { @@ -22,11 +22,11 @@ public class Fsd_bin_itm { this.bin_data_url = bin_data_url; this.bin_data = bin_data; } - public int Bin_owner_id() {return bin_owner_id;} private final int bin_owner_id; - public byte Bin_owner_tid() {return bin_owner_tid;} private final byte bin_owner_tid; - public int Bin_part_id() {return bin_part_id;} private final int bin_part_id; - public String Bin_data_url() {return bin_data_url;} private final String bin_data_url; - public byte[] Bin_data() {return bin_data;} private final byte[] bin_data; + public int Bin_owner_id() {return bin_owner_id;} private final int bin_owner_id; + public byte Bin_owner_tid() {return bin_owner_tid;} private final byte bin_owner_tid; + public int Bin_part_id() {return bin_part_id;} private final int bin_part_id; + public String Bin_data_url() {return bin_data_url;} private final String bin_data_url; + public byte[] Bin_data() {return bin_data;} private final byte[] bin_data; public static final int Db_row_size_fixed = (3 * 4); // bin_owner_id, bin_part_id, bin_owner_tid (assume byte saved as int in SQLITE) } diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_bin_tbl.java b/400_xowa/src/gplx/fsdb/data/Fsd_bin_tbl.java index 3b8e8fb65..05c6392f8 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_bin_tbl.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_bin_tbl.java @@ -19,9 +19,9 @@ import gplx.dbs.*; import gplx.core.ios.streams.*; public class Fsd_bin_tbl implements Rls_able { - public final String fld__owner_id, fld__owner_tid, fld__part_id, fld__data_url, fld__data; + public final String fld__owner_id, fld__owner_tid, fld__part_id, fld__data_url, fld__data; private Db_conn conn; private Db_stmt stmt_insert, stmt_select, stmt_select_itm; private Bry_bfr tmp_bfr; - private final Bool_obj_ref saved_in_parts = Bool_obj_ref.n_(); + private final Bool_obj_ref saved_in_parts = Bool_obj_ref.n_(); public Fsd_bin_tbl(Db_conn conn, boolean schema_is_1) { this.conn = conn; fld__owner_id = flds.Add_int_pkey ("bin_owner_id"); @@ -31,8 +31,8 @@ public class Fsd_bin_tbl implements Rls_able { fld__data = flds.Add_bry ("bin_data"); // mediumblob conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_bin"; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_bin"; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Rls() { stmt_insert = Db_stmt_.Rls(stmt_insert); stmt_select = Db_stmt_.Rls(stmt_select); diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_dir_itm.java b/400_xowa/src/gplx/fsdb/data/Fsd_dir_itm.java index 7b47f1041..4534317e4 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_dir_itm.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_dir_itm.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; -public class Fsd_dir_itm { - public Fsd_dir_itm(int dir_id, int owner, byte[] name) { - this.dir_id = dir_id; - this.owner = owner; - this.name = name; - } - public int Dir_id() {return dir_id;} private final int dir_id; - public int Owner() {return owner;} private final int owner; - public byte[] Name() {return name;} private final byte[] name; - - public static final int Owner_root = 0; - public static final Fsd_dir_itm Null = null; -} +package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; +public class Fsd_dir_itm { + public Fsd_dir_itm(int dir_id, int owner, byte[] name) { + this.dir_id = dir_id; + this.owner = owner; + this.name = name; + } + public int Dir_id() {return dir_id;} private final int dir_id; + public int Owner() {return owner;} private final int owner; + public byte[] Name() {return name;} private final byte[] name; + + public static final int Owner_root = 0; + public static final Fsd_dir_itm Null = null; +} diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_dir_tbl.java b/400_xowa/src/gplx/fsdb/data/Fsd_dir_tbl.java index 48b054979..75670a2ff 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_dir_tbl.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_dir_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; public class Fsd_dir_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_id, fld_owner_id, fld_name; - private final Db_conn conn; private Db_stmt stmt_select_by_name; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_id, fld_owner_id, fld_name; + private final Db_conn conn; private Db_stmt stmt_select_by_name; public Fsd_dir_tbl(Db_conn conn, boolean schema_is_1) { this.conn = conn; this.fld_id = flds.Add_int_pkey ("dir_id"); @@ -26,7 +26,7 @@ public class Fsd_dir_tbl implements Db_tbl { this.fld_name = flds.Add_str ("dir_name", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_dir"; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_dir"; public void Create_tbl() { conn.Meta_tbl_create ( Dbmeta_tbl_itm.New(tbl_name, flds diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_fil_itm.java b/400_xowa/src/gplx/fsdb/data/Fsd_fil_itm.java index f4d2a1aae..947ba708d 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_fil_itm.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_fil_itm.java @@ -1,34 +1,34 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; public class Fsd_fil_itm { public Fsd_fil_itm (int mnt_id, int dir_id, int fil_id, int xtn_id, int ext_id, byte[] name, long size, String modified_on, String hash_md5, int bin_db_id) { this.mnt_id = mnt_id; this.dir_id = dir_id; this.fil_id = fil_id; this.xtn_id = xtn_id; this.ext_id = ext_id; this.name = name; this.size = size; this.modified_on = modified_on; this.hash_md5 = hash_md5; this.bin_db_id = bin_db_id; } - public int Mnt_id() {return mnt_id;} private final int mnt_id; - public int Dir_id() {return dir_id;} private final int dir_id; - public int Fil_id() {return fil_id;} private final int fil_id; - public int Xtn_id() {return xtn_id;} private final int xtn_id; - public int Ext_id() {return ext_id;} private final int ext_id; - public byte[] Name() {return name;} private final byte[] name; - public long Size() {return size;} private final long size; - public String Modified_on() {return modified_on;} private final String modified_on; - public String Hash_md5() {return hash_md5;} private final String hash_md5; - public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; + public int Mnt_id() {return mnt_id;} private final int mnt_id; + public int Dir_id() {return dir_id;} private final int dir_id; + public int Fil_id() {return fil_id;} private final int fil_id; + public int Xtn_id() {return xtn_id;} private final int xtn_id; + public int Ext_id() {return ext_id;} private final int ext_id; + public byte[] Name() {return name;} private final byte[] name; + public long Size() {return size;} private final long size; + public String Modified_on() {return modified_on;} private final String modified_on; + public String Hash_md5() {return hash_md5;} private final String hash_md5; + public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; public int Db_row_size() {return Db_row_size_fixed + name.length;} private static final int Db_row_size_fixed = @@ -38,7 +38,7 @@ public class Fsd_fil_itm { + 14 // modified_on ; - public static final Fsd_fil_itm Null = null; + public static final Fsd_fil_itm Null = null; public static byte[] Gen_cache_key(Bry_bfr bfr, int dir_id, byte[] name) { return bfr.Add_int_variable(dir_id).Add_byte_pipe().Add(name).To_bry_and_clear(); } diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java b/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java index a88bb53c9..9329b23bc 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_fil_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.sqlite.*; public class Fsd_fil_tbl implements Db_tbl { - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_id, fld_owner_id, fld_name, fld_xtn_id, fld_ext_id, fld_size, fld_modified, fld_hash, fld_bin_db_id; - private final String idx_owner; - public final Db_conn conn; private Db_stmt stmt_insert, stmt_update, stmt_select_by_name; private int mnt_id; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_id, fld_owner_id, fld_name, fld_xtn_id, fld_ext_id, fld_size, fld_modified, fld_hash, fld_bin_db_id; + private final String idx_owner; + public final Db_conn conn; private Db_stmt stmt_insert, stmt_update, stmt_select_by_name; private int mnt_id; public Fsd_fil_tbl(Db_conn conn, boolean schema_is_1, int mnt_id) { this.conn = conn; this.mnt_id = mnt_id; this.fld_id = flds.Add_int_pkey ("fil_id"); @@ -34,7 +34,7 @@ public class Fsd_fil_tbl implements Db_tbl { this.idx_owner = Dbmeta_idx_itm.Bld_idx_name(tbl_name, "owner"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_fil"; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_fil"; public void Rls() { stmt_insert = Db_stmt_.Rls(stmt_insert); stmt_update = Db_stmt_.Rls(stmt_update); diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_img_itm.java b/400_xowa/src/gplx/fsdb/data/Fsd_img_itm.java index de21d0df2..c4938d893 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_img_itm.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_img_itm.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; -public class Fsd_img_itm { - public Fsd_img_itm(int mnt_id, int dir_id, int fil_id, int bin_db_id) { - this.mnt_id = mnt_id; this.dir_id = dir_id; this.fil_id = fil_id; this.bin_db_id = bin_db_id; - } - public int Mnt_id() {return mnt_id;} private final int mnt_id; - public int Dir_id() {return dir_id;} private final int dir_id; - public int Fil_id() {return fil_id;} private final int fil_id; - public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; -} +package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; +public class Fsd_img_itm { + public Fsd_img_itm(int mnt_id, int dir_id, int fil_id, int bin_db_id) { + this.mnt_id = mnt_id; this.dir_id = dir_id; this.fil_id = fil_id; this.bin_db_id = bin_db_id; + } + public int Mnt_id() {return mnt_id;} private final int mnt_id; + public int Dir_id() {return dir_id;} private final int dir_id; + public int Fil_id() {return fil_id;} private final int fil_id; + public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; +} diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_thm_itm.java b/400_xowa/src/gplx/fsdb/data/Fsd_thm_itm.java index b96cbec96..678b76891 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_thm_itm.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_thm_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; public class Fsd_thm_itm { public void Ctor(int mnt_id, int dir_id, int fil_id, int thm_id, int bin_db_id, int w, int h, double time, int page, long size, String modified, String hash) { @@ -50,8 +50,8 @@ public class Fsd_thm_itm { + 14 // modified_on ; - public static final Fsd_thm_itm Null = null; - public static final Fsd_thm_itm[] Ary_empty = new Fsd_thm_itm[0]; + public static final Fsd_thm_itm Null = null; + public static final Fsd_thm_itm[] Ary_empty = new Fsd_thm_itm[0]; public static Fsd_thm_itm new_() {return new Fsd_thm_itm();} Fsd_thm_itm() {} } class Fsdb_thm_itm_sorter implements gplx.core.lists.ComparerAble { @@ -62,5 +62,5 @@ class Fsdb_thm_itm_sorter implements gplx.core.lists.ComparerAble { comp = Double_.Compare (lhs.Time() , rhs.Time()); if (comp != CompareAble_.Same) return comp; // sort by increasing time return Int_.Compare (lhs.Page() , rhs.Page()); // sort by increasing page } - public static final Fsdb_thm_itm_sorter Instance = new Fsdb_thm_itm_sorter(); Fsdb_thm_itm_sorter() {} + public static final Fsdb_thm_itm_sorter Instance = new Fsdb_thm_itm_sorter(); Fsdb_thm_itm_sorter() {} } diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl.java b/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl.java index 6fd15c97a..d2e863d63 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.data; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; import gplx.fsdb.meta.*; import gplx.xowa.files.*; public class Fsd_thm_tbl implements Db_tbl { - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_id, fld_owner_id, fld_w, fld_h, fld_time, fld_page, fld_bin_db_id, fld_size, fld_modified, fld_hash; - public final Db_conn conn; private Db_stmt stmt_insert, stmt_select_by_fil_exact, stmt_select_by_fil_near; private int mnt_id; private boolean schema_thm_page; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_id, fld_owner_id, fld_w, fld_h, fld_time, fld_page, fld_bin_db_id, fld_size, fld_modified, fld_hash; + public final Db_conn conn; private Db_stmt stmt_insert, stmt_select_by_fil_exact, stmt_select_by_fil_near; private int mnt_id; private boolean schema_thm_page; public Fsd_thm_tbl(Db_conn conn, boolean schema_is_1, int mnt_id, boolean schema_thm_page) { this.conn = conn; this.mnt_id = mnt_id; this.schema_thm_page = schema_thm_page; this.tbl_name = schema_is_1 ? "fsdb_xtn_thm" : "fsdb_thm"; @@ -40,7 +40,7 @@ public class Fsd_thm_tbl implements Db_tbl { this.fld_hash = flds.Add_str ("thm_hash", 40); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds , Dbmeta_idx_itm.new_unique_by_tbl(tbl_name, "owner", fld_owner_id, fld_id, fld_w, fld_time, fld_page) @@ -123,7 +123,7 @@ public class Fsd_thm_tbl implements Db_tbl { itm.Ctor(mnt_id, dir_id, fil_id, thm_id, bin_db_id, w, h, time, page, size, modified, hash); return true; } - public static final DateAdp Modified_null = null; + public static final DateAdp Modified_null = null; public static final String Hash_null = "", Modified_null_str = ""; public static boolean Match_nearest(List_adp list, Fsd_thm_itm thm, boolean schema_thm_page) { int len = list.Count(); if (len == 0) return Bool_.N; diff --git a/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl_tst.java b/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl_tst.java index ae69f1641..30ca5cc54 100644 --- a/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl_tst.java +++ b/400_xowa/src/gplx/fsdb/data/Fsd_thm_tbl_tst.java @@ -32,7 +32,7 @@ public class Fsd_thm_tbl_tst { } } class Fsd_thm_tbl_fxt { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public void Clear() {list.Clear();} public Fsd_thm_itm Make(int w) { double time = gplx.xowa.files.Xof_lnki_time.Null; diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java index 2146f1d14..3af73805e 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_fil.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.core.primitives.*; import gplx.core.caches.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.fsdb.data.*; public class Fsm_atr_fil { - private final Fsm_mnt_itm mnt_itm; private final int mnt_id; + private final Fsm_mnt_itm mnt_itm; private final int mnt_id; private Fsd_dir_tbl tbl_dir; private Fsd_fil_tbl tbl_fil; private Fsd_thm_tbl tbl_thm; - private final Gfo_cache_mgr_bry dir_cache = new Gfo_cache_mgr_bry(); private Gfo_cache_mgr_bry fil_cache; private Bry_bfr fil_cache_key_bfr; + private final Gfo_cache_mgr_bry dir_cache = new Gfo_cache_mgr_bry(); private Gfo_cache_mgr_bry fil_cache; private Bry_bfr fil_cache_key_bfr; public Fsm_atr_fil(Fsm_mnt_itm mnt_itm, int id, String url_rel, Db_conn conn, boolean schema_is_1, boolean schema_thm_page) { this.mnt_itm = mnt_itm; this.mnt_id = mnt_itm.Id(); this.id = id; this.url_rel = url_rel; this.conn = conn; @@ -27,9 +27,9 @@ public class Fsm_atr_fil { this.tbl_fil = new Fsd_fil_tbl(conn, schema_is_1, mnt_id); this.tbl_thm = new Fsd_thm_tbl(conn, schema_is_1, mnt_id, schema_thm_page); } - public int Id() {return id;} private final int id; - public String Url_rel() {return url_rel;} private final String url_rel; - public Db_conn Conn() {return conn;} private final Db_conn conn; + public int Id() {return id;} private final int id; + public String Url_rel() {return url_rel;} private final String url_rel; + public Db_conn Conn() {return conn;} private final Db_conn conn; public Fsd_fil_itm Select_fil_or_null(byte[] dir, byte[] fil) { int dir_id = Get_dir_id_or_neg1(dir); return dir_id == Int_.Neg1 ? Fsd_fil_itm.Null : tbl_fil.Select_or_null(dir_id, fil); diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_tbl.java b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_tbl.java index eed40ca5b..5eefe2fab 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_atr_tbl.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_atr_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; import gplx.dbs.qrys.*; public class Fsm_atr_tbl implements Db_tbl { - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_uid, fld_url; - private final Db_conn conn; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_uid, fld_url; + private final Db_conn conn; public Fsm_atr_tbl(Db_conn conn, boolean schema_is_1) { this.conn = conn; String fld_prefix = ""; @@ -27,7 +27,7 @@ public class Fsm_atr_tbl implements Db_tbl { this.fld_uid = flds.Add_int_pkey (fld_prefix + "uid"); this.fld_url = flds.Add_str (fld_prefix + "url", 255); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public Fsm_atr_fil Select_1st_or_fail(Fsm_mnt_itm mnt_itm, Fsdb_db_mgr core_mgr, int mnt_id, boolean schema_thm_page) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, Dbmeta_fld_itm.Str_ary_empty).Exec_select__rls_auto(); diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_fil.java b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_fil.java index 934ebb1e9..620f4355c 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_fil.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_fil.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.dbs.*; import gplx.fsdb.data.*; @@ -21,12 +21,12 @@ public class Fsm_bin_fil { this.id = id; this.url = url; this.url_rel = url_rel; this.conn = conn; this.bin_len = bin_len; this.tbl = new Fsd_bin_tbl(conn, schema_is_1); } - public int Id() {return id;} private final int id; + public int Id() {return id;} private final int id; public Io_url Url() {return url;} private Io_url url; - public String Url_rel() {return url_rel;} private final String url_rel; + public String Url_rel() {return url_rel;} private final String url_rel; public long Bin_len() {return bin_len;} public void Bin_len_(long v) {bin_len = v;} private long bin_len; - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Fsd_bin_tbl Tbl() {return tbl;} private final Fsd_bin_tbl tbl; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Fsd_bin_tbl Tbl() {return tbl;} private final Fsd_bin_tbl tbl; public boolean Select_to_url(int id, Io_url url) {return tbl.Select_to_url(id, url);} public Io_stream_rdr Select_as_rdr(int id) {return tbl.Select_as_rdr(id);} public Fsd_bin_itm Select_as_itm(int id) {return tbl.Select_as_itm(id);} @@ -34,6 +34,6 @@ public class Fsm_bin_fil { tbl.Insert_rdr(bin_id, owner_tid, rdr_len, rdr); Bin_len_(bin_len + rdr_len); } - public static final Fsm_bin_fil[] Ary_empty = new Fsm_bin_fil[0]; + public static final Fsm_bin_fil[] Ary_empty = new Fsm_bin_fil[0]; public static final long Bin_len_null = 0; } diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_mgr.java b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_mgr.java index acc02751e..10193cd32 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_mgr.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.dbs.*; public class Fsm_bin_mgr { - private final Fsdb_db_mgr core_mgr; private final int mnt_id; private final Fsm_bin_tbl tbl; - private final Ordered_hash db_hash = Ordered_hash_.New(); + private final Fsdb_db_mgr core_mgr; private final int mnt_id; private final Fsm_bin_tbl tbl; + private final Ordered_hash db_hash = Ordered_hash_.New(); private Fsm_bin_fil nth_db; public Fsm_bin_mgr(Fsdb_db_mgr core_mgr, Db_conn conn, int mnt_id) { this.core_mgr = core_mgr; this.mnt_id = mnt_id; diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_tbl.java b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_tbl.java index 649dd7624..2c2ce5cfc 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_bin_tbl.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_bin_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; import gplx.dbs.qrys.*; public class Fsm_bin_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_uid, fld_url, fld_bin_len, fld_bin_max; - private final Db_conn conn; private int mnt_id; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_uid, fld_url, fld_bin_len, fld_bin_max; + private final Db_conn conn; private int mnt_id; public Fsm_bin_tbl(Db_conn conn, boolean schema_is_1, int mnt_id) { this.conn = conn; this.mnt_id = mnt_id; String fld_prefix = ""; @@ -35,7 +35,7 @@ public class Fsm_bin_tbl implements Db_tbl { fld_bin_max = Dbmeta_fld_itm.Key_null; } } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert(int id, String url_rel) { conn.Stmt_insert(tbl_name, flds).Crt_int(fld_uid, id).Val_str(fld_url, url_rel).Val_long(fld_bin_len, 0).Val_long(fld_bin_max, 0).Exec_insert(); diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_cfg_mgr.java b/400_xowa/src/gplx/fsdb/meta/Fsm_cfg_mgr.java index f230f60ce..b3b66fbea 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_cfg_mgr.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_cfg_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.fsdb.meta.*; public class Fsm_cfg_mgr { - private final Db_cfg_tbl tbl; private final Hash_adp grp_hash = Hash_adp_.New(); + private final Db_cfg_tbl tbl; private final Hash_adp grp_hash = Hash_adp_.New(); public Fsm_cfg_mgr(Fsdb_db_mgr db_conn_mgr, Db_conn conn) { this.tbl = new Db_cfg_tbl(conn, db_conn_mgr.File__cfg_tbl_name()); } diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_itm.java b/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_itm.java index b899411a6..7228cb8fe 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_itm.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_itm.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.dbs.*; import gplx.fsdb.data.*; public class Fsm_mnt_itm { public Fsm_mnt_itm(int id, String name, String url_rel) {this.id = id; this.name = name; this.url_rel = url_rel;} - public int Id() {return id;} private final int id; - public String Name() {return name;} private final String name; - public String Url_rel() {return url_rel;} private final String url_rel; + public int Id() {return id;} private final int id; + public String Name() {return name;} private final String name; + public String Url_rel() {return url_rel;} private final String url_rel; public Fsm_atr_mgr Atr_mgr() {return atr_mgr;} private Fsm_atr_mgr atr_mgr; public Fsm_bin_mgr Bin_mgr() {return bin_mgr;} private Fsm_bin_mgr bin_mgr; public Fsm_cfg_mgr Cfg_mgr() {return cfg_mgr;} private Fsm_cfg_mgr cfg_mgr; diff --git a/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_tbl.java b/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_tbl.java index 259bb8770..d88e63f79 100644 --- a/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_tbl.java +++ b/400_xowa/src/gplx/fsdb/meta/Fsm_mnt_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.fsdb.meta; import gplx.*; import gplx.fsdb.*; import gplx.dbs.*; public class Fsm_mnt_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_id, fld_name, fld_url; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_id, fld_name, fld_url; + private final Db_conn conn; public Fsm_mnt_tbl(Db_conn conn, boolean schema_is_1) { this.conn = conn; fld_id = flds.Add_int_pkey ("mnt_id"); @@ -26,7 +26,7 @@ public class Fsm_mnt_tbl implements Db_tbl { fld_url = flds.Add_str ("mnt_url", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_mnt"; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "fsdb_mnt"; public void Create_tbl() { Dbmeta_tbl_itm meta = Dbmeta_tbl_itm.New(tbl_name, flds); conn.Meta_tbl_create(meta); diff --git a/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java b/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java index 4ded20461..294e6c9de 100644 --- a/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java +++ b/400_xowa/src/gplx/gfui/Gfui_bnd_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.gfui; import gplx.*; import gplx.core.bits.*; public class Gfui_bnd_parser { @@ -21,14 +21,14 @@ public class Gfui_bnd_parser { gfui_regy = Hash_adp_bry.ci_a7() , norm_regy = Hash_adp_bry.ci_a7() ; - private static final Gfui_bnd_tkn + private static final Gfui_bnd_tkn Itm_sym_plus = new_sym_(Gfui_bnd_tkn.Tid_sym_plus , new byte[] {Byte_ascii.Plus}) , Itm_sym_pipe = new_sym_(Gfui_bnd_tkn.Tid_sym_pipe , new byte[] {Byte_ascii.Pipe}) , Itm_sym_comma = new_sym_(Gfui_bnd_tkn.Tid_sym_comma , new byte[] {Byte_ascii.Comma}) // , Itm_sym_ws = new_sym_(Gfui_bnd_tkn.Tid_sym_ws , Bry_.Empty) , Itm_sym_eos = new_sym_(Gfui_bnd_tkn.Tid_sym_eos , Bry_.Empty) ; - private static final Gfui_bnd_tkn[] Mod_ary = new Gfui_bnd_tkn[] + private static final Gfui_bnd_tkn[] Mod_ary = new Gfui_bnd_tkn[] { null , new_mod_(Gfui_bnd_tkn.Tid_mod_c , "mod.c" , "Ctrl") , new_mod_(Gfui_bnd_tkn.Tid_mod_a , "mod.a" , "Alt") @@ -278,10 +278,10 @@ class Gfui_bnd_tkn { public Gfui_bnd_tkn(byte tid, int keycode, byte[] gfui, byte[] norm) { this.tid = tid; this.keycode = keycode; ; this.bry_gfui = gfui; this.bry_norm = norm; } - public byte Tid() {return tid;} private final byte tid; - public int Keycode() {return keycode;} private final int keycode; - public byte[] Bry_gfui() {return bry_gfui;} private final byte[] bry_gfui; - public byte[] Bry_norm() {return bry_norm;} private final byte[] bry_norm; + public byte Tid() {return tid;} private final byte tid; + public int Keycode() {return keycode;} private final int keycode; + public byte[] Bry_gfui() {return bry_gfui;} private final byte[] bry_gfui; + public byte[] Bry_norm() {return bry_norm;} private final byte[] bry_norm; public void Write(Bry_bfr bfr, boolean src_is_gfui) { if (keycode != Gfui_bnd_tkn.Keycode_null) { if (src_is_gfui) @@ -326,5 +326,5 @@ class Gfui_bnd_tkn { , Tid_key = 12 ; public static final int Keycode_null = 0; - private static final byte[] Bry_key_prefix = Bry_.new_a7("key."); + private static final byte[] Bry_key_prefix = Bry_.new_a7("key."); } diff --git a/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java index 0ceb21f36..656bd9f47 100644 --- a/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java +++ b/400_xowa/src/gplx/langs/dsvs/Dsv_fld_parser_.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.dsvs; import gplx.*; import gplx.langs.*; public class Dsv_fld_parser_ { - public static final Dsv_fld_parser Bry_parser = Dsv_fld_parser_bry.Instance; - public static final Dsv_fld_parser Int_parser = Dsv_fld_parser_int.Instance; - public static final Dsv_fld_parser Line_parser__comment_is_pipe = new Dsv_fld_parser_line(Byte_ascii.Pipe); + public static final Dsv_fld_parser Bry_parser = Dsv_fld_parser_bry.Instance; + public static final Dsv_fld_parser Int_parser = Dsv_fld_parser_int.Instance; + public static final Dsv_fld_parser Line_parser__comment_is_pipe = new Dsv_fld_parser_line(Byte_ascii.Pipe); public static Err err_fld_unhandled(Dsv_fld_parser parser, Dsv_wkr_base wkr, int fld_idx, byte[] src, int bgn, int end) { throw Err_.new_wo_type("fld unhandled", "parser", Type_.Name_by_obj(parser), "wkr", Type_.Name_by_obj(wkr), "fld_idx", fld_idx, "val", String_.new_u8(src, bgn, end)).Trace_ignore_add_1_(); } } class Dsv_fld_parser_line implements Dsv_fld_parser { - private byte row_dlm = Byte_ascii.Nl; private final byte comment_dlm; + private byte row_dlm = Byte_ascii.Nl; private final byte comment_dlm; public Dsv_fld_parser_line(byte comment_dlm) {this.comment_dlm = comment_dlm;} public void Init(byte fld_dlm, byte row_dlm) { this.row_dlm = row_dlm; @@ -78,7 +78,7 @@ class Dsv_fld_parser_bry implements Dsv_fld_parser { ++pos; } } - public static final Dsv_fld_parser_bry Instance = new Dsv_fld_parser_bry(); Dsv_fld_parser_bry() {} + public static final Dsv_fld_parser_bry Instance = new Dsv_fld_parser_bry(); Dsv_fld_parser_bry() {} } class Dsv_fld_parser_int implements Dsv_fld_parser { private byte fld_dlm = Byte_ascii.Pipe, row_dlm = Byte_ascii.Nl; @@ -108,5 +108,5 @@ class Dsv_fld_parser_int implements Dsv_fld_parser { ++pos; } } - public static final Dsv_fld_parser_int Instance = new Dsv_fld_parser_int(); Dsv_fld_parser_int() {} + public static final Dsv_fld_parser_int Instance = new Dsv_fld_parser_int(); Dsv_fld_parser_int() {} } diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_lxr.java b/400_xowa/src/gplx/langs/gfs/Gfs_lxr.java index 9f0a333aa..393154732 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_lxr.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_lxr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.gfs; import gplx.*; import gplx.langs.*; interface Gfs_lxr { int Lxr_tid(); @@ -43,7 +43,7 @@ class Gfs_lxr_whitespace implements Gfs_lxr { } return rv; } - public static final Gfs_lxr_whitespace Instance = new Gfs_lxr_whitespace(); Gfs_lxr_whitespace() {} + public static final Gfs_lxr_whitespace Instance = new Gfs_lxr_whitespace(); Gfs_lxr_whitespace() {} } class Gfs_lxr_comment_flat implements Gfs_lxr { public Gfs_lxr_comment_flat(byte[] bgn_bry, byte[] end_bry) { @@ -87,7 +87,7 @@ class Gfs_lxr_identifier implements Gfs_lxr { if (rv == Gfs_lxr_.Rv_eos) ctx.Process_eos(); // eos return rv; } - public static final Gfs_lxr_identifier Instance = new Gfs_lxr_identifier(); Gfs_lxr_identifier() {} + public static final Gfs_lxr_identifier Instance = new Gfs_lxr_identifier(); Gfs_lxr_identifier() {} } class Gfs_lxr_semic implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_semic;} @@ -101,7 +101,7 @@ class Gfs_lxr_semic implements Gfs_lxr { } return end; } - public static final Gfs_lxr_semic Instance = new Gfs_lxr_semic(); Gfs_lxr_semic() {} + public static final Gfs_lxr_semic Instance = new Gfs_lxr_semic(); Gfs_lxr_semic() {} } class Gfs_lxr_dot implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_dot;} @@ -113,7 +113,7 @@ class Gfs_lxr_dot implements Gfs_lxr { } return end; } - public static final Gfs_lxr_dot Instance = new Gfs_lxr_dot(); Gfs_lxr_dot() {} + public static final Gfs_lxr_dot Instance = new Gfs_lxr_dot(); Gfs_lxr_dot() {} } class Gfs_lxr_paren_bgn implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_paren_bgn;} @@ -124,7 +124,7 @@ class Gfs_lxr_paren_bgn implements Gfs_lxr { } return end; } - public static final Gfs_lxr_paren_bgn Instance = new Gfs_lxr_paren_bgn(); Gfs_lxr_paren_bgn() {} + public static final Gfs_lxr_paren_bgn Instance = new Gfs_lxr_paren_bgn(); Gfs_lxr_paren_bgn() {} } class Gfs_lxr_paren_end implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_paren_end;} @@ -137,7 +137,7 @@ class Gfs_lxr_paren_end implements Gfs_lxr { } return end; } - public static final Gfs_lxr_paren_end Instance = new Gfs_lxr_paren_end(); Gfs_lxr_paren_end() {} + public static final Gfs_lxr_paren_end Instance = new Gfs_lxr_paren_end(); Gfs_lxr_paren_end() {} } class Gfs_lxr_quote implements Gfs_lxr { public Gfs_lxr_quote(byte[] bgn_bry, byte[] end_bry) { @@ -182,7 +182,7 @@ class Gfs_lxr_curly_bgn implements Gfs_lxr { } return end; } - public static final Gfs_lxr_curly_bgn Instance = new Gfs_lxr_curly_bgn(); Gfs_lxr_curly_bgn() {} + public static final Gfs_lxr_curly_bgn Instance = new Gfs_lxr_curly_bgn(); Gfs_lxr_curly_bgn() {} } class Gfs_lxr_curly_end implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_curly_end;} @@ -190,7 +190,7 @@ class Gfs_lxr_curly_end implements Gfs_lxr { ctx.Stack_pop(bgn); return end; } - public static final Gfs_lxr_curly_end Instance = new Gfs_lxr_curly_end(); Gfs_lxr_curly_end() {} + public static final Gfs_lxr_curly_end Instance = new Gfs_lxr_curly_end(); Gfs_lxr_curly_end() {} } class Gfs_lxr_equal implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_eq;} @@ -198,7 +198,7 @@ class Gfs_lxr_equal implements Gfs_lxr { ctx.Make_nde(bgn, end).Op_tid_(Gfs_nde.Op_tid_assign); return end; } - public static final Gfs_lxr_equal Instance = new Gfs_lxr_equal(); Gfs_lxr_equal() {} + public static final Gfs_lxr_equal Instance = new Gfs_lxr_equal(); Gfs_lxr_equal() {} } class Gfs_lxr_comma implements Gfs_lxr { public int Lxr_tid() {return Gfs_lxr_.Tid_comma;} @@ -208,5 +208,5 @@ class Gfs_lxr_comma implements Gfs_lxr { } return end; } - public static final Gfs_lxr_comma Instance = new Gfs_lxr_comma(); Gfs_lxr_comma() {} + public static final Gfs_lxr_comma Instance = new Gfs_lxr_comma(); Gfs_lxr_comma() {} } diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_msg_bldr.java b/400_xowa/src/gplx/langs/gfs/Gfs_msg_bldr.java index 36891e07c..e52fa1c69 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_msg_bldr.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_msg_bldr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.gfs; import gplx.*; import gplx.langs.*; import gplx.core.gfo_regys.*; public class Gfs_msg_bldr implements GfoMsgParser { - private final Object thread_lock = new Object(); - private final Gfs_parser parser = new Gfs_parser(); + private final Object thread_lock = new Object(); + private final Gfs_parser parser = new Gfs_parser(); public GfoMsg ParseToMsg(String s) {return Bld(s);} public GfoMsg Bld(String src) {return Bld(Bry_.new_u8(src));} public GfoMsg Bld(byte[] src) { @@ -46,6 +46,6 @@ public class Gfs_msg_bldr implements GfoMsgParser { } return rv; } - public static final Gfs_msg_bldr Instance = new Gfs_msg_bldr(); Gfs_msg_bldr() {} // TS.static + public static final Gfs_msg_bldr Instance = new Gfs_msg_bldr(); Gfs_msg_bldr() {} // TS.static public static final String Tkn_mutator = "_"; } diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_nde.java b/400_xowa/src/gplx/langs/gfs/Gfs_nde.java index 0cb260ce5..eff196277 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_nde.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_nde.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.gfs; import gplx.*; import gplx.langs.*; public class Gfs_nde { public byte[] Name_bry(byte[] src) {return name == null ? Bry_.Mid(src, name_bgn, name_end) : name;} @@ -78,6 +78,6 @@ public class Gfs_nde { rv[i] = args[i]; return rv; } - public static final Gfs_nde[] Ary_empty = new Gfs_nde[0]; + public static final Gfs_nde[] Ary_empty = new Gfs_nde[0]; public static final byte Op_tid_null = 0, Op_tid_assign = 1; } diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_parser.java b/400_xowa/src/gplx/langs/gfs/Gfs_parser.java index 205e4c7f1..4ea45dedb 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_parser.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_parser.java @@ -16,8 +16,8 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.langs.gfs; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; public class Gfs_parser { - private final Btrie_fast_mgr trie = Gfs_parser_.trie_(); - private final Gfs_parser_ctx ctx = new Gfs_parser_ctx(); + private final Btrie_fast_mgr trie = Gfs_parser_.trie_(); + private final Gfs_parser_ctx ctx = new Gfs_parser_ctx(); public Gfs_nde Parse(byte[] src) { ctx.Root().Subs_clear(); int src_len = src.length; if (src_len == 0) return ctx.Root(); diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_parser_ctx.java b/400_xowa/src/gplx/langs/gfs/Gfs_parser_ctx.java index 023443b7c..e41d7550a 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_parser_ctx.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_parser_ctx.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.gfs; import gplx.*; import gplx.langs.*; import gplx.core.btries.*; class Gfs_parser_ctx { public Btrie_fast_mgr Trie() {return trie;} Btrie_fast_mgr trie; - public Btrie_rv Trie_rv() {return trie_rv;} private final Btrie_rv trie_rv = new Btrie_rv(); + public Btrie_rv Trie_rv() {return trie_rv;} private final Btrie_rv trie_rv = new Btrie_rv(); public Gfs_nde Root() {return root;} Gfs_nde root = new Gfs_nde(); public byte[] Src() {return src;} private byte[] src; public int Src_len() {return src_len;} private int src_len; @@ -84,7 +84,7 @@ class Gfs_err_mgr { tmp_fail_args.Add("excerpt_end", Fail_excerpt_end(src, src_len, pos)); tmp_fail_args.Add("pos" , pos); } - public static final String Fail_msg_invalid_lxr = "invalid character", Fail_msg_unknown_char = "unknown char", Fail_msg_eos = "end of stream", Fail_msg_nde_stack_empty = "node stack empty"; + public static final String Fail_msg_invalid_lxr = "invalid character", Fail_msg_unknown_char = "unknown char", Fail_msg_eos = "end of stream", Fail_msg_nde_stack_empty = "node stack empty"; String Fail_msg(String type, Keyval_list fail_args) { tmp_fail_bfr.Add_str_u8(type).Add_byte(Byte_ascii.Colon); int len = fail_args.Count(); @@ -121,5 +121,5 @@ class Gfs_err_mgr { } } } - private static final byte[] Esc_nl = Bry_.new_a7("\\n"), Esc_cr = Bry_.new_a7("\\r"), Esc_tab = Bry_.new_a7("\\t"); + private static final byte[] Esc_nl = Bry_.new_a7("\\n"), Esc_cr = Bry_.new_a7("\\r"), Esc_tab = Bry_.new_a7("\\t"); } diff --git a/400_xowa/src/gplx/langs/gfs/Gfs_parser_tst.java b/400_xowa/src/gplx/langs/gfs/Gfs_parser_tst.java index c7fc471a7..d20beac2f 100644 --- a/400_xowa/src/gplx/langs/gfs/Gfs_parser_tst.java +++ b/400_xowa/src/gplx/langs/gfs/Gfs_parser_tst.java @@ -190,5 +190,5 @@ class Gfs_parser_fxt { bfr.Add(val); bfr.Add_byte_nl(); } - private static final byte[] Atr_name = Bry_.new_a7("name="); + private static final byte[] Atr_name = Bry_.new_a7("name="); } diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_atr_.java b/400_xowa/src/gplx/langs/htmls/Gfh_atr_.java index b356e8b7b..7b666b9d7 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_atr_.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_atr_.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Gfh_atr_ { - public static final byte[] + public static final byte[] // "coreattrs" Bry__id = Bry_.new_a7("id") , Bry__class = Bry_.new_a7("class") diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_atr_itm.java b/400_xowa/src/gplx/langs/htmls/Gfh_atr_itm.java index 68530dac3..2cfe3344a 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_atr_itm.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_atr_itm.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.langs.htmls; import gplx.*; import gplx.langs.*; -public class Gfh_atr_itm { - public Gfh_atr_itm(byte[] key, byte[] val) { - this.key = key; - this.val = val; - } - public byte[] Key() {return key;} private final byte[] key; - public byte[] Val() {return val;} private final byte[] val; - public static Gfh_atr_itm New(byte[] key, String val) {return new Gfh_atr_itm(key, Bry_.new_u8(val));} - public static Gfh_atr_itm New(byte[] key, byte[] val) {return new Gfh_atr_itm(key, val);} -} +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; +public class Gfh_atr_itm { + public Gfh_atr_itm(byte[] key, byte[] val) { + this.key = key; + this.val = val; + } + public byte[] Key() {return key;} private final byte[] key; + public byte[] Val() {return val;} private final byte[] val; + public static Gfh_atr_itm New(byte[] key, String val) {return new Gfh_atr_itm(key, Bry_.new_u8(val));} + public static Gfh_atr_itm New(byte[] key, byte[] val) {return new Gfh_atr_itm(key, val);} +} diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_parser.java b/400_xowa/src/gplx/langs/htmls/Gfh_parser.java index 0176d409c..28fedb2f0 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_parser.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import gplx.core.brys.*; public class Gfh_parser { @@ -157,7 +157,7 @@ public class Gfh_parser { } return Scan_invalid; } - private static final byte Scan_invalid = 0, Scan_valid = 1, Scan_stop = 2; - public static final byte[] Wildcard = null; - public static final String Wildcard_str = null; + private static final byte Scan_invalid = 0, Scan_valid = 1, Scan_stop = 2; + public static final byte[] Wildcard = null; + public static final String Wildcard_str = null; } diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_tag_.java b/400_xowa/src/gplx/langs/htmls/Gfh_tag_.java index 81b8adb2e..a5c669d13 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_tag_.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_tag_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls; import gplx.*; import gplx.langs.*; public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr public static final int @@ -83,7 +83,7 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr , Id__form = 61 , Id__mark = 62 ; - public static final byte[] + public static final byte[] Bry__a = Bry_.new_a7("a") , Bry__ul = Bry_.new_a7("ul") , Bry__td = Bry_.new_a7("td") @@ -97,15 +97,15 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr , Bry__img = Bry_.new_a7("img") ; -// private static final Gfh_tag_meta[] Ary = new Gfh_tag_meta[Id__ary_max]; -// private static final Hash_adp_bry tags_by_bry = Hash_adp_bry.ci_a7(); +// private static final Gfh_tag_meta[] Ary = new Gfh_tag_meta[Id__ary_max]; +// private static final Hash_adp_bry tags_by_bry = Hash_adp_bry.ci_a7(); // public static Gfh_tag_meta New_tag(int id, String key_str) { // Gfh_tag_meta rv = new Gfh_tag_meta(id, key_str); // Ary[id] = rv; // tags_by_bry.Add_bry_int(rv.Key_bry(), id); // return rv; // } - public static final Hash_adp_bry Hash = Hash_adp_bry.ci_a7() + public static final Hash_adp_bry Hash = Hash_adp_bry.ci_a7() .Add_bry_int(Bry__a , Id__a) .Add_str_int("h1" , Id__h1) .Add_str_int("h2" , Id__h2) @@ -240,7 +240,7 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr default: throw Err_.new_unhandled(tid); } } - public static final byte[] + public static final byte[] Br_inl = Bry_.new_a7("
") , Br_lhs = Bry_.new_a7("
") , Hr_inl = Bry_.new_a7("
") @@ -275,14 +275,14 @@ public class Gfh_tag_ { // NOTE: not serialized; used by tag_rdr , Comm_end_str = "-->" , Anchor_str = "#" ; - public static final byte[] + public static final byte[] Comm_bgn = Bry_.new_a7(Comm_bgn_str), Comm_end = Bry_.new_a7(Comm_end_str) ; - public static final int + public static final int Comm_bgn_len = Comm_bgn.length , Comm_end_len = Comm_end.length ; - public static final byte[] Rhs_bgn = Bry_.new_a7(" diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_tag_meta.java b/400_xowa/src/gplx/langs/htmls/Gfh_tag_meta.java index dfca8810a..8d37ba177 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_tag_meta.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_tag_meta.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.langs.htmls; import gplx.*; import gplx.langs.*; -public class Gfh_tag_meta { - public Gfh_tag_meta(int id, String key_str) { - this.id = id; - this.key_str = key_str; - this.key_bry = Bry_.new_u8(key_str); - } - public int Id() {return id;} private final int id; - public String Key_str() {return key_str;} private final String key_str; - public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; +package gplx.langs.htmls; import gplx.*; import gplx.langs.*; +public class Gfh_tag_meta { + public Gfh_tag_meta(int id, String key_str) { + this.id = id; + this.key_str = key_str; + this.key_bry = Bry_.new_u8(key_str); + } + public int Id() {return id;} private final int id; + public String Key_str() {return key_str;} private final String key_str; + public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; } \ No newline at end of file diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_utl.java b/400_xowa/src/gplx/langs/htmls/Gfh_utl.java index 0311f6693..53bb440ed 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_utl.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_utl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; import gplx.langs.htmls.entitys.*; public class Gfh_utl {// TS:Gfo_url_encoder is TS - private static final Gfo_url_encoder encoder_id = Gfo_url_encoder_.Id; + private static final Gfo_url_encoder encoder_id = Gfo_url_encoder_.Id; public static String Encode_id_as_str(byte[] key) {return String_.new_u8(Encode_id_as_bry(key));} public static byte[] Encode_id_as_bry(byte[] key) { Bry_bfr tmp_bfr = Bry_bfr_.Get(); @@ -111,7 +111,7 @@ public class Gfh_utl {// TS:Gfo_url_encoder is TS else return dirty ? bfr.To_bry_and_clear() : bry; } - private static final Btrie_slim_mgr unescape_trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr unescape_trie = Btrie_slim_mgr.ci_a7() .Add_bry_byte(Gfh_entity_.Lt_bry , Byte_ascii.Lt) .Add_bry_byte(Gfh_entity_.Gt_bry , Byte_ascii.Gt) .Add_bry_byte(Gfh_entity_.Amp_bry , Byte_ascii.Amp) diff --git a/400_xowa/src/gplx/langs/htmls/Gfh_utl__comments__tst.java b/400_xowa/src/gplx/langs/htmls/Gfh_utl__comments__tst.java index 6a6241b58..a4bad887b 100644 --- a/400_xowa/src/gplx/langs/htmls/Gfh_utl__comments__tst.java +++ b/400_xowa/src/gplx/langs/htmls/Gfh_utl__comments__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.langs.htmls; import gplx.*; import gplx.langs.*; import org.junit.*; public class Gfh_utl__comments__tst { - @Before public void init() {fxt.Clear();} private final Gfh_class_fxt fxt = new Gfh_class_fxt(); + @Before public void init() {fxt.Clear();} private final Gfh_class_fxt fxt = new Gfh_class_fxt(); @Test public void Basic() {fxt.Test_del_comments("ac" , "ac");} @Test public void Bgn_missing() {fxt.Test_del_comments("a b c" , "a b c");} @Test public void End_missing() {fxt.Test_del_comments("a", "bot", Xoscript_doc_sect_base.Pos__default); tail_var.reg_marker("", "top", Xoscript_doc_sect_base.Pos__default); } - public Xoscript_page page() {return page_var;} private final Xoscript_page page_var; - public Xoscript_doc_head head() {return head_var;} private final Xoscript_doc_head head_var; - public Xoscript_doc_tail tail() {return tail_var;} private final Xoscript_doc_tail tail_var; + public Xoscript_page page() {return page_var;} private final Xoscript_page page_var; + public Xoscript_doc_head head() {return head_var;} private final Xoscript_doc_head head_var; + public Xoscript_doc_tail tail() {return tail_var;} private final Xoscript_doc_tail tail_var; public String html() { if (html_var == null) { html_var = bfr.To_str(); diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_head__tst.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_head__tst.java index ebb191093..163770124 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_head__tst.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_head__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; import org.junit.*; import gplx.core.tests.*; public class Xoscript_doc_head__tst { - private final Xoscript_doc_head__fxt fxt = new Xoscript_doc_head__fxt(); + private final Xoscript_doc_head__fxt fxt = new Xoscript_doc_head__fxt(); @Before public void init() { fxt.Init__sect("head"); fxt.Exec__reg_marker("", "top", Xoscript_doc_head.Pos__default); @@ -46,7 +46,7 @@ public class Xoscript_doc_head__tst { } } class Xoscript_doc_head__fxt { - private final Xoscript_page spg; + private final Xoscript_page spg; private Xoscript_doc_sect_base sect; public Xoscript_doc_head__fxt() { Bry_bfr rv = Bry_bfr_.New(); diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_sect_base.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_sect_base.java index 66a72085e..b2a896b7f 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_sect_base.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_doc_sect_base.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; public abstract class Xoscript_doc_sect_base { - protected final Xoscript_doc doc; - private final Hash_adp_bry marker_hash = Hash_adp_bry.cs(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + protected final Xoscript_doc doc; + private final Hash_adp_bry marker_hash = Hash_adp_bry.cs(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Xoscript_doc_sect_base(Xoscript_doc doc) {this.doc = doc;} private byte[] get_marker_by_pos(byte[] pos_bry) { return (byte[])marker_hash.Get_by_or_fail(pos_bry); diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_page.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_page.java index c16494fd8..a8f6e6e0d 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_page.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_page.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; -public class Xoscript_page { - public Xoscript_page(Bry_bfr rv, Xoscript_env env_var, Xoscript_url url_var) { - this.env_var = env_var; - this.url_var = url_var; - this.doc_var = new Xoscript_doc(rv, this); - } - public Xoscript_env env() {return env_var;} private final Xoscript_env env_var; - public Xoscript_url url() {return url_var;} private final Xoscript_url url_var; - public Xoscript_doc doc() {return doc_var;} private final Xoscript_doc doc_var; -} +package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; +public class Xoscript_page { + public Xoscript_page(Bry_bfr rv, Xoscript_env env_var, Xoscript_url url_var) { + this.env_var = env_var; + this.url_var = url_var; + this.doc_var = new Xoscript_doc(rv, this); + } + public Xoscript_env env() {return env_var;} private final Xoscript_env env_var; + public Xoscript_url url() {return url_var;} private final Xoscript_url url_var; + public Xoscript_doc doc() {return doc_var;} private final Xoscript_doc doc_var; +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_url.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_url.java index 430f47f32..604ef36f3 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_url.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/apis/Xoscript_url.java @@ -13,9 +13,9 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; -public class Xoscript_url { - public Xoscript_url(String wiki_name_var, String page_name_var) {this.wiki_name_var = wiki_name_var; this.page_name_var = page_name_var;} - public String wiki_name() {return wiki_name_var;} private final String wiki_name_var; - public String page_name() {return page_name_var;} private final String page_name_var; -} +package gplx.xowa.addons.apps.scripts.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; +public class Xoscript_url { + public Xoscript_url(String wiki_name_var, String page_name_var) {this.wiki_name_var = wiki_name_var; this.page_name_var = page_name_var;} + public String wiki_name() {return wiki_name_var;} private final String wiki_name_var; + public String page_name() {return page_name_var;} private final String page_name_var; +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_itm.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_itm.java index 8eee1b820..1e20e7ff0 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_itm.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_itm.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.scripts.xtns; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; -import gplx.core.scripts.*; -public class Xoscript_xtn_itm { - public Xoscript_xtn_itm(String key, Io_url url, Gfo_script_engine engine) { - this.key = key; - this.url = url; - this.engine = engine; - } - public String Key() {return key;} private final String key; - public Io_url Url() {return url;} private final Io_url url; - public Gfo_script_engine Engine() {return engine;} private final Gfo_script_engine engine; -} +package gplx.xowa.addons.apps.scripts.xtns; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; +import gplx.core.scripts.*; +public class Xoscript_xtn_itm { + public Xoscript_xtn_itm(String key, Io_url url, Gfo_script_engine engine) { + this.key = key; + this.url = url; + this.engine = engine; + } + public String Key() {return key;} private final String key; + public Io_url Url() {return url;} private final Io_url url; + public Gfo_script_engine Engine() {return engine;} private final Gfo_script_engine engine; +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_mgr.java b/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_mgr.java index b295f6a47..350b09146 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/apps/scripts/xtns/Xoscript_xtn_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.scripts.xtns; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.scripts.*; import gplx.core.scripts.*; import gplx.xowa.addons.apps.scripts.apis.*; public class Xoscript_xtn_mgr { private Xoscript_xtn_itm root_itm; - private final Io_url root_dir; - private final Ordered_hash hash = Ordered_hash_.New(); + private final Io_url root_dir; + private final Ordered_hash hash = Ordered_hash_.New(); public Xoscript_xtn_mgr(Io_url root_dir) { this.root_dir = root_dir; } diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_item.java b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_item.java index 1f5cbdedc..2a0da585a 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_item.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_item.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.updates.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; -public class Xoa_manifest_item { - public Xoa_manifest_item(Io_url src, Io_url trg) { - this.src = src; - this.trg = trg; - } - public Io_url Src() {return src;} private final Io_url src; - public Io_url Trg() {return trg;} private final Io_url trg; -} +package gplx.xowa.addons.apps.updates.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; +public class Xoa_manifest_item { + public Xoa_manifest_item(Io_url src, Io_url trg) { + this.src = src; + this.trg = trg; + } + public Io_url Src() {return src;} private final Io_url src; + public Io_url Trg() {return trg;} private final Io_url trg; +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_list.java b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_list.java index 1cfe9440c..871cd9a7b 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_list.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_list.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; public class Xoa_manifest_list { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public int Len() {return hash.Len();} public Xoa_manifest_item Get_at(int i) {return (Xoa_manifest_item)hash.Get_at(i);} public void Del_at(int i) { diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_view.java b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_view.java index fd3dd3c07..590e59ae0 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_view.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_view.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.core.envs.*; import java.awt.*; @@ -23,7 +23,7 @@ import java.net.*; import javax.swing.*; import javax.swing.border.Border; public class Xoa_manifest_view extends JFrame implements Gfo_invk { - private final Xoa_manifest_wkr wkr; + private final Xoa_manifest_wkr wkr; private String run_xowa_cmd; public Xoa_manifest_view(Io_url manifest_url) { super("XOWA Application Update"); @@ -92,7 +92,7 @@ public class Xoa_manifest_view extends JFrame implements Gfo_invk { } else return Gfo_invk_.Rv_unhandled; return this; - } private static final String Invk__run_xowa = "run_xowa"; + } private static final String Invk__run_xowa = "run_xowa"; public static void Run() { Io_url manifest_url = Env_.AppUrl().GenNewExt(".txt"); diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_wkr.java b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_wkr.java index 39665f6c7..58ee7a63d 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/apps/Xoa_manifest_wkr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.core.envs.*; class Xoa_manifest_wkr { - private final Xoa_manifest_view view; - private final Xoa_manifest_list list = new Xoa_manifest_list(); + private final Xoa_manifest_view view; + private final Xoa_manifest_list list = new Xoa_manifest_list(); private Io_url manifest_url; private String run_xowa_cmd; public Xoa_manifest_wkr(Xoa_manifest_view view) { diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_itm.java b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_itm.java index 6890246fc..ef5985362 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_itm.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; public class Xoa_app_version_itm { public Xoa_app_version_itm(int id, String name, String date, int priority, String url, String summary, String details) { @@ -24,13 +24,13 @@ public class Xoa_app_version_itm { this.summary = summary; this.details = details; } - public int Id() {return id;} private final int id; - public String Name() {return name;} private final String name; - public String Date() {return date;} private final String date; - public int Priority() {return priority;} private final int priority; - public String Url() {return url;} private final String url; - public String Summary() {return summary;} private final String summary; - public String Details() {return details;} private final String details; + public int Id() {return id;} private final int id; + public String Name() {return name;} private final String name; + public String Date() {return date;} private final String date; + public int Priority() {return priority;} private final int priority; + public String Url() {return url;} private final String url; + public String Summary() {return summary;} private final String summary; + public String Details() {return details;} private final String details; public String Package_url() { String folder = url; if (String_.Len_eq_0(folder)) diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_tbl.java b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_tbl.java index 9807887c8..072cf9dec 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_app_version_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.dbs.*; import gplx.dbs.utls.*; public class Xoa_app_version_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__version_id, fld__version_name, fld__version_date, fld__version_priority, fld__version_url, fld__version_summary, fld__version_details; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__version_id, fld__version_name, fld__version_date, fld__version_priority, fld__version_url, fld__version_summary, fld__version_details; + private final Db_conn conn; public Xoa_app_version_tbl(Db_conn conn) { this.conn = conn; this.fld__version_id = flds.Add_int_pkey("version_id"); @@ -30,7 +30,7 @@ public class Xoa_app_version_tbl implements Db_tbl { this.fld__version_details = flds.Add_text("version_details"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = TBL_NAME; + public String Tbl_name() {return tbl_name;} private final String tbl_name = TBL_NAME; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); } diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_update_db_mgr.java b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_update_db_mgr.java index 493b03490..27278a725 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_update_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/dbs/Xoa_update_db_mgr.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.updates.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; -import gplx.dbs.*; import gplx.dbs.utls.*; -public class Xoa_update_db_mgr { - public Xoa_update_db_mgr(Io_url url) { - this.url = url; - this.conn = Db_conn_bldr.Instance.Get_or_autocreate(true, url); - this.tbl__app_version = new Xoa_app_version_tbl(conn); - conn.Meta_tbl_assert(tbl__app_version); - } - public Io_url Url() {return url;} private final Io_url url; - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Xoa_app_version_tbl Tbl__app_version() {return tbl__app_version;} private final Xoa_app_version_tbl tbl__app_version; -} +package gplx.xowa.addons.apps.updates.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; +import gplx.dbs.*; import gplx.dbs.utls.*; +public class Xoa_update_db_mgr { + public Xoa_update_db_mgr(Io_url url) { + this.url = url; + this.conn = Db_conn_bldr.Instance.Get_or_autocreate(true, url); + this.tbl__app_version = new Xoa_app_version_tbl(conn); + conn.Meta_tbl_assert(tbl__app_version); + } + public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Xoa_app_version_tbl Tbl__app_version() {return tbl__app_version;} private final Xoa_app_version_tbl tbl__app_version; +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__base.java b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__base.java index 3ec750f5c..158b78f39 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__base.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__base.java @@ -30,12 +30,12 @@ import gplx.core.progs.rates.Gfo_rate_list; import gplx.xowa.guis.cbks.Xog_cbk_mgr; import gplx.xowa.guis.cbks.Xog_cbk_trg; public class Xojs_wkr__base implements Gfo_prog_ui, Gfo_invk { - private final Gfo_invk_cmd done_cbk; - private final Gfo_invk_cmd fail_cbk; - private final Gfo_rate_list rate_list = new Gfo_rate_list(32); - private final long notify_delay = 1000; - private final double delta_threshold = .25d; // allow variance of up to 25% before updating rate - private final String js_cbk, task_type; + private final Gfo_invk_cmd done_cbk; + private final Gfo_invk_cmd fail_cbk; + private final Gfo_rate_list rate_list = new Gfo_rate_list(32); + private final long notify_delay = 1000; + private final double delta_threshold = .25d; // allow variance of up to 25% before updating rate + private final String js_cbk, task_type; private long time_prv; private double rate_cur; public Xojs_wkr__base(Xog_cbk_mgr cbk_mgr, Xog_cbk_trg cbk_trg, String js_cbk, Gfo_invk_cmd done_cbk, Gfo_invk_cmd fail_cbk, String task_type) { @@ -64,8 +64,8 @@ public class Xojs_wkr__base implements Gfo_prog_ui, Gfo_invk { gplx.core.threads.Thread_adp_.Start_by_key(thread_name + ".download", this, Invk__exec); } - public Xog_cbk_mgr Cbk_mgr() {return cbk_mgr;} private final Xog_cbk_mgr cbk_mgr; - public Xog_cbk_trg Cbk_trg() {return cbk_trg;} private final Xog_cbk_trg cbk_trg; + public Xog_cbk_mgr Cbk_mgr() {return cbk_mgr;} private final Xog_cbk_mgr cbk_mgr; + public Xog_cbk_trg Cbk_trg() {return cbk_trg;} private final Xog_cbk_trg cbk_trg; public boolean Canceled() {return canceled;} private boolean canceled; public void Cancel() {this.canceled = true;} diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__download.java b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__download.java index 8d6f15da8..e6a10efaa 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__download.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__download.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.xowa.guis.cbks.*; import gplx.core.net.downloads.*; @@ -23,9 +23,9 @@ public class Xojs_wkr__download extends Xojs_wkr__base { this.trg = trg; this.Prog_data_end_(src_len); } - public String Src() {return src;} private final String src; - public Io_url Trg() {return trg;} private final Io_url trg; - public long Src_len() {return src_len;} private final long src_len; + public String Src() {return src;} private final String src; + public Io_url Trg() {return trg;} private final Io_url trg; + public long Src_len() {return src_len;} private final long src_len; @Override protected void Exec_run() { Http_download_wkr wkr = Http_download_wkr_.Proto.Make_new(); if (wkr.Exec(this, src, trg, src_len) != gplx.core.progs.Gfo_prog_ui_.Status__done) diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__replace.java b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__replace.java index 20db9f84e..c815f6c6b 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__replace.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__replace.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.xowa.guis.cbks.*; public class Xojs_wkr__replace extends Xojs_wkr__base { - private final Io_url src_dir, trg_dir; - private final Io_url[] src_fils; + private final Io_url src_dir, trg_dir; + private final Io_url[] src_fils; public Xojs_wkr__replace(Xog_cbk_mgr cbk_mgr, Xog_cbk_trg cbk_trg, String js_cbk, Gfo_invk_cmd done_cbk, Io_url src_dir, Io_url trg_dir) {super(cbk_mgr, cbk_trg, js_cbk, done_cbk, null, "replacing"); this.src_dir = src_dir; this.trg_dir = trg_dir; diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__unzip.java b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__unzip.java index 8c3a99b95..fa68a8eff 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__unzip.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/js/Xojs_wkr__unzip.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.xowa.guis.cbks.*; import gplx.core.ios.zips.*; @@ -21,8 +21,8 @@ public class Xojs_wkr__unzip extends Xojs_wkr__base { this.src = src; this.trg = trg; this.Prog_data_end_(prog_data_end); } - public Io_url Src() {return src;} private final Io_url src; - public Io_url Trg() {return trg;} private final Io_url trg; + public Io_url Src() {return src;} private final Io_url src; + public Io_url Trg() {return trg;} private final Io_url trg; @Override protected void Exec_run() { Io_zip_decompress_cmd decompress = Io_zip_decompress_cmd_.Proto.Make_new(); List_adp unzip_urls = List_adp_.New(); diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__leaf.java b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__leaf.java index ceed9a584..bd156a856 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__leaf.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__leaf.java @@ -17,8 +17,8 @@ package gplx.xowa.addons.apps.updates.specials; import gplx.*; import gplx.xowa. import gplx.langs.mustaches.*; import gplx.xowa.addons.apps.updates.dbs.*; class Xoa_update_itm__leaf implements Mustache_doc_itm { - private final String version, date, summary, details, package_url; - private final int priority; + private final String version, date, summary, details, package_url; + private final int priority; public Xoa_update_itm__leaf(String version, String date, int priority, String summary, String details, String package_url) { this.version = version; this.date = date; @@ -41,5 +41,5 @@ class Xoa_update_itm__leaf implements Mustache_doc_itm { return Mustache_doc_itm_.Ary__empty; } - protected static final Xoa_update_itm__leaf[] Ary__empty = new Xoa_update_itm__leaf[0]; + protected static final Xoa_update_itm__leaf[] Ary__empty = new Xoa_update_itm__leaf[0]; } diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__root.java b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__root.java index daac22fb4..3708e1606 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__root.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_itm__root.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.langs.mustaches.*; -class Xoa_update_itm__root extends Xoa_update_itm__leaf { private final String current_version, current_date, check_date; - private final boolean web_access_enabled; +class Xoa_update_itm__root extends Xoa_update_itm__leaf { private final String current_version, current_date, check_date; + private final boolean web_access_enabled; private Xoa_update_itm__leaf[] itms = Xoa_update_itm__leaf.Ary__empty; public Xoa_update_itm__root ( String current_version, String current_date, String check_date, boolean web_access_enabled diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_special.java b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_special.java index ae562a2f8..30f0dbf51 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_special.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/Xoa_update_special.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.apps.updates.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; -import gplx.xowa.specials.*; import gplx.core.net.qargs.*; -public class Xoa_update_special implements Xow_special_page { - public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { - new Xoa_update_html().Bld_page_by_mustache(wiki.App(), page, this); - } - Xoa_update_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; - public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xoa_update_special(Xow_special_meta.New_xo("XowaAppUpdate", "App Update")); -} +package gplx.xowa.addons.apps.updates.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; +import gplx.xowa.specials.*; import gplx.core.net.qargs.*; +public class Xoa_update_special implements Xow_special_page { + public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { + new Xoa_update_html().Bld_page_by_mustache(wiki.App(), page, this); + } + Xoa_update_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_page Special__clone() {return this;} + public static final Xow_special_page Prototype = new Xoa_update_special(Xow_special_meta.New_xo("XowaAppUpdate", "App Update")); +} diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_bridge.java b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_bridge.java index 8ba83e313..b5ab35bbd 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.specials.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.xowa.addons.apps.updates.specials.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; public class Xoa_update_bridge implements Bridge_cmd_itm { @@ -34,11 +34,11 @@ public class Xoa_update_bridge implements Bridge_cmd_itm { } private static final byte Proc__install = 0, Proc__skip = 1; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("install" , Proc__install) .Add_str_byte("skip" , Proc__skip) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("app.updater"); - public static final Xoa_update_bridge Prototype = new Xoa_update_bridge(); Xoa_update_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("app.updater"); + public static final Xoa_update_bridge Prototype = new Xoa_update_bridge(); Xoa_update_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_svc__tst.java b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_svc__tst.java index 13c6bd646..ae7e30206 100644 --- a/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_svc__tst.java +++ b/400_xowa/src/gplx/xowa/addons/apps/updates/specials/svcs/Xoa_update_svc__tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.apps.updates.specials.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.updates.*; import gplx.xowa.addons.apps.updates.specials.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*; public class Xoa_update_svc__tst { - private final Xoa_update_svc__fxt fxt = new Xoa_update_svc__fxt(); + private final Xoa_update_svc__fxt fxt = new Xoa_update_svc__fxt(); @Test public void Restart_cmd() { Io_url jar_fil = Io_url_.new_dir_("/home/gnosygnu/xowa/xowa.jar"); fxt.Test__restart_cmd("manual" , jar_fil, Op_sys.Tid_lnx, Op_sys.Bitness_64, "manual"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/app_cfgs/wm_server_cfgs/Xowm_server_cfg_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/app_cfgs/wm_server_cfgs/Xowm_server_cfg_cmd.java index fcc7ede5b..1eb50d901 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/app_cfgs/wm_server_cfgs/Xowm_server_cfg_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/app_cfgs/wm_server_cfgs/Xowm_server_cfg_cmd.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.app_cfgs.wm_server_cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.app_cfgs.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xowm_server_cfg_cmd extends Xob_cmd__base { - public Xowm_server_cfg_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - new Xowm_server_cfg_mgr().Exec(bldr.App()); - } - - public static final String BLDR_CMD_KEY = "cfg.wikis.wm_server_cfg"; - @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xowm_server_cfg_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xowm_server_cfg_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.app_cfgs.wm_server_cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.app_cfgs.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xowm_server_cfg_cmd extends Xob_cmd__base { + public Xowm_server_cfg_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + new Xowm_server_cfg_mgr().Exec(bldr.App()); + } + + public static final String BLDR_CMD_KEY = "cfg.wikis.wm_server_cfg"; + @Override public String Cmd_key() {return BLDR_CMD_KEY;} + public static final Xob_cmd Prototype = new Xowm_server_cfg_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xowm_server_cfg_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_addon.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_addon.java index e78c5ccbd..78252aa99 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_addon.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_addon.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.specials.*; import gplx.xowa.htmls.bridges.*; import gplx.xowa.addons.bldrs.infos.*; import gplx.xowa.addons.bldrs.xodirs.*; @@ -35,5 +35,5 @@ public class Xobc_task_addon implements Xoax_addon_itm, Xoax_addon_itm__special, }; } - public String Addon__key() {return ADDON__KEY;} public static final String ADDON__KEY = "xowa.imports.downloads"; + public String Addon__key() {return ADDON__KEY;} public static final String ADDON__KEY = "xowa.imports.downloads"; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_bridge.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_bridge.java index 62e178377..873189f94 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; @@ -44,7 +44,7 @@ public class Xobc_task_bridge implements Bridge_cmd_itm { , Proc__run_next = 4, Proc__stop_cur = 5, Proc__redo_cur = 6, Proc__download_db = 7, Proc__filter_todo = 8 , Proc__del_todo = 9 ; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("reload" , Proc__reload) .Add_str_byte("add_work" , Proc__add_work) .Add_str_byte("del_work" , Proc__del_work) @@ -57,6 +57,6 @@ public class Xobc_task_bridge implements Bridge_cmd_itm { .Add_str_byte("del_todo" , Proc__del_todo) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("builder_central.exec"); - public static final Xobc_task_bridge Prototype = new Xobc_task_bridge(); Xobc_task_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("builder_central.exec"); + public static final Xobc_task_bridge Prototype = new Xobc_task_bridge(); Xobc_task_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_doc.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_doc.java index 58236db62..fad7dd192 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_doc.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_doc.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.langs.mustaches.*; class Xobc_task_doc implements Mustache_doc_itm { - private final boolean app_is_drd; - private final String link_help; + private final boolean app_is_drd; + private final String link_help; public Xobc_task_doc(boolean app_is_drd, String link_help) { this.app_is_drd = app_is_drd; this.link_help = link_help; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_mgr.java index 5a97542f2..cd6fdf40e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.core.brys.evals.*; import gplx.core.gfobjs.*; import gplx.core.progs.rates.*; import gplx.core.threads.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; import gplx.xowa.addons.bldrs.centrals.steps.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.xowa.addons.bldrs.centrals.mgrs.*; import gplx.xowa.guis.cbks.*; public class Xobc_task_mgr implements Xog_json_wkr { - private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(Xobc_task_special.Prototype.Special__meta().Ttl_bry()); + private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(Xobc_task_special.Prototype.Special__meta().Ttl_bry()); public Xobc_task_mgr(Xoa_app app, Io_url data_db_url) { this.app = app; this.cbk_mgr = app.Gui__cbk_mgr(); @@ -32,19 +32,19 @@ public class Xobc_task_mgr implements Xog_json_wkr { this.ary = new Xobc_task_regy__base[] {work_mgr, todo_mgr, done_mgr}; this.rate_mgr = Xobc_cmd__base.New_rate_mgr(); } - public Xoa_app App() {return app;} private final Xoa_app app; - public Xog_cbk_mgr Cbk_mgr() {return cbk_mgr;} private final Xog_cbk_mgr cbk_mgr; - public Xobc_task_regy__work Work_mgr() {return work_mgr;} private final Xobc_task_regy__work work_mgr; - public Xobc_task_regy__todo Todo_mgr() {return todo_mgr;} private final Xobc_task_regy__todo todo_mgr; - public Xobc_task_regy__done Done_mgr() {return done_mgr;} private final Xobc_task_regy__done done_mgr; - public Xobc_task_regy__base Get_at(int i) {return ary[i];} private final Xobc_task_regy__base[] ary; - public Xobc_data_db Data_db() {return data_db;} private final Xobc_data_db data_db; - public Xobc_user_db User_db() {return user_db;} private final Xobc_user_db user_db; - public Gfo_rate_mgr Rate_mgr() {return rate_mgr;} private final Gfo_rate_mgr rate_mgr; - public Xobc_step_factory Step_mgr() {return step_mgr;} private final Xobc_step_factory step_mgr; - public Xobc_filter_mgr Filter_mgr() {return filter_mgr;} private final Xobc_filter_mgr filter_mgr = new Xobc_filter_mgr(); - public Xobc_skip_mgr Skip_mgr() {return skip_mgr;} private final Xobc_skip_mgr skip_mgr; - public Xobc_lang_mgr Lang_mgr() {return lang_mgr;} private final Xobc_lang_mgr lang_mgr = new Xobc_lang_mgr(); + public Xoa_app App() {return app;} private final Xoa_app app; + public Xog_cbk_mgr Cbk_mgr() {return cbk_mgr;} private final Xog_cbk_mgr cbk_mgr; + public Xobc_task_regy__work Work_mgr() {return work_mgr;} private final Xobc_task_regy__work work_mgr; + public Xobc_task_regy__todo Todo_mgr() {return todo_mgr;} private final Xobc_task_regy__todo todo_mgr; + public Xobc_task_regy__done Done_mgr() {return done_mgr;} private final Xobc_task_regy__done done_mgr; + public Xobc_task_regy__base Get_at(int i) {return ary[i];} private final Xobc_task_regy__base[] ary; + public Xobc_data_db Data_db() {return data_db;} private final Xobc_data_db data_db; + public Xobc_user_db User_db() {return user_db;} private final Xobc_user_db user_db; + public Gfo_rate_mgr Rate_mgr() {return rate_mgr;} private final Gfo_rate_mgr rate_mgr; + public Xobc_step_factory Step_mgr() {return step_mgr;} private final Xobc_step_factory step_mgr; + public Xobc_filter_mgr Filter_mgr() {return filter_mgr;} private final Xobc_filter_mgr filter_mgr = new Xobc_filter_mgr(); + public Xobc_skip_mgr Skip_mgr() {return skip_mgr;} private final Xobc_skip_mgr skip_mgr; + public Xobc_lang_mgr Lang_mgr() {return lang_mgr;} private final Xobc_lang_mgr lang_mgr = new Xobc_lang_mgr(); public void Send_json(String func, Gfobj_nde data) {cbk_mgr.Send_json(cbk_trg, func, data);} public Xobc_task_mgr Load_or_init() { Gfo_log_.Instance.Info("task_mgr.load_or_init.bgn"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_special.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_special.java index 6400a37ac..8ce1f4d75 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_special.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/Xobc_task_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; public class Xobc_task_special implements Xow_special_page { @@ -38,7 +38,7 @@ public class Xobc_task_special implements Xow_special_page { } Xobc_task_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xobc_task_special(Xow_special_meta.New_xo("XowaDownloadCentral", "Download Central")); + public static final Xow_special_page Prototype = new Xobc_task_special(Xow_special_meta.New_xo("XowaDownloadCentral", "Download Central")); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__base.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__base.java index 713ddfe98..251f24680 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__base.java @@ -17,9 +17,9 @@ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.core.gfobjs.*; import gplx.core.progs.*; import gplx.core.progs.rates.*; import gplx.xowa.apps.apis.*; public abstract class Xobc_cmd__base implements Xobc_cmd_itm { - private final Xobc_task_mgr task_mgr; - private final Gfo_rate_list rate_list; private final long notify_delay = 1000; - private final double delta_threshold = .25d; // allow variance of up to 25% before updating rate + private final Xobc_task_mgr task_mgr; + private final Gfo_rate_list rate_list; private final long notify_delay = 1000; + private final double delta_threshold = .25d; // allow variance of up to 25% before updating rate private long time_prv; private double rate_cur; private boolean log_verbose; @@ -35,13 +35,13 @@ public abstract class Xobc_cmd__base implements Xobc_cmd_itm { public boolean Canceled() {return status == Gfo_prog_ui_.Status__suspended;} public void Cancel() {status = Gfo_prog_ui_.Status__suspended;} - public int Task_id() {return task_id;} private final int task_id; - public int Step_id() {return step_id;} private final int step_id; - public int Cmd_id() {return cmd_id;} private final int cmd_id; + public int Task_id() {return task_id;} private final int task_id; + public int Step_id() {return step_id;} private final int step_id; + public int Cmd_id() {return cmd_id;} private final int cmd_id; public abstract String Cmd_type(); public abstract String Cmd_name(); public boolean Cmd_suspendable() {return false;} - public String Cmd_uid() {return cmd_uid;} private final String cmd_uid; + public String Cmd_uid() {return cmd_uid;} private final String cmd_uid; public String Cmd_fallback() {return this.Cmd_type();} public void Cmd_clear() {// called when restarting failed task this.status = Gfo_prog_ui_.Status__init; @@ -143,7 +143,7 @@ public abstract class Xobc_cmd__base implements Xobc_cmd_itm { else return Gfo_invk_.Rv_unhandled; return this; } - public static final String Invk__exec = "exec"; + public static final String Invk__exec = "exec"; public static final int Seqn__0 = 0; public static Gfo_rate_mgr New_rate_mgr() { Gfo_rate_mgr rv = new Gfo_rate_mgr(128); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__download.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__download.java index 8d38f97f5..69d5a221b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__download.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__download.java @@ -1,32 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.progs.*; import gplx.core.net.downloads.*; public class Xobc_cmd__download extends Xobc_cmd__base { - private final Xobc_task_mgr task_mgr; - private final String src_url; private final Io_url trg_url; - private final long expd_size; - private final Http_download_wkr wkr; + private final Xobc_task_mgr task_mgr; + private final String src_url; private final Io_url trg_url; + private final long expd_size; + private final Http_download_wkr wkr; public Xobc_cmd__download(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_id, String src_url, Io_url trg_url, long file_size_zip) {super(task_mgr, task_id, step_id, cmd_id); this.task_mgr = task_mgr; this.src_url = src_url; this.trg_url = trg_url; this.expd_size = file_size_zip; this.wkr = Http_download_wkr_.Proto.Make_new(); this.Prog_data_end_(expd_size); } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.download"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.download"; @Override public String Cmd_name() {return "download";} @Override public boolean Cmd_suspendable() {return true;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__fsdb_delete.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__fsdb_delete.java index 631acae74..667024ff2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__fsdb_delete.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__fsdb_delete.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.updates.files.*; public class Xobc_cmd__fsdb_delete extends Xobc_cmd__base { - private final Io_url deletion_db_url; + private final Io_url deletion_db_url; public Xobc_cmd__fsdb_delete(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_idx, Io_url deletion_db_url) {super(task_mgr, task_id, step_id, cmd_idx); this.deletion_db_url = deletion_db_url; } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.fsdb.delete"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.fsdb.delete"; @Override public String Cmd_name() {return "deleting old files";} @Override public boolean Cmd_suspendable() {return true;} @Override protected void Cmd_exec_hook(Xobc_cmd_ctx ctx) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__move_fils.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__move_fils.java index 500e9456a..62a322598 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__move_fils.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__move_fils.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; public class Xobc_cmd__move_fils extends Xobc_cmd__base { - private final Io_url src_dir, trg_dir; - private final List_adp trg_fils = List_adp_.New(); + private final Io_url src_dir, trg_dir; + private final List_adp trg_fils = List_adp_.New(); public Xobc_cmd__move_fils(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_idx, Io_url src_dir, Io_url trg_dir) {super(task_mgr, task_id, step_id, cmd_idx); this.src_dir = src_dir; this.trg_dir = trg_dir; } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.move_fil"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.move_fil"; @Override public String Cmd_name() {return "move";} @Override protected void Cmd_exec_hook(Xobc_cmd_ctx ctx) { Io_url[] src_fils = Io_mgr.Instance.QueryDir_fils(src_dir); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__unzip.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__unzip.java index 70f3b9727..66f4af974 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__unzip.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__unzip.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.ios.zips.*; import gplx.core.progs.*; public class Xobc_cmd__unzip extends Xobc_cmd__base { - private final Io_url src_fil, trg_dir; - private final Io_zip_decompress_cmd wkr; - private final List_adp trg_fils = List_adp_.New(); + private final Io_url src_fil, trg_dir; + private final Io_zip_decompress_cmd wkr; + private final List_adp trg_fils = List_adp_.New(); public Xobc_cmd__unzip(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_id, Io_url src_fil, Io_url trg_dir, long prog_data_end) {super(task_mgr, task_id, step_id, cmd_id); this.src_fil = src_fil; this.trg_dir = trg_dir; this.Prog_data_end_(prog_data_end); this.wkr = Io_zip_decompress_cmd_.Proto.Make_new(); } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.ios.zips.zip_unzip"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.ios.zips.zip_unzip"; @Override public String Cmd_name() {return "unzip";} @Override public boolean Cmd_suspendable() {return true;} @Override public String Cmd_fallback() {return Xobc_cmd__verify_fil.CMD_TYPE;} // if unzip fails, backtrack to verify; if verify fails, it'll backtrack to download; DATE:2016-07-25 diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_dir.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_dir.java index 5e1e44d39..a665d931c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_dir.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_dir.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.progs.*; import gplx.core.security.algos.*; import gplx.core.security.files.*; public class Xobc_cmd__verify_dir extends Xobc_cmd__base { - private final Io_url delete_fil, checksum_fil; + private final Io_url delete_fil, checksum_fil; public Xobc_cmd__verify_dir(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_idx, Io_url checksum_fil, Io_url delete_fil) {super(task_mgr, task_id, step_id, cmd_idx); this.checksum_fil = checksum_fil; this.delete_fil = delete_fil; } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.hash_dir"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.hash_dir"; @Override public String Cmd_name() {return "verify";} @Override public String Cmd_fallback() {return Xobc_cmd__unzip.CMD_TYPE;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_fil.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_fil.java index a0ae06b27..c9c15cb24 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_fil.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__verify_fil.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.progs.*; import gplx.core.security.algos.*; public class Xobc_cmd__verify_fil extends Xobc_cmd__base { - private final Io_url src_url; private final byte[] expd_hash; + private final Io_url src_url; private final byte[] expd_hash; public Xobc_cmd__verify_fil(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_id, Io_url src_url, String expd_hash_str, long prog_data_end) {super(task_mgr, task_id, step_id, cmd_id); this.src_url = src_url; this.expd_hash = Bry_.new_a7(expd_hash_str); this.Prog_data_end_(prog_data_end); } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.hash_fil"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.core.hash_fil"; @Override public String Cmd_name() {return "verify";} @Override public String Cmd_fallback() {return Xobc_cmd__download.CMD_TYPE;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_merge.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_merge.java index 1e93918b9..8848480bc 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_merge.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_merge.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; import gplx.xowa.addons.bldrs.exports.merges.*; public class Xobc_cmd__wiki_merge extends Xobc_cmd__base { - private final String wiki_domain; - private final Io_url src_dir; - private final Merge2_mgr merge_mgr; - private final Merge_prog_wkr prog_wkr; - private final int idx_cur; + private final String wiki_domain; + private final Io_url src_dir; + private final Merge2_mgr merge_mgr; + private final Merge_prog_wkr prog_wkr; + private final int idx_cur; public Xobc_cmd__wiki_merge(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_idx, Merge2_mgr merge_mgr, String wiki_domain, Io_url src_dir , long prog_size_end, int prog_count_end, int idx_cur) {super(task_mgr, task_id, step_id, cmd_idx); this.merge_mgr = merge_mgr; @@ -33,7 +33,7 @@ public class Xobc_cmd__wiki_merge extends Xobc_cmd__base { this.Prog_data_end_(prog_count_end); this.idx_cur = idx_cur; } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.wiki.merge"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.wiki.merge"; @Override public String Cmd_name() {return "merge";} @Override public boolean Cmd_suspendable() {return true;} @Override protected void Cmd_exec_hook(Xobc_cmd_ctx ctx) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_reg.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_reg.java index ef9c725ad..3646ad748 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_reg.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd__wiki_reg.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.security.*; import gplx.xowa.wikis.*; public class Xobc_cmd__wiki_reg extends Xobc_cmd__base { - private final Io_url wiki_dir; - private final String wiki_domain; + private final Io_url wiki_dir; + private final String wiki_domain; public Xobc_cmd__wiki_reg(Xobc_task_mgr task_mgr, int task_id, int step_id, int cmd_idx, Io_url wiki_dir, String wiki_domain) {super(task_mgr, task_id, step_id, cmd_idx); this.wiki_dir = wiki_dir; this.wiki_domain = wiki_domain; } - @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.wiki.reg"; + @Override public String Cmd_type() {return CMD_TYPE;} public static final String CMD_TYPE = "xowa.wiki.reg"; @Override public String Cmd_name() {return "import";} @Override protected void Cmd_exec_hook(Xobc_cmd_ctx ctx) { ctx.App().User().User_db_mgr().Init_site_mgr(); // must init for wiki.register cmd diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd_ctx.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd_ctx.java index 597846fc0..2d1933f74 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd_ctx.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/cmds/Xobc_cmd_ctx.java @@ -13,8 +13,8 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; -public class Xobc_cmd_ctx { - public Xobc_cmd_ctx(Xoa_app app) {this.app = app;} - public Xoa_app App() {return app;} private final Xoa_app app; -} +package gplx.xowa.addons.bldrs.centrals.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; +public class Xobc_cmd_ctx { + public Xobc_cmd_ctx(Xoa_app app) {this.app = app;} + public Xoa_app App() {return app;} private final Xoa_app app; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_data_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_data_db.java index 52a1dad11..8075c9984 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_data_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_data_db.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.imports.*; @@ -29,15 +29,15 @@ public class Xobc_data_db { this.tbl__lang_regy = new Xobc_lang_regy_tbl(conn); conn.Meta_tbl_assert(tbl__task_regy, tbl__step_regy, tbl__step_map, tbl__import_step, tbl__host_regy, tbl__version_regy, tbl__lang_regy); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Io_url Url() {return url;} private final Io_url url; - public Xobc_task_regy_tbl Tbl__task_regy() {return tbl__task_regy;} private final Xobc_task_regy_tbl tbl__task_regy; - public Xobc_step_regy_tbl Tbl__step_regy() {return tbl__step_regy;} private final Xobc_step_regy_tbl tbl__step_regy; - public Xobc_step_map_tbl Tbl__step_map() {return tbl__step_map;} private final Xobc_step_map_tbl tbl__step_map; - public Xobc_import_step_tbl Tbl__import_step() {return tbl__import_step;} private final Xobc_import_step_tbl tbl__import_step; - public Xobc_host_regy_tbl Tbl__host_regy() {return tbl__host_regy;} private final Xobc_host_regy_tbl tbl__host_regy; - public Xobc_version_regy_tbl Tbl__version_regy() {return tbl__version_regy;} private final Xobc_version_regy_tbl tbl__version_regy; - public Xobc_lang_regy_tbl Tbl__lang_regy() {return tbl__lang_regy;} private final Xobc_lang_regy_tbl tbl__lang_regy; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Io_url Url() {return url;} private final Io_url url; + public Xobc_task_regy_tbl Tbl__task_regy() {return tbl__task_regy;} private final Xobc_task_regy_tbl tbl__task_regy; + public Xobc_step_regy_tbl Tbl__step_regy() {return tbl__step_regy;} private final Xobc_step_regy_tbl tbl__step_regy; + public Xobc_step_map_tbl Tbl__step_map() {return tbl__step_map;} private final Xobc_step_map_tbl tbl__step_map; + public Xobc_import_step_tbl Tbl__import_step() {return tbl__import_step;} private final Xobc_import_step_tbl tbl__import_step; + public Xobc_host_regy_tbl Tbl__host_regy() {return tbl__host_regy;} private final Xobc_host_regy_tbl tbl__host_regy; + public Xobc_version_regy_tbl Tbl__version_regy() {return tbl__version_regy;} private final Xobc_version_regy_tbl tbl__version_regy; + public Xobc_lang_regy_tbl Tbl__lang_regy() {return tbl__lang_regy;} private final Xobc_lang_regy_tbl tbl__lang_regy; public void Delete_by_import(byte[] wiki_abrv, String wiki_date) { // get all step ids from import_regy diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_task_step_hash.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_task_step_hash.java index 0d5d7d744..04f8ac425 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_task_step_hash.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_task_step_hash.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; -public class Xobc_task_step_hash { - private final Ordered_hash tasks_hash = Ordered_hash_.New(); - private final Ordered_hash steps_hash = Ordered_hash_.New(); - public int Tasks__len() {return tasks_hash.Len();} - public int Tasks__get_at(int i) {return Int_.Cast(tasks_hash.Get_at(i));} - public int Steps__len() {return steps_hash.Len();} - public int Steps__get_at(int i) {return Int_.Cast(steps_hash.Get_at(i));} - public void Clear() {tasks_hash.Clear(); steps_hash.Clear();} - public void Add(int task_id, int step_id) { - tasks_hash.Add_if_dupe_use_nth(task_id, task_id); - steps_hash.Add_if_dupe_use_nth(step_id, step_id); - } -} +package gplx.xowa.addons.bldrs.centrals.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; +public class Xobc_task_step_hash { + private final Ordered_hash tasks_hash = Ordered_hash_.New(); + private final Ordered_hash steps_hash = Ordered_hash_.New(); + public int Tasks__len() {return tasks_hash.Len();} + public int Tasks__get_at(int i) {return Int_.Cast(tasks_hash.Get_at(i));} + public int Steps__len() {return steps_hash.Len();} + public int Steps__get_at(int i) {return Int_.Cast(steps_hash.Get_at(i));} + public void Clear() {tasks_hash.Clear(); steps_hash.Clear();} + public void Add(int task_id, int step_id) { + tasks_hash.Add_if_dupe_use_nth(task_id, task_id); + steps_hash.Add_if_dupe_use_nth(step_id, step_id); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_user_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_user_db.java index c7a664cc5..a7a63e71c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_user_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/Xobc_user_db.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; -import gplx.dbs.*; -import gplx.xowa.addons.bldrs.centrals.dbs.users.*; -public class Xobc_user_db { - public Xobc_user_db(Db_conn conn) { - this.work_task_tbl = new Xobc_work_task_tbl(conn); - this.done_task_tbl = new Xobc_done_task_tbl(conn); - this.done_step_tbl = new Xobc_done_step_tbl(conn); - conn.Meta_tbl_assert(work_task_tbl, done_task_tbl, done_step_tbl); - } - public Xobc_work_task_tbl Work_task_tbl() {return work_task_tbl;} private final Xobc_work_task_tbl work_task_tbl; - public Xobc_done_task_tbl Done_task_tbl() {return done_task_tbl;} private final Xobc_done_task_tbl done_task_tbl; - public Xobc_done_step_tbl Done_step_tbl() {return done_step_tbl;} private final Xobc_done_step_tbl done_step_tbl; -} +package gplx.xowa.addons.bldrs.centrals.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; +import gplx.dbs.*; +import gplx.xowa.addons.bldrs.centrals.dbs.users.*; +public class Xobc_user_db { + public Xobc_user_db(Db_conn conn) { + this.work_task_tbl = new Xobc_work_task_tbl(conn); + this.done_task_tbl = new Xobc_done_task_tbl(conn); + this.done_step_tbl = new Xobc_done_step_tbl(conn); + conn.Meta_tbl_assert(work_task_tbl, done_task_tbl, done_step_tbl); + } + public Xobc_work_task_tbl Work_task_tbl() {return work_task_tbl;} private final Xobc_work_task_tbl work_task_tbl; + public Xobc_done_task_tbl Done_task_tbl() {return done_task_tbl;} private final Xobc_done_task_tbl done_task_tbl; + public Xobc_done_step_tbl Done_step_tbl() {return done_step_tbl;} private final Xobc_done_step_tbl done_step_tbl; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_itm.java index fd30b94d9..739221748 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_itm.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; -public class Xobc_host_regy_itm { - public Xobc_host_regy_itm(int host_id, String host_domain, String host_data_dir, String host_update_dir) { - this.host_id = host_id; - this.host_domain = host_domain; - this.host_data_dir = host_data_dir; - this.host_update_dir = host_update_dir; - } - public int Host_id() {return host_id;} private final int host_id; - public String Host_domain() {return host_domain;} private final String host_domain; - public String Host_data_dir() {return host_data_dir;} private final String host_data_dir; - public String Host_update_dir() {return host_update_dir;} private final String host_update_dir; -} +package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; +public class Xobc_host_regy_itm { + public Xobc_host_regy_itm(int host_id, String host_domain, String host_data_dir, String host_update_dir) { + this.host_id = host_id; + this.host_domain = host_domain; + this.host_data_dir = host_data_dir; + this.host_update_dir = host_update_dir; + } + public int Host_id() {return host_id;} private final int host_id; + public String Host_domain() {return host_domain;} private final String host_domain; + public String Host_data_dir() {return host_data_dir;} private final String host_data_dir; + public String Host_update_dir() {return host_update_dir;} private final String host_update_dir; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_tbl.java index 690dc2e51..a69babd0d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_host_regy_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; public class Xobc_host_regy_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_host_id, fld_host_domain, fld_host_data_dir, fld_host_update_dir; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_host_id, fld_host_domain, fld_host_data_dir, fld_host_update_dir; + private final Db_conn conn; public Xobc_host_regy_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "host_regy"; @@ -28,7 +28,7 @@ public class Xobc_host_regy_tbl implements Db_tbl { this.fld_host_update_dir = flds.Add_str("host_update_dir", 255); // EX: download/Xowa_app_support conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); conn.Stmt_insert(tbl_name, flds) diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_itm.java index 866e1d64e..4d9db889d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_itm.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; -public class Xobc_lang_regy_itm { - public Xobc_lang_regy_itm(int id, String key, String name) { - this.id = id; - this.key = key; - this.name = name; - } - public int Id() {return id;} private final int id; - public String Key() {return key;} private final String key; - public String Name() {return name;} private final String name; -} +package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; +public class Xobc_lang_regy_itm { + public Xobc_lang_regy_itm(int id, String key, String name) { + this.id = id; + this.key = key; + this.name = name; + } + public int Id() {return id;} private final int id; + public String Key() {return key;} private final String key; + public String Name() {return name;} private final String name; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_tbl.java index efe9dd5b3..fef2b1900 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_lang_regy_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; public class Xobc_lang_regy_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__lang_id, fld__lang_key, fld__lang_name; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__lang_id, fld__lang_key, fld__lang_name; + private final Db_conn conn; public Xobc_lang_regy_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "lang_regy"; @@ -27,7 +27,7 @@ public class Xobc_lang_regy_tbl implements Db_tbl { this.fld__lang_name = flds.Add_str("lang_name", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public Xobc_lang_regy_itm[] Select_all() { List_adp list = List_adp_.New(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_itm.java index 33ca5fd19..1a8756524 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_itm.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; -public class Xobc_step_map_itm { - public Xobc_step_map_itm(int sm_id, int task_id, int step_id, int step_seqn) { - this.Sm_id = sm_id; - this.Task_id = task_id; - this.Step_id = step_id; - this.Step_seqn = step_seqn; - } - public final int Sm_id; - public final int Task_id; - public final int Step_id; - public final int Step_seqn; -} +package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; +public class Xobc_step_map_itm { + public Xobc_step_map_itm(int sm_id, int task_id, int step_id, int step_seqn) { + this.Sm_id = sm_id; + this.Task_id = task_id; + this.Step_id = step_id; + this.Step_seqn = step_seqn; + } + public final int Sm_id; + public final int Task_id; + public final int Step_id; + public final int Step_seqn; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_tbl.java index cb194a648..b726d04ac 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_map_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; public class Xobc_step_map_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_sm_id, fld_step_seqn, fld_task_id, fld_step_id; - private final Db_conn conn; private Db_stmt insert_stmt; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_sm_id, fld_step_seqn, fld_task_id, fld_step_id; + private final Db_conn conn; private Db_stmt insert_stmt; public Xobc_step_map_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "step_map"; @@ -28,7 +28,7 @@ public class Xobc_step_map_tbl implements Db_tbl { this.fld_step_seqn = flds.Add_int("step_seqn"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public int Select_step_id(int task_id, int step_seqn) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, fld_task_id, fld_step_seqn).Crt_int(fld_task_id, task_id).Crt_int(fld_step_seqn, step_seqn).Exec_select__rls_auto(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_regy_tbl.java index 87885b321..2191591ec 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_step_regy_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; public class Xobc_step_regy_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_step_id, fld_step_type; - private final Db_conn conn; private Db_stmt insert_stmt; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_step_id, fld_step_type; + private final Db_conn conn; private Db_stmt insert_stmt; public Xobc_step_regy_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "step_regy"; @@ -27,7 +27,7 @@ public class Xobc_step_regy_tbl implements Db_tbl { this.fld_step_type = flds.Add_int("step_type"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public int Select_type(int step_id) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, fld_step_id).Crt_int(fld_step_id, step_id).Exec_select__rls_auto(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_itm.java index f0a7e4a43..5926a3685 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; public class Xobc_task_regy_itm { public Xobc_task_regy_itm(int id, int seqn, byte[] key, byte[] name, int step_count) { @@ -22,11 +22,11 @@ public class Xobc_task_regy_itm { this.name = name; this.step_count = step_count; } - public int Id() {return id;} private final int id; - public int Seqn() {return seqn;} private final int seqn; - public byte[] Key() {return key;} private final byte[] key; - public byte[] Name() {return name;} private final byte[] name; - public int Step_count() {return step_count;} private final int step_count; + public int Id() {return id;} private final int id; + public int Seqn() {return seqn;} private final int seqn; + public byte[] Key() {return key;} private final byte[] key; + public byte[] Name() {return name;} private final byte[] name; + public int Step_count() {return step_count;} private final int step_count; public static final String Type__text = "text", Type__html = "html", Type__file = "file"; public static final int Seqn__obsolete = 999999; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_tbl.java index 272810d06..4587e02e4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_task_regy_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; public class Xobc_task_regy_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_task_id, fld_task_seqn, fld_step_count, fld_task_key, fld_task_name; - private final Db_conn conn; private Db_stmt insert_stmt; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_task_id, fld_task_seqn, fld_step_count, fld_task_key, fld_task_name; + private final Db_conn conn; private Db_stmt insert_stmt; public Xobc_task_regy_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "task_regy"; @@ -30,7 +30,7 @@ public class Xobc_task_regy_tbl implements Db_tbl { this.fld_task_name = flds.Add_str("task_name", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "task_seqn", fld_task_seqn)); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_itm.java index 35b5218ed..0b25cf08e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_itm.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; -public class Xobc_version_regy_itm { - public Xobc_version_regy_itm(int id, String date, String note) { - this.id = id; - this.date = date; - this.note = note; - } - public int Id() {return id;} private final int id; - public String Date() {return date;} private final String date; - public String Note() {return note;} private final String note; -} +package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; +public class Xobc_version_regy_itm { + public Xobc_version_regy_itm(int id, String date, String note) { + this.id = id; + this.date = date; + this.note = note; + } + public int Id() {return id;} private final int id; + public String Date() {return date;} private final String date; + public String Note() {return note;} private final String note; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_tbl.java index 97f68e713..c37c126fb 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/Xobc_version_regy_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; public class Xobc_version_regy_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_version_id, fld_version_date, fld_version_note; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_version_id, fld_version_date, fld_version_note; + private final Db_conn conn; public Xobc_version_regy_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "version_regy"; @@ -27,7 +27,7 @@ public class Xobc_version_regy_tbl implements Db_tbl { this.fld_version_note = flds.Add_str("version_note", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); conn.Stmt_insert(tbl_name, flds) diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_itm.java index 335fc2cc2..a921033c6 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.*; import gplx.dbs.*; public class Xobc_import_step_itm { @@ -33,18 +33,18 @@ public class Xobc_import_step_itm { this.Import_prog_data_max = import_prog_data_max; this.Import_prog_row_max = import_prog_row_max; } - public final int Step_id; - public final int Host_id; - public byte[] Wiki_abrv() {return wiki_abrv;} private final byte[] wiki_abrv; - public final String Wiki_date; - public final String Import_name; - public final int Import_type; - public final byte Import_zip_type; - public final long Import_size_zip; - public final long Import_size_raw; - public final String Import_md5; - public final long Import_prog_data_max; - public final int Import_prog_row_max; + public final int Step_id; + public final int Host_id; + public byte[] Wiki_abrv() {return wiki_abrv;} private final byte[] wiki_abrv; + public final String Wiki_date; + public final String Import_name; + public final int Import_type; + public final byte Import_zip_type; + public final long Import_size_zip; + public final long Import_size_raw; + public final String Import_md5; + public final long Import_prog_data_max; + public final int Import_prog_row_max; - public static final Xobc_import_step_itm Null = null; + public static final Xobc_import_step_itm Null = null; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_tbl.java index bb0cff2c3..b184dbcad 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/datas/imports/Xobc_import_step_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.datas.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.*; import gplx.dbs.*; public class Xobc_import_step_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_step_id, fld_host_id, fld_wiki_abrv, fld_wiki_date, fld_import_name, fld_import_type, fld_import_zip, fld_import_md5, fld_import_size_zip, fld_import_size_raw, fld_prog_size_end, fld_prog_count_end; - public final Db_conn conn; private Db_stmt insert_stmt; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_step_id, fld_host_id, fld_wiki_abrv, fld_wiki_date, fld_import_name, fld_import_type, fld_import_zip, fld_import_md5, fld_import_size_zip, fld_import_size_raw, fld_prog_size_end, fld_prog_count_end; + public final Db_conn conn; private Db_stmt insert_stmt; public Xobc_import_step_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "import_step"; @@ -36,7 +36,7 @@ public class Xobc_import_step_tbl implements Db_tbl { this.fld_prog_count_end = flds.Add_long("prog_count_end"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public Xobc_import_step_itm Select_one(int step_id) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, fld_step_id).Crt_int(fld_step_id, step_id).Exec_select__rls_auto(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_step_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_step_tbl.java index 732b28f10..026da7f5c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_step_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_step_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.users; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; public class Xobc_done_step_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_task_id, fld_step_id; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_task_id, fld_step_id; + private final Db_conn conn; public Xobc_done_step_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xobc_done_step"; @@ -27,7 +27,7 @@ public class Xobc_done_step_tbl implements Db_tbl { this.fld_step_id = flds.Add_int("step_id"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "main", fld_task_id, fld_step_id)); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_task_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_task_tbl.java index 844b57452..288e9434b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_task_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_done_task_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.users; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; public class Xobc_done_task_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_task_id, fld_task_seqn; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_task_id, fld_task_seqn; + private final Db_conn conn; public Xobc_done_task_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xobc_done_task"; @@ -27,7 +27,7 @@ public class Xobc_done_task_tbl implements Db_tbl { this.fld_task_seqn = flds.Add_int("task_seqn"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert(int task_id, int task_seqn) { conn.Stmt_insert(tbl_name, fld_task_id, fld_task_seqn) diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_work_task_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_work_task_tbl.java index 3e88aec6f..5e7ca2887 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_work_task_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/dbs/users/Xobc_work_task_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.dbs.users; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; public class Xobc_work_task_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_task_id, fld_task_seqn, fld_step_id, fld_cmd_id; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_task_id, fld_task_seqn, fld_step_id, fld_cmd_id; + private final Db_conn conn; public Xobc_work_task_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xobc_work_task"; @@ -29,7 +29,7 @@ public class Xobc_work_task_tbl implements Db_tbl { this.fld_cmd_id = flds.Add_int("cmd_id"); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Select_all(Xobc_task_mgr task_mgr, Xobc_task_regy__base todo_regy, Xobc_task_regy__base work_regy) { work_regy.Clear(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_itm.java index cec1ed809..1517fb94d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_itm.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.hosts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.*; import gplx.core.brys.evals.*; import gplx.xowa.wikis.domains.*; public class Host_eval_itm { - private final Bry_eval_mgr mgr = Bry_eval_mgr.Dflt(); - private final Host_eval_wkr wkr = new Host_eval_wkr(); - private final Hash_adp host_hash = Hash_adp_.New(); + private final Bry_eval_mgr mgr = Bry_eval_mgr.Dflt(); + private final Host_eval_wkr wkr = new Host_eval_wkr(); + private final Hash_adp host_hash = Hash_adp_.New(); public Host_eval_itm() { mgr.Add_many(wkr); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr.java index 5d5b00d7b..b2f70cfef 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.hosts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.brys.evals.*; import gplx.xowa.wikis.domains.*; @@ -43,7 +43,7 @@ public class Host_eval_wkr implements Bry_eval_wkr { } public static final byte Type__wiki_abrv = 0; - private static final Hash_adp_bry hash = Hash_adp_bry.cs() + private static final Hash_adp_bry hash = Hash_adp_bry.cs() .Add_str_byte("wiki_abrv", Type__wiki_abrv) ; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr__tst.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr__tst.java index 43f423117..f029e9df4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr__tst.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/hosts/Host_eval_wkr__tst.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.centrals.hosts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; -import org.junit.*; import gplx.core.tests.*; import gplx.xowa.wikis.domains.*; -public class Host_eval_wkr__tst { - private final Host_eval_wkr__fxt fxt = new Host_eval_wkr__fxt(); - @Test public void En_w() {fxt.Test__resolve_quick("en.wikipedia.org" , "Xowa_enwiki_latest");} - @Test public void Fr_d() {fxt.Test__resolve_quick("fr.wiktionary.org" , "Xowa_frwiki_latest");} - @Test public void Species() {fxt.Test__resolve_quick("species.wikimedia.org" , "Xowa_enwiki_latest");} -} -class Host_eval_wkr__fxt { - public void Test__resolve_quick(String domain_str, String expd) { - Host_eval_itm eval_itm = new Host_eval_itm(); - Xow_domain_itm domain_itm = Xow_domain_itm_.parse(Bry_.new_u8(domain_str)); - Gftest.Eq__bry(Bry_.new_u8(expd), eval_itm.Eval_dir_name(domain_itm)); - } +package gplx.xowa.addons.bldrs.centrals.hosts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; +import org.junit.*; import gplx.core.tests.*; import gplx.xowa.wikis.domains.*; +public class Host_eval_wkr__tst { + private final Host_eval_wkr__fxt fxt = new Host_eval_wkr__fxt(); + @Test public void En_w() {fxt.Test__resolve_quick("en.wikipedia.org" , "Xowa_enwiki_latest");} + @Test public void Fr_d() {fxt.Test__resolve_quick("fr.wiktionary.org" , "Xowa_frwiki_latest");} + @Test public void Species() {fxt.Test__resolve_quick("species.wikimedia.org" , "Xowa_enwiki_latest");} +} +class Host_eval_wkr__fxt { + public void Test__resolve_quick(String domain_str, String expd) { + Host_eval_itm eval_itm = new Host_eval_itm(); + Xow_domain_itm domain_itm = Xow_domain_itm_.parse(Bry_.new_u8(domain_str)); + Gftest.Eq__bry(Bry_.new_u8(expd), eval_itm.Eval_dir_name(domain_itm)); + } } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_factory.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_factory.java index b5ad98fba..d4512bdc5 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_factory.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_factory.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.steps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.brys.evals.*; import gplx.core.primitives.*; import gplx.xowa.addons.bldrs.centrals.tasks.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.steps.*; import gplx.xowa.addons.bldrs.centrals.utils.*; @@ -23,10 +23,10 @@ import gplx.xowa.addons.bldrs.exports.packs.files.*; import gplx.xowa.bldrs.*; import gplx.xowa.wikis.domains.*; public class Xobc_step_factory { - private final Xobc_task_mgr task_mgr; - private final Xobc_data_db data_db; - private final Bry_eval_mgr eval_mgr = Bry_eval_mgr.Dflt(); private final Host_eval_itm host_eval = new Host_eval_itm(); - private final Host_eval_wkr eval_wkr__host_regy = new Host_eval_wkr(); + private final Xobc_task_mgr task_mgr; + private final Xobc_data_db data_db; + private final Bry_eval_mgr eval_mgr = Bry_eval_mgr.Dflt(); private final Host_eval_itm host_eval = new Host_eval_itm(); + private final Host_eval_wkr eval_wkr__host_regy = new Host_eval_wkr(); public Xobc_step_factory(Xobc_task_mgr task_mgr, Xobc_data_db data_db, Io_url wiki_dir) { this.task_mgr = task_mgr; this.data_db = data_db; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_itm.java index f7c426e66..05412cc8c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/steps/Xobc_step_itm.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.steps; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.gfobjs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; public class Xobc_step_itm { private int cmd_idx = 0; - private final Xobc_cmd_itm[] cmds; + private final Xobc_cmd_itm[] cmds; public Xobc_step_itm(int step_id, int step_seqn, Xobc_cmd_itm[] cmds) { this.step_id = step_id; this.step_seqn = step_seqn; this.cmds = cmds; } - public int Step_id() {return step_id;} private final int step_id; - public int Step_seqn() {return step_seqn;} private final int step_seqn; + public int Step_id() {return step_id;} private final int step_id; + public int Step_seqn() {return step_seqn;} private final int step_seqn; public String Step_name() {return step_name;} private String step_name; public Xobc_cmd_itm Cmd() {return cmds[cmd_idx];} public Xobc_step_itm Cmd_idx_(int v) {cmd_idx = v; return this;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_itm.java index 4ad407d11..08dcf94d0 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_itm.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.tasks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.gfobjs.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.steps.*; public class Xobc_task_itm implements gplx.CompareAble { - private final int task_sort; + private final int task_sort; public Xobc_task_itm(int task_id, int task_seqn, int step_count, String task_key, String task_name) { this.task_id = task_id; this.task_seqn = task_seqn; @@ -26,10 +26,10 @@ public class Xobc_task_itm implements gplx.CompareAble { this.task_name = task_name; this.task_sort = task_seqn; // set task_sort to task_seqn; note that task_sort needs to be memorialized b/c "work" changes task_seqn to add-order } - public int Task_id() {return task_id;} private final int task_id; - public String Task_key() {return task_key;} private final String task_key; - public String Task_name() {return task_name;} private final String task_name; - public int Step_count() {return step_count;} private final int step_count; + public int Task_id() {return task_id;} private final int task_id; + public String Task_key() {return task_key;} private final String task_key; + public String Task_name() {return task_name;} private final String task_name; + public int Step_count() {return step_count;} private final int step_count; public int Task_seqn() {return task_seqn;} private int task_seqn; public byte Task_status() {return task_status;} private byte task_status; public Xobc_step_itm Step() {return step;} public void Step_(Xobc_step_itm v) {this.step = v;} private Xobc_step_itm step; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_key.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_key.java index 460978e14..15a1622fc 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_key.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_key.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.tasks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.wikis.domains.*; public class Xobc_task_key { @@ -21,10 +21,10 @@ public class Xobc_task_key { this.wiki_date = wiki_date; this.task_type = task_type; } - public String Wiki_domain() {return wiki_domain;} private final String wiki_domain; - public String Wiki_date() {return wiki_date;} private final String wiki_date; + public String Wiki_domain() {return wiki_domain;} private final String wiki_domain; + public String Wiki_date() {return wiki_date;} private final String wiki_date; public String Wiki_date_ui() {return String_.Replace(wiki_date, ".", "-");} - public String Task_type() {return task_type;} private final String task_type; + public String Task_type() {return task_type;} private final String task_type; public String Task_type_ui() { if (String_.Eq(task_type, "html")) return "Articles"; else if (String_.Eq(task_type, "file")) return "Images"; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__base.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__base.java index 097ac03ab..f323d9eb2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.tasks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.gfobjs.*; public abstract class Xobc_task_regy__base { - private final Ordered_hash hash = Ordered_hash_.New(); - protected final Xobc_task_mgr task_mgr; + private final Ordered_hash hash = Ordered_hash_.New(); + protected final Xobc_task_mgr task_mgr; public Xobc_task_regy__base(Xobc_task_mgr task_mgr, String name) {this.task_mgr = task_mgr; this.name = name;} - public String Name() {return name;} private final String name; + public String Name() {return name;} private final String name; public int Len() {return hash.Len();} public void Add(Xobc_task_itm t) {hash.Add(t.Task_id(), t);} public void Clear() {hash.Clear();} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__work.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__work.java index 94b53b2cd..fb9a4be7d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__work.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/tasks/Xobc_task_regy__work.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.tasks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.gfobjs.*; import gplx.core.progs.*; import gplx.core.threads.*; import gplx.xowa.drds.powers.*; import gplx.xowa.addons.bldrs.centrals.steps.*; import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.imports.*; public class Xobc_task_regy__work extends Xobc_task_regy__base { - private final Thread_adp_mgr thread_mgr = new Thread_adp_mgr(1000, 5000); - private final Xobc_cmd_ctx ctx; + private final Thread_adp_mgr thread_mgr = new Thread_adp_mgr(1000, 5000); + private final Xobc_cmd_ctx ctx; public Xobc_task_regy__work(Xobc_task_mgr task_mgr, Xoa_app app) {super(task_mgr, "work"); this.ctx = new Xobc_cmd_ctx(app); } @@ -148,8 +148,8 @@ public class Xobc_task_regy__work extends Xobc_task_regy__base { } } class Xobc_task_skip implements Gfo_invk { - private final Xobc_task_regy__work work_regy; - private final Xobc_cmd_itm cmd; + private final Xobc_task_regy__work work_regy; + private final Xobc_cmd_itm cmd; public Xobc_task_skip(Xobc_task_regy__work work_regy, Xobc_cmd_itm cmd) { this.work_regy = work_regy; this.cmd = cmd; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Bry_eval_wkr__builder_central.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Bry_eval_wkr__builder_central.java index bbd5b00fd..dbed8ff4e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Bry_eval_wkr__builder_central.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Bry_eval_wkr__builder_central.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.core.brys.evals.*; public class Bry_eval_wkr__builder_central implements Bry_eval_wkr { - private final byte[] wiki_dir; + private final byte[] wiki_dir; public Bry_eval_wkr__builder_central(Io_url wiki_dir) {this.wiki_dir = wiki_dir.RawBry();} public String Key() {return "builder_central";} public void Resolve(Bry_bfr rv, byte[] src, int args_bgn, int args_end) { @@ -39,7 +39,7 @@ public class Bry_eval_wkr__builder_central implements Bry_eval_wkr { } public static final byte Type__download_fil = 0, Type__unzip_dir = 1, Type__wiki_dir = 2; - private static final Hash_adp_bry hash = Hash_adp_bry.cs() + private static final Hash_adp_bry hash = Hash_adp_bry.cs() .Add_str_byte("download_fil", Type__download_fil) .Add_str_byte("unzip_dir", Type__unzip_dir) .Add_str_byte("wiki_dir", Type__wiki_dir) diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Time_dhms__tst.java b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Time_dhms__tst.java index 796f0da71..71c78db62 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Time_dhms__tst.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/centrals/utils/Time_dhms__tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.centrals.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*; import org.junit.*; import gplx.core.tests.*; public class Time_dhms__tst { - private final Time_dhms__fxt fxt = new Time_dhms__fxt(); + private final Time_dhms__fxt fxt = new Time_dhms__fxt(); @Test public void S__0() {fxt.Test__to_str( 0, 4, "0 s");} @Test public void S__1() {fxt.Test__to_str( 1, 4, "1 s");} @Test public void S__2() {fxt.Test__to_str( 30, 4, "30 s");} @@ -28,7 +28,7 @@ public class Time_dhms__tst { @Test public void Max_places() {fxt.Test__to_str( 86400, 2, "1:00 d");} } class Time_dhms__fxt { - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public Time_dhms__fxt Test__to_str(long v, int max_places, String expd) { Gftest.Eq__str(expd, Time_dhms_.To_str(bfr, v, Bool_.Y, max_places)); return this;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/Xow_db_file_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/Xow_db_file_mgr.java index 58dc5e256..450ba4461 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/Xow_db_file_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/Xow_db_file_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; public class Xow_db_file_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public int Len() {return hash.Len();} public Xow_db_file Get_at(int i) {return (Xow_db_file)hash.Get_at(i);} public Xow_db_file_mgr Load_by_type(Xow_db_mgr db_mgr, int type) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_utl.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_utl.java index 944a661aa..b24430e1b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_utl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_utl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; public class Merge2_copy_utl { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final String tbl_name, fld_pkey, fld_blob; - private final boolean tbl_has_blob; + private final Bry_bfr bfr = Bry_bfr_.New(); + private final String tbl_name, fld_pkey, fld_blob; + private final boolean tbl_has_blob; private Db_conn conn; public Merge2_copy_utl(String tbl_name, String fld_pkey, String fld_blob, boolean tbl_has_blob) { this.tbl_name = tbl_name; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_wkr__lot.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_wkr__lot.java index b4938a0bc..cee5efb82 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_wkr__lot.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_copy_wkr__lot.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; class Merge2_copy_wkr__lot { - private final Split_tbl tbl; - private final String tbl_name, fld_blob_pkey, fld_blob_data; - private final Merge2_copy_utl copy_utl; + private final Split_tbl tbl; + private final String tbl_name, fld_blob_pkey, fld_blob_data; + private final Merge2_copy_utl copy_utl; private int resume__db_id; private boolean tbl_has_blob; public Merge2_copy_wkr__lot(Split_tbl tbl) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_db.java index 7b3fd941b..7d20da428 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_db.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; -import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; -public class Merge2_heap_db implements Merge2_trg_itm { - public Merge2_heap_db(Split_tbl tbl, Dbmeta_fld_list flds, int idx, Io_url url, Db_conn conn) { - this.tbl = tbl; this.flds = flds; this.idx = idx; - this.url = url; this.conn = conn; - } - public Split_tbl Tbl() {return tbl;} private final Split_tbl tbl; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds; - public int Idx() {return idx;} private final int idx; - public Io_url Url() {return url;} private final Io_url url; - public Db_conn Conn() {return conn;} private final Db_conn conn; -} +package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; +import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; +public class Merge2_heap_db implements Merge2_trg_itm { + public Merge2_heap_db(Split_tbl tbl, Dbmeta_fld_list flds, int idx, Io_url url, Db_conn conn) { + this.tbl = tbl; this.flds = flds; this.idx = idx; + this.url = url; this.conn = conn; + } + public Split_tbl Tbl() {return tbl;} private final Split_tbl tbl; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds; + public int Idx() {return idx;} private final int idx; + public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_mgr.java index 1439d6042..417e22a4a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_heap_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; public class Merge2_heap_mgr {// data tbls will only have 1 itms; blob tbls will have N itms - private final Split_tbl tbl; - private final List_adp list = List_adp_.New(), deleted = List_adp_.New(); + private final Split_tbl tbl; + private final List_adp list = List_adp_.New(), deleted = List_adp_.New(); private Dbmeta_fld_list heap_flds; public Merge2_heap_mgr(Split_tbl tbl) {this.tbl = tbl;} public Merge2_heap_db Cur() {return cur;} private Merge2_heap_db cur; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_mgr.java index e95288715..5259b4719 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; public class Merge2_mgr { - public final Merge_ctx ctx; - private final Ordered_hash wkr_hash; + public final Merge_ctx ctx; + private final Ordered_hash wkr_hash; public Merge2_mgr() { this.ctx = new Merge_ctx(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_itm.java index b5b6df585..bbd3c16af 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_itm.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; -import gplx.dbs.*; -public interface Merge2_trg_itm { - int Idx(); - Db_conn Conn(); -} -class Merge2_trg_itm__wiki implements Merge2_trg_itm { - public Merge2_trg_itm__wiki(int idx, Db_conn conn) {this.idx = idx; this.conn = conn;} - public int Idx() {return idx;} private final int idx; - public Db_conn Conn() {return conn;} private final Db_conn conn; -} +package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; +import gplx.dbs.*; +public interface Merge2_trg_itm { + int Idx(); + Db_conn Conn(); +} +class Merge2_trg_itm__wiki implements Merge2_trg_itm { + public Merge2_trg_itm__wiki(int idx, Db_conn conn) {this.idx = idx; this.conn = conn;} + public int Idx() {return idx;} private final int idx; + public Db_conn Conn() {return conn;} private final Db_conn conn; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_mgr.java index 02d936517..eaa76f1dc 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_trg_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; interface Merge2_trg_mgr { @@ -20,7 +20,7 @@ interface Merge2_trg_mgr { Merge2_trg_itm Cur_or_new(Merge_ctx ctx, Merge_prog_wkr prog_wkr, Xow_wiki wiki, int trg_db_id); } class Merge2_trg_mgr__heap implements Merge2_trg_mgr { - private final Merge2_heap_mgr heap_mgr; + private final Merge2_heap_mgr heap_mgr; public Merge2_trg_mgr__heap(Merge2_heap_mgr heap_mgr) {this.heap_mgr = heap_mgr;} public Merge2_trg_itm Cur() {return heap_mgr.Cur();} public Merge2_trg_itm Cur_or_new(Merge_ctx ctx, Merge_prog_wkr prog_wkr, Xow_wiki wiki, int trg_db_id) { @@ -32,7 +32,7 @@ class Merge2_trg_mgr__heap implements Merge2_trg_mgr { } } class Merge2_trg_mgr__wiki implements Merge2_trg_mgr { - private final Split_tbl tbl; + private final Split_tbl tbl; public Merge2_trg_mgr__wiki(Split_tbl tbl) {this.tbl = tbl;} public Merge2_trg_itm Cur() {return cur;} private Merge2_trg_itm__wiki cur; public Merge2_trg_itm Cur_or_new(Merge_ctx ctx, Merge_prog_wkr prog_wkr, Xow_wiki wiki, int trg_db_id) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_base.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_base.java index 31ce47163..66cd74bb1 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; public abstract class Merge2_wkr__heap_base implements Merge2_wkr { @@ -20,8 +20,8 @@ public abstract class Merge2_wkr__heap_base implements Merge2_wkr { this.tbl = tbl; this.heap_mgr = new Merge2_heap_mgr(tbl); } - public Split_tbl Tbl() {return tbl;} private final Split_tbl tbl; - protected Merge2_heap_mgr Heap_mgr() {return heap_mgr;} private final Merge2_heap_mgr heap_mgr; + public Split_tbl Tbl() {return tbl;} private final Split_tbl tbl; + protected Merge2_heap_mgr Heap_mgr() {return heap_mgr;} private final Merge2_heap_mgr heap_mgr; public void Merge_data(Merge_ctx ctx, Merge_prog_wkr prog_wkr) { // fires once per file this.Copy_to_heap(ctx, prog_wkr, heap_mgr, tbl); this.Copy_to_wiki(ctx, prog_wkr, heap_mgr, tbl); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_lot.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_lot.java index 7bfdb09d0..ceba82462 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_lot.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge2_wkr__heap_lot.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.utls.*; public class Merge2_wkr__heap_lot extends Merge2_wkr__heap_base { - private final Merge2_copy_wkr__lot copy_wkr; - private final Merge2_trg_mgr trg_mgr__heap; + private final Merge2_copy_wkr__lot copy_wkr; + private final Merge2_trg_mgr trg_mgr__heap; public Merge2_wkr__heap_lot(Split_tbl tbl) {super(tbl); this.copy_wkr = new Merge2_copy_wkr__lot(tbl); this.trg_mgr__heap = new Merge2_trg_mgr__heap(this.Heap_mgr()); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_bldr_cmd.java index 9a373e533..5763321bd 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -45,6 +45,6 @@ public class Merge_bldr_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "bldr.export.merge"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Merge_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Merge_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Merge_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_checkpoint.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_checkpoint.java index b9e275770..fb9fd65a1 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_checkpoint.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_checkpoint.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; public class Merge_prog_checkpoint { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Io_url url; + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Io_url url; private String resume_fil; private int resume_wkr = -1; private int resume_db = -1; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_wkr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_wkr.java index 17719a5a8..654d8c04f 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_prog_wkr.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.core.progs.*; import gplx.dbs.bulks.*; public class Merge_prog_wkr implements Db_bulk_prog { - private final Gfo_prog_ui prog_ui; - private final Merge_prog_checkpoint checkpoint; - private final int prog_count_end; + private final Gfo_prog_ui prog_ui; + private final Merge_prog_checkpoint checkpoint; + private final int prog_count_end; private int prog_count_cur; private long time_nxt, time_gap = 100; - // private final int[] mergepoint_ary = new int[gplx.xowa.addons.bldrs.exports.splits.rslts.Split_rslt_tid_.Tid_max]; + // private final int[] mergepoint_ary = new int[gplx.xowa.addons.bldrs.exports.splits.rslts.Split_rslt_tid_.Tid_max]; public Merge_prog_wkr(Gfo_prog_ui prog_ui, Io_url checkpoint_fil, int prog_count_end, long prog_size_end) { this.prog_ui = prog_ui; this.checkpoint = new Merge_prog_checkpoint(checkpoint_fil); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_wkr__core.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_wkr__core.java index 580085e5a..5aa9e74ae 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_wkr__core.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/merges/Merge_wkr__core.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.merges; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.bulks.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.infos.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; class Merge_wkr__core { - private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); - private final Db_tbl_copy copy_mgr = new Db_tbl_copy(); + private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Db_tbl_copy copy_mgr = new Db_tbl_copy(); public void Copy_to_temp(Merge_prog_wkr prog_wkr, Xow_wiki wiki, Db_conn src_conn) { Create_dbs(wiki, src_conn); Merge_core(wiki, src_conn); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_file_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_file_bldr_cmd.java index 2416e432d..196e0e218 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_file_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_file_bldr_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.packs.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Pack_file_bldr_cmd extends Xob_cmd__base { - private final Pack_file_cfg cfg = new Pack_file_cfg(); + private final Pack_file_cfg cfg = new Pack_file_cfg(); public Pack_file_bldr_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { new Pack_file_mgr().Exec(wiki, cfg); @@ -30,6 +30,6 @@ public class Pack_file_bldr_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "bldr.export.pack.file"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Pack_file_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Pack_file_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Pack_file_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_hash.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_hash.java index c4791d0ef..2d8b52a53 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_hash.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_hash.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.packs.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; class Pack_hash { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public int Len() {return hash.Len();} public Pack_list Get_at(int i) {return (Pack_list)hash.Get_at(i);} public Pack_list Get_by(int tid) {return (Pack_list)hash.Get_by(tid);} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_list.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_list.java index d9f953427..241b12af7 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_list.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_list.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.packs.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; -class Pack_list { - private final Ordered_hash list = Ordered_hash_.New(); - public Pack_list(int tid) {this.tid = tid;} - public int Tid() {return tid;} private final int tid; - public int Len() {return list.Len();} - public Pack_itm Get_at(int i) {return (Pack_itm)list.Get_at(i);} - public void Add(Pack_itm itm) {list.Add(itm.Zip_url().Raw(), itm);} - public void Clear() {list.Clear();} - public boolean Has(Io_url url) { - return list.Has(url.Raw()); - } -} +package gplx.xowa.addons.bldrs.exports.packs.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; +class Pack_list { + private final Ordered_hash list = Ordered_hash_.New(); + public Pack_list(int tid) {this.tid = tid;} + public int Tid() {return tid;} private final int tid; + public int Len() {return list.Len();} + public Pack_itm Get_at(int i) {return (Pack_itm)list.Get_at(i);} + public void Add(Pack_itm itm) {list.Add(itm.Zip_url().Raw(), itm);} + public void Clear() {list.Clear();} + public boolean Has(Io_url url) { + return list.Has(url.Raw()); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_zip_name_bldr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_zip_name_bldr.java index 4b93cae27..1fdca0a88 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_zip_name_bldr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/files/Pack_zip_name_bldr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.packs.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; public class Pack_zip_name_bldr { // en.wikipedia.org-file-ns.000-db.001.xowa -> Xowa_enwiki_2016-05_file_ns.000_db.001.zip - private final Io_url pack_dir; - private final byte[] wiki_domain, zip_name_prefix; + private final Io_url pack_dir; + private final byte[] wiki_domain, zip_name_prefix; public Pack_zip_name_bldr(Io_url pack_dir, String wiki_domain_str, String wiki_abrv, String wiki_date, String custom_name) { this.pack_dir = pack_dir; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_itm.java index f6de91943..f07c3dd4a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_itm.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.packs.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; -class Pack_itm { - public Pack_itm(int idx, int type, Io_url zip_url, Io_url[] raw_urls) { - this.idx = idx; - this.type = type; - this.zip_url = zip_url; - this.raw_urls = raw_urls; - } - public int Idx() {return idx;} private final int idx; - public int Type() {return type;} private final int type; - public Io_url[] Raw_urls() {return raw_urls;} private final Io_url[] raw_urls; - public Io_url Zip_url() {return zip_url;} private final Io_url zip_url; -} +package gplx.xowa.addons.bldrs.exports.packs.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; +class Pack_itm { + public Pack_itm(int idx, int type, Io_url zip_url, Io_url[] raw_urls) { + this.idx = idx; + this.type = type; + this.zip_url = zip_url; + this.raw_urls = raw_urls; + } + public int Idx() {return idx;} private final int idx; + public int Type() {return type;} private final int type; + public Io_url[] Raw_urls() {return raw_urls;} private final Io_url[] raw_urls; + public Io_url Zip_url() {return zip_url;} private final Io_url zip_url; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_list.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_list.java index 5c81350cf..1976051a5 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_list.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_list.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.packs.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; -import gplx.xowa.wikis.data.*; -import gplx.xowa.addons.bldrs.centrals.dbs.datas.imports.*; -import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; -class Pack_list { - private final List_adp list = List_adp_.New(); - public int Len() {return list.Len();} - public Pack_itm Get_at(int i) {return (Pack_itm)list.Get_at(i);} - public void Add(Pack_itm itm) {list.Add(itm);} -} +package gplx.xowa.addons.bldrs.exports.packs.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; +import gplx.xowa.wikis.data.*; +import gplx.xowa.addons.bldrs.centrals.dbs.datas.imports.*; +import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; +class Pack_list { + private final List_adp list = List_adp_.New(); + public int Len() {return list.Len();} + public Pack_itm Get_at(int i) {return (Pack_itm)list.Get_at(i);} + public void Add(Pack_itm itm) {list.Add(itm);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_split_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_split_bldr_cmd.java index 622818945..d9e858633 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_split_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/packs/splits/Pack_split_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.packs.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.packs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Pack_split_bldr_cmd extends Xob_cmd__base { @@ -30,6 +30,6 @@ public class Pack_split_bldr_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "bldr.export.pack.split"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Pack_split_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Pack_split_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Pack_split_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_bldr_cmd.java index 16f64314a..94e5b6914 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_bldr_cmd.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; public class Split_bldr_cmd extends Xob_cmd__base { - private final Split_cfg cfg = new Split_cfg(); + private final Split_cfg cfg = new Split_cfg(); public Split_bldr_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -31,6 +31,6 @@ public class Split_bldr_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "bldr.export.split"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Split_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Split_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Split_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_ctx.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_ctx.java index 490869cc0..fc98d9f6c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_ctx.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/Split_ctx.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; public class Split_ctx { private int trg_idx = -1; - private final Split_wkr[] wkrs; + private final Split_wkr[] wkrs; private boolean trg_make = true; private long trg_max = 32 * Io_mgr.Len_mb; public Split_ctx(Split_cfg cfg, Xow_wiki wiki, Split_wkr[] wkrs, Split_ns_itm[] ns_itms, Db_conn wkr_conn) { @@ -29,16 +29,16 @@ public class Split_ctx { this.html_size_calc = new Split_db_size_calc(cfg.Html().Db_max(), cfg.Html().Db_idx()); this.file_size_calc = new Split_db_size_calc(cfg.File().Db_max(), cfg.File().Db_idx()); } - public Split_cfg Cfg() {return cfg;} private final Split_cfg cfg; - public Xow_wiki Wiki() {return wiki;} private final Xow_wiki wiki; - public Split_ns_itm[] Ns_itms() {return ns_itms;} private final Split_ns_itm[] ns_itms; - public Db_conn Wkr_conn() {return wkr_conn;} private final Db_conn wkr_conn; + public Split_cfg Cfg() {return cfg;} private final Split_cfg cfg; + public Xow_wiki Wiki() {return wiki;} private final Xow_wiki wiki; + public Split_ns_itm[] Ns_itms() {return ns_itms;} private final Split_ns_itm[] ns_itms; + public Db_conn Wkr_conn() {return wkr_conn;} private final Db_conn wkr_conn; public Db_conn Trg_conn() {return trg_conn;} private Db_conn trg_conn; public int Trg_ns() {return trg_ns;} private int trg_ns; public void Trg_ns_(int v) {this.trg_ns = v;} - public Split_page_mgr Page_mgr() {return page_mgr;} private final Split_page_mgr page_mgr = new Split_page_mgr(); - public Split_rslt_mgr Rslt_mgr() {return rslt_mgr;} private final Split_rslt_mgr rslt_mgr; - public Split_db_size_calc Html_size_calc() {return html_size_calc;} private final Split_db_size_calc html_size_calc; - public Split_db_size_calc File_size_calc() {return file_size_calc;} private final Split_db_size_calc file_size_calc; + public Split_page_mgr Page_mgr() {return page_mgr;} private final Split_page_mgr page_mgr = new Split_page_mgr(); + public Split_rslt_mgr Rslt_mgr() {return rslt_mgr;} private final Split_rslt_mgr rslt_mgr; + public Split_db_size_calc Html_size_calc() {return html_size_calc;} private final Split_db_size_calc html_size_calc; + public Split_db_size_calc File_size_calc() {return file_size_calc;} private final Split_db_size_calc file_size_calc; public void Trg_db__completed() {trg_make = true;} public void Trg_db__assert(int ns_id) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/archives/Reindex_html_dbs_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/archives/Reindex_html_dbs_cmd.java index dc8cfc140..b59296670 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/archives/Reindex_html_dbs_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/archives/Reindex_html_dbs_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.archives; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.metas.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.htmls.core.dbs.*; @@ -23,7 +23,7 @@ class Reindex_html_dbs_cmd { private Xoh_src_tbl_mgr src_tbl_mgr; private Xoh_trg_tbl_mgr trg_tbl_mgr; private String tbl_page, fld_page_id, fld_page_ns, fld_page_len, fld_page_score, fld_page_html_db_id; - private final String Idx_name = "page__repack"; + private final String Idx_name = "page__repack"; public void Exec(Xowe_wiki wiki, long trg_db_size_max) { // init wiki.Init_assert(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Bin_meta_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Bin_meta_itm.java index 8cea04595..451c7ddae 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Bin_meta_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Bin_meta_itm.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -class Bin_meta_itm { - public Bin_meta_itm(byte bin_type, int bin_owner_id, int bin_id, int bin_db_id) { - this.bin_type = bin_type; this.bin_owner_id = bin_owner_id; this.bin_id = bin_id; this.bin_db_id = bin_db_id; - } - public byte Bin_type() {return bin_type;} private final byte bin_type; - public int Bin_owner_id() {return bin_owner_id;} private final int bin_owner_id; - public int Bin_id() {return bin_id;} private final int bin_id; - public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; -} +package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +class Bin_meta_itm { + public Bin_meta_itm(byte bin_type, int bin_owner_id, int bin_id, int bin_db_id) { + this.bin_type = bin_type; this.bin_owner_id = bin_owner_id; this.bin_id = bin_id; this.bin_db_id = bin_db_id; + } + public byte Bin_type() {return bin_type;} private final byte bin_type; + public int Bin_owner_id() {return bin_owner_id;} private final int bin_owner_id; + public int Bin_id() {return bin_id;} private final int bin_id; + public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__bin.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__bin.java index f290ab2be..3cd87bba6 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__bin.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__bin.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.fsdb.meta.*; import gplx.fsdb.data.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; class Split_meta_wkr__bin extends Split_meta_wkr_base { - private final Fsm_bin_mgr bin_mgr; - private final Split_rslt_wkr__bin rslt_wkr = new Split_rslt_wkr__bin(); + private final Fsm_bin_mgr bin_mgr; + private final Split_rslt_wkr__bin rslt_wkr = new Split_rslt_wkr__bin(); private Fsd_bin_tbl tbl; private Db_stmt stmt; public Split_meta_wkr__bin(Split_ctx ctx, Fsm_bin_mgr bin_mgr) { this.bin_mgr = bin_mgr; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__fil.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__fil.java index d50dfb676..00fa0808a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__fil.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__fil.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.fsdb.meta.*; import gplx.fsdb.data.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; class Split_meta_wkr__fil extends Split_meta_wkr_base { - private final Split_rslt_wkr__fil rslt_wkr = new Split_rslt_wkr__fil(); - private final Db_conn atr_conn; + private final Split_rslt_wkr__fil rslt_wkr = new Split_rslt_wkr__fil(); + private final Db_conn atr_conn; private Fsd_fil_tbl tbl; private Db_stmt stmt; public Split_meta_wkr__fil(Split_ctx ctx, Db_conn atr_conn) { this.atr_conn = atr_conn; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__org.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__org.java index 6cb8b85c6..923497263 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__org.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__org.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.files.origs.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; class Split_meta_wkr__org extends Split_meta_wkr_base { - private final Split_rslt_wkr__org rslt_wkr = new Split_rslt_wkr__org(); - private final Db_conn atr_conn; + private final Split_rslt_wkr__org rslt_wkr = new Split_rslt_wkr__org(); + private final Db_conn atr_conn; private Xof_orig_tbl tbl; private Db_stmt stmt; public Split_meta_wkr__org(Split_ctx ctx, Db_conn atr_conn) { this.atr_conn = atr_conn; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__thm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__thm.java index f292f5152..5ffe6f6a3 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__thm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/files/Split_meta_wkr__thm.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.fsdb.meta.*; import gplx.fsdb.data.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; class Split_meta_wkr__thm extends Split_meta_wkr_base { - private final Split_rslt_wkr__thm rslt_wkr = new Split_rslt_wkr__thm(); - private final Db_conn atr_conn; + private final Split_rslt_wkr__thm rslt_wkr = new Split_rslt_wkr__thm(); + private final Db_conn atr_conn; private Fsd_thm_tbl tbl; private Db_stmt stmt; public Split_meta_wkr__thm(Split_ctx ctx, Db_conn atr_conn) { this.atr_conn = atr_conn; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Split_wkr__html.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Split_wkr__html.java index 76fff32ec..be416aae6 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Split_wkr__html.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Split_wkr__html.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; @@ -20,8 +20,8 @@ import gplx.xowa.htmls.core.dbs.*; public class Split_wkr__html implements Split_wkr { private Xoh_src_tbl_mgr src_tbl_mgr; private Xowd_html_tbl tbl; private Db_stmt stmt; - private final Xowd_html_row trg_itm = new Xowd_html_row(); - private final Split_rslt_wkr__html rslt_wkr = new Split_rslt_wkr__html(); + private final Xowd_html_row trg_itm = new Xowd_html_row(); + private final Split_rslt_wkr__html rslt_wkr = new Split_rslt_wkr__html(); public void Split__init(Split_ctx ctx, Xow_wiki wiki, Db_conn wkr_conn) { this.src_tbl_mgr = new Xoh_src_tbl_mgr(wiki); ctx.Rslt_mgr().Reg_wkr(rslt_wkr); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_page_tbl_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_page_tbl_itm.java index c49a80b75..ec4cd6a43 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_page_tbl_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_page_tbl_itm.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.htmls.core.dbs.*; public class Xoh_page_tbl_itm { - private final boolean trg; + private final boolean trg; public Xoh_page_tbl_itm(boolean trg, int db_id, Db_conn conn) { this.trg = trg; this.db_id = db_id; this.html_tbl = new Xowd_html_tbl(conn); } - public int Db_id() {return db_id;} private final int db_id; - public Xowd_html_tbl Html_tbl() {return html_tbl;} private final Xowd_html_tbl html_tbl; + public int Db_id() {return db_id;} private final int db_id; + public Xowd_html_tbl Html_tbl() {return html_tbl;} private final Xowd_html_tbl html_tbl; public void Rls() { html_tbl.Conn().Rls_conn(); if (trg) html_tbl.Conn().Env_vacuum(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_src_tbl_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_src_tbl_mgr.java index 29a136620..e999fa59e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_src_tbl_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_src_tbl_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.htmls.core.dbs.*; public class Xoh_src_tbl_mgr { - private final Xow_wiki wiki; - private final Ordered_hash hash = Ordered_hash_.New(); + private final Xow_wiki wiki; + private final Ordered_hash hash = Ordered_hash_.New(); public Xoh_src_tbl_mgr(Xow_wiki wiki) { this.wiki = wiki; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_trg_tbl_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_trg_tbl_mgr.java index 5bca72644..e409fed83 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_trg_tbl_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/htmls/Xoh_trg_tbl_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; public class Xoh_trg_tbl_mgr { - private final Xow_db_mgr db_mgr; + private final Xow_db_mgr db_mgr; public Xoh_trg_tbl_mgr(Xowe_wiki wiki) { this.db_mgr = wiki.Data__core_mgr(); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_meta_wkr_base.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_meta_wkr_base.java index 94308e6be..2da041434 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_meta_wkr_base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_meta_wkr_base.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; public abstract class Split_meta_wkr_base { - private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); public void Load(Db_conn wkr_conn, Split_page_mgr page_mgr, int ns_id, int score_bgn, int score_end) { attach_mgr.Conn_main_(wkr_conn); String sql_fmt = Load_sql(attach_mgr, ns_id, score_bgn, score_end); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_itm.java index 098882c3c..71933191f 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_itm.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; public class Split_page_itm { - private final Split_page_list[] lists_ary; + private final Split_page_list[] lists_ary; public Split_page_itm(boolean fsdb, int page_id) { this.page_id = page_id; this.lists_ary = new Split_page_list[Split_page_list_type_.Tid_max]; } - public int Page_id() {return page_id;} private final int page_id; + public int Page_id() {return page_id;} private final int page_id; public Split_page_list Get_by_or_null(byte type) {return lists_ary[type];} public Split_page_list Get_by_or_make(byte type) { Split_page_list rv = lists_ary[type]; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_list.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_list.java index eb58f3da0..feec6f207 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_list.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_list.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -public class Split_page_list { - private final List_adp list = List_adp_.New(); - public Split_page_list(byte type) {this.type = type;} - public byte Type() {return type;} private final byte type; - public int Len() {return list.Count();} - public Object Get_at(int i) {return list.Get_at(i);} - public void Add(Object o) {list.Add(o);} -} +package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +public class Split_page_list { + private final List_adp list = List_adp_.New(); + public Split_page_list(byte type) {this.type = type;} + public byte Type() {return type;} private final byte type; + public int Len() {return list.Count();} + public Object Get_at(int i) {return list.Get_at(i);} + public void Add(Object o) {list.Add(o);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_mgr.java index d9e701b6e..79d999adf 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/metas/Split_page_mgr.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -import gplx.core.lists.hashs.*; -public class Split_page_mgr { - private final Hash_adp__int hash = new Hash_adp__int(); - public void Clear() {hash.Clear();} - public Split_page_itm Get_by_or_null(int page_id) {return (Split_page_itm)hash.Get_by_or_null(page_id);} - public void Add(Split_page_itm page) { - hash.Add(page.Page_id(), page); - } -} +package gplx.xowa.addons.bldrs.exports.splits.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +import gplx.core.lists.hashs.*; +public class Split_page_mgr { + private final Hash_adp__int hash = new Hash_adp__int(); + public void Clear() {hash.Clear();} + public Split_page_itm Get_by_or_null(int page_id) {return (Split_page_itm)hash.Get_by_or_null(page_id);} + public void Add(Split_page_itm page) { + hash.Add(page.Page_id(), page); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_cfg.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_cfg.java index 1756b03b2..e22385077 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_cfg.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_cfg.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; public class Split_cfg implements Gfo_invk { public boolean Force_rebuild() {return force_rebuild;} private boolean force_rebuild; public long Trg_max() {return trg_max;} private long trg_max = 32 * Io_mgr.Len_mb; public Split_ns_itm[] Ns_itms() {return ns_itms;} private Split_ns_itm[] ns_itms; public int Loader_rows() {return loader_rows;} private int loader_rows = 10000; - public Split_type_cfg Text() {return text;} private final Split_type_cfg text = new Split_type_cfg("text", 1000); - public Split_type_cfg Html() {return html;} private final Split_type_cfg html = new Split_type_cfg("html", 2000); - public Split_type_cfg File() {return file;} private final Split_type_cfg file = new Split_type_cfg("file", 3000); + public Split_type_cfg Text() {return text;} private final Split_type_cfg text = new Split_type_cfg("text", 1000); + public Split_type_cfg Html() {return html;} private final Split_type_cfg html = new Split_type_cfg("html", 2000); + public Split_type_cfg File() {return file;} private final Split_type_cfg file = new Split_type_cfg("file", 3000); public void Ns_itms_(int[] ary) { List_adp list = List_adp_.New(); int len = ary.length; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_db_size_calc.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_db_size_calc.java index e6b24ed08..d6dcb6256 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_db_size_calc.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_db_size_calc.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; public class Split_db_size_calc { - private final long size_max; + private final long size_max; private long size_cur; public Split_db_size_calc(long size_max, int idx) { this.size_max = size_max; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_ns_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_ns_itm.java index 42a7ee93a..8d8aa2c18 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_ns_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_ns_itm.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -public class Split_ns_itm { - public Split_ns_itm(int ns_id) { - this.ns_id = ns_id; - } - public int Ns_id() {return ns_id;} private final int ns_id; -} +package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +public class Split_ns_itm { + public Split_ns_itm(int ns_id) { + this.ns_id = ns_id; + } + public int Ns_id() {return ns_id;} private final int ns_id; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_page_loader.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_page_loader.java index 51763f973..f1c97c823 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_page_loader.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_page_loader.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.xowa.wikis.data.tbls.*; public class Split_page_loader { - private final int rows_to_read; - private final Xowd_page_tbl tbl; private final Db_stmt stmt; + private final int rows_to_read; + private final Xowd_page_tbl tbl; private final Db_stmt stmt; private int score_max = Int_.Max_value; public Split_page_loader(Xow_wiki wiki, int rows_to_read) { this.rows_to_read = rows_to_read; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_type_cfg.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_type_cfg.java index a85c6d550..b7eb5e67f 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_type_cfg.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/mgrs/Split_type_cfg.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; public class Split_type_cfg implements Gfo_invk { public Split_type_cfg(String key, int db_idx) {this.key = key; this.db_idx = db_idx;} - public String Key() {return key;} private final String key; // NOTE: used for layout + public String Key() {return key;} private final String key; // NOTE: used for layout public int Db_idx() {return db_idx;} private int db_idx = 1000; public long Db_max() {return db_max;} private long db_max = 1500 * Io_mgr.Len_mb; public String Layout() {return layout;} private String layout; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/pages/Split_wkr__page.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/pages/Split_wkr__page.java index a5e03bec8..372b73629 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/pages/Split_wkr__page.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/pages/Split_wkr__page.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.bulks.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; public class Split_wkr__page implements Split_wkr { - private final Split_rslt_wkr__page rslt_wkr = new Split_rslt_wkr__page(); + private final Split_rslt_wkr__page rslt_wkr = new Split_rslt_wkr__page(); private Xowd_page_tbl tbl; private Db_stmt stmt; public void Split__init(Split_ctx ctx, Xow_wiki wiki, Db_conn wkr_conn) { ctx.Rslt_mgr().Reg_wkr(rslt_wkr); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rndms/Split_wkr__rndm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rndms/Split_wkr__rndm.java index 752b51047..b1f93bd33 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rndms/Split_wkr__rndm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rndms/Split_wkr__rndm.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.rndms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.bulks.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; import gplx.xowa.addons.bldrs.exports.splits.mgrs.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.xowa.addons.wikis.pages.randoms.dbs.*; import gplx.xowa.addons.wikis.pages.randoms.bldrs.*; import gplx.xowa.addons.wikis.pages.randoms.mgrs.*; import gplx.xowa.addons.bldrs.exports.utls.*; public class Split_wkr__rndm implements Split_wkr { - private final Split_rslt_wkr__rndm rslt_wkr = new Split_rslt_wkr__rndm(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Split_rslt_wkr__rndm rslt_wkr = new Split_rslt_wkr__rndm(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); private Rndm_bldr_wkr bldr; private int cur_ns_id = -1; public void Split__init(Split_ctx ctx, Xow_wiki wiki, Db_conn wkr_conn) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_mgr.java index 14dd5edd2..731088c82 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; public class Split_rslt_mgr { - private final Db_conn wkr_conn; + private final Db_conn wkr_conn; private Db_stmt rslt_type_stmt, rslt_db_stmt; private Io_url db_url; private int db_id, ns_id; private int score_min, score_max; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr_.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr_.java index bab638146..d60bb8370 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr_.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr_.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -import gplx.dbs.*; -public class Split_rslt_wkr_ { - public static final Split_rslt_wkr Noop = new Split_rslt_wkr__noop(); -} -class Split_rslt_wkr__noop implements Split_rslt_wkr { - public byte Tid() {return Split_rslt_tid_.Tid_max;} - public int Row_count() {return 0;} - public long Obj_size() {return 0;} - public void On__init(Split_rslt_mgr rslt_mgr, Db_conn wkr_conn) {} - public void On__nth__new(int db_id) {} - public void On__nth__rls() {} - public void On_term() {} +package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +import gplx.dbs.*; +public class Split_rslt_wkr_ { + public static final Split_rslt_wkr Noop = new Split_rslt_wkr__noop(); +} +class Split_rslt_wkr__noop implements Split_rslt_wkr { + public byte Tid() {return Split_rslt_tid_.Tid_max;} + public int Row_count() {return 0;} + public long Obj_size() {return 0;} + public void On__init(Split_rslt_mgr rslt_mgr, Db_conn wkr_conn) {} + public void On__nth__new(int db_id) {} + public void On__nth__rls() {} + public void On_term() {} } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__int__base.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__int__base.java index db3ed8890..108d76f29 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__int__base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__int__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; public abstract class Split_rslt_wkr__int__base implements Split_rslt_wkr { private Split_rslt_mgr rslt_mgr; private Db_conn wkr_conn; private Db_stmt stmt; private int db_id; - private final Int_ary pkey_ary = new Int_ary(128); - private final String tbl_name, pkey_name; + private final Int_ary pkey_ary = new Int_ary(128); + private final String tbl_name, pkey_name; public Split_rslt_wkr__int__base() { this.tbl_name = Tbl_name(); this.pkey_name = Pkey_name(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__objs__base.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__objs__base.java index c6017c14b..6fcf0935c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__objs__base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Split_rslt_wkr__objs__base.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; public abstract class Split_rslt_wkr__objs__base implements Split_rslt_wkr { private Split_rslt_mgr rslt_mgr; private Db_conn wkr_conn; private Db_stmt stmt; private int db_id; - private final List_adp pkey_list = List_adp_.New(); - private final String tbl_name; private final int pkey_flds_len; private final Dbmeta_fld_itm[] pkey_flds; private final String[] pkey_names; + private final List_adp pkey_list = List_adp_.New(); + private final String tbl_name; private final int pkey_flds_len; private final Dbmeta_fld_itm[] pkey_flds; private final String[] pkey_names; public Split_rslt_wkr__objs__base() { this.tbl_name = Tbl_name(); this.pkey_flds = Pkey_flds(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_itm.java index 0629a247a..251bb967c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_itm.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; -public class Wkr_stats_itm { - public Wkr_stats_itm(int id, int count, long size) {this.Id = id; this.Count = count; this.Size = size;} - public final int Id; - public final int Count; - public final long Size; -} +package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; +public class Wkr_stats_itm { + public Wkr_stats_itm(int id, int count, long size) {this.Id = id; this.Count = count; this.Size = size;} + public final int Id; + public final int Count; + public final long Size; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_tbl.java index f11fd6e80..ec6536399 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/rslts/Wkr_stats_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; public class Wkr_stats_tbl implements Rls_able { - private final String tbl_name; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_wkr_id, fld_wkr_count, fld_wkr_size; - public final Db_conn conn; + private final String tbl_name; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_wkr_id, fld_wkr_count, fld_wkr_size; + public final Db_conn conn; public Wkr_stats_tbl(Db_conn conn) { this.conn = conn; conn.Rls_reg(this); this.tbl_name = "wkr_stats"; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__link.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__link.java index 27ac014ae..37d9dc383 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__link.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__link.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.srchs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.dbs.*; class Split_meta_wkr__link extends Split_meta_wkr_base { - private final Srch_db_mgr srch_db_mgr; + private final Srch_db_mgr srch_db_mgr; private Srch_link_tbl tbl; private Db_stmt stmt; - private final Split_rslt_wkr__link rslt_wkr = new Split_rslt_wkr__link(); + private final Split_rslt_wkr__link rslt_wkr = new Split_rslt_wkr__link(); public Split_meta_wkr__link(Split_ctx ctx, Srch_db_mgr srch_db_mgr) { this.srch_db_mgr = srch_db_mgr; ctx.Rslt_mgr().Reg_wkr(rslt_wkr); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__word.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__word.java index aa9d5c85c..dd18b79e4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__word.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/splits/srchs/Split_meta_wkr__word.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.splits.srchs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.xowa.addons.bldrs.exports.splits.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.exports.splits.metas.*; import gplx.xowa.addons.bldrs.exports.splits.rslts.*; @@ -20,7 +20,7 @@ import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.d class Split_meta_wkr__word extends Split_meta_wkr_base { private Srch_word_tbl tbl; private Db_stmt stmt; - private final Split_rslt_wkr__word rslt_wkr = new Split_rslt_wkr__word(); + private final Split_rslt_wkr__word rslt_wkr = new Split_rslt_wkr__word(); public Split_meta_wkr__word(Split_ctx ctx) { ctx.Rslt_mgr().Reg_wkr(rslt_wkr); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/exports/utls/Split_tbl_.java b/400_xowa/src/gplx/xowa/addons/bldrs/exports/utls/Split_tbl_.java index 4b8161638..950dbd1b5 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/exports/utls/Split_tbl_.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/exports/utls/Split_tbl_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.exports.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.exports.*; import gplx.dbs.*; public class Split_tbl_ { - public static final Split_tbl + public static final Split_tbl Page = new Split_tbl__page() , Html = new Split_tbl__html() , Srch_word = new Split_tbl__srch_word() diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_cmd.java index 2c5297204..d93538ada 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_cmd.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.files.checks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xocheck_cmd extends Xob_cmd__base { // checks fsdb; needed for en.w and multiple monthly updates - public Xocheck_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - wiki.Init_assert(); - new Xocheck_mgr().Exec(wiki); - } - - @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.check"; - public static final Xob_cmd Prototype = new Xocheck_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xocheck_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.files.checks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xocheck_cmd extends Xob_cmd__base { // checks fsdb; needed for en.w and multiple monthly updates + public Xocheck_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + wiki.Init_assert(); + new Xocheck_mgr().Exec(wiki); + } + + @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.check"; + public static final Xob_cmd Prototype = new Xocheck_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xocheck_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_mgr.java index 83f93ea28..45ce3705e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/checks/Xocheck_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.checks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.ios.streams.*; import gplx.dbs.*; @@ -23,7 +23,7 @@ import gplx.xowa.htmls.*; // TODO.XO:cache files in memory, else commonly used files (Wiki.png) will be loaded from fsdb for every usage on page // TODO.XO:save results to db to verify unused images (images in fsdb, but not loaded during this code) class Xocheck_mgr { - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Xof_img_size img_size = new Xof_img_size(); + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Xof_img_size img_size = new Xof_img_size(); private Xowe_wiki wiki; public void Exec(Xowe_wiki wiki) { // init diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/Xocksum_calc_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/Xocksum_calc_cmd.java index 7f6c2eb0b..2d5f0fd5b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/Xocksum_calc_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/Xocksum_calc_cmd.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.files.cksums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xocksum_calc_cmd extends Xob_cmd__base { - public Xocksum_calc_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - wiki.Init_assert(); - new Xocksum_calc_mgr().Exec(wiki); - } - - @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.cksums.calc"; - public static final Xob_cmd Prototype = new Xocksum_calc_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xocksum_calc_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.files.cksums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xocksum_calc_cmd extends Xob_cmd__base { + public Xocksum_calc_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + wiki.Init_assert(); + new Xocksum_calc_mgr().Exec(wiki); + } + + @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.cksums.calc"; + public static final Xob_cmd Prototype = new Xocksum_calc_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xocksum_calc_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_db.java index af8abf109..8cbf2caf0 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_db.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.files.cksums.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.cksums.*; -import gplx.dbs.*; import gplx.fsdb.meta.*; -public class Xocksum_cksum_db { - public Xocksum_cksum_db(Db_conn conn) { - this.conn = conn; - this.tbl__cksum = new Xocksum_cksum_tbl(conn); - } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Xocksum_cksum_tbl Tbl__cksum() {return tbl__cksum;} private final Xocksum_cksum_tbl tbl__cksum; - - public static Xocksum_cksum_db Get(Xowe_wiki wiki) { - return new Xocksum_cksum_db(wiki.File__fsdb_core().File__abc_file__at(Fsm_mnt_mgr.Mnt_idx_main).Conn()); - } -} +package gplx.xowa.addons.bldrs.files.cksums.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.cksums.*; +import gplx.dbs.*; import gplx.fsdb.meta.*; +public class Xocksum_cksum_db { + public Xocksum_cksum_db(Db_conn conn) { + this.conn = conn; + this.tbl__cksum = new Xocksum_cksum_tbl(conn); + } + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Xocksum_cksum_tbl Tbl__cksum() {return tbl__cksum;} private final Xocksum_cksum_tbl tbl__cksum; + + public static Xocksum_cksum_db Get(Xowe_wiki wiki) { + return new Xocksum_cksum_db(wiki.File__fsdb_core().File__abc_file__at(Fsm_mnt_mgr.Mnt_idx_main).Conn()); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_row.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_row.java index 9f66ac04b..ce3e3d5d2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_row.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_row.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cksums.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.cksums.*; public class Xocksum_cksum_row { public Xocksum_cksum_row(int fil_id, int thm_id, int bin_db_id, long bin_size, byte cksum_tid, int cksum_count, byte[] cksum_val, String cksum_date) { @@ -25,14 +25,14 @@ public class Xocksum_cksum_row { this.cksum_val = cksum_val; this.cksum_date = cksum_date; } - public int Fil_id() {return fil_id;} private final int fil_id; - public int Thm_id() {return thm_id;} private final int thm_id; - public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; + public int Fil_id() {return fil_id;} private final int fil_id; + public int Thm_id() {return thm_id;} private final int thm_id; + public int Bin_db_id() {return bin_db_id;} private final int bin_db_id; public long Bin_size() {return bin_size;} private long bin_size; - public byte Cksum_tid() {return cksum_tid;} private final byte cksum_tid; - public int Cksum_count() {return cksum_count;} private final int cksum_count; + public byte Cksum_tid() {return cksum_tid;} private final byte cksum_tid; + public int Cksum_count() {return cksum_count;} private final int cksum_count; public byte[] Cksum_val() {return cksum_val;} private byte[] cksum_val; - public String Cksum_date() {return cksum_date;} private final String cksum_date; + public String Cksum_date() {return cksum_date;} private final String cksum_date; public void Bin_size_(long v) {this.bin_size = v;} public void Cksum_val_(byte[] v) {this.cksum_val = v;} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_tbl.java index 04f1731a3..d4f4518d4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cksums/dbs/Xocksum_cksum_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cksums.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.cksums.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.addons.wikis.ctgs.*; public class Xocksum_cksum_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__fil_id, fld__thm_id, fld__bin_db_id, fld__bin_len, fld__cksum_tid, fld__cksum_count, fld__cksum_val, fld__cksum_date; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__fil_id, fld__thm_id, fld__bin_db_id, fld__bin_len, fld__cksum_tid, fld__cksum_count, fld__cksum_val, fld__cksum_date; private Db_stmt stmt__update; public Xocksum_cksum_tbl(Db_conn conn) { this.conn = conn; @@ -32,8 +32,8 @@ public class Xocksum_cksum_tbl implements Db_tbl { this.fld__cksum_date = flds.Add_str("cksum_date", 16); conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Create_idx() { conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "fil_id__thm_id", fld__fil_id, fld__thm_id)); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xob_hdump_tbl_retriever__ns_to_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xob_hdump_tbl_retriever__ns_to_db.java index af7838848..8952ce531 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xob_hdump_tbl_retriever__ns_to_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xob_hdump_tbl_retriever__ns_to_db.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.htmls.core.dbs.*; import gplx.xowa.htmls.core.bldrs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.wikis.data.*; class Xob_hdump_tbl_retriever__ns_to_db implements Xob_hdump_tbl_retriever { - private final Xob_ns_to_db_mgr ns_to_db_mgr; + private final Xob_ns_to_db_mgr ns_to_db_mgr; public Xob_hdump_tbl_retriever__ns_to_db(Xowe_wiki wiki) { Xow_db_mgr core_data_mgr = wiki.Db_mgr_as_sql().Core_data_mgr(); this.ns_to_db_mgr = new Xob_ns_to_db_mgr(new Xob_ns_to_db_wkr__html(core_data_mgr.Db__core()), core_data_mgr, Xobldr_cfg.Max_size__html(wiki.App())); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_data.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_data.java index 5501ee96b..8d05eefe2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_data.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.stores.*; import gplx.core.envs.*; import gplx.core.ios.streams.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.engines.sqlite.*; @@ -25,7 +25,7 @@ public class Xobldr__fsdb_db__create_data extends Xob_cmd__base implements Xob_c private Db_conn bldr_conn; private Db_cfg_tbl bldr_cfg_tbl; private Xof_bin_mgr src_bin_mgr; private Xof_bin_wkr__fsdb_sql src_fsdb_wkr; private boolean src_bin_mgr__cache_enabled = Bool_.N; private String src_bin_mgr__fsdb_version; private String[] src_bin_mgr__fsdb_skip_wkrs; private boolean src_bin_mgr__wmf_enabled; private Fsm_mnt_itm trg_mnt_itm; private Fsm_cfg_mgr trg_cfg_mgr; private Fsm_atr_fil trg_atr_fil; private Fsm_bin_fil trg_bin_fil; private long trg_bin_db_max; private String trg_bin_mgr__fsdb_version; - private final Xof_bin_updater trg_bin_updater = new Xof_bin_updater(); private Xob_bin_db_mgr bin_db_mgr; private int[] ns_ids; private int prv_lnki_tier_id = -1; + private final Xof_bin_updater trg_bin_updater = new Xof_bin_updater(); private Xob_bin_db_mgr bin_db_mgr; private int[] ns_ids; private int prv_lnki_tier_id = -1; private long download_size_max = Io_mgr.Len_mb_long * 5; private int[] download_keep_tier_ids = Int_ary_.New(0); private Xobu_poll_mgr poll_mgr; private int poll_interval; private long time_bgn; private int select_interval = 2500, progress_interval = 1, commit_interval = 1, delete_interval = 5000; @@ -324,7 +324,7 @@ public class Xobldr__fsdb_db__create_data extends Xob_cmd__base implements Xob_c else return Gfo_invk_.Rv_unhandled; return this; } - private static final String + private static final String Invk_tier_id_bmk_ = "tier_id_bmk_", Invk_page_id_bmk_ = "page_id_bmk_", Invk_lnki_id_bmk_ = "lnki_id_bmk_" , Invk_select_interval_ = "select_interval_", Invk_commit_interval_ = "commit_interval_", Invk_progress_interval_ = "progress_interval_", Invk_delete_interval_ = "delete_interval_" , Invk_exec_count_max_ = "exec_count_max_", Invk_exec_fail_max_ = "exec_fail_max_", Invk_exit_now_ = "exit_now_", Invk_exit_after_commit_ = "exit_after_commit_" @@ -338,7 +338,7 @@ public class Xobldr__fsdb_db__create_data extends Xob_cmd__base implements Xob_c public static final String BLDR_CMD_KEY = "file.fsdb_make"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__fsdb_db__create_data(null, null); + public static final Xob_cmd Prototype = new Xobldr__fsdb_db__create_data(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__fsdb_db__create_data(bldr, wiki);} public static Fsdb_db_mgr new_src_bin_db_mgr(Xow_wiki wiki, String version) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_orig.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_orig.java index ff3ec31dc..9da846e05 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_orig.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__fsdb_db__create_orig.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -42,7 +42,7 @@ public class Xobldr__fsdb_db__create_orig extends Xob_cmd__base { conn.Exec_sql_plog_txn("orig_wkr.inserting orig direct" , String_.Format(Sql_create_orig_direct, tbl_name, fld_status)); conn.Exec_sql_plog_txn("orig_wkr.inserting orig redirect" , String_.Format(Sql_create_orig_redirect, tbl_name, fld_status)); } - private static final String + private static final String Sql_delete_wiki_orig = "DELETE FROM {0};" , Sql_create_xfer_direct = String_.Concat_lines_nl ( "INSERT INTO {0} " @@ -115,6 +115,6 @@ public class Xobldr__fsdb_db__create_orig extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.orig_reg"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__fsdb_db__create_orig(null, null); + public static final Xob_cmd Prototype = new Xobldr__fsdb_db__create_orig(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__fsdb_db__create_orig(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__image__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__image__create.java index b98e9dc0c..a71692340 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__image__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__image__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.core.ios.*; import gplx.xowa.files.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sql_dumps.*; @@ -80,7 +80,7 @@ public class Xobldr__image__create extends Xob_itm_dump_base implements Xob_cmd, else if (ctx.Match(k, Invk_show_issues_)) show_issues = m.ReadYn("v"); else return super.Invk(ctx, ikey, k, m); return this; - } private static final String Invk_src_fil_ = "src_fil_", Invk_show_issues_ = "show_issues_"; + } private static final String Invk_src_fil_ = "src_fil_", Invk_show_issues_ = "show_issues_"; public static int Calc_ext_id(Gfo_usr_dlg usr_dlg, byte[] file, byte[] media_type, byte[] minor_mime, int w, int h) { Xof_ext file_ext = Xof_ext_.new_by_ttl_(file); int file_ext_id = file_ext.Id(); Xof_ext mime_ext = Xof_mime_minor_.ext_(minor_mime); int mime_ext_id = mime_ext.Id(); @@ -122,6 +122,6 @@ public class Xobldr__image__create extends Xob_itm_dump_base implements Xob_cmd, public static final String BLDR_CMD_KEY = "wiki.image"; public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__image__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__image__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__image__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_regy__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_regy__create.java index bd99173ee..c9b08bbd3 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_regy__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_regy__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -26,6 +26,6 @@ public class Xobldr__lnki_regy__create extends Xob_cmd__base implements Xob_cmd public static final String BLDR_CMD_KEY = "file.lnki_regy"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__lnki_regy__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__lnki_regy__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__lnki_regy__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_temp__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_temp__create.java index 992a0486c..2b65a5498 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_temp__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__lnki_temp__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.files.*; @@ -30,7 +30,7 @@ public class Xobldr__lnki_temp__create extends Xob_dump_mgr_base implements gplx private Xob_lnki_temp_tbl tbl; private boolean wdata_enabled = true, xtn_ref_enabled = true, gen_html, gen_hdump, load_all_imglinks; private Xop_log_invoke_wkr invoke_wkr; private Xop_log_property_wkr property_wkr; private boolean ns_file_is_case_match_all = true; private Xowe_wiki commons_wiki; - private final Xob_hdump_bldr hdump_bldr = new Xob_hdump_bldr(); private Vnt_convert_lang converter_lang; + private final Xob_hdump_bldr hdump_bldr = new Xob_hdump_bldr(); private Vnt_convert_lang converter_lang; public Xobldr__lnki_temp__create(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} @Override public byte Init_redirect() {return Bool_.N_byte;} // lnki_temp does not look at redirect pages @Override public int[] Init_ns_ary() {return ns_ids;} private int[] ns_ids = Int_ary_.New(Xow_ns_.Tid__main); @@ -175,7 +175,7 @@ public class Xobldr__lnki_temp__create extends Xob_dump_mgr_base implements gplx ; public static final String BLDR_CMD_KEY = "file.lnki_temp"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__lnki_temp__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__lnki_temp__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__lnki_temp__create(bldr, wiki);} private Xop_log_invoke_wkr Invoke_wkr() { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__orig_regy__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__orig_regy__create.java index 1685e6dfc..f7fb61a3a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__orig_regy__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__orig_regy__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -41,6 +41,6 @@ public class Xobldr__orig_regy__create extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.orig_regy"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__orig_regy__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__orig_regy__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__orig_regy__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_file_map__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_file_map__create.java index 67d725471..b020e5a3f 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_file_map__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_file_map__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -155,6 +155,6 @@ public class Xobldr__page_file_map__create extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.page_file_map.create"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__page_file_map__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__page_file_map__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__page_file_map__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_regy__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_regy__create.java index 35bb069bf..71b85127c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_regy__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__page_regy__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -45,6 +45,6 @@ public class Xobldr__page_regy__create extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.page_regy"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__page_regy__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__page_regy__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__page_regy__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__redirect__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__redirect__create.java index 83bead2c1..5997fcd68 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__redirect__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__redirect__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.wikis.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.langs.htmls.encoders.*; @@ -58,6 +58,6 @@ public class Xobldr__redirect__create extends Xob_dump_mgr_base { public static final String BLDR_CMD_KEY = "wiki.redirect"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__redirect__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__redirect__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__redirect__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__drop_page.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__drop_page.java index 36feb48c9..4a8938a0d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__drop_page.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__drop_page.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.wikis.dbs.*; @@ -37,6 +37,6 @@ public class Xobldr__text_db__drop_page extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "wiki.page_dump.drop"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__text_db__drop_page(null, null); + public static final Xob_cmd Prototype = new Xobldr__text_db__drop_page(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__text_db__drop_page(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__make_page.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__make_page.java index f79c74ef6..909e57d29 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__make_page.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__text_db__make_page.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.data.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.wikis.dbs.*; @@ -39,6 +39,6 @@ public class Xobldr__text_db__make_page extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "wiki.page_dump.make"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__text_db__make_page(null, null); + public static final Xob_cmd Prototype = new Xobldr__text_db__make_page(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__text_db__make_page(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__create.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__create.java index 2d8960318..73bbadc01 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__create.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__create.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -30,6 +30,6 @@ public class Xobldr__xfer_regy__create extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.xfer_regy"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__xfer_regy__create(null, null); + public static final Xob_cmd Prototype = new Xobldr__xfer_regy__create(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__xfer_regy__create(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__update_downloaded.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__update_downloaded.java index 269488984..f4b9a3453 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__update_downloaded.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_regy__update_downloaded.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -63,6 +63,6 @@ public class Xobldr__xfer_regy__update_downloaded extends Xob_cmd__base implemen public static final String BLDR_CMD_KEY = "file.xfer_regy_update"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__xfer_regy__update_downloaded(null, null); + public static final Xob_cmd Prototype = new Xobldr__xfer_regy__update_downloaded(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__xfer_regy__update_downloaded(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_orig.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_orig.java index f98dbe171..3766e15bb 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_orig.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_orig.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.stores.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -70,7 +70,7 @@ public class Xobldr__xfer_temp__insert_orig extends Xob_cmd__base { } return rv; } - private static final String + private static final String Sql_select_clause = String_.Concat_lines_nl ( "SELECT DISTINCT" , " l.lnki_id" @@ -101,6 +101,6 @@ public class Xobldr__xfer_temp__insert_orig extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.xfer_temp.orig"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__xfer_temp__insert_orig(null, null); + public static final Xob_cmd Prototype = new Xobldr__xfer_temp__insert_orig(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__xfer_temp__insert_orig(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_thm.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_thm.java index 4ac895abe..b0deb0ccc 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_thm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/cmds/Xobldr__xfer_temp__insert_thm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.core.stores.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.bldrs.files.utls.*; @@ -74,6 +74,6 @@ public class Xobldr__xfer_temp__insert_thm extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.xfer_temp.thumb"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__xfer_temp__insert_thm(null, null); + public static final Xob_cmd Prototype = new Xobldr__xfer_temp__insert_thm(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__xfer_temp__insert_thm(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Page_file_map_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Page_file_map_tbl.java index 0ca99c50d..c8fa825a8 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Page_file_map_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Page_file_map_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; public class Page_file_map_tbl implements Db_tbl { - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_page_id, fld_fil_id, fld_thm_id, fld_sort_id, fld_count_of; - public final Db_conn conn; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_page_id, fld_fil_id, fld_thm_id, fld_sort_id, fld_count_of; + public final Db_conn conn; public Page_file_map_tbl(Db_conn conn, String tbl_name) { this.conn = conn; this.tbl_name = tbl_name; @@ -29,8 +29,8 @@ public class Page_file_map_tbl implements Db_tbl { this.fld_count_of = flds.Add_int("count_of"); this.meta = Dbmeta_tbl_itm.New(tbl_name, flds); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(meta);} - public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; + public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; public void Rls() {} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_fsdb_regy_tbl_.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_fsdb_regy_tbl_.java index 86181c661..e9eab4c45 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_fsdb_regy_tbl_.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_fsdb_regy_tbl_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; public class Xob_fsdb_regy_tbl_ { public static final String Tbl_name = "fsdb_regy"; - public static final String Tbl_sql = String_.Concat_lines_nl + public static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE fsdb_regy " , "( fsdb_id integer NOT NULL PRIMARY KEY AUTOINCREMENT" , ", fsdb_name varchar(255) NOT NULL" @@ -34,8 +34,8 @@ public class Xob_fsdb_regy_tbl_ { , ", fsdb_deleted tinyint NOT NULL" , ");" ); - public static final Db_idx_itm Idx_main = Db_idx_itm.sql_("CREATE INDEX fsdb_regy__main ON fsdb_regy (fsdb_name, fsdb_is_orig, fsdb_repo, fsdb_w, fsdb_time, fsdb_page);"); - public static final String + public static final Db_idx_itm Idx_main = Db_idx_itm.sql_("CREATE INDEX fsdb_regy__main ON fsdb_regy (fsdb_name, fsdb_is_orig, fsdb_repo, fsdb_w, fsdb_time, fsdb_page);"); + public static final String Insert_fsdb_fil = String_.Concat_lines_nl ( "INSERT INTO fsdb_regy (fsdb_name, fsdb_is_orig, fsdb_repo, fsdb_w, fsdb_time, fsdb_page, fsdb_db_id, fsdb_size, fsdb_status, fsdb_fil_id, fsdb_thm_id, fsdb_deleted)" , "SELECT f.fil_name" diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_image_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_image_tbl.java index b2d71cbeb..45e3d3bcd 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_image_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_image_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; public class Xob_image_tbl { @@ -32,12 +32,12 @@ public class Xob_image_tbl { .Val_bry_as_str(img_timestamp) .Exec_insert(); } - public static final String Tbl_name = "image" + public static final String Tbl_name = "image" , Fld_img_name = "img_name", Fld_img_media_type = "img_media_type", Fld_img_minor_mime = "img_minor_mime" , Fld_img_size = "img_size", Fld_img_width = "img_width", Fld_img_height = "img_height", Fld_img_bits = "img_bits", Fld_img_ext_id = "img_ext_id" , Fld_img_timestamp = "img_timestamp" ; - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS image" , "( img_name varchar(255) NOT NULL -- varbinary(255)" , ", img_media_type varchar(64) NOT NULL -- enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE')" @@ -50,7 +50,7 @@ public class Xob_image_tbl { , ", img_timestamp varchar(14) NOT NULL -- 20140101155749" , ");" ); - private static final Db_idx_itm + private static final Db_idx_itm Idx_img_name = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS image__img_name ON image (img_name, img_timestamp);") ; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_regy_tbl.java index d110b8575..e70a4bbf9 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_regy_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; public class Xob_lnki_regy_tbl { @@ -23,14 +23,14 @@ public class Xob_lnki_regy_tbl { if (wiki_ns_for_file_is_case_match_all) Sqlite_engine_.Idx_create(usr_dlg, p, "lnki_regy_commons", Idx_ttl_commons); } - public static final String Tbl_name = "lnki_regy" + public static final String Tbl_name = "lnki_regy" , Fld_lnki_id = "lnki_id", Fld_lnki_tier_id = "lnki_tier_id", Fld_lnki_page_id = "lnki_page_id", Fld_lnki_page_ns = "lnki_page_ns" , Fld_lnki_ttl = "lnki_ttl", Fld_lnki_commons_ttl = "lnki_commons_ttl" , Fld_lnki_ext = "lnki_ext", Fld_lnki_type = "lnki_type", Fld_lnki_src_tid = "lnki_src_tid" , Fld_lnki_w = "lnki_w", Fld_lnki_h = "lnki_h", Fld_lnki_upright = "lnki_upright", Fld_lnki_time = "lnki_time", Fld_lnki_page = "lnki_page" , Fld_lnki_count = "lnki_count" ; - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS lnki_regy" , "( lnki_id integer NOT NULL PRIMARY KEY" , ", lnki_tier_id integer NOT NULL" @@ -49,7 +49,7 @@ public class Xob_lnki_regy_tbl { , ", lnki_count integer NOT NULL" , ");" ); - public static final String Sql_create_data = String_.Concat_lines_nl + public static final String Sql_create_data = String_.Concat_lines_nl ( "INSERT INTO lnki_regy (lnki_id, lnki_tier_id, lnki_page_id, lnki_ttl, lnki_commons_ttl, lnki_ext, lnki_type, lnki_src_tid, lnki_w, lnki_h, lnki_upright, lnki_time, lnki_page, lnki_count)" , "SELECT Min(lnki_id)" , ", Min(lnki_tier_id)" @@ -106,7 +106,7 @@ public class Xob_lnki_regy_tbl { , "WHERE lnki_commons_flag = 1" , ";" ); - private static final Db_idx_itm + private static final Db_idx_itm Idx_ttl = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS lnki_regy__ttl ON lnki_regy (lnki_ttl, lnki_ext, lnki_id, lnki_page_id);") , Idx_ttl_commons = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS lnki_regy__ttl ON lnki_regy (lnki_commons_ttl, lnki_ext, lnki_id, lnki_page_id);") ; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_temp_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_temp_tbl.java index dcdd5b33c..1bcc9e9b1 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_temp_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_lnki_temp_tbl.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.files.*; public class Xob_lnki_temp_tbl implements Db_tbl { - private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private static final String tbl_name = "lnki_temp"; - public static final String + private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private static final String tbl_name = "lnki_temp"; + public static final String Fld_lnki_id = flds.Add_int_pkey_autonum("lnki_id"); // NOTE: insertion order index; public b/c not used and want to bypass warning - private static final String + private static final String Fld_lnki_tier_id = flds.Add_int("lnki_tier_id") , Fld_lnki_page_id = flds.Add_int("lnki_page_id") , Fld_lnki_ttl = flds.Add_str("lnki_ttl", 255) @@ -36,7 +36,7 @@ public class Xob_lnki_temp_tbl implements Db_tbl { ; private Db_stmt stmt_insert; public Xob_lnki_temp_tbl(Db_conn conn) {this.conn = conn;} - public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_conn Conn() {return conn;} private final Db_conn conn; public String Tbl_name() {return tbl_name;} public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert_bgn() {conn.Txn_bgn("bldr__lnki_temp"); stmt_insert = conn.Stmt_insert(tbl_name, flds);} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_orig_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_orig_regy_tbl.java index 80fd249ef..738498e31 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_orig_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_orig_regy_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.nss.*; @@ -67,19 +67,19 @@ public class Xob_orig_regy_tbl { p.Exec_sql(Xob_lnki_regy_tbl.Sql_cs_mark_changed); // lnki_regy: update lnki_commons_flag p.Exec_sql(Xob_lnki_regy_tbl.Sql_cs_update_ttls); // lnki_regy: update cs } - public static final String Tbl_name = "orig_regy" + public static final String Tbl_name = "orig_regy" , Fld_lnki_id = "lnki_id", Fld_lnki_ttl = "lnki_ttl", Fld_lnki_ext = "lnki_ext", Fld_lnki_count = "lnki_count" , Fld_orig_repo = "orig_repo", Fld_orig_page_id = "orig_page_id" , Fld_orig_redirect_id = "orig_redirect_id", Fld_orig_redirect_ttl = "orig_redirect_ttl", Fld_orig_file_id = "orig_file_id", Fld_orig_file_ttl = "orig_file_ttl" , Fld_orig_size = "orig_size", Fld_orig_w = "orig_w", Fld_orig_h = "orig_h", Fld_orig_bits = "orig_bits" , Fld_orig_media_type = "orig_media_type", Fld_orig_minor_mime = "orig_minor_mime", Fld_orig_file_ext = "orig_file_ext", Fld_orig_timestamp = "orig_timestamp" ; - private static final Db_idx_itm + private static final Db_idx_itm Idx_ttl_local = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS orig_regy__ttl_local ON orig_regy (lnki_ttl);") , Idx_ttl_remote = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS orig_regy__ttl_remote ON orig_regy (lnki_commons_ttl, lnki_ttl);") , Idx_xfer_temp = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS orig_regy__xfer_temp ON orig_regy (lnki_ttl, orig_file_ttl, orig_repo, orig_timestamp);") ; - private static final String + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS orig_regy" , "( lnki_id integer NOT NULL PRIMARY KEY" // NOTE: must be PRIMARY KEY, else later REPLACE INTO will create dupe rows diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_dump_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_dump_tbl.java index 661d9b60e..f9e4a91a8 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_dump_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_dump_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; public class Xob_page_dump_tbl { - public final static String Tbl_name = "page_dump"; - private final String fld_id, fld_title, fld_namespace, fld_is_redirect; - private final Db_conn conn; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final static String Tbl_name = "page_dump"; + private final String fld_id, fld_title, fld_namespace, fld_is_redirect; + private final Db_conn conn; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public Xob_page_dump_tbl(Db_conn conn) { this.conn = conn; this.fld_id = flds.Add_int_pkey("page_id"); @@ -33,7 +33,7 @@ public class Xob_page_dump_tbl { .Exec_sql_w_msg("text_db_prep.clone_page", Sql_insert_data, text_db_id); conn.Meta_idx_create(Dbmeta_idx_itm.new_unique_by_tbl(Tbl_name, "main", fld_id, fld_namespace, fld_is_redirect, fld_title)); } - private static final String Sql_insert_data = String_.Concat_lines_nl + private static final String Sql_insert_data = String_.Concat_lines_nl ( "INSERT INTO page_dump (page_id, page_title, page_namespace, page_is_redirect)" , "SELECT p.page_id" , ", p.page_title" diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_regy_tbl.java index 2334d9264..c8cab6b95 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_page_regy_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.files.repos.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.bldrs.*; @@ -39,15 +39,15 @@ public class Xob_page_regy_tbl { cur.Exec_sql(String_.Format(Sql_create_redirect, repo_tid)); Sqlite_engine_.Db_detach(cur, "redirect_db"); } - public static final String Tbl_name = "page_regy" + public static final String Tbl_name = "page_regy" , Fld_uid = "uid", Fld_repo_id = "repo_id", Fld_itm_tid = "itm_tid" , Fld_src_id = "src_id", Fld_src_ttl = "src_ttl" , Fld_trg_id = "trg_id", Fld_trg_ttl = "trg_ttl" ; - public static final Db_idx_itm + public static final Db_idx_itm Idx_main = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS page_regy__main ON page_regy (repo_id, itm_tid, src_ttl, src_id, trg_id, trg_ttl);") ; - private static final String + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS page_regy" , "( uid integer NOT NULL PRIMARY KEY AUTOINCREMENT" // NOTE: must be PRIMARY KEY, else later REPLACE INTO will create dupe rows diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_redirect_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_redirect_tbl.java index e3c8815d6..581cc75f3 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_redirect_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_redirect_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.langs.htmls.encoders.*; @@ -73,7 +73,7 @@ public class Xob_redirect_tbl { private static final String Fld_src_id = "src_id", Fld_src_ttl = "src_ttl", Fld_trg_id = "trg_id", Fld_trg_ns = "trg_ns", Fld_trg_ttl = "trg_ttl", Fld_trg_anchor = "trg_anchor" , Fld_trg_is_redirect = "trg_is_redirect", Fld_redirect_count = "redirect_count"; - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS redirect" , "( src_id integer NOT NULL PRIMARY KEY" , ", src_ttl varchar(255) NOT NULL" @@ -85,15 +85,15 @@ public class Xob_redirect_tbl { , ", redirect_count integer NOT NULL" , ");" ); - private static final Db_idx_itm + private static final Db_idx_itm Idx_trg_ttl = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS redirect__trg_ttl ON redirect (trg_ttl);") , Idx_trg_id = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS redirect__trg_id ON redirect (trg_id);") , Idx_trg_src = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS redirect__trg_src ON redirect (src_id, trg_id);") ; -// public static final String +// public static final String // Sql_ddl__page_redirect_id = "ALTER TABLE page ADD COLUMN page_redirect_id integer NOT NULL DEFAULT '-1'" // ; - private static final String + private static final String Sql_get_page_data = String_.Concat_lines_nl // get data from page table for initial redirect dump ( "REPLACE INTO redirect " , "SELECT t.src_id" diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_log_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_log_tbl.java index 63466fd18..b51d59125 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_log_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_log_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; public class Xob_xfer_regy_log_tbl { @@ -26,7 +26,7 @@ public class Xob_xfer_regy_log_tbl { .Val_str(wkr_msg) .Exec_insert(); } - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS xfer_regy_log" , "( lnki_id integer NOT NULL" , ", xfer_status tinyint NOT NULL" // 0=todo; 1=fail; 2=pass; 3=done @@ -34,7 +34,7 @@ public class Xob_xfer_regy_log_tbl { , ", xfer_bin_msg varchar(255) NOT NULL" , ");" ); - public static final String Tbl_name = "xfer_regy_log" + public static final String Tbl_name = "xfer_regy_log" , Fld_lnki_id = "lnki_id", Fld_xfer_status = "xfer_status", Fld_xfer_bin_tid = "xfer_bin_tid", Fld_xfer_bin_msg = "xfer_bin_msg" ; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_tbl.java index 0708c6a8e..37e400115 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_regy_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.stores.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.bldrs.*; public class Xob_xfer_regy_tbl { - public static final String Tbl_name = "xfer_regy" + public static final String Tbl_name = "xfer_regy" , Fld_lnki_id = "lnki_id", Fld_lnki_tier_id = "lnki_tier_id", Fld_lnki_page_id = "lnki_page_id", Fld_lnki_ttl = "lnki_ttl", Fld_lnki_ext = "lnki_ext" , Fld_lnki_time = "lnki_time", Fld_lnki_page = "lnki_page", Fld_lnki_count = "lnki_count" , Fld_orig_repo = "orig_repo", Fld_orig_page_id = "orig_page_id", Fld_orig_redirect_src = "orig_redirect_src", Fld_orig_media_type = "orig_media_type" @@ -43,7 +43,7 @@ public class Xob_xfer_regy_tbl { } public static Db_stmt Select_by_page_id_stmt(Db_conn p) {return p.Stmt_sql(Sql_select_clause);} public static DataRdr Select_by_page_id(Db_stmt stmt, int page_id, int limit) {return stmt.Val_int(page_id).Val_int(limit).Exec_select();} - private static final String + private static final String Sql_select_clause = String_.Concat_lines_nl ( "SELECT *" , "FROM xfer_regy" @@ -75,7 +75,7 @@ public class Xob_xfer_regy_tbl { rdr.Rls(); return rv; } - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS xfer_regy" , "( lnki_id integer NOT NULL PRIMARY KEY" , ", lnki_tier_id integer NOT NULL" @@ -97,7 +97,7 @@ public class Xob_xfer_regy_tbl { , ", xfer_status integer NOT NULL" , ");" ); - private static final String Sql_create_data_orig = String_.Concat_lines_nl + private static final String Sql_create_data_orig = String_.Concat_lines_nl ( "INSERT INTO xfer_regy " , "( lnki_id, lnki_tier_id, lnki_page_id, orig_page_id, orig_repo, lnki_ttl, orig_redirect_src, lnki_ext, orig_media_type" , ", file_is_orig, orig_w, orig_h, file_w, file_h, lnki_time, lnki_page, lnki_count" @@ -111,7 +111,7 @@ public class Xob_xfer_regy_tbl { , "WHERE file_is_orig = 1" , "GROUP BY orig_repo, lnki_ttl, lnki_ext, orig_media_type, file_is_orig, orig_w, orig_h, lnki_time, lnki_page" ); - private static final String Sql_create_data_thumb = String_.Concat_lines_nl + private static final String Sql_create_data_thumb = String_.Concat_lines_nl ( "INSERT INTO xfer_regy " , "( lnki_id, lnki_tier_id, lnki_page_id, orig_page_id, orig_repo, lnki_ttl, orig_redirect_src, lnki_ext, orig_media_type" , ", file_is_orig, orig_w, orig_h, file_w, file_h, lnki_time, lnki_page, lnki_count" @@ -125,7 +125,7 @@ public class Xob_xfer_regy_tbl { , "WHERE file_is_orig = 0" , "GROUP BY orig_repo, lnki_ttl, lnki_ext, orig_media_type, file_is_orig, orig_w, orig_h, file_w, file_h, lnki_time, lnki_page" ); - private static final Db_idx_itm + private static final Db_idx_itm // Idx_select = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS xfer_regy__select ON xfer_regy (xfer_status, orig_repo, lnki_ttl, file_w);") Idx_lnki_page_id = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS xfer_regy__lnki_page_id ON xfer_regy (xfer_status, lnki_tier_id, lnki_page_id, lnki_id, orig_repo, file_is_orig, lnki_ttl, lnki_ext, lnki_time, lnki_page, file_w, file_h);") , Idx_lnki_ttl = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS xfer_regy__lnki_ttl ON xfer_regy (lnki_ttl);") // needed for troubleshooting diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_temp_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_temp_tbl.java index 07a294f26..9506d7bf4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_temp_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/dbs/Xob_xfer_temp_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; import gplx.xowa.wikis.dbs.*; import gplx.xowa.files.*; public class Xob_xfer_temp_tbl { @@ -48,7 +48,7 @@ public class Xob_xfer_temp_tbl { .Val_int(count) .Exec_insert(); } - public static final String Tbl_name = "xfer_temp" + public static final String Tbl_name = "xfer_temp" , Fld_lnki_id = "lnki_id", Fld_lnki_tier_id = "lnki_tier_id", Fld_lnki_page_id = "lnki_page_id", Fld_lnki_ttl = "lnki_ttl", Fld_lnki_ext = "lnki_ext", Fld_lnki_type = "lnki_type" , Fld_lnki_w = "lnki_w", Fld_lnki_h = "lnki_h", Fld_lnki_upright = "lnki_upright", Fld_lnki_time = "lnki_time", Fld_lnki_page = "lnki_page", Fld_lnki_count = "lnki_count" , Fld_orig_repo = "orig_repo", Fld_orig_page_id = "orig_page_id", Fld_orig_redirect_src = "orig_redirect_src", Fld_orig_media_type = "orig_media_type" @@ -56,7 +56,7 @@ public class Xob_xfer_temp_tbl { , Fld_file_w = "file_w", Fld_file_h = "file_h", Fld_file_is_orig = "file_is_orig" , Fld_html_w = "html_w", Fld_html_h = "html_h" ; - private static final String Tbl_sql = String_.Concat_lines_nl + private static final String Tbl_sql = String_.Concat_lines_nl ( "CREATE TABLE IF NOT EXISTS xfer_temp" , "( lnki_id integer NOT NULL PRIMARY KEY" , ", lnki_tier_id integer NOT NULL" diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/Xobldr_missing_origs_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/Xobldr_missing_origs_cmd.java index 297795010..774f9603e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/Xobldr_missing_origs_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/Xobldr_missing_origs_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.missing_origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -148,6 +148,6 @@ public class Xobldr_missing_origs_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.orig_regy.find_missing"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr_missing_origs_cmd(null, null); + public static final Xob_cmd Prototype = new Xobldr_missing_origs_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr_missing_origs_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_api.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_api.java index 065514566..45e7a8de6 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_api.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_api.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.missing_origs.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.missing_origs.*; import gplx.langs.htmls.encoders.*; import gplx.langs.jsons.*; @@ -20,9 +20,9 @@ import gplx.xowa.files.repos.*; import gplx.xowa.files.downloads.*; import gplx.xowa.apps.wms.apis.origs.*; public class Xowmf_imageinfo_api { - private final Xof_download_wkr download_wkr; - private final Ordered_hash temp_hash = Ordered_hash_.New(); - public static final byte[] FILE_NS_PREFIX = Bry_.new_a7("File:"); + private final Xof_download_wkr download_wkr; + private final Ordered_hash temp_hash = Ordered_hash_.New(); + public static final byte[] FILE_NS_PREFIX = Bry_.new_a7("File:"); public Xowmf_imageinfo_api(Xof_download_wkr download_wkr) { this.download_wkr = download_wkr; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_item__tst.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_item__tst.java index 52d3fbb26..a41201406 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_item__tst.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/missing_origs/apis/Xowmf_imageinfo_item__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.bldrs.files.missing_origs.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.xowa.addons.bldrs.files.missing_origs.*; import org.junit.*; import gplx.core.tests.*; public class Xowmf_imageinfo_item__tst { - private final Xowmf_imageinfo_item__fxt fxt = new Xowmf_imageinfo_item__fxt(); + private final Xowmf_imageinfo_item__fxt fxt = new Xowmf_imageinfo_item__fxt(); @Test public void Normalize_ttl() { fxt.Test__Normalize_ttl("File:A b.png", "A_b.png"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/shrinks/Xoshrink_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/shrinks/Xoshrink_cmd.java index 071da867e..0aeb6a021 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/shrinks/Xoshrink_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/shrinks/Xoshrink_cmd.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.files.shrinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xoshrink_cmd extends Xob_cmd__base { - public Xoshrink_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - wiki.Init_assert(); - new Xoshrink_mgr().Exec(wiki); - } - - @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.shrink"; - public static final Xob_cmd Prototype = new Xoshrink_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xoshrink_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.files.shrinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xoshrink_cmd extends Xob_cmd__base { + public Xoshrink_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + wiki.Init_assert(); + new Xoshrink_mgr().Exec(wiki); + } + + @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "fsdb.shrink"; + public static final Xob_cmd Prototype = new Xoshrink_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xoshrink_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_itm.java index 553fb5388..e43d2da0b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_itm.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.fsdb.meta.*; public class Xob_bin_db_itm { public Xob_bin_db_itm(int id, Io_url db_url, int ns_id, int pt_id) {this.id = id; this.db_url = db_url; this.ns_id = ns_id; this.pt_id = pt_id;} public int Id() {return id;} private int id; - public int Ns_id() {return ns_id;} private final int ns_id; + public int Ns_id() {return ns_id;} private final int ns_id; public int Pt_id() {return pt_id;} private int pt_id; public long Db_len() {return db_len;} public void Db_len_(long v) {this.db_len = v;} private long db_len; public Io_url Db_url() {return db_url;} public void Db_url_(Io_url v) {db_url = v;} private Io_url db_url; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_mgr.java index 223be47f6..7b6a7d33a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_bin_db_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.primitives.*; import gplx.core.ios.*; import gplx.fsdb.meta.*; public class Xob_bin_db_mgr { - private final int[] ns_ids; private final int ns_ids_len; - private final Ordered_hash nth_hash = Ordered_hash_.New(); private final Int_obj_ref tier_key = Int_obj_ref.New_neg1(); + private final int[] ns_ids; private final int ns_ids_len; + private final Ordered_hash nth_hash = Ordered_hash_.New(); private final Int_obj_ref tier_key = Int_obj_ref.New_neg1(); public Xob_bin_db_mgr(int[] ns_ids) { this.ns_ids = ns_ids; this.ns_ids_len = ns_ids.length; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_xfer_temp_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_xfer_temp_itm.java index a63a4722c..084e3145e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_xfer_temp_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/files/utls/Xob_xfer_temp_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.files.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.files.*; import gplx.core.stores.*; import gplx.dbs.*; import gplx.xowa.files.*; @@ -78,7 +78,7 @@ public class Xob_xfer_temp_itm { orig_minor_mime = rdr.ReadStrOr(Xob_orig_regy_tbl.Fld_orig_minor_mime, ""); // convert nulls to "" orig_ext_id = rdr.ReadInt(Xob_orig_regy_tbl.Fld_orig_file_ext); } - public static final byte + public static final byte Chk_tid_none = 0 , Chk_tid_orig_page_id_is_null = 1 , Chk_tid_orig_media_type_is_audio = 2 diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_cmd.java index a13620a13..c4d5a11e2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_cmd.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.htmls.core.htmls.*; public class Dumpdiff_cmd extends Xob_cmd__base { - private final Dumpdiff_cfg cfg = new Dumpdiff_cfg(); - private final Dumpdiff_mgr mgr = new Dumpdiff_mgr(); + private final Dumpdiff_cfg cfg = new Dumpdiff_cfg(); + private final Dumpdiff_mgr mgr = new Dumpdiff_mgr(); public Dumpdiff_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -31,6 +31,6 @@ public class Dumpdiff_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "hdump.diff"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Dumpdiff_cmd(null, null); + public static final Xob_cmd Prototype = new Dumpdiff_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Dumpdiff_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_log_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_log_tbl.java index b0da05032..2cb544503 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_log_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_log_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; import gplx.dbs.*; class Dumpdiff_log_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__page_id, fld__cur_snip, fld__prv_snip; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__page_id, fld__cur_snip, fld__prv_snip; private Db_stmt stmt__insert; public Dumpdiff_log_tbl(Db_conn conn) { this.conn = conn; @@ -27,8 +27,8 @@ class Dumpdiff_log_tbl implements Db_tbl { this.fld__prv_snip = flds.Add_str("prv_snip", 1024); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "diff_log"; - public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "diff_log"; + public Db_conn Conn() {return conn;} private final Db_conn conn; public void Create_tbl() { conn.Meta_tbl_remake(Dbmeta_tbl_itm.New(tbl_name, flds, Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, fld__page_id, fld__page_id))); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_itm.java index bceee3b3e..22e000422 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_itm.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; -class Dumpdiff_page_itm { - public Dumpdiff_page_itm(int page_id, int ns_id, byte[] ttl_bry, int cur_db_id, int prv_db_id) { - this.page_id = page_id; - this.ns_id = ns_id; - this.ttl_bry = ttl_bry; - this.cur_db_id = cur_db_id; - this.prv_db_id = prv_db_id; - } - public int Page_id() {return page_id;} private final int page_id; - public int Ns_id() {return ns_id;} private final int ns_id; - public byte[] Ttl_bry() {return ttl_bry;} private final byte[] ttl_bry; - public int Cur_db_id() {return cur_db_id;} private final int cur_db_id; - public int Prv_db_id() {return prv_db_id;} private final int prv_db_id; -} +package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; +class Dumpdiff_page_itm { + public Dumpdiff_page_itm(int page_id, int ns_id, byte[] ttl_bry, int cur_db_id, int prv_db_id) { + this.page_id = page_id; + this.ns_id = ns_id; + this.ttl_bry = ttl_bry; + this.cur_db_id = cur_db_id; + this.prv_db_id = prv_db_id; + } + public int Page_id() {return page_id;} private final int page_id; + public int Ns_id() {return ns_id;} private final int ns_id; + public byte[] Ttl_bry() {return ttl_bry;} private final byte[] ttl_bry; + public int Cur_db_id() {return cur_db_id;} private final int cur_db_id; + public int Prv_db_id() {return prv_db_id;} private final int prv_db_id; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_loader.java b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_loader.java index 04105a1f4..1cf902fd2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_loader.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Dumpdiff_page_loader.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; import gplx.dbs.*; class Dumpdiff_page_loader { - private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); private int select_count, cutoff_page_id; public Dumpdiff_page_loader(Xowe_wiki cur_wiki, Xowe_wiki prv_wiki, int select_count) { this.select_count = select_count; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Hdump_html_loader.java b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Hdump_html_loader.java index 7bbd97945..779b99a3b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Hdump_html_loader.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/hdumps/diffs/Hdump_html_loader.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.hdumps.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.hdumps.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.htmls.*; class Hdump_html_loader { - private final Xowe_wiki wiki; + private final Xowe_wiki wiki; private Io_stream_zip_mgr stream_zip_mgr = new Io_stream_zip_mgr(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private final Xoh_page tmp_hpg = new Xoh_page(); - private final Xoa_url tmp_url; private final Xoa_ttl tmp_ttl; + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoh_page tmp_hpg = new Xoh_page(); + private final Xoa_url tmp_url; private final Xoa_ttl tmp_ttl; public Hdump_html_loader(Xowe_wiki wiki) { this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/htmls/Html__dump_to_fsys__cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/htmls/Html__dump_to_fsys__cmd.java index c30c3877b..cce1f35c2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/htmls/Html__dump_to_fsys__cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/htmls/Html__dump_to_fsys__cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.htmls.core.htmls.*; @@ -81,6 +81,6 @@ public class Html__dump_to_fsys__cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "html.dump_to_file"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Html__dump_to_fsys__cmd(null, null); + public static final Xob_cmd Prototype = new Html__dump_to_fsys__cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Html__dump_to_fsys__cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_doc.java b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_doc.java index 5a618fe18..6a05df284 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_doc.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_doc.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.langs.mustaches.*; class Xobc_info_doc implements Mustache_doc_itm { - private final byte[] wiki_domain, task_size; - private final String wiki_dir, torrent_fil; - private final Mustache_doc_itm[] urls; + private final byte[] wiki_domain, task_size; + private final String wiki_dir, torrent_fil; + private final Mustache_doc_itm[] urls; public Xobc_info_doc(byte[] wiki_domain, String wiki_dir, byte[] task_size, String torrent_fil, Mustache_doc_itm[] urls) { this.wiki_domain = wiki_domain; this.wiki_dir = wiki_dir; this.task_size = task_size; this.torrent_fil = torrent_fil; this.urls = urls; } @@ -35,7 +35,7 @@ class Xobc_info_doc implements Mustache_doc_itm { } } class Xobc_info_url implements Mustache_doc_itm { - private final String url, md5; private final byte[] size; + private final String url, md5; private final byte[] size; public Xobc_info_url(String url, byte[] size, String md5) { this.url = url; this.size = size; this.md5 = md5; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html.java b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html.java index edc0a9626..685ccea31 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*; import gplx.xowa.addons.bldrs.centrals.*; import gplx.xowa.addons.bldrs.centrals.dbs.*; import gplx.xowa.addons.bldrs.centrals.dbs.datas.imports.*; import gplx.xowa.addons.bldrs.centrals.hosts.*; import gplx.xowa.wikis.domains.*; import gplx.core.ios.*; class Xobc_info_html extends Xow_special_wtr__base { - private final Xobc_task_mgr task_mgr; - private final int task_id; + private final Xobc_task_mgr task_mgr; + private final int task_id; public Xobc_info_html(Xobc_task_mgr task_mgr, int task_id) {this.task_mgr = task_mgr; this.task_id = task_id;} @Override protected Io_url Get_addon_dir(Xoa_app app) {return app.Fsys_mgr().Http_root().GenSubDir_nest("bin", "any", "xowa", "addon", "bldr", "info");} @Override protected Io_url Get_mustache_fil(Io_url addon_dir) {return addon_dir.GenSubFil_nest("bin", "xobc_info.mustache.html");} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html__tst.java b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html__tst.java index 05ecc3f18..45ff1ce67 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html__tst.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_html__tst.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; -import org.junit.*; import gplx.core.tests.*; import gplx.xowa.wikis.domains.*; -public class Xobc_info_html__tst { - private final Xobc_info_html__fxt fxt = new Xobc_info_html__fxt(); - @Test public void Torrent__en_w() {fxt.Test__torrent_link("en.wikipedia.org" , "https://archive.org/download/Xowa_enwiki_latest_archive.torrent");} - @Test public void Torrent__fr_d() {fxt.Test__torrent_link("fr.wiktionary.org" , "https://archive.org/download/Xowa_frwiki_latest_archive.torrent");} -} -class Xobc_info_html__fxt { - public void Test__torrent_link(String domain_str, String expd) { - Gftest.Eq__str(expd, Xobc_info_html.Make_torrent_fil("https://archive.org/download/", Xow_domain_itm_.parse(Bry_.new_u8(domain_str)))); - } +package gplx.xowa.addons.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; +import org.junit.*; import gplx.core.tests.*; import gplx.xowa.wikis.domains.*; +public class Xobc_info_html__tst { + private final Xobc_info_html__fxt fxt = new Xobc_info_html__fxt(); + @Test public void Torrent__en_w() {fxt.Test__torrent_link("en.wikipedia.org" , "https://archive.org/download/Xowa_enwiki_latest_archive.torrent");} + @Test public void Torrent__fr_d() {fxt.Test__torrent_link("fr.wiktionary.org" , "https://archive.org/download/Xowa_frwiki_latest_archive.torrent");} +} +class Xobc_info_html__fxt { + public void Test__torrent_link(String domain_str, String expd) { + Gftest.Eq__str(expd, Xobc_info_html.Make_torrent_fil("https://archive.org/download/", Xow_domain_itm_.parse(Bry_.new_u8(domain_str)))); + } } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_special.java b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_special.java index 9ba4d298f..8eb182d04 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_special.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/infos/Xobc_info_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.addons.bldrs.centrals.*; @@ -27,7 +27,7 @@ public class Xobc_info_special implements Xow_special_page { } Xobc_info_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xobc_info_special(Xow_special_meta.New_xo("XowaDownloadCentralInfo", "Download Central Task Info")); + public static final Xow_special_page Prototype = new Xobc_info_special(Xow_special_meta.New_xo("XowaDownloadCentralInfo", "Download Central Task Info")); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_req_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_req_tbl.java index 4f36cbe94..5b886d723 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_req_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_req_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; public class Xomp_lock_req_tbl implements Db_tbl { - private final String fld_machine_name, fld_req_time; - private final Db_conn conn; + private final String fld_machine_name, fld_req_time; + private final Db_conn conn; public Xomp_lock_req_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xomp_lock_req"; @@ -25,8 +25,8 @@ public class Xomp_lock_req_tbl implements Db_tbl { this.fld_req_time = flds.Add_str("req_time", 32); // EX: 20160801 010203 conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds , Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "req_time", fld_req_time) diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_tbl.java index a6430eac6..fd6de855d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_lock_tbl.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; public class Xomp_lock_tbl implements Db_tbl { - private final String fld_uid_prv; - private final Db_conn conn; + private final String fld_uid_prv; + private final Db_conn conn; public Xomp_lock_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xomp_lock"; this.fld_uid_prv = flds.Add_int("uid_prv"); // EX: -1 conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Create_tbl() { conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds)); conn.Stmt_insert(tbl_name, flds).Clear().Val_int(fld_uid_prv, -1).Exec_insert(); // always add default record when creating table diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_mgr_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_mgr_db.java index eccd0637e..140987294 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_mgr_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_mgr_db.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.addons.bldrs.mass_parses.parses.pools.*; import gplx.xowa.addons.bldrs.mass_parses.parses.locks.*; @@ -26,13 +26,13 @@ public class Xomp_mgr_db { // this.lock_mgr = new Xomp_lock_mgr__db(conn, 5000); this.lock_mgr = new Xomp_lock_mgr__fsys(5000, this.Dir()); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Io_url Url() {return url;} private final Io_url url; public Io_url Dir() {return url.OwnerDir();} - public Xomp_page_tbl Tbl__page() {return page_tbl;} private final Xomp_page_tbl page_tbl; - public Xomp_wkr_tbl Tbl__wkr() {return wkr_tbl;} private final Xomp_wkr_tbl wkr_tbl; - public Db_cfg_tbl Tbl__cfg() {return cfg_tbl;} private final Db_cfg_tbl cfg_tbl; - public Xomp_lock_mgr Lock_mgr() {return lock_mgr;} private final Xomp_lock_mgr lock_mgr; + public Xomp_page_tbl Tbl__page() {return page_tbl;} private final Xomp_page_tbl page_tbl; + public Xomp_wkr_tbl Tbl__wkr() {return wkr_tbl;} private final Xomp_wkr_tbl wkr_tbl; + public Db_cfg_tbl Tbl__cfg() {return cfg_tbl;} private final Db_cfg_tbl cfg_tbl; + public Xomp_lock_mgr Lock_mgr() {return lock_mgr;} private final Xomp_lock_mgr lock_mgr; public void Remake() { conn.Meta_tbl_remake_many(page_tbl, wkr_tbl, cfg_tbl); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_page_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_page_tbl.java index 8c72a0f11..cde853448 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_page_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_page_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; public class Xomp_page_tbl implements Db_tbl { - private final Object thread_lock = new Object(); - private final Db_conn conn; - // private final String fld_page_id, fld_page_status, fld_page_mgr_id; + private final Object thread_lock = new Object(); + private final Db_conn conn; + // private final String fld_page_id, fld_page_status, fld_page_mgr_id; public Xomp_page_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xomp_page"; @@ -30,8 +30,8 @@ public class Xomp_page_tbl implements Db_tbl { flds.Add_int_dflt("xomp_wkr_id", -1); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Create_tbl() { conn.Meta_tbl_create diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_stat_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_stat_tbl.java index 487f2ec74..0eff58e68 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_stat_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_stat_tbl.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.parsers.logs.stats.*; public class Xomp_stat_tbl implements Rls_able { - private static final String tbl_name = "xomp_stats"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private static final String + private static final String tbl_name = "xomp_stats"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private static final String fld_page_id = flds.Add_int_pkey("page_id"), fld_wkr_uid = flds.Add_int("wkr_uid") , fld_wtxt_len = flds.Add_int("wtxt_len"), fld_html_len = flds.Add_int("html_len"), fld_zip_len = flds.Add_int("zip_len") , fld_page_time = flds.Add_long("page_time"), fld_tidy_time = flds.Add_long("tidy_time"), fld_fulltext_time = flds.Add_long("fulltext_time") @@ -30,7 +30,7 @@ public class Xomp_stat_tbl implements Rls_able { , fld_math_count = flds.Add_int("math_count"), fld_imap_count = flds.Add_int("imap_count"), fld_hiero_count = flds.Add_int("hiero_count") , fld_gallery_count = flds.Add_int("gallery_count"), fld_gallery_packed_count = flds.Add_int("gallery_packed_count") ; - private final Db_conn conn; private Db_stmt stmt_insert; + private final Db_conn conn; private Db_stmt stmt_insert; public Xomp_stat_tbl(Db_conn conn) { this.conn = conn; this.Create_tbl(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_db.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_db.java index 27de8478f..fcc7fc88d 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_db.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.xowa.htmls.core.dbs.*; @@ -24,10 +24,10 @@ public class Xomp_wkr_db { this.html_tbl = new Xowd_html_tbl(conn); conn.Meta_tbl_assert(html_tbl); } - public int Idx() {return idx;} private final int idx; + public int Idx() {return idx;} private final int idx; public Io_url Url() {return url;} private Io_url url; public Db_conn Conn() {return conn;} private Db_conn conn; - public Xowd_html_tbl Html_tbl() {return html_tbl;} private final Xowd_html_tbl html_tbl; + public Xowd_html_tbl Html_tbl() {return html_tbl;} private final Xowd_html_tbl html_tbl; public static Xomp_wkr_db New(Io_url root_dir, int uid) { Io_url url = root_dir.GenSubFil_nest("xomp_" + Int_.To_str_fmt(uid, "000"), "xomp_wkr.sqlite3"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_tbl.java index 8ee77d223..e4c8c9f08 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/dbs/Xomp_wkr_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; public class Xomp_wkr_tbl implements Db_tbl { - private final String fld_wkr_uid, fld_wkr_url, fld_wkr_status, fld_wkr_status_time, fld_wkr_exec_count, fld_wkr_exec_time; - private final Db_conn conn; - private final Object thread_lock = new Object(); + private final String fld_wkr_uid, fld_wkr_url, fld_wkr_status, fld_wkr_status_time, fld_wkr_exec_count, fld_wkr_exec_time; + private final Db_conn conn; + private final Object thread_lock = new Object(); public Xomp_wkr_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "xomp_wkr"; @@ -30,8 +30,8 @@ public class Xomp_wkr_tbl implements Db_tbl { fld_wkr_exec_time = flds.Add_int("wkr_exec_time"); // EX: 123 conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public int Init_wkrs(String wkr_url, int wkr_len) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_cmd.java index 862bcd8d5..9296eb16b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.inits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Xomp_init_cmd extends Xob_cmd__base { - private final Xomp_init_mgr mgr = new Xomp_init_mgr(); + private final Xomp_init_mgr mgr = new Xomp_init_mgr(); public Xomp_init_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -28,6 +28,6 @@ public class Xomp_init_cmd extends Xob_cmd__base { } private static final String Invk__cfg = "cfg"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "wiki.mass_parse.init"; - public static final Xob_cmd Prototype = new Xomp_init_cmd(null, null); + public static final Xob_cmd Prototype = new Xomp_init_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xomp_init_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_mgr.java index 63981ab86..ca9feee1c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/inits/Xomp_init_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.inits; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; class Xomp_init_mgr { - public Xomp_init_mgr_cfg Cfg() {return cfg;} private final Xomp_init_mgr_cfg cfg = new Xomp_init_mgr_cfg(); + public Xomp_init_mgr_cfg Cfg() {return cfg;} private final Xomp_init_mgr_cfg cfg = new Xomp_init_mgr_cfg(); public void Exec(Xowe_wiki wiki) { // init vars cfg.Init(wiki); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_rdr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_rdr.java index 62882731c..c791eab76 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_rdr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_rdr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.xowa.htmls.core.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; class Xomp_html_db_rdr { - private final Xowd_html_tbl[] src_tbls; - private final Xomp_mgr_db mgr_db; + private final Xowd_html_tbl[] src_tbls; + private final Xomp_mgr_db mgr_db; public Xomp_html_db_rdr(Xowe_wiki wiki) { this.mgr_db = Xomp_mgr_db.New__load(wiki); this.src_tbls = new Xowd_html_tbl[mgr_db.Tbl__wkr().Select_count()]; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_wtr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_wtr.java index 4842923ff..a2f507682 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_wtr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_html_db_wtr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.dbs.*; import gplx.xowa.htmls.core.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.bldrs.cmds.*; class Xomp_html_db_wtr { - private final long len_max; - private final Xowe_wiki wiki; private final Xow_db_mgr db_mgr; + private final long len_max; + private final Xowe_wiki wiki; private final Xow_db_mgr db_mgr; private long len_cur; private int prv_ns_id = -1; private Xow_db_file html_db; private Xowd_html_tbl html_tbl; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd.java index 6d0761987..5041e57cd 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Xomp_make_cmd extends Xob_cmd__base { - private final Xomp_make_cmd_cfg cfg = new Xomp_make_cmd_cfg(); + private final Xomp_make_cmd_cfg cfg = new Xomp_make_cmd_cfg(); public Xomp_make_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -35,6 +35,6 @@ public class Xomp_make_cmd extends Xob_cmd__base { } private static final String Invk__cfg = "cfg"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "wiki.mass_parse.make"; - public static final Xob_cmd Prototype = new Xomp_make_cmd(null, null); + public static final Xob_cmd Prototype = new Xomp_make_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xomp_make_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd_cfg.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd_cfg.java index 32d346b2e..05a88a882 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd_cfg.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_cmd_cfg.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; public class Xomp_make_cmd_cfg implements Gfo_invk { public Hash_adp Mode() {return mode;} private Hash_adp mode = Hash_adp_.New().Add_and_more("html", "html").Add_and_more("lnki", "lnki").Add_and_more("stat", "stat").Add_and_more("hxtn", "hxtn"); public boolean Delete_html_dbs() {return delete_html_dbs;} private boolean delete_html_dbs = true; - public Ordered_hash Merger_wkrs() {return merger_wkrs;} private final Ordered_hash merger_wkrs = Ordered_hash_.New(); + public Ordered_hash Merger_wkrs() {return merger_wkrs;} private final Ordered_hash merger_wkrs = Ordered_hash_.New(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk__mode_)) mode = GfoMsg_.Read_str_ary_as_hash(m, "v"); else if (ctx.Match(k, Invk__delete_html_dbs_)) delete_html_dbs = m.ReadYn("v"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_html.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_html.java index 0d79e9ed0..4d7f64425 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_html.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/makes/Xomp_make_html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.core.brys.*; import gplx.dbs.*; import gplx.xowa.htmls.core.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; class Xomp_make_html { - private final Int_flag_bldr src_body_flag_bldr = Xowd_html_tbl.Make_body_flag_bldr(); + private final Int_flag_bldr src_body_flag_bldr = Xowd_html_tbl.Make_body_flag_bldr(); public void Exec(Xowe_wiki wiki, Xomp_make_cmd_cfg cfg) { // init Xomp_mgr_db mgr_db = Xomp_mgr_db.New__load(wiki); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/Xomp_parse_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/Xomp_parse_cmd.java index eb3e24b8d..3b6931501 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/Xomp_parse_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/Xomp_parse_cmd.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.bldrs.mass_parses.parses.mgrs.*; public class Xomp_parse_cmd extends Xob_cmd__base { - private final Xomp_parse_mgr mgr = new Xomp_parse_mgr(); + private final Xomp_parse_mgr mgr = new Xomp_parse_mgr(); public Xomp_parse_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -29,6 +29,6 @@ public class Xomp_parse_cmd extends Xob_cmd__base { } private static final String Invk__cfg = "cfg"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "wiki.mass_parse.exec"; - public static final Xob_cmd Prototype = new Xomp_parse_cmd(null, null); + public static final Xob_cmd Prototype = new Xomp_parse_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xomp_parse_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__db.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__db.java index 85d18c9d6..3e26dd15c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__db.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__db.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.locks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; public class Xomp_lock_mgr__db implements Xomp_lock_mgr { - private final Db_conn conn; - private final Xomp_lock_tbl lock_tbl; - private final Xomp_lock_req_tbl req_tbl; - private final int wait_time; + private final Db_conn conn; + private final Xomp_lock_tbl lock_tbl; + private final Xomp_lock_req_tbl req_tbl; + private final int wait_time; public Xomp_lock_mgr__db(Db_conn conn, int wait_time) { this.conn = conn; this.lock_tbl = new Xomp_lock_tbl(conn); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__fsys.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__fsys.java index 4b3f72586..1e9372aaf 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__fsys.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/locks/Xomp_lock_mgr__fsys.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.locks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; public class Xomp_lock_mgr__fsys implements Xomp_lock_mgr { - private final Io_url root_dir, uid_fil, active_fil; - private final int wait_time; + private final Io_url root_dir, uid_fil, active_fil; + private final int wait_time; private Io_url stop_fil; public Xomp_lock_mgr__fsys(int wait_time, Io_url root_dir) { this.wait_time = wait_time; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_parse_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_parse_mgr.java index faf587ef5..ef61b290f 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_parse_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_parse_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.core.threads.*; import gplx.core.threads.utils.*; import gplx.core.caches.*; import gplx.xowa.wikis.caches.*; @@ -21,7 +21,7 @@ import gplx.xowa.addons.bldrs.wmdumps.imglinks.*; import gplx.xowa.addons.wikis.fulltexts.indexers.bldrs.*; public class Xomp_parse_mgr { private Gfo_countdown_latch latch; - public Xomp_parse_mgr_cfg Cfg() {return cfg;} private final Xomp_parse_mgr_cfg cfg = new Xomp_parse_mgr_cfg(); + public Xomp_parse_mgr_cfg Cfg() {return cfg;} private final Xomp_parse_mgr_cfg cfg = new Xomp_parse_mgr_cfg(); public void Wkrs_done_add_1() {latch.Countdown();} public void Run(Xowe_wiki wiki) { // init db diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_prog_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_prog_mgr.java index 97d4b50d8..e3c80f79b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_prog_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/mgrs/Xomp_prog_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.xowa.wikis.caches.*; public class Xomp_prog_mgr { - private final Object thread_lock = new Object(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Object thread_lock = new Object(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private Xow_page_cache page_cache; private int prog_interval, perf_interval; private int pages_done, pages_total; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_load_wkr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_load_wkr.java index 68dc87ec7..a33aa752a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_load_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_load_wkr.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.pools; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.core.threads.utils.*; import gplx.xowa.addons.bldrs.mass_parses.parses.utls.*; public class Xomp_load_wkr implements Gfo_invk { - private final Object thread_lock = new Object(); - private final Xow_wiki wiki; - private final Db_conn mgr_conn; - private final Db_attach_mgr attach_mgr; - private final Gfo_blocking_queue queue; - private final int num_wkrs; + private final Object thread_lock = new Object(); + private final Xow_wiki wiki; + private final Db_conn mgr_conn; + private final Db_attach_mgr attach_mgr; + private final Gfo_blocking_queue queue; + private final int num_wkrs; - private final Bry_bfr prog_bfr = Bry_bfr_.New(); + private final Bry_bfr prog_bfr = Bry_bfr_.New(); private int pages_done, pages_total; private long time_bgn, time_prv, time_done; public Xomp_load_wkr(Xow_wiki wiki, Db_conn mgr_conn, int num_pages_in_pool, int num_wkrs) { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_itm.java index 42256b910..a0b985008 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_itm.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.pools; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.xowa.wikis.data.tbls.*; public class Xomp_page_itm implements Xowd_text_bry_owner { public Xomp_page_itm(int id) {this.id = id;} - public int Id() {return id;} private final int id; + public int Id() {return id;} private final int id; public int Ns_id() {return ns_id;} private int ns_id; public int Page_score() {return page_score;} private int page_score; public byte[] Ttl_bry() {return ttl_bry;} private byte[] ttl_bry; @@ -34,5 +34,5 @@ public class Xomp_page_itm implements Xowd_text_bry_owner { public int Page_id() {return id;} public void Set_text_bry_by_db(byte[] v) {this.text = v;} - public static final Xomp_page_itm Null = new Xomp_page_itm(-1); + public static final Xomp_page_itm Null = new Xomp_page_itm(-1); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool.java index ae19dddaa..257ec5514 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.pools; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; public class Xomp_page_pool { - private final Object thread_lock = new Object(); - private final Xomp_page_pool_loader loader; - private final int num_pages_per_wkr; + private final Object thread_lock = new Object(); + private final Xomp_page_pool_loader loader; + private final int num_pages_per_wkr; private List_adp pool = List_adp_.New(); private int pool_idx = 0, pool_len = 0; public Xomp_page_pool(Xomp_page_pool_loader loader, int num_pages_per_wkr) { this.loader = loader; this.num_pages_per_wkr = num_pages_per_wkr; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool_loader.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool_loader.java index f75270d3b..b6fcdc27c 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool_loader.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/pools/Xomp_page_pool_loader.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.pools; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.dbs.*; import gplx.xowa.addons.bldrs.mass_parses.parses.wkrs.*; import gplx.xowa.addons.bldrs.mass_parses.parses.utls.*; import gplx.xowa.addons.bldrs.mass_parses.parses.locks.*; public class Xomp_page_pool_loader { - private final Xow_wiki wiki; - private final int num_pages_per_load; - private final Db_attach_mgr attach_mgr; - private final boolean show_msg__fetched_pool; + private final Xow_wiki wiki; + private final int num_pages_per_load; + private final Db_attach_mgr attach_mgr; + private final boolean show_msg__fetched_pool; public Xomp_page_pool_loader(Xow_wiki wiki, Db_conn make_conn, int num_pages_per_load, boolean show_msg__fetched_pool) { this.wiki = wiki; this.make_conn = make_conn; @@ -28,7 +28,7 @@ public class Xomp_page_pool_loader { this.num_pages_per_load = num_pages_per_load; this.show_msg__fetched_pool = show_msg__fetched_pool; } - public Db_conn Conn() {return make_conn;} private final Db_conn make_conn; + public Db_conn Conn() {return make_conn;} private final Db_conn make_conn; public int Get_pending_count() { Db_rdr rdr = make_conn.Stmt_sql("SELECT Count(*) AS Count_of FROM xomp_page mp WHERE mp.page_status = 0").Exec_select__rls_auto(); try { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_lnki_temp_wkr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_lnki_temp_wkr.java index e88e89000..9c363e1fa 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_lnki_temp_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_lnki_temp_wkr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.parsers.lnkis.files.*; import gplx.xowa.files.*; import gplx.xowa.addons.bldrs.files.cmds.*; import gplx.xowa.addons.bldrs.files.dbs.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.domains.*; public class Xomp_lnki_temp_wkr implements Xop_file_logger { - private final Xob_lnki_temp_tbl tbl; - private final Xowe_wiki commons_wiki; + private final Xob_lnki_temp_tbl tbl; + private final Xowe_wiki commons_wiki; private boolean ns_file_is_case_match_all = true; public Xomp_lnki_temp_wkr(Xowe_wiki wiki, Db_conn wkr_conn) { this.tbl = new Xob_lnki_temp_tbl(wkr_conn); wkr_conn.Meta_tbl_assert(tbl); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_ns_ord_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_ns_ord_mgr.java index 72300f2e1..c71e0e04b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_ns_ord_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_ns_ord_mgr.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.mass_parses.parses.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; -import gplx.core.primitives.*; import gplx.core.lists.hashs.*; -public class Xomp_ns_ord_mgr { - private final Hash_adp__int hash = new Hash_adp__int(); - public Xomp_ns_ord_mgr(int[] ns_id_ary) { - int len = ns_id_ary.length; - for (int i = 0; i < len; ++i) { - hash.Add(ns_id_ary[i], new Int_obj_val(i)); - } - } - public int Get_ord_by_ns_id(int ns_id) {return ((Int_obj_val)hash.Get_by_or_fail(ns_id)).Val();} -} +package gplx.xowa.addons.bldrs.mass_parses.parses.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; +import gplx.core.primitives.*; import gplx.core.lists.hashs.*; +public class Xomp_ns_ord_mgr { + private final Hash_adp__int hash = new Hash_adp__int(); + public Xomp_ns_ord_mgr(int[] ns_id_ary) { + int len = ns_id_ary.length; + for (int i = 0; i < len; ++i) { + hash.Add(ns_id_ary[i], new Int_obj_val(i)); + } + } + public int Get_ord_by_ns_id(int ns_id) {return ((Int_obj_val)hash.Get_by_or_fail(ns_id)).Val();} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_text_db_loader.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_text_db_loader.java index 7ee1d6a0b..a4d551c90 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_text_db_loader.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/utls/Xomp_text_db_loader.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.core.ios.*; import gplx.xowa.wikis.data.tbls.*; public class Xomp_text_db_loader { - private final Xow_wiki wiki; - private final Ordered_hash text_db_hash = Ordered_hash_.New(); - private final Io_stream_zip_mgr zip_mgr; + private final Xow_wiki wiki; + private final Ordered_hash text_db_hash = Ordered_hash_.New(); + private final Io_stream_zip_mgr zip_mgr; public Xomp_text_db_loader(Xow_wiki wiki) { this.wiki = wiki; this.zip_mgr = wiki.Utl__zip_mgr(); @@ -89,6 +89,6 @@ public class Xomp_text_db_loader { } class Xomp_text_db_itm { public Xomp_text_db_itm(int text_db_id) {this.text_db_id = text_db_id;} - public int Text_db_id() {return text_db_id;} private final int text_db_id; - public List_adp Page_list() {return page_list;} private final List_adp page_list = List_adp_.New(); + public int Text_db_id() {return text_db_id;} private final int text_db_id; + public List_adp Page_list() {return page_list;} private final List_adp page_list = List_adp_.New(); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/wkrs/Xob_hdump_tbl_retriever__xomp.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/wkrs/Xob_hdump_tbl_retriever__xomp.java index 47a689532..6f74f3afc 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/wkrs/Xob_hdump_tbl_retriever__xomp.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/parses/wkrs/Xob_hdump_tbl_retriever__xomp.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.mass_parses.parses.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; import gplx.xowa.addons.bldrs.mass_parses.parses.*; import gplx.dbs.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.htmls.core.bldrs.*; import gplx.xowa.htmls.core.dbs.*; class Xob_hdump_tbl_retriever__xomp implements Xob_hdump_tbl_retriever { - private final Db_conn conn; - private final Xowd_html_tbl tbl; + private final Db_conn conn; + private final Xowd_html_tbl tbl; public Xob_hdump_tbl_retriever__xomp(Xowd_html_tbl tbl) { this.tbl = tbl; this.conn = tbl.Conn(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/resumes/Xomp_resume_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/resumes/Xomp_resume_cmd.java index eb7d57e50..26601edc0 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/resumes/Xomp_resume_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/mass_parses/resumes/Xomp_resume_cmd.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.mass_parses.resumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xomp_resume_cmd extends Xob_cmd__base { - public Xomp_resume_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - new Xomp_resume_mgr().Exec(wiki); - } - - @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "wiki.mass_parse.resume"; - public static final Xob_cmd Prototype = new Xomp_resume_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xomp_resume_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.mass_parses.resumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.mass_parses.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xomp_resume_cmd extends Xob_cmd__base { + public Xomp_resume_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + new Xomp_resume_mgr().Exec(wiki); + } + + @Override public String Cmd_key() {return BLDR_CMD_KEY;} private static final String BLDR_CMD_KEY = "wiki.mass_parse.resume"; + public static final Xob_cmd Prototype = new Xomp_resume_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xomp_resume_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xob_delete_regy_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xob_delete_regy_tbl.java index ed4c7fd00..086663d2a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xob_delete_regy_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xob_delete_regy_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; import gplx.dbs.*; public class Xob_delete_regy_tbl { - public final String tbl_name = "delete_regy"; - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_fil_id, fld_thm_id, fld_reason; - public final Db_conn conn; + public final String tbl_name = "delete_regy"; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_fil_id, fld_thm_id, fld_reason; + public final Db_conn conn; public Xob_delete_regy_tbl(Db_conn conn) { this.conn = conn; this.fld_fil_id = flds.Add_int("fil_id"); @@ -27,5 +27,5 @@ public class Xob_delete_regy_tbl { this.fld_reason = flds.Add_str("reason", 255); this.meta = Dbmeta_tbl_itm.New(tbl_name, flds); } - public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; + public Dbmeta_tbl_itm Meta() {return meta;} private final Dbmeta_tbl_itm meta; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_exec_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_exec_cmd.java index c3f58b0d6..f040f90fb 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_exec_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_exec_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Xodel_exec_cmd extends Xob_cmd__base { @@ -29,6 +29,6 @@ public class Xodel_exec_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "fsdb.deletion_db.exec"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xodel_exec_cmd(null, null); + public static final Xob_cmd Prototype = new Xodel_exec_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_exec_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_make_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_make_cmd.java index d8e5a534a..a8d5458a4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_make_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_make_cmd.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xodel_make_cmd extends Xob_cmd__base implements Xob_cmd { - public Xodel_make_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - wiki.Init_assert(); - new Xodel_make_mgr().Exec(wiki); - } - - public static final String BLDR_CMD_KEY = "file.deletion_db.make"; - @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xodel_make_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_make_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xodel_make_cmd extends Xob_cmd__base implements Xob_cmd { + public Xodel_make_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + wiki.Init_assert(); + new Xodel_make_mgr().Exec(wiki); + } + + public static final String BLDR_CMD_KEY = "file.deletion_db.make"; + @Override public String Cmd_key() {return BLDR_CMD_KEY;} + public static final Xob_cmd Prototype = new Xodel_make_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_make_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_prune_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_prune_itm.java index 518319248..5f19914d1 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_prune_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_prune_itm.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; -class Xodel_prune_itm { - public Xodel_prune_itm(int item_id, boolean item_is_orig) { - this.Item_id = item_id; - this.Item_is_orig = item_is_orig; - } - public final int Item_id; - public final boolean Item_is_orig; -} +package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; +class Xodel_prune_itm { + public Xodel_prune_itm(int item_id, boolean item_is_orig) { + this.Item_id = item_id; + this.Item_is_orig = item_is_orig; + } + public final int Item_id; + public final boolean Item_is_orig; +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_small_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_small_cmd.java index 9e0372b15..0bf766258 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_small_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/Xodel_small_cmd.java @@ -18,7 +18,7 @@ import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.files.*; public class Xodel_small_cmd extends Xob_cmd__base { public Xodel_small_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - private final int[] ext_max_ary = Xobldr__fsdb_db__delete_small_files_.New_ext_max_ary(); + private final int[] ext_max_ary = Xobldr__fsdb_db__delete_small_files_.New_ext_max_ary(); @Override public void Cmd_run() { wiki.Init_assert(); new Xodel_small_mgr().Exec(wiki, ext_max_ary); @@ -27,7 +27,7 @@ public class Xodel_small_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "file.deletion_db.small_files"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xodel_small_cmd(null, null); + public static final Xob_cmd Prototype = new Xodel_small_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_small_cmd(bldr, wiki);} } class Xobldr__fsdb_db__delete_small_files_ { diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/find_missings/Xodel_find_missing_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/find_missings/Xodel_find_missing_cmd.java index 1e21f7279..6b9021622 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/find_missings/Xodel_find_missing_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/updates/files/find_missings/Xodel_find_missing_cmd.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.bldrs.updates.files.find_missings; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; import gplx.xowa.addons.bldrs.updates.files.*; -import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; -public class Xodel_find_missing_cmd extends Xob_cmd__base implements Xob_cmd { - public Xodel_find_missing_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} - @Override public void Cmd_run() { - wiki.Init_assert(); - new Xodel_find_missing_mgr().Exec(wiki); - } - - public static final String BLDR_CMD_KEY = "file.deletion_db.find_missing"; - @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xodel_find_missing_cmd(null, null); - @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_find_missing_cmd(bldr, wiki);} -} +package gplx.xowa.addons.bldrs.updates.files.find_missings; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*; import gplx.xowa.addons.bldrs.updates.files.*; +import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; +public class Xodel_find_missing_cmd extends Xob_cmd__base implements Xob_cmd { + public Xodel_find_missing_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} + @Override public void Cmd_run() { + wiki.Init_assert(); + new Xodel_find_missing_mgr().Exec(wiki); + } + + public static final String BLDR_CMD_KEY = "file.deletion_db.find_missing"; + @Override public String Cmd_key() {return BLDR_CMD_KEY;} + public static final Xob_cmd Prototype = new Xodel_find_missing_cmd(null, null); + @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_find_missing_cmd(bldr, wiki);} +} diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/utils_rankings/bldrs/Sqlite_percentile_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/utils_rankings/bldrs/Sqlite_percentile_cmd.java index a9d94639f..76f04f225 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/utils_rankings/bldrs/Sqlite_percentile_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/utils_rankings/bldrs/Sqlite_percentile_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.utils_rankings.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.utils_rankings.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -83,6 +83,6 @@ public class Sqlite_percentile_cmd extends Xob_cmd__base implements Xob_cmd { public static final String BLDR_CMD_KEY = "util.sqlite.normalize"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Sqlite_percentile_cmd(null, null); + public static final Xob_cmd Prototype = new Sqlite_percentile_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Sqlite_percentile_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_page_loader__wiki.java b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_page_loader__wiki.java index 17c2e71bf..cace578a0 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_page_loader__wiki.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_page_loader__wiki.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.volumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.wikis.nss.*; interface Volume_page_loader { boolean Load(Volume_page_itm rv, byte[] ttl); } class Volume_page_loader__wiki implements Volume_page_loader { - private final Xowe_wiki wiki; + private final Xowe_wiki wiki; public Volume_page_loader__wiki(Xowe_wiki wiki) {this.wiki = wiki;} public boolean Load(Volume_page_itm rv, byte[] ttl) { Xoa_ttl page_ttl = wiki.Ttl_parse(ttl); if (page_ttl == null) return false; @@ -56,6 +56,6 @@ class Volume_page_itm { } public Xoa_ttl Page_ttl() {return page_ttl;} private Xoa_ttl page_ttl; public Xoa_url Page_url() {return page_url;} private Xoa_url page_url; - public List_adp Link_list() {return link_list;} private final List_adp link_list = List_adp_.New(); - public List_adp File_list() {return file_list;} private final List_adp file_list = List_adp_.New(); + public List_adp Link_list() {return link_list;} private final List_adp link_list = List_adp_.New(); + public List_adp File_list() {return file_list;} private final List_adp file_list = List_adp_.New(); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_cmd.java index cfe93ee6d..995c24dfa 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.volumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.core.brys.*; import gplx.dbs.*; @@ -41,6 +41,6 @@ public class Volume_prep_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "volume.prep"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Volume_prep_cmd(null, null); + public static final Xob_cmd Prototype = new Volume_prep_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Volume_prep_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_itm.java b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_itm.java index 51ec172eb..fe4aa0bb2 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_itm.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.volumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.core.brys.*; class Volume_prep_itm implements Bry_bfr_able { @@ -26,7 +26,7 @@ class Volume_prep_itm implements Bry_bfr_able { public int Max_file_count = -1; public long Max_file_size = -1; public boolean Skip_audio = true; - public static final Volume_prep_itm[] Ary_empty = new Volume_prep_itm[0]; + public static final Volume_prep_itm[] Ary_empty = new Volume_prep_itm[0]; public void To_bfr(Bry_bfr bfr) { bfr.Add(Page_ttl); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_mgr.java index 5dbccc24a..e65349265 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.volumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; class Volume_prep_mgr { - private final Volume_page_loader loader; - private final Volume_page_itm tmp_page = new Volume_page_itm(); - private final List_adp list = List_adp_.New(); + private final Volume_page_loader loader; + private final Volume_page_itm tmp_page = new Volume_page_itm(); + private final List_adp list = List_adp_.New(); public Volume_prep_mgr(Volume_page_loader loader) {this.loader = loader;} public Volume_make_itm[] Calc_makes(Volume_prep_itm[] ary) { Volume_prep_ctx ctx = new Volume_prep_ctx(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_rdr_tst.java b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_rdr_tst.java index f000100fa..a76c51e89 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_rdr_tst.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/volumes/Volume_prep_rdr_tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.volumes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import org.junit.*; import gplx.core.tests.*; public class Volume_prep_rdr_tst { - private final Volume_prep_rdr_fxt fxt = new Volume_prep_rdr_fxt(); + private final Volume_prep_rdr_fxt fxt = new Volume_prep_rdr_fxt(); @Test public void Parse() { fxt.Test__parse(String_.Concat_lines_nl_skip_last("A", "", "B") , fxt.Make__itm("A") @@ -25,7 +25,7 @@ public class Volume_prep_rdr_tst { } } class Volume_prep_rdr_fxt { - private final Volume_prep_rdr rdr = new Volume_prep_rdr(); + private final Volume_prep_rdr rdr = new Volume_prep_rdr(); public Volume_prep_rdr_fxt Test__parse(String raw, Volume_prep_itm... expd) { Gftest.Eq__ary(expd, rdr.Parse(Bry_.new_u8(raw))); return this; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Db_bulk_cmd_base.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Db_bulk_cmd_base.java index bdc6bf5ca..d9414450e 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Db_bulk_cmd_base.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Db_bulk_cmd_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; public abstract class Db_bulk_cmd_base { @@ -35,9 +35,9 @@ public abstract class Db_bulk_cmd_base { protected abstract void Bulk_run(int uid_bgn, int uid_end); } class Imglnk_bulk_cmd__img_id extends Db_bulk_cmd_base { - private final Db_conn conn; - private final Db_attach_mgr attach_mgr; - private final int img_wiki; + private final Db_conn conn; + private final Db_attach_mgr attach_mgr; + private final int img_wiki; private String sql; public Imglnk_bulk_cmd__img_id(Db_conn conn, boolean wiki_is_local, Xowe_wiki wiki) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_cmd.java index 9bd6149e6..23f6e8711 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sql_dumps.*; @@ -45,6 +45,6 @@ public class Imglnk_bldr_cmd extends Xob_sql_dump_base implements Xosql_dump_cbk public static final String BLDR_CMD_KEY = "wiki.imagelinks"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Imglnk_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Imglnk_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Imglnk_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_mgr.java index e1c6a6876..08b7d62de 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_bldr_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.files.repos.*; class Imglnk_bldr_mgr { - private final Db_conn conn; - private final Xowe_wiki wiki; + private final Db_conn conn; + private final Xowe_wiki wiki; public Imglnk_tmp_tbl Tmp_tbl() {return tmp_tbl;} private Imglnk_tmp_tbl tmp_tbl; public Imglnk_bldr_mgr(Xowe_wiki wiki) { wiki.Init_assert(); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_reg_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_reg_tbl.java index c31539900..b885d3a68 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_reg_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_reg_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; public class Imglnk_reg_tbl implements Db_tbl { - private final String tbl_name = "imglnk_reg"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__img_src, fld__img_trg, fld__img_repo; - private final Db_conn conn; + private final String tbl_name = "imglnk_reg"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__img_src, fld__img_trg, fld__img_repo; + private final Db_conn conn; public Imglnk_reg_tbl(Db_conn conn) { this.conn = conn; fld__img_src = flds.Add_str("img_src", 255); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_tmp_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_tmp_tbl.java index 3717c9be2..aabba48fa 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_tmp_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Imglnk_tmp_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; public class Imglnk_tmp_tbl implements Db_tbl { - private final String tbl_name = "imglnk_tmp"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__page_id, fld__img_name; - private final Db_conn conn; + private final String tbl_name = "imglnk_tmp"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__page_id, fld__img_name; + private final Db_conn conn; private Db_stmt stmt__insert; public Imglnk_tmp_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Xof_orig_wkr__img_links.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Xof_orig_wkr__img_links.java index 7736e29aa..9e3a448d5 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Xof_orig_wkr__img_links.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/imglinks/Xof_orig_wkr__img_links.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.imglinks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.repos.*; public class Xof_orig_wkr__img_links implements Xof_orig_wkr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); private Db_conn imglnk_conn; public Xof_orig_wkr__img_links(Xowe_wiki wiki) { this.wiki = wiki; @@ -34,7 +34,7 @@ public class Xof_orig_wkr__img_links implements Xof_orig_wkr { public void Db_txn_save() {} public void Db_rls() {} - public Xowe_wiki Wiki() {return wiki;} private final Xowe_wiki wiki; + public Xowe_wiki Wiki() {return wiki;} private final Xowe_wiki wiki; public Imglnk_reg_tbl Tbl__imglnk_reg() { if (tbl__imglnk_reg == null) this.tbl__imglnk_reg = new Imglnk_reg_tbl(imglnk_conn); @@ -70,5 +70,5 @@ public class Xof_orig_wkr__img_links implements Xof_orig_wkr { return rv; } } - private static final Xof_orig_itm Missing = new Xof_orig_itm(Byte_.Max_value_127, Bry_.Empty, -1, -1, -1, Bry_.Empty); + private static final Xof_orig_itm Missing = new Xof_orig_itm(Byte_.Max_value_127, Bry_.Empty, -1, -1, -1, Bry_.Empty); } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_bldr_cmd.java index 3605f0da3..636f54ca4 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.pagelinks.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sql_dumps.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.data.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.dbs.*; @@ -52,6 +52,6 @@ public class Pglnk_bldr_cmd extends Xob_sql_dump_base implements Xosql_dump_cbk public static final String BLDR_CMD_KEY = "wiki.page_link"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Pglnk_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Pglnk_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Pglnk_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_tempdb_mgr.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_tempdb_mgr.java index ddfe05aaa..c1810969b 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_tempdb_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/bldrs/Pglnk_tempdb_mgr.java @@ -1,34 +1,34 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.pagelinks.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.*; import gplx.core.ios.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.dbs.*; class Pglnk_tempdb_mgr { - private final Gfo_usr_dlg usr_dlg; - private final Xow_wiki wiki; - private final Db_conn conn; - private final int row_max; + private final Gfo_usr_dlg usr_dlg; + private final Xow_wiki wiki; + private final Db_conn conn; + private final int row_max; private int rows; - private final Dbmeta_fld_list dump_flds; - private final String dump_tbl_name = "pagelink_dump", dump_src_id, dump_trg_ns, dump_trg_ttl; + private final Dbmeta_fld_list dump_flds; + private final String dump_tbl_name = "pagelink_dump", dump_src_id, dump_trg_ns, dump_trg_ttl; private Db_stmt dump_insert; - private final String temp_tbl_name = "pagelink_temp"; + private final String temp_tbl_name = "pagelink_temp"; public Pglnk_tempdb_mgr(Gfo_usr_dlg usr_dlg, Xow_wiki wiki, int row_max) { // init members diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/dbs/Pglnk_page_link_tbl.java b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/dbs/Pglnk_page_link_tbl.java index 70abb1d98..48e7007a9 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/dbs/Pglnk_page_link_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/wmdumps/pagelinks/dbs/Pglnk_page_link_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.wmdumps.pagelinks.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.wmdumps.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.*; import gplx.core.ios.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.dbs.*; import gplx.dbs.cfgs.*; public class Pglnk_page_link_tbl implements Rls_able { - private static final String tbl_name = "page_link"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_src_id, fld_trg_id; - private final Db_conn conn; + private static final String tbl_name = "page_link"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_src_id, fld_trg_id; + private final Db_conn conn; public Pglnk_page_link_tbl(Db_conn conn) { this.conn = conn; fld_src_id = flds.Add_int("src_id"); diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_dir.java b/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_dir.java index c4e8072a8..b4c5cc8f7 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_dir.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_dir.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.xodirs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.langs.mustaches.*; class Xobc_xodir_doc implements Mustache_doc_itm { - private final byte[] import_root, app_root_dir; - private final Xobc_xodir_dir[] dirs; + private final byte[] import_root, app_root_dir; + private final Xobc_xodir_dir[] dirs; public Xobc_xodir_doc(Xobc_xodir_dir[] dirs, byte[] import_root, byte[] app_root_dir) { this.dirs = dirs; this.import_root = import_root; this.app_root_dir = app_root_dir; } @@ -32,8 +32,8 @@ class Xobc_xodir_doc implements Mustache_doc_itm { } } public class Xobc_xodir_dir implements Mustache_doc_itm { - private final boolean is_selected, is_custom; - private final byte[] path; + private final boolean is_selected, is_custom; + private final byte[] path; public Xobc_xodir_dir(boolean is_selected, boolean is_custom, byte[] path) { this.is_selected = is_selected; this.is_custom = is_custom; this.path = path; } diff --git a/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_special.java b/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_special.java index 9d2a72af9..ef5cdfe4a 100644 --- a/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_special.java +++ b/400_xowa/src/gplx/xowa/addons/bldrs/xodirs/Xobc_xodir_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.bldrs.xodirs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.addons.bldrs.centrals.*; @@ -32,12 +32,12 @@ public class Xobc_xodir_special implements Xow_special_page { new Xobc_xodir_html().Bld_page_by_mustache(wiki.App(), page, this); } - private static final byte[] Bry__path = Bry_.new_a7("path"); + private static final byte[] Bry__path = Bry_.new_a7("path"); Xobc_xodir_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xobc_xodir_special(Xow_special_meta.New_xo("XowaRootDir", "XOWA Folder Selection")); + public static final Xow_special_page Prototype = new Xobc_xodir_special(Xow_special_meta.New_xo("XowaRootDir", "XOWA Folder Selection")); public static Gfo_invk On_path_selected = Gfo_invk_.Noop; } diff --git a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_itm.java b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_itm.java index 11c2a942a..9aa3b6fb9 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_itm.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.sidebars; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; public class Xoh_sidebar_itm { public Xoh_sidebar_itm(boolean tid_is_itm, byte[] text_key, byte[] text_val, byte[] href) { @@ -21,14 +21,14 @@ public class Xoh_sidebar_itm { this.text = text_val; this.href = href; } - public boolean Tid_is_itm() {return tid_is_itm;} private final boolean tid_is_itm; - public byte[] Id() {return id;} private final byte[] id; - public byte[] Text() {return text;} private final byte[] text; - public byte[] Href() {return href;} private final byte[] href; + public boolean Tid_is_itm() {return tid_is_itm;} private final boolean tid_is_itm; + public byte[] Id() {return id;} private final byte[] id; + public byte[] Text() {return text;} private final byte[] text; + public byte[] Href() {return href;} private final byte[] href; public byte[] Title() {return title;} private byte[] title; public byte[] Accesskey() {return accesskey;} private byte[] accesskey; public byte[] Atr_accesskey_and_title() {return atr_accesskey_and_title;} private byte[] atr_accesskey_and_title; - public int Subs__len() {return subs.Count();} private final List_adp subs = List_adp_.New(); + public int Subs__len() {return subs.Count();} private final List_adp subs = List_adp_.New(); public Xoh_sidebar_itm Subs__get_at(int i) {return (Xoh_sidebar_itm)subs.Get_at(i);} public Xoh_sidebar_itm Subs__add(Xoh_sidebar_itm... ary) { int len = ary.length; @@ -43,5 +43,5 @@ public class Xoh_sidebar_itm { this.atr_accesskey_and_title = atr_accesskey_and_title; } - private static final byte[] CONST_id_prefix = Bry_.new_a7("n-"); + private static final byte[] CONST_id_prefix = Bry_.new_a7("n-"); } diff --git a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_mgr.java b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_mgr.java index 7e7dc790a..b09eaed48 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.sidebars; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.nss.*; public class Xoh_sidebar_mgr { - public Xoh_sidebar_mgr(Xowe_wiki wiki) {this.wiki = wiki;} private final Xowe_wiki wiki; - public List_adp Grps() {return grps;} private final List_adp grps = List_adp_.New(); // TEST: + public Xoh_sidebar_mgr(Xowe_wiki wiki) {this.wiki = wiki;} private final Xowe_wiki wiki; + public List_adp Grps() {return grps;} private final List_adp grps = List_adp_.New(); // TEST: public byte[] Html_bry() {return html_bry;} private byte[] html_bry; public void Init_by_wiki() { try { @@ -48,5 +48,5 @@ public class Xoh_sidebar_mgr { Xoh_sidebar_parser.Parse(tmp_bfr, wiki, grps, src); html_bry = Xoh_sidebar_htmlr.To_html(tmp_bfr, wiki, grps); } - private static final byte[] Ttl__sidebar = Bry_.new_a7("Sidebar"); // MediaWiki:Sidebar + private static final byte[] Ttl__sidebar = Bry_.new_a7("Sidebar"); // MediaWiki:Sidebar } diff --git a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_parser.java b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_parser.java index 719a5f5d6..d99fa151c 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_parser.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/sidebars/Xoh_sidebar_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.sidebars; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.core.btries.*; import gplx.langs.htmls.encoders.*; @@ -102,7 +102,7 @@ class Xoh_sidebar_parser { // TS: private static byte[] Ignore_wiki_ess = Bry_.new_a7("es.wikisource.org"), Ignore_item_ess_random = Bry_.new_u8("special:Random/Página djvu"); private static final byte Ignore__search = 1, Ignore__toolbox = 2, Ignore__toolbox_end = 3, Ignore__languages = 4; - private static final Btrie_slim_mgr ignore_trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr ignore_trie = Btrie_slim_mgr.ci_a7() .Add_str_byte("SEARCH" , Ignore__search) .Add_str_byte("TOOLBOX" , Ignore__toolbox) .Add_str_byte("TOOLBOXEND" , Ignore__toolbox_end) diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr.java index 1f3c4c6f7..dc12e9c31 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.core.htmls.*; class Xoh_toc_htmlr implements gplx.core.brys.Bfr_arg { - private final Bry_bfr numbering_bfr = Bry_bfr_.New(); + private final Bry_bfr numbering_bfr = Bry_bfr_.New(); private byte[] toc_label; private int prv_lvl; private Ordered_hash toc_itms; @@ -74,8 +74,8 @@ class Xoh_toc_htmlr implements gplx.core.brys.Bfr_arg { fmtr_itm.Bld_many(bfr, itm.Lvl(), itm.Uid(), itm.Anch(), itm.Path_to_bry(numbering_bfr), itm.Text()); prv_lvl = cur_lvl; } - private static final byte[] Bry_toc_cls = Bry_.new_a7(" id=\"toc\" class=\"toc\""); - private final Bry_fmt + private static final byte[] Bry_toc_cls = Bry_.new_a7(" id=\"toc\" class=\"toc\""); + private final Bry_fmt fmtr_div = Bry_fmt.Auto(String_.Concat_lines_nl_skip_last ( "" , "
" diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr__basic__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr__basic__tst.java index 215ba9b65..00dbb5aff 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr__basic__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_htmlr__basic__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import org.junit.*; import gplx.core.tests.*; public class Xoh_toc_htmlr__basic__tst { - @Before public void init() {fxt.Clear();} private final Xoh_toc_htmlr__basic__fxt fxt = new Xoh_toc_htmlr__basic__fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_toc_htmlr__basic__fxt fxt = new Xoh_toc_htmlr__basic__fxt(); @Test public void D1_S0_S0() { fxt.Init__add(2, "a"); fxt.Init__add(2, "b"); @@ -160,8 +160,8 @@ public class Xoh_toc_htmlr__basic__tst { } } class Xoh_toc_htmlr__basic__fxt { - private final Xoh_toc_mgr wtr = new Xoh_toc_mgr(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Xoh_toc_mgr wtr = new Xoh_toc_mgr(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Clear() {wtr.Clear();} public void Init__add(int hdr_num, String hdr_txt) {wtr.Add(hdr_num, Bry_.new_u8(hdr_txt));} public void Init__init_page(String toc_title, boolean page_banner) {wtr.Init(gplx.xowa.htmls.core.htmls.tidy.Xow_tidy_mgr_interface_.Noop, Xoa_url.Test(), Bry_.new_u8(toc_title));} diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_mgr.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_mgr.java index 69524faa3..b352b1e29 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.htmls.core.wkrs.tocs.*; import gplx.xowa.htmls.core.htmls.tidy.*; public class Xoh_toc_mgr { - private final Ordered_hash itms = Ordered_hash_.New_bry(); - private final Xoh_toc_wkr__lvl lvl_wkr = new Xoh_toc_wkr__lvl(); - private final Xoh_toc_wkr__txt txt_wkr = new Xoh_toc_wkr__txt(); - private final Xoh_toc_htmlr htmlr = new Xoh_toc_htmlr(); + private final Ordered_hash itms = Ordered_hash_.New_bry(); + private final Xoh_toc_wkr__lvl lvl_wkr = new Xoh_toc_wkr__lvl(); + private final Xoh_toc_wkr__txt txt_wkr = new Xoh_toc_wkr__txt(); + private final Xoh_toc_htmlr htmlr = new Xoh_toc_htmlr(); public boolean Exists() {return exists && Enabled;} private boolean exists; public void Exists_y_() {exists = true;} public int Toc_bgn() {return toc_bgn;} private int toc_bgn; diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl.java index a1922167c..642ca0a50 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; class Xoh_toc_wkr__lvl { private static final int Toc_lvls_max = 7; - private final int[] sub_lvl_count = new int[Toc_lvls_max], lvl_count = new int[Toc_lvls_max]; + private final int[] sub_lvl_count = new int[Toc_lvls_max], lvl_count = new int[Toc_lvls_max]; private int prv_lvl, toc_lvl, prv_toc_lvl; private int uid = 0; public void Clear() { diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl__basic__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl__basic__tst.java index f6590edcc..78ba82df7 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl__basic__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__lvl__basic__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import org.junit.*; import gplx.core.tests.*; public class Xoh_toc_wkr__lvl__basic__tst { - @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__lvl__fxt fxt = new Xoh_toc_wkr__lvl__fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__lvl__fxt fxt = new Xoh_toc_wkr__lvl__fxt(); @Test public void D1_S0_S0() { fxt.Test__calc(2, fxt.Make(1, 1, Int_ary_.New(1))); fxt.Test__calc(2, fxt.Make(2, 1, Int_ary_.New(2))); @@ -47,8 +47,8 @@ public class Xoh_toc_wkr__lvl__basic__tst { } } class Xoh_toc_wkr__lvl__fxt { - private final Xoh_toc_wkr__lvl wkr = new Xoh_toc_wkr__lvl(); - private final Xoh_toc_itm actl = new Xoh_toc_itm(); + private final Xoh_toc_wkr__lvl wkr = new Xoh_toc_wkr__lvl(); + private final Xoh_toc_itm actl = new Xoh_toc_itm(); public void Clear() {wkr.Clear();} public Xoh_toc_itm Make(int uid, int lvl, int[] path) { Xoh_toc_itm rv = new Xoh_toc_itm(); diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt.java index 83549f3ff..35b3e3972 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.htmls.core.htmls.tidy.*; import gplx.xowa.parsers.amps.*; import gplx.core.primitives.*; class Xoh_toc_wkr__txt { - private final Gfh_tag_rdr tag_rdr = Gfh_tag_rdr.New__html().Skip_ws_after_slash_y_(); - private final Bry_bfr anch_bfr = Bry_bfr_.New(), text_bfr = Bry_bfr_.New(); - private final Gfo_url_encoder anch_encoder = Gfo_url_encoder_.New__html_id().Make(); - private final Xop_amp_mgr amp_mgr = Xop_amp_mgr.Instance; - private final Hash_adp anch_hash = Hash_adp_bry.ci_u8(gplx.xowa.langs.cases.Xol_case_mgr_.U8()); + private final Gfh_tag_rdr tag_rdr = Gfh_tag_rdr.New__html().Skip_ws_after_slash_y_(); + private final Bry_bfr anch_bfr = Bry_bfr_.New(), text_bfr = Bry_bfr_.New(); + private final Gfo_url_encoder anch_encoder = Gfo_url_encoder_.New__html_id().Make(); + private final Xop_amp_mgr amp_mgr = Xop_amp_mgr.Instance; + private final Hash_adp anch_hash = Hash_adp_bry.ci_u8(gplx.xowa.langs.cases.Xol_case_mgr_.U8()); private Xow_tidy_mgr_interface tidy_mgr; private byte[] page_url_bry; public void Clear() { @@ -171,5 +171,5 @@ class Xoh_toc_wkr__txt { return true; } - private static final byte[] Trim__id = Bry_.mask_(256, Byte_ascii.Underline_bry), Trim__anch = Bry_.mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr); + private static final byte[] Trim__id = Bry_.mask_(256, Byte_ascii.Underline_bry), Trim__anch = Bry_.mask_(256, Byte_ascii.Tab, Byte_ascii.Nl, Byte_ascii.Cr); } diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__basic__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__basic__tst.java index 25e8fd76e..af9fd24cf 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__basic__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__basic__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import org.junit.*; import gplx.core.tests.*; import gplx.langs.htmls.*; public class Xoh_toc_wkr__txt__basic__tst { - @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); @Test public void Basic() { fxt.Test__both("a b c", "a_b_c", "a b c"); } @@ -49,10 +49,10 @@ public class Xoh_toc_wkr__txt__basic__tst { } } class Xoh_toc_wkr__txt__fxt { - private final Xoh_toc_wkr__txt wkr = new Xoh_toc_wkr__txt(); - private final Xoh_toc_itm itm = new Xoh_toc_itm(); - private final Bry_bfr tmp = Bry_bfr_.New(); - private final Xow_tidy_mgr_interface__test tidy_mgr = new Xow_tidy_mgr_interface__test(); + private final Xoh_toc_wkr__txt wkr = new Xoh_toc_wkr__txt(); + private final Xoh_toc_itm itm = new Xoh_toc_itm(); + private final Bry_bfr tmp = Bry_bfr_.New(); + private final Xow_tidy_mgr_interface__test tidy_mgr = new Xow_tidy_mgr_interface__test(); public void Clear() { wkr.Clear(); tidy_mgr.Clear(); @@ -76,7 +76,7 @@ class Xoh_toc_wkr__txt__fxt { } } class Xow_tidy_mgr_interface__test implements gplx.xowa.htmls.core.htmls.tidy.Xow_tidy_mgr_interface { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public void Clear() {hash.Clear();} public void Add(byte[] html, byte[] tidy) {hash.Add(html, tidy);} public void Exec_tidy(Bry_bfr bfr, boolean indent, byte[] page_url) { diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__dupe__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__dupe__tst.java index d34d4ea32..b50a13b71 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__dupe__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__dupe__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import org.junit.*; import gplx.core.tests.*; public class Xoh_toc_wkr__txt__dupe__tst { - @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); @Test public void Basic() { fxt.Test__anch("a" , "a"); fxt.Test__anch("a" , "a_2"); diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__xnde__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__xnde__tst.java index 747437be5..4410b1bd0 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__xnde__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xoh_toc_wkr__txt__xnde__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import org.junit.*; import gplx.core.tests.*; public class Xoh_toc_wkr__txt__xnde__tst { - @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_toc_wkr__txt__fxt fxt = new Xoh_toc_wkr__txt__fxt(); @Test public void I() {fxt.Test__both("a" , "a", "a");} @Test public void I__id() {fxt.Test__both("a" , "a", "a");} @Test public void B() {fxt.Test__both("a" , "a", "a");} diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr__tst.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr__tst.java index 8f8189179..55df7d28f 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr__tst.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import g import org.junit.*; import gplx.xowa.parsers.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.parsers.hdrs.*; public class Xowe_hdr_bldr__tst { - @Before public void init() {fxt.Clear();} private final Xowe_hdr_bldr_fxt fxt = new Xowe_hdr_bldr_fxt(); + @Before public void init() {fxt.Clear();} private final Xowe_hdr_bldr_fxt fxt = new Xowe_hdr_bldr_fxt(); @Test public void Basic() { fxt.Test_html_toc(String_.Concat_lines_nl_skip_last ( "==a==" diff --git a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr_fxt.java b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr_fxt.java index 219903fe8..1ed60f550 100644 --- a/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr_fxt.java +++ b/400_xowa/src/gplx/xowa/addons/htmls/tocs/Xowe_hdr_bldr_fxt.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.htmls.tocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.htmls.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.htmls.*; public class Xowe_hdr_bldr_fxt { - private final Bry_bfr tmp = Bry_bfr_.New(); - public Xop_fxt Fxt() {return fxt;} private final Xop_fxt fxt = new Xop_fxt(); + private final Bry_bfr tmp = Bry_bfr_.New(); + public Xop_fxt Fxt() {return fxt;} private final Xop_fxt fxt = new Xop_fxt(); public void Clear() { fxt.Reset(); tmp.Clear(); diff --git a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_mgr.java b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_mgr.java index ca11d6314..d1f5d31b9 100644 --- a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.parsers.mediawikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.parsers.*; public class Xop_mediawiki_mgr { - private final Xoae_app app; + private final Xoae_app app; private boolean mode_is_prod; public Xop_mediawiki_mgr(String root_str, boolean mode_is_prod) { Gfo_usr_dlg usr_dlg = Xoa_app_.New__usr_dlg__console(); diff --git a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_wkr__tst.java b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_wkr__tst.java index 6aaa50088..b8b04327f 100644 --- a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_wkr__tst.java +++ b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xop_mediawiki_wkr__tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.parsers.mediawikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.parsers.*; import org.junit.*; import gplx.core.tests.*; public class Xop_mediawiki_wkr__tst { - private final Xop_mediawiki_wkr__fxt fxt = new Xop_mediawiki_wkr__fxt(); + private final Xop_mediawiki_wkr__fxt fxt = new Xop_mediawiki_wkr__fxt(); @After public void term() {Gfo_usr_dlg_.Instance = Gfo_usr_dlg_.Noop;} @Test public void Basic() { fxt.Init__wkr("en.wikipedia.org", null); @@ -34,7 +34,7 @@ public class Xop_mediawiki_wkr__tst { } } class Xop_mediawiki_wkr__fxt { - private final Xop_mediawiki_mgr mgr = new Xop_mediawiki_mgr("mem/xowa/wiki/en.wikipedia.org/", false); + private final Xop_mediawiki_mgr mgr = new Xop_mediawiki_mgr("mem/xowa/wiki/en.wikipedia.org/", false); private Xop_mediawiki_wkr wkr; public Xop_mediawiki_wkr__fxt() { gplx.dbs.Db_conn_bldr.Instance.Reg_default_mem(); diff --git a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xow_page_cache_wkr__embeddable.java b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xow_page_cache_wkr__embeddable.java index 88468f983..d81436422 100644 --- a/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xow_page_cache_wkr__embeddable.java +++ b/400_xowa/src/gplx/xowa/addons/parsers/mediawikis/Xow_page_cache_wkr__embeddable.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.parsers.mediawikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.parsers.*; import gplx.xowa.parsers.utils.*; class Xow_page_cache_wkr__embeddable implements gplx.xowa.wikis.caches.Xow_page_cache_wkr { - private final Xop_mediawiki_loader cbk; - private final Xop_redirect_mgr redirect_mgr; + private final Xop_mediawiki_loader cbk; + private final Xop_redirect_mgr redirect_mgr; public Xow_page_cache_wkr__embeddable(Xowe_wiki wiki, Xop_mediawiki_loader cbk) { this.cbk = cbk; this.redirect_mgr = new Xop_redirect_mgr(wiki); diff --git a/400_xowa/src/gplx/xowa/addons/servers/https/Http_long_poll_cmd.java b/400_xowa/src/gplx/xowa/addons/servers/https/Http_long_poll_cmd.java index d6e4e1707..27c424d50 100644 --- a/400_xowa/src/gplx/xowa/addons/servers/https/Http_long_poll_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/servers/https/Http_long_poll_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; import gplx.core.envs.*; public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_itm { - private final List_adp msgs = List_adp_.New(); + private final List_adp msgs = List_adp_.New(); private String prv_guid; private long prv_start; private long prv_timeout; @@ -74,8 +74,8 @@ public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_it return String_.Concat_lines_nl(rv); } - public byte[] Key() {return BRIDGE_KEY;} private static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll"); - public static final Http_long_poll_cmd Instance = new Http_long_poll_cmd(); Http_long_poll_cmd() {} + public byte[] Key() {return BRIDGE_KEY;} private static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll"); + public static final Http_long_poll_cmd Instance = new Http_long_poll_cmd(); Http_long_poll_cmd() {} private static final int Sleep_interval = 100 diff --git a/400_xowa/src/gplx/xowa/addons/servers/https/Http_send_msg_cmd.java b/400_xowa/src/gplx/xowa/addons/servers/https/Http_send_msg_cmd.java index db5feeceb..32b49199f 100644 --- a/400_xowa/src/gplx/xowa/addons/servers/https/Http_send_msg_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/servers/https/Http_send_msg_cmd.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; -public class Http_send_msg_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_itm { - public void Init_by_app(Xoa_app app) {} - public String Exec(gplx.langs.jsons.Json_nde data) { - gplx.langs.jsons.Json_nde jnde = (gplx.langs.jsons.Json_nde)data.Get_as_itm_or_null(Bry_.new_a7("msg")); - Http_long_poll_cmd.Instance.Send_msg(jnde.Print_as_json()); - return "{}"; - } - - public byte[] Key() {return BRIDGE_KEY;} - public static final byte[] BRIDGE_KEY = Bry_.new_a7("send_msg"); -} +package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; +public class Http_send_msg_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_itm { + public void Init_by_app(Xoa_app app) {} + public String Exec(gplx.langs.jsons.Json_nde data) { + gplx.langs.jsons.Json_nde jnde = (gplx.langs.jsons.Json_nde)data.Get_as_itm_or_null(Bry_.new_a7("msg")); + Http_long_poll_cmd.Instance.Send_msg(jnde.Print_as_json()); + return "{}"; + } + + public byte[] Key() {return BRIDGE_KEY;} + public static final byte[] BRIDGE_KEY = Bry_.new_a7("send_msg"); +} diff --git a/400_xowa/src/gplx/xowa/addons/servers/https/Xog_cbk_wkr__http.java b/400_xowa/src/gplx/xowa/addons/servers/https/Xog_cbk_wkr__http.java index 04f3267e9..83f53428d 100644 --- a/400_xowa/src/gplx/xowa/addons/servers/https/Xog_cbk_wkr__http.java +++ b/400_xowa/src/gplx/xowa/addons/servers/https/Xog_cbk_wkr__http.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; -import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; import gplx.xowa.guis.cbks.swts.*; -public class Xog_cbk_wkr__http implements Xog_cbk_wkr { - private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser(); - public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) { - String script = json_wtr.Write_as_func__drd(func, data); - Http_long_poll_cmd.Instance.Send_msg(script); - return null; - } - public void Send_prog(String head) { - Http_long_poll_cmd.Instance.Send_msg(head); - } - public static final Xog_cbk_wkr__http Instance = new Xog_cbk_wkr__http(); Xog_cbk_wkr__http() {} -} +package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; +import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; import gplx.xowa.guis.cbks.swts.*; +public class Xog_cbk_wkr__http implements Xog_cbk_wkr { + private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser(); + public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) { + String script = json_wtr.Write_as_func__drd(func, data); + Http_long_poll_cmd.Instance.Send_msg(script); + return null; + } + public void Send_prog(String head) { + Http_long_poll_cmd.Instance.Send_msg(head); + } + public static final Xog_cbk_wkr__http Instance = new Xog_cbk_wkr__http(); Xog_cbk_wkr__http() {} +} diff --git a/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_bridge.java b/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_bridge.java index c82247ed8..55f5b00d9 100644 --- a/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.servers.https.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; import gplx.xowa.addons.servers.https.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; @@ -32,10 +32,10 @@ public class Xoa_util_bridge implements Bridge_cmd_itm { } private static final byte Proc__page_get = 0; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("page_get" , Proc__page_get) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.app.util.misc"); - public static final Xoa_util_bridge Prototype = new Xoa_util_bridge(); Xoa_util_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.app.util.misc"); + public static final Xoa_util_bridge Prototype = new Xoa_util_bridge(); Xoa_util_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_svc.java b/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_svc.java index 91bb3d761..e5d0326d5 100644 --- a/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_svc.java +++ b/400_xowa/src/gplx/xowa/addons/servers/https/utils/Xoa_util_svc.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.servers.https.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*; import gplx.xowa.addons.servers.https.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; import gplx.xowa.wikis.caches.*; import gplx.xowa.guis.cbks.*; public class Xoa_util_svc { - private final Xoa_app app; - private final Xog_cbk_mgr cbk_mgr; + private final Xoa_app app; + private final Xog_cbk_mgr cbk_mgr; public Xoa_util_svc(Xoa_app app) { this.app = app; this.cbk_mgr = app.Gui__cbk_mgr(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoa_ctg_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoa_ctg_mgr.java index aa77711b2..060216e7c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoa_ctg_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoa_ctg_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; public class Xoa_ctg_mgr { @@ -20,7 +20,7 @@ public class Xoa_ctg_mgr { public static final byte Tid__subc = 0, Tid__file = 1, Tid__page = 2, Tid___max = 3; // SERIALIZED; cat_link.cl_type_id public static final byte Hidden_n = Byte_.Zero, Hidden_y = (byte)1; public static final String Html__cls__str = "CategoryTreeLabel CategoryTreeLabelNs14 CategoryTreeLabelCategory"; - public static final byte[] Html__cls__bry = Bry_.new_a7(Html__cls__str); + public static final byte[] Html__cls__bry = Bry_.new_a7(Html__cls__str); public static byte To_tid_by_ns(int ns) { switch (ns) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoax_ctg_addon.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoax_ctg_addon.java index dc52a3471..2d86ec130 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoax_ctg_addon.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoax_ctg_addon.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.ctgs.dbs.*; public class Xoax_ctg_addon implements Xoax_addon_itm { // TODO_OLD:mem_mgr - private final Xow_wiki wiki; - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Xow_wiki wiki; + private final Hash_adp_bry hash = Hash_adp_bry.cs(); public Xoax_ctg_addon(Xow_wiki wiki) {this.wiki = wiki;} public Xoctg_ctg_itm Itms__get_or_null(byte[] key) {return (Xoctg_ctg_itm)hash.Get_by_bry(key);} public Xoctg_ctg_itm Itms__load(byte[] key) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_ctg_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_ctg_itm.java index 66ae81602..5711b404f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_ctg_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_ctg_itm.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; -public class Xoctg_ctg_itm { - public Xoctg_ctg_itm(byte[] ttl_wo_ns, int pages, int subcs, int files) { - this.Ttl_wo_ns = ttl_wo_ns; - this.Pages = pages; - this.Subcs = subcs; - this.Files = files; - this.All = pages + subcs + files; - } - public final byte[] Ttl_wo_ns; - public final int Pages; - public final int Subcs; - public final int Files; - public final int All; -} +package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; +public class Xoctg_ctg_itm { + public Xoctg_ctg_itm(byte[] ttl_wo_ns, int pages, int subcs, int files) { + this.Ttl_wo_ns = ttl_wo_ns; + this.Pages = pages; + this.Subcs = subcs; + this.Files = files; + this.All = pages + subcs + files; + } + public final byte[] Ttl_wo_ns; + public final int Pages; + public final int Subcs; + public final int Files; + public final int All; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_page_xtn.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_page_xtn.java index 5577726dd..f7fcf57d3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_page_xtn.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/Xoctg_page_xtn.java @@ -13,9 +13,9 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; -public class Xoctg_page_xtn { - public Xoctg_page_xtn(byte tid, byte[] sortkey) {this.tid = tid; this.sortkey = sortkey;} - public byte Tid() {return tid;} private final byte tid; - public byte[] Sortkey() {return sortkey;} private final byte[] sortkey; -} +package gplx.xowa.addons.wikis.ctgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; +public class Xoctg_page_xtn { + public Xoctg_page_xtn(byte tid, byte[] sortkey) {this.tid = tid; this.sortkey = sortkey;} + public byte Tid() {return tid;} private final byte tid; + public byte[] Sortkey() {return sortkey;} private final byte[] sortkey; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_cmd.java index e2d49e853..aa7389bca 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sql_dumps.*; public class Xob_catlink_cmd extends Xob_sql_dump_base implements Xosql_dump_cbk { - private final Xob_catlink_mgr mgr = new Xob_catlink_mgr(); + private final Xob_catlink_mgr mgr = new Xob_catlink_mgr(); private int tmp_page_id; private byte[] tmp_ctg_ttl, tmp_sortkey, tmp_timestamp, tmp_sortkey_prefix, tmp_collation, tmp_type; @@ -51,6 +51,6 @@ public class Xob_catlink_cmd extends Xob_sql_dump_base implements Xosql_dump_cbk public static final String BLDR_CMD_KEY = "wiki.categorylinks"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xob_catlink_cmd(null, null); + public static final Xob_cmd Prototype = new Xob_catlink_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xob_catlink_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr.java index d2aef8e3b..5769b538b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.dbs.*; import gplx.xowa.addons.wikis.ctgs.dbs.*; import gplx.xowa.addons.wikis.ctgs.enums.*; @@ -20,7 +20,7 @@ import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; class Xob_catlink_mgr { private Xowe_wiki wiki; private Xodb_tmp_cat_db tmp_db; private Db_conn tmp_conn; private Xodb_tmp_cat_link_tbl tmp_link_tbl; - private final Xoctg_collation_enum collation_enum = new Xoctg_collation_enum(); private final Xoctg_type_enum type_enum = new Xoctg_type_enum(); + private final Xoctg_collation_enum collation_enum = new Xoctg_collation_enum(); private final Xoctg_type_enum type_enum = new Xoctg_type_enum(); private int rows = 0; public void On_cmd_bgn(Xowe_wiki wiki) { this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr__tst.java index da0ef56aa..87aabf104 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_catlink_mgr__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.ctgs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import org.junit.*; import gplx.core.tests.*; public class Xob_catlink_mgr__tst { - private final Xob_catlink_mgr__fxt fxt = new Xob_catlink_mgr__fxt(); + private final Xob_catlink_mgr__fxt fxt = new Xob_catlink_mgr__fxt(); @Test public void Parse_timestamp() {// fix bad parsing b/c of "YYYY" instead of "yyyy"; ISSUE#:664; DATE:2020-02-05 fxt.Test__Parse_timestamp("2016-02-01 18:34:08", 1454351648); // fails if 1451241248 } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_pageprop_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_pageprop_cmd.java index 884cd9b07..3c5b46bd0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_pageprop_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/bldrs/Xob_pageprop_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.sql_dumps.*; import gplx.dbs.*; import gplx.xowa.addons.wikis.ctgs.dbs.*; @@ -52,8 +52,8 @@ public class Xob_pageprop_cmd extends Xob_sql_dump_base implements Xosql_dump_cb public static final String BLDR_CMD_KEY = "wiki.page_props"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xob_pageprop_cmd(null, null); + public static final Xob_cmd Prototype = new Xob_pageprop_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xob_pageprop_cmd(bldr, wiki);} - private static final byte[] Key_hiddencat = Bry_.new_a7("hiddencat"); + private static final byte[] Key_hiddencat = Bry_.new_a7("hiddencat"); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_row.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_row.java index 40e6a29b8..4b4263d57 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_row.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_row.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; public class Xodb_cat_link_row { public Xodb_cat_link_row(int page_id, int cat_id, byte type_id, long timestamp_unix, byte[] sortkey, byte[] sortkey_prefix) { @@ -23,10 +23,10 @@ public class Xodb_cat_link_row { this.sortkey = sortkey; this.sortkey_prefix = sortkey_prefix; } - public int Page_id() {return page_id;} private final int page_id; - public int Cat_id() {return cat_id;} private final int cat_id; - public byte Type_id() {return type_id;} private final byte type_id; - public long Timestamp_unix() {return timestamp_unix;} private final long timestamp_unix; - public byte[] Sortkey() {return sortkey;} private final byte[] sortkey; - public byte[] Sortkey_prefix() {return sortkey_prefix;} private final byte[] sortkey_prefix; + public int Page_id() {return page_id;} private final int page_id; + public int Cat_id() {return cat_id;} private final int cat_id; + public byte Type_id() {return type_id;} private final byte type_id; + public long Timestamp_unix() {return timestamp_unix;} private final long timestamp_unix; + public byte[] Sortkey() {return sortkey;} private final byte[] sortkey; + public byte[] Sortkey_prefix() {return sortkey_prefix;} private final byte[] sortkey_prefix; } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_tbl.java index 55d7c2fe0..714c1ba66 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_link_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; public class Xodb_cat_link_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__from, fld__to_id, fld__type_id, fld__timestamp_unix, fld__sortkey, fld__sortkey_prefix; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__from, fld__to_id, fld__type_id, fld__timestamp_unix, fld__sortkey, fld__sortkey_prefix; private Db_stmt stmt_insert; public Xodb_cat_link_tbl(Db_conn conn) { this.conn = conn; @@ -32,8 +32,8 @@ public class Xodb_cat_link_tbl implements Db_tbl { this.fld__sortkey_prefix = flds.Add_str (FLD__cl_sortkey_prefix, 255); // page_title; needed for sorting under letter on catpage conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Create_idx__catbox() {conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "catbox", fld__from));} public void Create_idx__catpage() {conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "catpage", fld__to_id, fld__type_id, fld__sortkey));} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_sort_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_sort_tbl.java index ac818738a..7bb49e5bd 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_sort_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_cat_sort_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.addons.wikis.ctgs.*; public class Xodb_cat_sort_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_key; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_key; public Xodb_cat_sort_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "cat_sort"; @@ -25,8 +25,8 @@ public class Xodb_cat_sort_tbl implements Db_tbl { this.fld_key = flds.Add_str ("cs_key", 255); conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Create_idx__key() {conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, fld_key, fld_key));} public void Delete_idx__key() {conn.Meta_idx_delete(tbl_name, fld_key);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_db.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_db.java index 542c589f0..47c0384d7 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_db.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_db.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; -import gplx.dbs.*; -public class Xodb_tmp_cat_db { - private final Io_url url; - public Xodb_tmp_cat_db(Xowe_wiki wiki) { - this.url = wiki.Fsys_mgr().Root_dir().GenSubFil("xowa.temp.category.sqlite3"); - this.conn = Db_conn_bldr.Instance.Get_or_autocreate(true, url); - } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public void Delete() { - conn.Rls_conn(); - Io_mgr.Instance.DeleteFil(url); - } -} +package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; +import gplx.dbs.*; +public class Xodb_tmp_cat_db { + private final Io_url url; + public Xodb_tmp_cat_db(Xowe_wiki wiki) { + this.url = wiki.Fsys_mgr().Root_dir().GenSubFil("xowa.temp.category.sqlite3"); + this.conn = Db_conn_bldr.Instance.Get_or_autocreate(true, url); + } + public Db_conn Conn() {return conn;} private final Db_conn conn; + public void Delete() { + conn.Rls_conn(); + Io_mgr.Instance.DeleteFil(url); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_hidden_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_hidden_tbl.java index 2f8244eb8..dc9a3a1f4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_hidden_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_hidden_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.dbs.*; public class Xodb_tmp_cat_hidden_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_cat_id; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_cat_id; private Db_stmt stmt_insert; public Xodb_tmp_cat_hidden_tbl(Db_conn conn) { this.conn = conn; @@ -26,8 +26,8 @@ public class Xodb_tmp_cat_hidden_tbl implements Db_tbl { conn.Rls_reg(this); conn.Meta_tbl_remake(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert_bgn() {conn.Txn_bgn("tch__insert"); stmt_insert = conn.Stmt_insert(tbl_name, flds);} public void Insert_end() {conn.Txn_end(); stmt_insert = Db_stmt_.Rls(stmt_insert);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_link_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_link_tbl.java index d53f973ff..2f3851393 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_link_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/dbs/Xodb_tmp_cat_link_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.addons.wikis.ctgs.*; public class Xodb_tmp_cat_link_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_from, fld_to_ttl, fld_sortkey, fld_timestamp, fld_sortkey_prefix, fld_collation_id, fld_type_id; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_from, fld_to_ttl, fld_sortkey, fld_timestamp, fld_sortkey_prefix, fld_collation_id, fld_type_id; private Db_stmt stmt_insert; public Xodb_tmp_cat_link_tbl(Db_conn conn) { this.conn = conn; @@ -32,8 +32,8 @@ public class Xodb_tmp_cat_link_tbl implements Db_tbl { conn.Rls_reg(this); conn.Meta_tbl_remake(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert_bgn() {conn.Txn_bgn("tcl__insert"); stmt_insert = conn.Stmt_insert(tbl_name, flds);} public void Insert_end() {conn.Txn_end(); stmt_insert = Db_stmt_.Rls(stmt_insert);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java index 3dc5125b1..c338fd46b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_collation_enum.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.enums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.core.btries.*; public class Xoctg_collation_enum { // REF:https://www.mediawiki.org/wiki/Manual:$wgCategoryCollation - private final Btrie_rv trv = new Btrie_rv(); - private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs() + private final Btrie_rv trv = new Btrie_rv(); + private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs() .Add_str_byte("uppercase" , Tid__uppercase) .Add_str_byte("uca" , Tid__uca) .Add_str_byte("numeric" , Tid__numeric) // NOTE: no logic implemented for numeric; DATE:2019-10-15 diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_type_enum.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_type_enum.java index bdca3b4df..e9b4129fe 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_type_enum.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/enums/Xoctg_type_enum.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.ctgs.enums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; -import gplx.core.btries.*; -public class Xoctg_type_enum { - private final Btrie_rv trv = new Btrie_rv(); - private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs() - .Add_str_byte("subcat" , Tid__subc) - .Add_str_byte("file" , Tid__file) - .Add_str_byte("page" , Tid__page); - public byte To_tid_or_fail(byte[] raw) { - byte tid = trie.Match_byte_or(trv, raw, 0, raw.length, Byte_.Max_value_127); - if (tid == Byte_.Max_value_127) throw Err_.new_unhandled_default(raw); - return tid; - } - public static final byte Tid__subc = 0, Tid__file = 1, Tid__page = 2, Tid_max = 3; -} +package gplx.xowa.addons.wikis.ctgs.enums; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; +import gplx.core.btries.*; +public class Xoctg_type_enum { + private final Btrie_rv trv = new Btrie_rv(); + private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs() + .Add_str_byte("subcat" , Tid__subc) + .Add_str_byte("file" , Tid__file) + .Add_str_byte("page" , Tid__page); + public byte To_tid_or_fail(byte[] raw) { + byte tid = trie.Match_byte_or(trv, raw, 0, raw.length, Byte_.Max_value_127); + if (tid == Byte_.Max_value_127) throw Err_.new_unhandled_default(raw); + return tid; + } + public static final byte Tid__subc = 0, Tid__file = 1, Tid__page = 2, Tid_max = 3; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/Xoctg_catpage_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/Xoctg_catpage_mgr.java index c3f28375f..79bc86f82 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/Xoctg_catpage_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/Xoctg_catpage_mgr.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.wikis.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.htmls.core.htmls.*; import gplx.core.intls.ucas.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.fmts.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.dbs.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.urls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs.*; public class Xoctg_catpage_mgr implements Gfo_invk { - private final Xow_wiki wiki; - private final Hash_adp_bry cache = Hash_adp_bry.cs(); - private final Xoctg_catpage_loader loader = new Xoctg_catpage_loader(); - private final Xoctg_fmt_grp fmt_subcs = Xoctg_fmt_grp.New__subc(), fmt_pages = Xoctg_fmt_grp.New__page(), fmt_files = Xoctg_fmt_grp.New__file(); - private final Uca_ltr_extractor ltr_extractor = new Uca_ltr_extractor(true); + private final Xow_wiki wiki; + private final Hash_adp_bry cache = Hash_adp_bry.cs(); + private final Xoctg_catpage_loader loader = new Xoctg_catpage_loader(); + private final Xoctg_fmt_grp fmt_subcs = Xoctg_fmt_grp.New__subc(), fmt_pages = Xoctg_fmt_grp.New__page(), fmt_files = Xoctg_fmt_grp.New__file(); + private final Uca_ltr_extractor ltr_extractor = new Uca_ltr_extractor(true); private String missing_cls = Str__missing_cls__red; public int Grp_max() {return grp_max;} private int grp_max = Grp_max_dflt; public Xoctg_catpage_mgr(Xow_wiki wiki) { @@ -98,9 +98,9 @@ public class Xoctg_catpage_mgr implements Gfo_invk { } private static final String Invk__collation_ = "collation_"; public static int Grp_max_dflt = 200; - private static final Object thread_lock = new Object(); + private static final Object thread_lock = new Object(); private static final String Cfg__missing_class = "xowa.addon.category.catpage.missing_class"; private static final String Str__missing_cls__normal = "normal", Str__missing_cls__hide = "hide", Str__missing_cls__red = "red_link"; - private static final byte[] Css__missing_cls__normal = Bry_.new_a7(".xowa-missing-category-entry {}"), Css__missing_cls__hide = Bry_.new_a7(".xowa-missing-category-entry {display: none;}"), Css__missing_cls__red = Bry_.new_a7(".xowa-missing-category-entry {color: red;}"); + private static final byte[] Css__missing_cls__normal = Bry_.new_a7(".xowa-missing-category-entry {}"), Css__missing_cls__hide = Bry_.new_a7(".xowa-missing-category-entry {display: none;}"), Css__missing_cls__red = Bry_.new_a7(".xowa-missing-category-entry {color: red;}"); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader.java index fcc376a5c..a5a4cf3b4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs.*; class Xoctg_catlink_loader { - private final Xow_wiki wiki; - private final Xoctg_catpage_mgr catpage_mgr; - private final Xowd_page_tbl page_tbl; - private final Db_attach_mgr attach_mgr; - private final byte version; - private final int link_dbs_len; - private final Bry_bfr sortkey_val_bfr = Bry_bfr_.New(); + private final Xow_wiki wiki; + private final Xoctg_catpage_mgr catpage_mgr; + private final Xowd_page_tbl page_tbl; + private final Db_attach_mgr attach_mgr; + private final byte version; + private final int link_dbs_len; + private final Bry_bfr sortkey_val_bfr = Bry_bfr_.New(); Xoctg_catlink_loader(Xow_wiki wiki, Xoctg_catpage_mgr catpage_mgr, Xowd_page_tbl page_tbl, byte version, int link_dbs_len, Db_attach_mgr attach_mgr) { this.wiki = wiki; this.catpage_mgr = catpage_mgr; @@ -210,7 +210,7 @@ class Xoctg_catlink_loader { } } class Xoctg_catlink_sorter implements gplx.core.lists.ComparerAble { - private final int sort_multiplier; + private final int sort_multiplier; public Xoctg_catlink_sorter(boolean sort_ascending) { this.sort_multiplier = sort_ascending ? 1 : -1; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader__tst.java index 5ebe4e443..b84e529cd 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/dbs/Xoctg_catlink_loader__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.dbs; import gplx.*; import gp import org.junit.*; import gplx.core.tests.*; import gplx.xowa.apps.urls.*; import gplx.xowa.langs.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs.*; public class Xoctg_catlink_loader__tst { - private final Xoctg_catlink_loader__fxt fxt = new Xoctg_catlink_loader__fxt(); + private final Xoctg_catlink_loader__fxt fxt = new Xoctg_catlink_loader__fxt(); @Test public void Build_sortkey_val__v4() { // PURPOSE: remove "\n" and afterwards else will omit 1 record fxt.Test__build_sortkey_sql(4, "A\nA", "x'41'"); // fails if "x'410a41'" } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_ctg.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_ctg.java index 7e66e573a..d651c91e1 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_ctg.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_ctg.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; public class Xoctg_catpage_ctg { public Xoctg_catpage_ctg(int id, byte[] name) { this.id = id; this.name = name; } - public int Id() {return id;} private final int id; - public byte[] Name() {return name;} private final byte[] name; - public Xoctg_catpage_grp Subcs() {return subcs;} private final Xoctg_catpage_grp subcs = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__subc); - public Xoctg_catpage_grp Pages() {return pages;} private final Xoctg_catpage_grp pages = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__page); - public Xoctg_catpage_grp Files() {return files;} private final Xoctg_catpage_grp files = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__file); + public int Id() {return id;} private final int id; + public byte[] Name() {return name;} private final byte[] name; + public Xoctg_catpage_grp Subcs() {return subcs;} private final Xoctg_catpage_grp subcs = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__subc); + public Xoctg_catpage_grp Pages() {return pages;} private final Xoctg_catpage_grp pages = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__page); + public Xoctg_catpage_grp Files() {return files;} private final Xoctg_catpage_grp files = new Xoctg_catpage_grp(Xoa_ctg_mgr.Tid__file); public int Total() {return subcs.Count_all() + pages.Count_all() + files.Count_all();} public Xoctg_catpage_grp Grp_by_tid(byte tid) { switch (tid) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_itm.java index 433e367f0..fa1b81a3a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.dbs.*; import gplx.xowa.wikis.nss.*; public class Xoctg_catpage_itm { @@ -26,8 +26,8 @@ public class Xoctg_catpage_itm { this.sortkey_handle = sortkey_prefix; // default handle to sortkey_prefix; this.sortkey_binary = sortkey_binary; } - public byte Grp_tid() {return grp_tid;} private final byte grp_tid; // v2-v4:cl_type_id; subc,page,file - public int Page_id() {return page_id;} private final int page_id; // v2-v4:cl_from + public byte Grp_tid() {return grp_tid;} private final byte grp_tid; // v2-v4:cl_type_id; subc,page,file + public int Page_id() {return page_id;} private final int page_id; // v2-v4:cl_from public byte[] Sortkey_prefix() {return sortkey_prefix;} private byte[] sortkey_prefix; // v2-v3:cl_sortkey; v4:cl_sortkey_prefix public byte[] Sortkey_handle() {return sortkey_handle;} private byte[] sortkey_handle; // v2-v3:cl_sortkey; v4:cl_sortkey_prefix\nttl_txt; never "cl_sortkey" which is binary ICU value; public byte[] Sortkey_binary() {return sortkey_binary;} private byte[] sortkey_binary; // v2-v4:cl_sortkey; note that v4 is binary icu value @@ -76,7 +76,7 @@ public class Xoctg_catpage_itm { } } - public static final Xoctg_catpage_itm[] Ary_empty = new Xoctg_catpage_itm[0]; + public static final Xoctg_catpage_itm[] Ary_empty = new Xoctg_catpage_itm[0]; public static Xoctg_catpage_itm New_by_rdr(Xow_wiki wiki, Db_rdr rdr, byte version) { byte[] sortkey_binary = Bry_.Empty; byte[] sortkey_prefix = Bry_.Empty; @@ -104,5 +104,5 @@ public class Xoctg_catpage_itm { return rv; } private static final byte Version__2 = 2, Version__4 = 4; - private static final byte[] Sortkey_prefix_replace__src = Bry_.new_a7("\n\t"), Sortkey_prefix_replace__trg = Bry_.new_a7(" "); + private static final byte[] Sortkey_prefix_replace__src = Bry_.new_a7("\n\t"), Sortkey_prefix_replace__trg = Bry_.new_a7(" "); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_tmp.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_tmp.java index 4657da5b3..01fe26d96 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_tmp.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/doms/Xoctg_catpage_tmp.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; public class Xoctg_catpage_tmp { - private final List_adp subc_list = List_adp_.New(), page_list = List_adp_.New(), file_list = List_adp_.New(); + private final List_adp subc_list = List_adp_.New(), page_list = List_adp_.New(), file_list = List_adp_.New(); public void Add(Xoctg_catpage_itm itm) { List_adp list = Get_by_tid(itm.Grp_tid()); list.Add(itm); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_grp.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_grp.java index 94dabfb85..9a33fff2f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_grp.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_grp.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.fmts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.htmls.core.htmls.*; import gplx.langs.htmls.encoders.*; import gplx.core.intls.ucas.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.urls.*; public class Xoctg_fmt_grp { // subc|page|file - private final byte tid; - private final byte[] div_id, url_arg_bgn, url_arg_end; - private final byte[] msg_label_key, msg_stats_key; - private final Xoctg_fmt_ltr itms_fmt; + private final byte tid; + private final byte[] div_id, url_arg_bgn, url_arg_end; + private final byte[] msg_label_key, msg_stats_key; + private final Xoctg_fmt_ltr itms_fmt; Xoctg_fmt_grp(byte tid, Xoctg_fmt_itm_base itm_fmt, byte[] msg_label_key, byte[] msg_stats_key, byte[] url_arg_bgn, byte[] url_arg_end, byte[] div_id) { this.tid = tid; this.itm_fmt = itm_fmt; @@ -29,7 +29,7 @@ public class Xoctg_fmt_grp { // subc|page|file this.msg_label_key = msg_label_key; this.msg_stats_key = msg_stats_key; this.url_arg_bgn = url_arg_bgn; this.url_arg_end = url_arg_end; this.div_id = div_id; } - public Xoctg_fmt_itm_base Itm_fmt() {return itm_fmt;} private final Xoctg_fmt_itm_base itm_fmt; + public Xoctg_fmt_itm_base Itm_fmt() {return itm_fmt;} private final Xoctg_fmt_itm_base itm_fmt; public void Write_catpage_grp(Bry_bfr bfr, Xow_wiki wiki, Xol_lang_itm lang, Uca_ltr_extractor ltr_extractor, Xoctg_catpage_ctg dom_ctg, int grp_max) { // TEST: Xoctg_catpage_grp dom_grp = dom_ctg.Grp_by_tid(tid); int count = dom_grp.Count_all(); @@ -92,7 +92,7 @@ public class Xoctg_fmt_grp { // subc|page|file else Fmt__nav__href.Bld_many(bfr, nav_href, ttl.Full_url(), nav_text); } - private static final Bry_fmt + private static final Bry_fmt Fmt__nav__href = Bry_fmt.New("\n(~{nav_text})") , Fmt__nav__text = Bry_fmt.New("\n(~{nav_text})") , Fmt__ctg = Bry_fmt.Auto_nl_skip_last diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_base.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_base.java index 841043d83..1e32d7b98 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_base.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_base.java @@ -19,7 +19,7 @@ import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.core.intls. import gplx.xowa.users.history.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; public abstract class Xoctg_fmt_itm_base implements gplx.core.brys.Bfr_arg { - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private Xow_wiki wiki; private Xoctg_catpage_grp grp; private Uca_ltr_extractor ltr_extractor; @@ -78,7 +78,7 @@ public abstract class Xoctg_fmt_itm_base implements gplx.core.brys.Bfr_arg { byte[] itm_atr_cls = Xoh_lnki_wtr.Lnki_cls_visited(history_mgr, wiki.Domain_bry(), ttl.Page_txt()); // NOTE: must be ttl.Page_txt() in order to match Xou_history_mgr.Add Fmt__exists.Bld_many(bfr, itm_href, itm_atr_cls, itm_full_ttl, itm_full_ttl, gplx.core.encoders.Hex_utl_.Encode_bry(itm.Sortkey_binary())); } - private static final Bry_fmt + private static final Bry_fmt Fmt__missing = Bry_fmt.Auto_nl_skip_last ( "" , "
  • missing page (~{itm_id})
  • " diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_subc.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_subc.java index 80390c75e..58734bd8d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_subc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_itm_subc.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.fmts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; import gplx.xowa.users.history.*; class Xoctg_fmt_itm_subc extends Xoctg_fmt_itm_base { - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); @Override public void Bld_html(Bry_bfr bfr, Xow_wiki wiki, Xou_history_mgr history_mgr, Xoh_href_parser href_parser, Xoctg_catpage_itm itm, Xoa_ttl ttl) { byte[] itm_href = wiki.Html__href_wtr().Build_to_bry(wiki, ttl); int count_subcs = 0; @@ -44,8 +44,8 @@ class Xoctg_fmt_itm_subc extends Xoctg_fmt_itm_base { if (val == 0) return; if (bfr.Len() > 1) bfr.Add(Bld_contains_text_itm_dlm); // NOTE: 1 b/c Paren_bgn is always added bfr.Add(msg_mgr.Val_by_id_args(msg_id, val)); - } private static final byte[] Bld_contains_text_itm_dlm = Bry_.new_a7(", "); - private static final Bry_fmt + } private static final byte[] Bld_contains_text_itm_dlm = Bry_.new_a7(", "); + private static final Bry_fmt Fmt__exists__subc = Bry_fmt.Auto_nl_skip_last ( "" , "
  • " diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_ltr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_ltr.java index 3676794cd..d45f3bf58 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_ltr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/fmts/Xoctg_fmt_ltr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.fmts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.core.intls.ucas.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.doms.*; public class Xoctg_fmt_ltr implements gplx.core.brys.Bfr_arg { // "A", "B", "C cont." - private final Xoctg_fmt_itm_base itm_fmt; + private final Xoctg_fmt_itm_base itm_fmt; private Xoctg_catpage_grp grp; private byte[] msg__list_continues; private Uca_ltr_extractor ltr_extractor; @@ -72,7 +72,7 @@ public class Xoctg_fmt_ltr implements gplx.core.brys.Bfr_arg { // "A", "B", "C c Fmt__col_end.Bld_many(bfr); } } - private static final Bry_fmt + private static final Bry_fmt Fmt__tbl = Bry_fmt.Auto_nl_skip_last ( "" , "

    ~{ltr_head}

    " // EX: "A", "A cont." diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_mgr.java index abbcf3a45..16990a84f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.core.intls.ucas.*; public class Xoctg_collation_mgr { - private final Xow_wiki wiki; + private final Xow_wiki wiki; private Xoctg_collation_wkr wkr; public Xoctg_collation_mgr(Xow_wiki wiki) { this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr.java index 15c53db6d..eadb34b47 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; public interface Xoctg_collation_wkr { String Type_name(); @@ -20,7 +20,7 @@ public interface Xoctg_collation_wkr { byte[] Get_sortkey(byte[] src); } class Xoctg_collation_wkr__uppercase implements Xoctg_collation_wkr { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Xoctg_collation_wkr__uppercase(Xow_wiki wiki) {this.wiki = wiki;} public String Type_name() {return "uppercase";} public String Wm_name() {return this.Type_name();} @@ -54,10 +54,10 @@ class Xoctg_collation_wkr__uca implements Xoctg_collation_wkr { this.icu_locale = icu_locale; this.numeric_sorting = String_.Has_at_end(icu_locale, "-u-kn"); } - public String Type_name() {return wm_name;} private final String wm_name; + public String Type_name() {return wm_name;} private final String wm_name; public String Wm_name() {return this.Type_name();} - public String Icu_locale() {return icu_locale;} private final String icu_locale; - public boolean Numeric_sorting() {return numeric_sorting;} private final boolean numeric_sorting; + public String Icu_locale() {return icu_locale;} private final String icu_locale; + public boolean Numeric_sorting() {return numeric_sorting;} private final boolean numeric_sorting; public byte[] Get_sortkey(byte[] src) { if (collator == null) collator = gplx.core.intls.ucas.Uca_collator_.New(icu_locale, numeric_sorting); return collator.Get_sortkey(String_.new_u8(src)); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr___tst.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr___tst.java index 20233aecb..6fc9f5ff0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr___tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/langs/Xoctg_collation_wkr___tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.ctgs.htmls.catpages.langs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import org.junit.*; import gplx.core.tests.*; public class Xoctg_collation_wkr___tst { - private final Xoctg_collation_wkr___fxt fxt = new Xoctg_collation_wkr___fxt(); + private final Xoctg_collation_wkr___fxt fxt = new Xoctg_collation_wkr___fxt(); @Test public void Uppercase() {fxt.Test__make("uppercase" , "uppercase");} @Test public void Identity() {fxt.Test__make("identity" , "identity");} @Test public void Unknown() {fxt.Test__make("unknown" , "uppercase");} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url.java index 76ef7bb99..bea4d5a3a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; public class Xoctg_catpage_url { public Xoctg_catpage_url(byte[][] keys, boolean[] fwds) {this.keys = keys; this.fwds = fwds;} - public byte[][] Grp_keys() {return keys;} private final byte[][] keys; - public boolean[] Grp_fwds() {return fwds;} private final boolean[] fwds; + public byte[][] Grp_keys() {return keys;} private final byte[][] keys; + public boolean[] Grp_fwds() {return fwds;} private final boolean[] fwds; public static Xoctg_catpage_url New__blank() { byte[][] keys = new byte[Xoa_ctg_mgr.Tid___max][]; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url_parser.java index 112ac389d..fa5a25dfe 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/catpages/urls/Xoctg_catpage_url_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.catpages.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.catpages.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.langs.htmls.encoders.*; @@ -78,13 +78,13 @@ public class Xoctg_catpage_url_parser { , Tid__file_bgn = 4, Tid__file_end = 5 , Tid__page_bgn = 6, Tid__page_end = 7 ; - public static final byte[] + public static final byte[] Bry__arg_each_bgn = Bry_.new_a7("from") , Bry__arg_each_end = Bry_.new_a7("until") , Bry__arg_subc_bgn = Bry_.new_a7("subcatfrom") , Bry__arg_subc_end = Bry_.new_a7("subcatuntil") , Bry__arg_page_bgn = Bry_.new_a7("pagefrom") , Bry__arg_page_end = Bry_.new_a7("pageuntil") , Bry__arg_file_bgn = Bry_.new_a7("filefrom") , Bry__arg_file_end = Bry_.new_a7("fileuntil") ; - private static final Hash_adp_bry Key_hash = Hash_adp_bry.ci_a7() + private static final Hash_adp_bry Key_hash = Hash_adp_bry.ci_a7() .Add_bry_byte(Bry__arg_each_bgn , Tid__each_bgn) .Add_bry_byte(Bry__arg_each_end , Tid__each_end) .Add_bry_byte(Bry__arg_subc_bgn , Tid__subc_bgn) .Add_bry_byte(Bry__arg_subc_end , Tid__subc_end) .Add_bry_byte(Bry__arg_page_bgn , Tid__page_bgn) .Add_bry_byte(Bry__arg_page_end , Tid__page_end) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_hash.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_hash.java index f01ab3a54..d6e11023d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_hash.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_hash.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.core.lists.hashs.*; class Xoctg_pagebox_hash { - private final Ordered_hash hash_by_ttl = Ordered_hash_.New_bry(); - private final Hash_adp__int hash_by_id = new Hash_adp__int(); + private final Ordered_hash hash_by_ttl = Ordered_hash_.New_bry(); + private final Hash_adp__int hash_by_id = new Hash_adp__int(); public int Len() {return hash_by_ttl.Len();} public Xoctg_pagebox_itm Get_at(int i) {return (Xoctg_pagebox_itm)hash_by_ttl.Get_at(i);} public Xoctg_pagebox_itm Get_by_ttl(byte[] full_db) {return (Xoctg_pagebox_itm)hash_by_ttl.Get_by(full_db);} @@ -50,5 +50,5 @@ class Xoctg_pagebox_hash_sorter implements gplx.core.lists.ComparerAble { Xoctg_pagebox_itm rhs = (Xoctg_pagebox_itm)rhsObj; return -Int_.Compare(lhs.Count__all(), rhs.Count__all()); } - public static final Xoctg_pagebox_hash_sorter Sorter = new Xoctg_pagebox_hash_sorter(); Xoctg_pagebox_hash_sorter() {} + public static final Xoctg_pagebox_hash_sorter Sorter = new Xoctg_pagebox_hash_sorter(); Xoctg_pagebox_hash_sorter() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_itm.java index 18a88b229..d7d96c331 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_itm.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.wikis.pages.wtxts.*; public class Xoctg_pagebox_itm { public Xoctg_pagebox_itm(Xoa_ttl ttl) { this.ttl = ttl; } - public Xoa_ttl Ttl() {return ttl;} private final Xoa_ttl ttl; + public Xoa_ttl Ttl() {return ttl;} private final Xoa_ttl ttl; public int Id() {return id;} private int id; public DateAdp Timestamp() {return timestamp;} private DateAdp timestamp; public boolean Hidden() {return hidden;} private boolean hidden; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_loader.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_loader.java index 025742f06..ab14d7c78 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_loader.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/Xoctg_pagebox_loader.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.dbs.*; import gplx.xowa.addons.wikis.ctgs.dbs.*; import gplx.xowa.wikis.data.tbls.*; class Xoctg_pagebox_loader implements Select_in_cbk { - private final Xoctg_pagebox_hash hash; private final byte[] page_url; + private final Xoctg_pagebox_hash hash; private final byte[] page_url; public Xoctg_pagebox_loader(Xoctg_pagebox_hash hash, byte[] page_url) { this.hash = hash; this.page_url = page_url; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box.java index c1344dbb9..4f64c2549 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.doubles; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.core.brys.*; import gplx.core.brys.fmts.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.wikis.data.tbls.*; @@ -20,8 +20,8 @@ import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.users.history.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; public class Xoctg_double_box implements Bfr_arg { - public Xoctg_double_grp Grp_normal() {return grp_normal;} private final Xoctg_double_grp grp_normal = new Xoctg_double_grp(); - public Xoctg_double_grp Grp_hidden() {return grp_hidden;} private final Xoctg_double_grp grp_hidden = new Xoctg_double_grp(); + public Xoctg_double_grp Grp_normal() {return grp_normal;} private final Xoctg_double_grp grp_normal = new Xoctg_double_grp(); + public Xoctg_double_grp Grp_hidden() {return grp_hidden;} private final Xoctg_double_grp grp_hidden = new Xoctg_double_grp(); public void Init_by_wiki(Xow_wiki wiki) { Xou_history_mgr history_mgr = wiki.App().User().History_mgr(); grp_normal.Init_by_wiki(wiki, history_mgr, Bool_.Y); @@ -42,7 +42,7 @@ public class Xoctg_double_box implements Bfr_arg { public void Bfr_arg__add(Bry_bfr bfr) { Fmt__all.Bld_many(bfr, grp_normal, grp_hidden); } - private static final Bry_fmt + private static final Bry_fmt Fmt__all = Bry_fmt.Auto_nl_skip_last ( "
    ~{grp_normal}~{grp_hidden}" , "
    " diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box__tst.java index 27fef7c3a..823a2be1d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_box__tst.java @@ -79,7 +79,7 @@ public class Xoctg_double_box__tst { } class Xoctg_double_box__fxt { private Xop_fxt fxt; private Xoctg_double_box hidden_wtr; - private final List_adp init_ctgs = List_adp_.New(); + private final List_adp init_ctgs = List_adp_.New(); public void Clear() { fxt = new Xop_fxt(); hidden_wtr = new Xoctg_double_box(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_grp.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_grp.java index 5697c039f..3b64c849d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_grp.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_grp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.doubles; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.core.brys.*; import gplx.core.brys.fmts.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; @@ -22,7 +22,7 @@ public class Xoctg_double_grp implements Bfr_arg { private Xow_wiki wiki; private byte[] lbl_ctg_help; public boolean Type_is_normal() {return type_is_normal;} private boolean type_is_normal; - public Xoctg_double_itm Itms() {return itms;} private final Xoctg_double_itm itms = new Xoctg_double_itm(); + public Xoctg_double_itm Itms() {return itms;} private final Xoctg_double_itm itms = new Xoctg_double_itm(); public void Init_by_wiki(Xow_wiki wiki, Xou_history_mgr history_mgr, boolean type_is_normal) { this.type_is_normal = type_is_normal; this.wiki = wiki; @@ -41,11 +41,11 @@ public class Xoctg_double_grp implements Bfr_arg { } } - private static final byte[] + private static final byte[] Key_pagecategorieslink = Bry_.new_a7("pagecategorieslink") , Key_pagecategories = Bry_.new_a7("pagecategories") ; - private static final Bry_fmt + private static final Bry_fmt Fmt__normal = Bry_fmt.Auto_nl_skip_last ( "" , "
    " diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_itm.java index 70caeb610..d2563407b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/doubles/Xoctg_double_itm.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.doubles; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.core.brys.fmts.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.htmls.core.wkrs.lnkis.htmls.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.users.history.*; public class Xoctg_double_itm implements gplx.core.brys.Bfr_arg { - private final List_adp itms = List_adp_.New(); + private final List_adp itms = List_adp_.New(); private Xow_wiki wiki; private Xoh_href_wtr href_wtr; private Xou_history_mgr history_mgr; public void Init_by_wiki(Xow_wiki wiki, Xou_history_mgr history_mgr) { this.wiki = wiki; @@ -50,7 +50,7 @@ public class Xoctg_double_itm implements gplx.core.brys.Bfr_arg { Fmt__itm.Bld_many(bfr, lnki_cls, lnki_href, lnki_ttl, lnki_text); } } - private static final Bry_fmt Fmt__itm = Bry_fmt.Auto_nl_skip_last + private static final Bry_fmt Fmt__itm = Bry_fmt.Auto_nl_skip_last ( "" , "
  • " , "~{lnki_text}" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box.java index 349f27b14..dd4e2029b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.singles; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.core.brys.*; import gplx.core.brys.fmts.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.htmls.core.htmls.*; public class Xoctg_single_box { - private final Xoctg_single_itm itms_fmtr = new Xoctg_single_itm(); + private final Xoctg_single_itm itms_fmtr = new Xoctg_single_itm(); private byte[] lbl_categories; public void Init_by_wiki(Xow_wiki wiki) { this.lbl_categories = wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_ctg_tbl_hdr); @@ -28,7 +28,7 @@ public class Xoctg_single_box { itms_fmtr.Init_by_page(itms); Fmt__grp.Bld_many(bfr, lbl_categories, itms_fmtr); } - private static final Bry_fmt Fmt__grp = Bry_fmt.Auto_nl_skip_last + private static final Bry_fmt Fmt__grp = Bry_fmt.Auto_nl_skip_last ( "
    " , "
    " , "~{grp_lbl}:" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box__tst.java index 39433f175..ef82b9d1f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_box__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.singles; import gplx.*; impor import org.junit.*; import gplx.xowa.htmls.core.htmls.*; public class Xoctg_single_box__tst { - @Before public void init() {fxt.Clear();} private final Xoh_ctg_mgr_fxt fxt = new Xoh_ctg_mgr_fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_ctg_mgr_fxt fxt = new Xoh_ctg_mgr_fxt(); @Test public void Basic() { fxt.Init__ctgs("Category:A", "Category:B").Test_html(String_.Concat_lines_nl ( "
    " diff --git a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_itm.java index 0406d6610..63cb140ac 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/ctgs/htmls/pageboxs/singles/Xoctg_single_itm.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.singles; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.ctgs.*; import gplx.xowa.addons.wikis.ctgs.htmls.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.core.brys.*; import gplx.core.brys.fmts.*; class Xoctg_single_itm implements Bfr_arg { - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private Xow_wiki wiki; private Xoctg_pagebox_itm[] itms; public void Init_by_wiki(Xow_wiki wiki) {this.wiki = wiki;} @@ -30,7 +30,7 @@ class Xoctg_single_itm implements Bfr_arg { Fmt__itm.Bld_many(bfr, tmp_bfr.To_bry_and_clear(), ctg_page_txt, ctg_page_txt); } } - private static final Bry_fmt Fmt__itm = Bry_fmt.Auto_nl_skip_last + private static final Bry_fmt Fmt__itm = Bry_fmt.Auto_nl_skip_last ( "" , "
  • " , "~{itm_text}" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_db_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_db_mgr.java index 1951ff6b4..97f157843 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_db_mgr.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; -import gplx.dbs.*; -public class Xowdir_db_mgr { - public Xowdir_db_mgr(Db_conn conn) { - tbl__wiki = new Xowdir_wiki_tbl(conn); - conn.Meta_tbl_assert(tbl__wiki); - } - public Xowdir_wiki_tbl Tbl__wiki() {return tbl__wiki;} private final Xowdir_wiki_tbl tbl__wiki; -} +package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; +import gplx.dbs.*; +public class Xowdir_db_mgr { + public Xowdir_db_mgr(Db_conn conn) { + tbl__wiki = new Xowdir_wiki_tbl(conn); + conn.Meta_tbl_assert(tbl__wiki); + } + public Xowdir_wiki_tbl Tbl__wiki() {return tbl__wiki;} private final Xowdir_wiki_tbl tbl__wiki; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_itm.java index a49792e1c..94c4d80b5 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_itm.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; -public class Xowdir_wiki_itm { - public Xowdir_wiki_itm(int id, String domain, Io_url url, Xowdir_wiki_json json) { - this.id = id; - this.domain = domain; - this.url = url; - this.json = json; - } - public int Id() {return id;} private final int id; - public String Domain() {return domain;} private final String domain; - public Io_url Url() {return url;} private final Io_url url; - public Xowdir_wiki_json Json() {return json;} private final Xowdir_wiki_json json; -} +package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; +public class Xowdir_wiki_itm { + public Xowdir_wiki_itm(int id, String domain, Io_url url, Xowdir_wiki_json json) { + this.id = id; + this.domain = domain; + this.url = url; + this.json = json; + } + public int Id() {return id;} private final int id; + public String Domain() {return domain;} private final String domain; + public Io_url Url() {return url;} private final Io_url url; + public Xowdir_wiki_json Json() {return json;} private final Xowdir_wiki_json json; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr.java index eb50a4e33..abee9ea95 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.langs.jsons.*; import gplx.xowa.wikis.data.*; @@ -24,7 +24,7 @@ public interface Xowdir_wiki_props_mgr { Xowdir_wiki_props Verify(boolean mode_is_import, String domain, Io_url core_db_url); } abstract class Xowdir_wiki_props_mgr__base implements Xowdir_wiki_props_mgr { - private final Gfo_usr_dlg usr_dlg; + private final Gfo_usr_dlg usr_dlg; public Xowdir_wiki_props_mgr__base(Gfo_usr_dlg usr_dlg) { this.usr_dlg = usr_dlg; } @@ -74,8 +74,8 @@ abstract class Xowdir_wiki_props_mgr__base implements Xowdir_wiki_props_mgr { } } class Xowdir_wiki_props_mgr__mock extends Xowdir_wiki_props_mgr__base { - private final Hash_adp wiki_cfg_hash = Hash_adp_.New(); - private final Hash_adp user_reg_hash = Hash_adp_.New(); + private final Hash_adp wiki_cfg_hash = Hash_adp_.New(); + private final Hash_adp user_reg_hash = Hash_adp_.New(); public Xowdir_wiki_props_mgr__mock() {super(Gfo_usr_dlg_.Noop);} @Override public void Wiki_cfg__upsert(String key, String val) { if (val != null) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__tst.java index 4d9031b78..da58d45b3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__tst.java @@ -18,7 +18,7 @@ import org.junit.*; import gplx.core.tests.*; import gplx.langs.jsons.*; import gplx.xowa.wikis.data.*; public class Xowdir_wiki_props_mgr__tst { - private final Xowdir_wiki_props_mgr__fxt fxt = new Xowdir_wiki_props_mgr__fxt(); + private final Xowdir_wiki_props_mgr__fxt fxt = new Xowdir_wiki_props_mgr__fxt(); @Test public void Import__wiki__missing_all() { // handle all imported .xowa wikis pre v4.3 @@ -48,7 +48,7 @@ public class Xowdir_wiki_props_mgr__tst { } } class Xowdir_wiki_props_mgr__fxt { - private final Xowdir_wiki_props_mgr mgr = new Xowdir_wiki_props_mgr__mock(); + private final Xowdir_wiki_props_mgr mgr = new Xowdir_wiki_props_mgr__mock(); public Xowdir_wiki_props Make__json(String domain, String name, String main_page) { return new Xowdir_wiki_props(domain, name, main_page); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__xowa.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__xowa.java index fb5da59b9..dbba4eaf4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__xowa.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_props_mgr__xowa.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.langs.jsons.*; class Xowdir_wiki_props_mgr__xowa extends Xowdir_wiki_props_mgr__base { - private final Xoa_app app; - private final Io_url core_db_url; + private final Xoa_app app; + private final Io_url core_db_url; private Db_cfg_tbl wiki_cfg_tbl; private Xowdir_wiki_tbl user_reg_tbl; public Xowdir_wiki_props_mgr__xowa(Xoa_app app, Io_url core_db_url) {super(Gfo_usr_dlg_.Instance); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_tbl.java index 0cd966162..584be5cf2 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/dbs/Xowdir_wiki_tbl.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.dbs.*; import gplx.dbs.utls.*; import gplx.langs.jsons.*; public class Xowdir_wiki_tbl implements Db_tbl { // for domain and user-specific data only (name, url); don't replicate wiki-specific info here (like main_page) - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld__wiki_id, fld__wiki_domain, fld__wiki_core_url, fld__wiki_json; - private final Db_conn conn; - private final Json_parser json_parser = new Json_parser(); + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld__wiki_id, fld__wiki_domain, fld__wiki_core_url, fld__wiki_json; + private final Db_conn conn; + private final Json_parser json_parser = new Json_parser(); public Xowdir_wiki_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = Tbl_name_dflt; @@ -30,7 +30,7 @@ public class Xowdir_wiki_tbl implements Db_tbl { // for domain and user-specific this.fld__wiki_json = flds.Add_text("wiki_json"); // EX: '{category_level="1",search_level="2", ...}' conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public boolean Upsert(int id, String domain, Io_url core_url, String json) { return Db_tbl__crud_.Upsert(conn, tbl_name, flds, String_.Ary(fld__wiki_id), id, domain, core_url.Xto_api(), json); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_bridge.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_bridge.java index 4e2e130a1..ae81f79cc 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.langs.jsons.*; import gplx.xowa.addons.wikis.directorys.dbs.*; @@ -35,12 +35,12 @@ public class Xowdir_item_bridge implements Bridge_cmd_itm { } private static final byte Proc__save = 0, Proc__delete = 1, Proc__reindex_search = 2; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("save" , Proc__save) .Add_str_byte("delete" , Proc__delete) .Add_str_byte("reindex_search" , Proc__reindex_search) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("wiki.directory.item"); - public static final Xowdir_item_bridge Prototype = new Xowdir_item_bridge(); Xowdir_item_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("wiki.directory.item"); + public static final Xowdir_item_bridge Prototype = new Xowdir_item_bridge(); Xowdir_item_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_doc.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_doc.java index 4978bd5ac..4c7310b1e 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_doc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_doc.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.addons.wikis.directorys.dbs.*; public class Xowdir_item_doc implements Mustache_doc_itm { - private final boolean mode_is_new; - private final int id; - private final String domain, name, dir, main_page; + private final boolean mode_is_new; + private final int id; + private final String domain, name, dir, main_page; public Xowdir_item_doc(int id, String domain, String name, String dir, String main_page) { this.mode_is_new = id == -1; this.id = id; @@ -41,7 +41,7 @@ public class Xowdir_item_doc implements Mustache_doc_itm { return Mustache_doc_itm_.Ary__empty; } - public static final Xowdir_item_doc[] Ary_empty = new Xowdir_item_doc[0]; + public static final Xowdir_item_doc[] Ary_empty = new Xowdir_item_doc[0]; public static Xowdir_item_doc New(Xowdir_wiki_itm itm) { return new Xowdir_item_doc(itm.Id(), itm.Domain(), itm.Json().Name(), itm.Url().OwnerDir().Xto_api(), itm.Json().Main_page()); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_html.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_html.java index 3bd5f4fdc..09ddbcfd3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_html.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*; import gplx.dbs.*; import gplx.xowa.addons.wikis.directorys.dbs.*; class Xowdir_item_html extends Xow_special_wtr__base { - private final String domain; + private final String domain; public Xowdir_item_html(String domain) { this.domain = domain; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_mgr.java index 4ad32dde6..c8d42285d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_mgr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.langs.jsons.*; import gplx.dbs.sys.*; import gplx.xowa.addons.wikis.directorys.dbs.*; import gplx.xowa.addons.wikis.directorys.specials.items.bldrs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.*; import gplx.xowa.langs.cases.*; class Xowdir_item_mgr { - private final Xoa_app app; - private final Json_wtr json_wtr = new Json_wtr(); + private final Xoa_app app; + private final Json_wtr json_wtr = new Json_wtr(); private gplx.xowa.guis.cbks.Xog_cbk_trg cbk_trg = gplx.xowa.guis.cbks.Xog_cbk_trg.New_by_page(Xowdir_item_special.Prototype.Special__meta().Ttl_bry()); public Xowdir_item_mgr(Xoa_app app) { this.app = app; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_special.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_special.java index 8617c46d7..89be3e38a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/Xowdir_item_special.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; -import gplx.xowa.specials.*; import gplx.core.net.qargs.*; -public class Xowdir_item_special implements Xow_special_page { - public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { - Gfo_qarg_mgr url_args = new Gfo_qarg_mgr().Init(url.Qargs_ary()); - - String domain = url_args.Read_str_or("domain", ""); - - new Xowdir_item_html(domain).Bld_page_by_mustache(wiki.App(), page, this); - } - Xowdir_item_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; - public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xowdir_item_special(Xow_special_meta.New_xo("XowaWikiItem", "Wiki Details")); -} +package gplx.xowa.addons.wikis.directorys.specials.items; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; +import gplx.xowa.specials.*; import gplx.core.net.qargs.*; +public class Xowdir_item_special implements Xow_special_page { + public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { + Gfo_qarg_mgr url_args = new Gfo_qarg_mgr().Init(url.Qargs_ary()); + + String domain = url_args.Read_str_or("domain", ""); + + new Xowdir_item_html(domain).Bld_page_by_mustache(wiki.App(), page, this); + } + Xowdir_item_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_page Special__clone() {return this;} + public static final Xow_special_page Prototype = new Xowdir_item_special(Xow_special_meta.New_xo("XowaWikiItem", "Wiki Details")); +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_data.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_data.java index f759e1e8b..09900513f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_data.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_data.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.specials.items.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; -import gplx.core.ios.streams.*; -public class Xodb_wiki_data { - public Xodb_wiki_data(String domain, Io_url core_url) { - this.domain = domain; - this.core_url = core_url; - } - public String Domain() {return domain;} private final String domain; - public Io_url Core_url() {return core_url;} private final Io_url core_url; - public byte Text_zip_tid() {return text_zip_tid;} private byte text_zip_tid = Io_stream_tid_.Tid__raw; -} +package gplx.xowa.addons.wikis.directorys.specials.items.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; +import gplx.core.ios.streams.*; +public class Xodb_wiki_data { + public Xodb_wiki_data(String domain, Io_url core_url) { + this.domain = domain; + this.core_url = core_url; + } + public String Domain() {return domain;} private final String domain; + public Io_url Core_url() {return core_url;} private final Io_url core_url; + public byte Text_zip_tid() {return text_zip_tid;} private byte text_zip_tid = Io_stream_tid_.Tid__raw; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_db.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_db.java index 5bf590f4f..3b2df4d4b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_db.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_db.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.items.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; import gplx.dbs.*; public class Xodb_wiki_db implements Db_tbl_owner { - private final Ordered_hash tbls = Ordered_hash_.New(); + private final Ordered_hash tbls = Ordered_hash_.New(); public Xodb_wiki_db(int tid, Io_url url, Db_conn conn) { this.tid = tid; this.url = url; this.conn = conn; } - public int Tid() {return tid;} private final int tid; - public Io_url Url() {return url;} private final Io_url url; - public Db_conn Conn() {return conn;} private final Db_conn conn; + public int Tid() {return tid;} private final int tid; + public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; public Db_tbl Tbls__get_by_key(String key) {return (Db_tbl)tbls.Get_by(key);} public void Tbls__add(boolean create, Db_tbl... ary) { int len = ary.length; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_mgr.java index b5fcd52c6..8790e9d0c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/items/bldrs/Xodb_wiki_mgr.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.specials.items.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; -import gplx.dbs.*; -public class Xodb_wiki_mgr { - public Xodb_wiki_mgr(String domain) { - this.domain = domain; - } - public String Domain() {return domain;} private final String domain; - public Xodb_wiki_db Dbs__get_core() {return dbs__core;} private Xodb_wiki_db dbs__core; - public void Dbs__add(Xodb_wiki_db file) { - if (file.Tid() == Xodb_wiki_db_tid.Tid__core) - dbs__core = file; - } -} +package gplx.xowa.addons.wikis.directorys.specials.items.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; +import gplx.dbs.*; +public class Xodb_wiki_mgr { + public Xodb_wiki_mgr(String domain) { + this.domain = domain; + } + public String Domain() {return domain;} private final String domain; + public Xodb_wiki_db Dbs__get_core() {return dbs__core;} private Xodb_wiki_db dbs__core; + public void Dbs__add(Xodb_wiki_db file) { + if (file.Tid() == Xodb_wiki_db_tid.Tid__core) + dbs__core = file; + } +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_bridge.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_bridge.java index 482ba4b3f..fe2e95096 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.langs.jsons.*; import gplx.xowa.addons.wikis.directorys.dbs.*; @@ -33,10 +33,10 @@ public class Xowdir_list_bridge implements Bridge_cmd_itm { } private static final byte Proc__import_wiki = 0; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("import_wiki" , Proc__import_wiki) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("wiki.directory.list"); - public static final Xowdir_list_bridge Prototype = new Xowdir_list_bridge(); Xowdir_list_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("wiki.directory.list"); + public static final Xowdir_list_bridge Prototype = new Xowdir_list_bridge(); Xowdir_list_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_doc.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_doc.java index 506b8f5c6..45bcda314 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_doc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_doc.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.addons.wikis.directorys.specials.items.*; class Xowdir_list_doc implements Mustache_doc_itm { - private final Xowdir_item_doc[] itms_ary; + private final Xowdir_item_doc[] itms_ary; public Xowdir_list_doc(Xowdir_item_doc[] itms_ary) { this.itms_ary = itms_ary; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_special.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_special.java index 7d38b303f..cb648fb48 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_special.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.directorys.specials.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; -import gplx.xowa.specials.*; import gplx.core.net.qargs.*; -public class Xowdir_list_special implements Xow_special_page { - public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { - new Xowdir_list_html().Bld_page_by_mustache(wiki.App(), page, this); - } - Xowdir_list_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; - public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xowdir_list_special(Xow_special_meta.New_xo("XowaWikiDirectory", "Wiki List")); -} +package gplx.xowa.addons.wikis.directorys.specials.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; +import gplx.xowa.specials.*; import gplx.core.net.qargs.*; +public class Xowdir_list_special implements Xow_special_page { + public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) { + new Xowdir_list_html().Bld_page_by_mustache(wiki.App(), page, this); + } + Xowdir_list_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_page Special__clone() {return this;} + public static final Xow_special_page Prototype = new Xowdir_list_special(Xow_special_meta.New_xo("XowaWikiDirectory", "Wiki List")); +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_svc.java b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_svc.java index 18f4b7066..dd869f6a6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_svc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/directorys/specials/lists/Xowdir_list_svc.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.directorys.specials.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.directorys.*; import gplx.xowa.addons.wikis.directorys.specials.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.sys.*; import gplx.langs.jsons.*; import gplx.xowa.addons.wikis.directorys.dbs.*; class Xowdir_list_svc { - private final Xoa_app app; + private final Xoa_app app; private gplx.xowa.guis.cbks.Xog_cbk_trg cbk_trg = gplx.xowa.guis.cbks.Xog_cbk_trg.New_by_page(Xowdir_list_special.Prototype.Special__meta().Ttl_bry()); public Xowdir_list_svc(Xoa_app app) { this.app = app; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/Xosearch_fulltext_addon.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/Xosearch_fulltext_addon.java index 915749abd..80f12ee8c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/Xosearch_fulltext_addon.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/Xosearch_fulltext_addon.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.specials.*; import gplx.xowa.htmls.bridges.*; @@ -36,7 +36,7 @@ public class Xosearch_fulltext_addon implements Xoax_addon_itm, Xoax_addon_itm__ , gplx.xowa.addons.wikis.fulltexts.indexers.svcs.Xofulltext_indexer_bridge.Prototype }; } - public Xofulltext_cache_mgr Cache_mgr() {return cache_mgr;} private final Xofulltext_cache_mgr cache_mgr = new Xofulltext_cache_mgr(); + public Xofulltext_cache_mgr Cache_mgr() {return cache_mgr;} private final Xofulltext_cache_mgr cache_mgr = new Xofulltext_cache_mgr(); public static Xosearch_fulltext_addon Get_by_app(Xoa_app app) { return (Xosearch_fulltext_addon)app.Addon_mgr().Itms__get_or_null(ADDON__KEY); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor.java index f91e182e5..b208b0818 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.core.btries.*; import gplx.xowa.parsers.htmls.*; public class Xofulltext_extractor implements Mwh_doc_wkr { - private final Mwh_doc_parser doc_parser = new Mwh_doc_parser(); - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Btrie_slim_mgr punct_trie = Btrie_slim_mgr.cs(); - private final Btrie_rv trv = new Btrie_rv(); + private final Mwh_doc_parser doc_parser = new Mwh_doc_parser(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Btrie_slim_mgr punct_trie = Btrie_slim_mgr.cs(); + private final Btrie_rv trv = new Btrie_rv(); public Xofulltext_extractor() { punct_trie.Add_many_str(Xofulltext_punct_.Punct_bgn_ary); punct_trie.Add_many_str("/", ")", "]", ">", "�"); } - public Hash_adp_bry Nde_regy() {return nde_regy;} private final Hash_adp_bry nde_regy = Mwh_doc_wkr_.Nde_regy__mw(); + public Hash_adp_bry Nde_regy() {return nde_regy;} private final Hash_adp_bry nde_regy = Mwh_doc_wkr_.Nde_regy__mw(); public void On_nde_head_bgn (Mwh_doc_parser mgr, byte[] src, int nde_tid, int key_bgn, int key_end) {} public void On_nde_head_end (Mwh_doc_parser mgr, byte[] src, int nde_tid, int itm_bgn, int itm_end, boolean inline) {} public void On_nde_tail_end (Mwh_doc_parser mgr, byte[] src, int nde_tid, int itm_bgn, int itm_end) {} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor__tst.java index 06f84f44b..ee2baace3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_extractor__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.fulltexts.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import org.junit.*; import gplx.core.tests.*; public class Xofulltext_extractor__tst { - private final Xofulltext_extractor__fxt fxt = new Xofulltext_extractor__fxt(); + private final Xofulltext_extractor__fxt fxt = new Xofulltext_extractor__fxt(); @Test public void Basic() { // simple node fxt.Test__extract("a b c", "a b c"); @@ -38,7 +38,7 @@ public class Xofulltext_extractor__tst { } } class Xofulltext_extractor__fxt { - private final Xofulltext_extractor extractor = new Xofulltext_extractor(); + private final Xofulltext_extractor extractor = new Xofulltext_extractor(); public void Test__extract(String src, String expd) { Gftest.Eq__str(expd, extractor.Extract(Bry_.new_u8(src))); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_punct_.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_punct_.java index 327188abf..8c7717129 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_punct_.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/core/Xofulltext_punct_.java @@ -13,8 +13,8 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; -public class Xofulltext_punct_ { - public static final String[] Ws_bgn_ary = new String[] {"\t", "\n", "\r", " ", "/", "(", ")", "[", "]", "<", ">"}; - public static final String[] Punct_bgn_ary = new String[] {".", ",", "?", "!", ":", ";", "'", "\"", "-"}; -} +package gplx.xowa.addons.wikis.fulltexts.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; +public class Xofulltext_punct_ { + public static final String[] Ws_bgn_ary = new String[] {"\t", "\n", "\r", " ", "/", "(", ")", "[", "]", "<", ">"}; + public static final String[] Punct_bgn_ary = new String[] {".", ",", "?", "!", ":", ";", "'", "\"", "-"}; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_cmd.java index 02d107560..ddc340f3b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Xofulltext_indexer_cmd extends Xob_cmd__base { - private final Xofulltext_indexer_args args = new Xofulltext_indexer_args(); + private final Xofulltext_indexer_args args = new Xofulltext_indexer_args(); public Xofulltext_indexer_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);} @Override public void Cmd_run() { wiki.Init_assert(); @@ -28,6 +28,6 @@ public class Xofulltext_indexer_cmd extends Xob_cmd__base { } @Override public String Cmd_key() {return "search.index";} - public static final Xob_cmd Prototype = new Xofulltext_indexer_cmd(null, null); + public static final Xob_cmd Prototype = new Xofulltext_indexer_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xofulltext_indexer_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_wkr.java index 9f6be0fbc..04e3e0f22 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/bldrs/Xofulltext_indexer_wkr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.gflucene.core.*; import gplx.gflucene.indexers.*; import gplx.xowa.addons.wikis.fulltexts.core.*; public class Xofulltext_indexer_wkr { - private final Gflucene_indexer_mgr index_wtr = new Gflucene_indexer_mgr(); - private final Xofulltext_extractor extractor = new Xofulltext_extractor(); + private final Gflucene_indexer_mgr index_wtr = new Gflucene_indexer_mgr(); + private final Xofulltext_extractor extractor = new Xofulltext_extractor(); public void Init(Xow_wiki wiki, String idx_opt) { // delete existing dir Io_url index_dir = Xosearch_fulltext_addon.Get_index_dir(wiki); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_html.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_html.java index d2a21d076..0267a05e5 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_html.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*; import gplx.dbs.*; class Xofulltext_indexer_html extends Xow_special_wtr__base implements Mustache_doc_itm { - private final String wikis_bry, ns_ids, idx_opt; + private final String wikis_bry, ns_ids, idx_opt; public Xofulltext_indexer_html(String wikis_bry, String ns_ids, String idx_opt) { this.wikis_bry = wikis_bry; this.ns_ids = ns_ids; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_special.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_special.java index e109c8e19..fdb420b31 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/specials/Xofulltext_indexer_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.xowa.specials.*; import gplx.core.net.qargs.*; import gplx.xowa.addons.apps.cfgs.*; @@ -30,7 +30,7 @@ public class Xofulltext_indexer_special implements Xow_special_page { ).Bld_page_by_mustache(wiki.App(), page, this); } Xofulltext_indexer_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xofulltext_indexer_special(Xow_special_meta.New_xo("XowaSearchBuilder", "Indexer")); + public static final Xow_special_page Prototype = new Xofulltext_indexer_special(Xow_special_meta.New_xo("XowaSearchBuilder", "Indexer")); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_bridge.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_bridge.java index 85a6cb1a7..dd4a1a44c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; @@ -32,10 +32,10 @@ public class Xofulltext_indexer_bridge implements Bridge_cmd_itm { } private static final byte Proc__index = 0; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("index" , Proc__index) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.wiki.fulltext.indexer"); - public static final Xofulltext_indexer_bridge Prototype = new Xofulltext_indexer_bridge(); Xofulltext_indexer_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.wiki.fulltext.indexer"); + public static final Xofulltext_indexer_bridge Prototype = new Xofulltext_indexer_bridge(); Xofulltext_indexer_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_svc.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_svc.java index 14a82570c..394dd9c02 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_svc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_svc.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.indexers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; import gplx.core.btries.*; import gplx.langs.jsons.*; @@ -22,8 +22,8 @@ import gplx.xowa.addons.apps.cfgs.*; import gplx.xowa.addons.wikis.fulltexts.indexers.specials.*; import gplx.xowa.addons.wikis.fulltexts.indexers.bldrs.*; class Xofulltext_indexer_svc implements Gfo_invk { - private final Xoa_app app; - private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(Xofulltext_indexer_special.Prototype.Special__meta().Ttl_bry()); + private final Xoa_app app; + private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(Xofulltext_indexer_special.Prototype.Special__meta().Ttl_bry()); public Xofulltext_indexer_svc(Xoa_app app) { this.app = app; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_ui.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_ui.java index cc81ca3d3..05576ecc5 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_ui.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/indexers/svcs/Xofulltext_indexer_ui.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.indexers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; -import gplx.xowa.guis.cbks.*; -public class Xofulltext_indexer_ui { - private final Xog_cbk_mgr cbk_mgr; - private final Xog_cbk_trg cbk_trg; - public Xofulltext_indexer_ui(Xog_cbk_mgr cbk_mgr, Xog_cbk_trg cbk_trg) { - this.cbk_mgr = cbk_mgr; - this.cbk_trg = cbk_trg; - } - public void Send_prog(String prog) { - cbk_mgr.Send_json(cbk_trg, "xo.fulltext_indexer.status__prog__recv", gplx.core.gfobjs.Gfobj_nde.New() - .Add_str("prog", prog) - ); - } -} +package gplx.xowa.addons.wikis.fulltexts.indexers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.indexers.*; +import gplx.xowa.guis.cbks.*; +public class Xofulltext_indexer_ui { + private final Xog_cbk_mgr cbk_mgr; + private final Xog_cbk_trg cbk_trg; + public Xofulltext_indexer_ui(Xog_cbk_mgr cbk_mgr, Xog_cbk_trg cbk_trg) { + this.cbk_mgr = cbk_mgr; + this.cbk_trg = cbk_trg; + } + public void Send_prog(String prog) { + cbk_mgr.Send_json(cbk_trg, "xo.fulltext_indexer.status__prog__recv", gplx.core.gfobjs.Gfobj_nde.New() + .Add_str("prog", prog) + ); + } +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_line.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_line.java index 8fc44861d..07ce0d52c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_line.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_line.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; -public class Xofulltext_cache_line { - public Xofulltext_cache_line(int line_seq, byte[] line_html) { - this.line_seq = line_seq; - this.line_html = line_html; - } - public int Line_seq() {return line_seq;} private final int line_seq; - public byte[] Line_html() {return line_html;} private final byte[] line_html; -} +package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; +public class Xofulltext_cache_line { + public Xofulltext_cache_line(int line_seq, byte[] line_html) { + this.line_seq = line_seq; + this.line_html = line_html; + } + public int Line_seq() {return line_seq;} private final int line_seq; + public byte[] Line_html() {return line_html;} private final byte[] line_html; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_mgr.java index 05852b2b1..4302dc67b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.core.primitives.*; public class Xofulltext_cache_mgr { - private final Ordered_hash qry_hash = Ordered_hash_.New(); - private final Hash_adp_bry id_hash = Hash_adp_bry.cs(); + private final Ordered_hash qry_hash = Ordered_hash_.New(); + private final Hash_adp_bry id_hash = Hash_adp_bry.cs(); public int Next_qry_id() {return next_qry_id++;} private int next_qry_id; public void Clear() { qry_hash.Clear(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_page.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_page.java index 968ab6734..4753b426a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_page.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_page.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; -public class Xofulltext_cache_page { - public Xofulltext_cache_page(int page_id, int page_seq, byte[] page_ttl) { - this.page_id = page_id; - this.page_seq = page_seq; - this.page_ttl = page_ttl; - } - public int Page_id() {return page_id;} private final int page_id; - public int Page_seq() {return page_seq;} private final int page_seq; - public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; - public List_adp Lines() {return lines;} private final List_adp lines = List_adp_.New(); -} +package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; +public class Xofulltext_cache_page { + public Xofulltext_cache_page(int page_id, int page_seq, byte[] page_ttl) { + this.page_id = page_id; + this.page_seq = page_seq; + this.page_ttl = page_ttl; + } + public int Page_id() {return page_id;} private final int page_id; + public int Page_seq() {return page_seq;} private final int page_seq; + public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; + public List_adp Lines() {return lines;} private final List_adp lines = List_adp_.New(); +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_qry.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_qry.java index 3638fe7c5..2fba3327f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_qry.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/caches/Xofulltext_cache_qry.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; -public class Xofulltext_cache_qry { - public Xofulltext_cache_qry(int id, byte[] text) { - this.id = id; - this.text = text; - } - public int Id() {return id;} private final int id; - public byte[] Text() {return text;} private final byte[] text; - public Ordered_hash Pages() {return pages;} private final Ordered_hash pages = Ordered_hash_.New(); - public boolean done; -} +package gplx.xowa.addons.wikis.fulltexts.searchers.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; +public class Xofulltext_cache_qry { + public Xofulltext_cache_qry(int id, byte[] text) { + this.id = id; + this.text = text; + } + public int Id() {return id;} private final int id; + public byte[] Text() {return text;} private final byte[] text; + public Ordered_hash Pages() {return pages;} private final Ordered_hash pages = Ordered_hash_.New(); + public boolean done; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/Xofulltext_searcher__brute.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/Xofulltext_searcher__brute.java index 093a60544..f38c946f7 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/Xofulltext_searcher__brute.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/Xofulltext_searcher__brute.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.dbs.*; import gplx.xowa.guis.cbks.*; @@ -20,9 +20,9 @@ import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.finders.*; import gplx.xowa.addons.wikis.fulltexts.searchers.caches.*; public class Xofulltext_searcher__brute implements Xofulltext_searcher { - private final Xofulltext_finder_mgr finder = new Xofulltext_finder_mgr(); - private final Xofulltext_finder_cbk__eval cbk_eval = new Xofulltext_finder_cbk__eval(); - private final Xofulltext_finder_cbk__highlight cbk_highlight = new Xofulltext_finder_cbk__highlight(); + private final Xofulltext_finder_mgr finder = new Xofulltext_finder_mgr(); + private final Xofulltext_finder_cbk__eval cbk_eval = new Xofulltext_finder_cbk__eval(); + private final Xofulltext_finder_cbk__highlight cbk_highlight = new Xofulltext_finder_cbk__highlight(); public boolean Type_is_lucene() {return false;} public void Search(Xofulltext_searcher_ui ui, Xow_wiki wiki, Xofulltext_cache_qry qry, Xofulltext_args_qry args, Xofulltext_args_wiki wiki_args) { // get pages from db diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__eval__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__eval__tst.java index bac621d4d..4081fbbb4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__eval__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__eval__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.finders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.*; import org.junit.*; import gplx.core.tests.*; public class Xofulltext_finder_cbk__eval__tst { - private final Xofulltext_finder_cbk__eval__fxt fxt = new Xofulltext_finder_cbk__eval__fxt(); + private final Xofulltext_finder_cbk__eval__fxt fxt = new Xofulltext_finder_cbk__eval__fxt(); @Test public void Exact() { fxt.Init__search("a"); // y: basic match @@ -104,8 +104,8 @@ class Xofulltext_finder_cbk__eval__fxt { private boolean auto_wildcard_end = false; private byte wildcard_byte = Byte_ascii.Star; private byte not_byte = Byte_ascii.Dash; - private final Xofulltext_finder_mgr finder = new Xofulltext_finder_mgr(); - private final Xofulltext_finder_cbk__eval cbk = new Xofulltext_finder_cbk__eval(); + private final Xofulltext_finder_mgr finder = new Xofulltext_finder_mgr(); + private final Xofulltext_finder_cbk__eval cbk = new Xofulltext_finder_cbk__eval(); public void Init__search(String query) { finder.Init(Bry_.new_u8(query), case_match, auto_wildcard_bgn, auto_wildcard_end, wildcard_byte, not_byte); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__highlight.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__highlight.java index 1f9acdb60..82b681652 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__highlight.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_cbk__highlight.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.finders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.*; import gplx.xowa.guis.cbks.*; import gplx.xowa.addons.wikis.fulltexts.searchers.caches.*; @@ -22,7 +22,7 @@ public class Xofulltext_finder_cbk__highlight implements Xofulltext_finder_cbk { private Xow_wiki wiki; private int qry_id; private int page_id; - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public int found; private boolean show_all_matches; public byte[] Page_ttl() {return page_ttl;} private byte[] page_ttl; @@ -65,7 +65,7 @@ public class Xofulltext_finder_cbk__highlight implements Xofulltext_finder_cbk { ui.Send_line_add(true, show_all_matches, qry_id, wiki.Domain_bry(), page_id, found, line_html); found++; } - private static final byte[] Angle_bgn_escaped = Bry_.new_a7("<"); + private static final byte[] Angle_bgn_escaped = Bry_.new_a7("<"); private void Add_snip(Bry_bfr bfr, byte[] src, int bgn, int end) { for (int i = bgn; i < end; i++) { byte b = src[i]; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_mgr.java index 76f42d3c9..7339bd94c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_finder_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.finders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.*; import gplx.xowa.guis.cbks.*; import gplx.core.btries.*; @@ -20,10 +20,10 @@ import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Xofulltext_finder_mgr { private Btrie_slim_mgr hook_trie; private Xofulltext_word_node tree_root; - private final Srch_crt_parser parser = new Srch_crt_parser(Srch_crt_scanner_syms.Dflt); - private final Btrie_rv trv = new Btrie_rv(); - private final Xofulltext_word_lang lang = new Xofulltext_word_lang(); - private final Xofulltext_word_bounds word_bounds = new Xofulltext_word_bounds(); + private final Srch_crt_parser parser = new Srch_crt_parser(Srch_crt_scanner_syms.Dflt); + private final Btrie_rv trv = new Btrie_rv(); + private final Xofulltext_word_lang lang = new Xofulltext_word_lang(); + private final Xofulltext_word_bounds word_bounds = new Xofulltext_word_bounds(); public byte[] Query() {return query;} private byte[] query; public void Init(byte[] query, boolean case_match, boolean auto_wildcard_bgn, boolean auto_wildcard_end, byte wildchar_byte, byte not_byte) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_word_lang.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_word_lang.java index 830289eb3..3c9f0f276 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_word_lang.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/brutes/finders/Xofulltext_word_lang.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.finders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.*; import gplx.core.btries.*; import gplx.core.intls.*; import gplx.xowa.addons.wikis.fulltexts.core.*; public class Xofulltext_word_lang { - private final Btrie_slim_mgr ws_bgn = Btrie_slim_mgr.cs().Add_many_str(Xofulltext_punct_.Ws_bgn_ary); - private final Btrie_slim_mgr ws_end; - private final Btrie_slim_mgr punct_bgn = Btrie_slim_mgr.cs().Add_many_str(Xofulltext_punct_.Punct_bgn_ary); - private final Btrie_slim_mgr punct_end; + private final Btrie_slim_mgr ws_bgn = Btrie_slim_mgr.cs().Add_many_str(Xofulltext_punct_.Ws_bgn_ary); + private final Btrie_slim_mgr ws_end; + private final Btrie_slim_mgr punct_bgn = Btrie_slim_mgr.cs().Add_many_str(Xofulltext_punct_.Punct_bgn_ary); + private final Btrie_slim_mgr punct_end; public Xofulltext_word_lang() { this.ws_end = ws_bgn; this.punct_end = punct_bgn; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_highlighter_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_highlighter_mgr.java index 3be6f43d1..98df2d153 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_highlighter_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_highlighter_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.gflucenes; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.gflucene.core.*; import gplx.gflucene.highlighters.*; @@ -22,16 +22,16 @@ import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis.*; import gplx.xowa.addons.wikis.fulltexts.core.*; class Xofulltext_highlighter_mgr implements Gfo_invk { - private final Xofulltext_searcher_ui ui; - private final Xow_wiki wiki; - private final Xofulltext_args_qry searcher_args; - private final Xofulltext_args_wiki wiki_args; - private final Gflucene_analyzer_data analyzer_data; - private final Gflucene_searcher_qry searcher_data; - private final Gflucene_highlighter_mgr highlighter_mgr = new Gflucene_highlighter_mgr(); - private final Xoh_page hpg = new Xoh_page(); - private final Ordered_hash list; - private final Xofulltext_extractor extractor = new Xofulltext_extractor(); + private final Xofulltext_searcher_ui ui; + private final Xow_wiki wiki; + private final Xofulltext_args_qry searcher_args; + private final Xofulltext_args_wiki wiki_args; + private final Gflucene_analyzer_data analyzer_data; + private final Gflucene_searcher_qry searcher_data; + private final Gflucene_highlighter_mgr highlighter_mgr = new Gflucene_highlighter_mgr(); + private final Xoh_page hpg = new Xoh_page(); + private final Ordered_hash list; + private final Xofulltext_extractor extractor = new Xofulltext_extractor(); public Xofulltext_highlighter_mgr(Xofulltext_searcher_ui ui, Xow_wiki wiki, Xofulltext_args_qry searcher_args, Xofulltext_args_wiki wiki_args, Gflucene_analyzer_data analyzer_data, Gflucene_searcher_qry searcher_data, Ordered_hash list) { this.ui = ui; this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_searcher__lucene.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_searcher__lucene.java index bbd32d3c3..c3d4e0885 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_searcher__lucene.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/gflucenes/Xofulltext_searcher__lucene.java @@ -36,7 +36,7 @@ import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis.Xofulltext_searcher_u import gplx.xowa.wikis.data.tbls.Xowd_page_itm; import gplx.xowa.wikis.data.tbls.Xowd_page_tbl; public class Xofulltext_searcher__lucene implements Xofulltext_searcher { - private final Gflucene_searcher_mgr searcher = new Gflucene_searcher_mgr(); + private final Gflucene_searcher_mgr searcher = new Gflucene_searcher_mgr(); public boolean Type_is_lucene() {return true;} public void Search(Xofulltext_searcher_ui ui, Xow_wiki wiki, Xofulltext_cache_qry qry, Xofulltext_args_qry args, Xofulltext_args_wiki wiki_args) { // create lists diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_line.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_line.java index 964152590..5be9a1c33 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_line.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_line.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; -public class Xofulltext_searcher_line { - public Xofulltext_searcher_line(byte[] wiki_domain, int page_id, int found_idx, byte[] excerpt) { - this.wiki_domain = wiki_domain; - this.page_id = page_id; - this.found_idx = found_idx; - this.excerpt = excerpt; - } - public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; - public int Page_id() {return page_id;} private final int page_id; - public int Found_idx() {return found_idx;} private final int found_idx; - public byte[] Excerpt() {return excerpt;} private final byte[] excerpt; -} +package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; +public class Xofulltext_searcher_line { + public Xofulltext_searcher_line(byte[] wiki_domain, int page_id, int found_idx, byte[] excerpt) { + this.wiki_domain = wiki_domain; + this.page_id = page_id; + this.found_idx = found_idx; + this.excerpt = excerpt; + } + public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; + public int Page_id() {return page_id;} private final int page_id; + public int Found_idx() {return found_idx;} private final int found_idx; + public byte[] Excerpt() {return excerpt;} private final byte[] excerpt; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_page.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_page.java index befb485a5..735662d19 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_page.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_page.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; -public class Xofulltext_searcher_page { - public Xofulltext_searcher_page(int query_id, byte[] wiki_domain, int page_id, byte[] page_ttl, boolean expand_snips) { - this.query_id = query_id; - this.wiki_domain = wiki_domain; - this.page_id = page_id; - this.page_ttl = page_ttl; - this.expand_snips = expand_snips; - } - public int Query_id() {return query_id;} private final int query_id; - public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; - public int Page_id() {return page_id;} private final int page_id; - public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; - public boolean Expand_snips() {return expand_snips;} private final boolean expand_snips; -} +package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; +public class Xofulltext_searcher_page { + public Xofulltext_searcher_page(int query_id, byte[] wiki_domain, int page_id, byte[] page_ttl, boolean expand_snips) { + this.query_id = query_id; + this.wiki_domain = wiki_domain; + this.page_id = page_id; + this.page_ttl = page_ttl; + this.expand_snips = expand_snips; + } + public int Query_id() {return query_id;} private final int query_id; + public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; + public int Page_id() {return page_id;} private final int page_id; + public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; + public boolean Expand_snips() {return expand_snips;} private final boolean expand_snips; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_ui.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_ui.java index 026ea2d83..2c53250d3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_ui.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/mgrs/uis/Xofulltext_searcher_ui.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.*; import gplx.xowa.guis.cbks.*; import gplx.xowa.addons.wikis.fulltexts.searchers.caches.*; public class Xofulltext_searcher_ui { - private final Xog_cbk_mgr cbk_mgr; - private final Xog_cbk_trg cbk_trg; - private final Xofulltext_cache_mgr cache_mgr; + private final Xog_cbk_mgr cbk_mgr; + private final Xog_cbk_trg cbk_trg; + private final Xofulltext_cache_mgr cache_mgr; public Xofulltext_searcher_ui(Xofulltext_cache_mgr cache_mgr, Xog_cbk_mgr cbk_mgr, Xog_cbk_trg cbk_trg) { this.cache_mgr = cache_mgr; this.cbk_mgr = cbk_mgr; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_html.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_html.java index 1d65424d9..1d43cc993 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_html.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_html.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.core.net.qargs.*; import gplx.dbs.*; @@ -21,8 +21,8 @@ import gplx.xowa.addons.apps.cfgs.*; import gplx.xowa.parsers.amps.*; import gplx.xowa.htmls.core.htmls.*; class Xofulltext_searcher_html extends Xow_special_wtr__base implements Mustache_doc_itm { - private final Hash_adp props = Hash_adp_.New(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Hash_adp props = Hash_adp_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Xofulltext_searcher_html(Xocfg_mgr cfg_mgr, Gfo_qarg_mgr url_args, Xow_wiki wiki, Guid_adp page_guid, boolean lucene_exists) { String search_text = url_args.Read_str_or("search", ""); search_text = String_.Replace(search_text, "_", " "); // xofulltext_searcher.js chains multiple words with "_"; convert back to space diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_special.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_special.java index 8cb0067f9..3ae795324 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/specials/Xofulltext_searcher_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.xowa.specials.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.domains.*; @@ -42,7 +42,7 @@ public class Xofulltext_searcher_special implements Xow_special_page { html.Bld_page_by_mustache(wiki.App(), page, this); } Xofulltext_searcher_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xofulltext_searcher_special(Xow_special_meta.New_xo("XowaSearch", "Search")); + public static final Xow_special_page Prototype = new Xofulltext_searcher_special(Xow_special_meta.New_xo("XowaSearch", "Search")); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_bridge.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_bridge.java index dad7930c2..ccbff6c8a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_bridge.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_bridge.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.*; @@ -35,13 +35,13 @@ public class Xofulltext_searcher_bridge implements Bridge_cmd_itm { } private static final byte Proc__search_run = 0, Proc__search_cxl = 1, Proc__options_save = 2, Proc__snips_show_all = 3; - private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() + private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs() .Add_str_byte("search_run" , Proc__search_run) .Add_str_byte("search_cxl" , Proc__search_cxl) .Add_str_byte("options_save" , Proc__options_save) .Add_str_byte("snips_show_all" , Proc__snips_show_all) ; - public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.wiki.fulltext.searcher"); - public static final Xofulltext_searcher_bridge Prototype = new Xofulltext_searcher_bridge(); Xofulltext_searcher_bridge() {} + public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xowa.wiki.fulltext.searcher"); + public static final Xofulltext_searcher_bridge Prototype = new Xofulltext_searcher_bridge(); Xofulltext_searcher_bridge() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_svc.java b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_svc.java index 2f5fe3972..5ac9fe0a2 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_svc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/fulltexts/searchers/svcs/Xofulltext_searcher_svc.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.fulltexts.searchers.svcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.fulltexts.*; import gplx.xowa.addons.wikis.fulltexts.searchers.*; import gplx.core.btries.*; import gplx.langs.jsons.*; @@ -28,8 +28,8 @@ import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.uis.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.gflucenes.*; import gplx.xowa.addons.wikis.fulltexts.searchers.mgrs.brutes.*; class Xofulltext_searcher_svc implements Gfo_invk { - private final Xoa_app app; - private final Ordered_hash wkr_hash = Ordered_hash_.New(); + private final Xoa_app app; + private final Ordered_hash wkr_hash = Ordered_hash_.New(); public Xofulltext_searcher_svc(Xoa_app app) { this.app = app; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/bldrs/Xob_css_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/bldrs/Xob_css_cmd.java index 9f471af5d..5dfc45d2e 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/bldrs/Xob_css_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/bldrs/Xob_css_cmd.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.htmls.css.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; import gplx.xowa.addons.wikis.htmls.css.mgrs.*; public class Xob_css_cmd implements Xob_cmd { - private final Xob_bldr bldr; private final Xowe_wiki wiki; private final Gfo_usr_dlg usr_dlg; + private final Xob_bldr bldr; private final Xowe_wiki wiki; private final Gfo_usr_dlg usr_dlg; private Io_url css_dir; private String css_key; public Xob_css_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.bldr = bldr; this.wiki = wiki; this.usr_dlg = wiki.Appe().Usr_dlg();} public String Cmd_key() {return Xob_cmd_keys.Key_text_css;} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Css_db_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Css_db_mgr.java index ef07e354b..4d2358cea 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Css_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Css_db_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; public class Css_db_mgr { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Css_db_mgr(Xow_wiki wiki) { this.wiki = wiki; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_itm.java index 118e5c487..1d926085c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_itm.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; -public class Xowd_css_core_itm { - public Xowd_css_core_itm(int id, String key, DateAdp updated_on) { - this.id = id; this.key = key; this.updated_on = updated_on; - } - public int Id() {return id;} private final int id; - public String Key() {return key;} private final String key; - public DateAdp Updated_on() {return updated_on;} private final DateAdp updated_on; -} +package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; +public class Xowd_css_core_itm { + public Xowd_css_core_itm(int id, String key, DateAdp updated_on) { + this.id = id; this.key = key; this.updated_on = updated_on; + } + public int Id() {return id;} private final int id; + public String Key() {return key;} private final String key; + public DateAdp Updated_on() {return updated_on;} private final DateAdp updated_on; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_tbl.java index 042f4d23c..ee6e6085b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_core_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; import gplx.dbs.*; public class Xowd_css_core_tbl implements Rls_able { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_id, fld_key, fld_updated_on; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_id, fld_key, fld_updated_on; public Xowd_css_core_tbl(Db_conn conn) { this.conn = conn; this.fld_id = flds.Add_int_pkey_autonum("css_id"); @@ -25,8 +25,8 @@ public class Xowd_css_core_tbl implements Rls_able { this.fld_updated_on = flds.Add_str("css_updated_on", 20); conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name = "css_core"; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "css_core"; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds, Dbmeta_idx_itm.new_unique_by_tbl(tbl_name, "main", fld_key)));} public void Rls() {} public int Insert(String key, DateAdp updated_on) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_itm.java index ff2519bed..55d682b96 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_itm.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; -public class Xowd_css_file_itm { - public Xowd_css_file_itm(int css_id, String path, byte[] data) {this.css_id = css_id; this.path = path; this.data = data;} - public int Css_id() {return css_id;} private final int css_id; - public String Path() {return path;} private final String path; - public byte[] Data() {return data;} private final byte[] data; -} +package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; +public class Xowd_css_file_itm { + public Xowd_css_file_itm(int css_id, String path, byte[] data) {this.css_id = css_id; this.path = path; this.data = data;} + public int Css_id() {return css_id;} private final int css_id; + public String Path() {return path;} private final String path; + public byte[] Data() {return data;} private final byte[] data; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_tbl.java index 13fdaffcf..2854bf6b3 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/dbs/Xowd_css_file_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.htmls.css.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; import gplx.dbs.*; public class Xowd_css_file_tbl implements Rls_able { - private final String tbl_name = "css_file"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_css_id, fld_path, fld_data; - private final Db_conn conn; private Db_stmt stmt_insert; + private final String tbl_name = "css_file"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_css_id, fld_path, fld_data; + private final Db_conn conn; private Db_stmt stmt_insert; public Xowd_css_file_tbl(Db_conn conn) { this.conn = conn; fld_css_id = flds.Add_int("css_id"); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xow_css_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xow_css_mgr.java index 37572e5f4..dbb931a77 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xow_css_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xow_css_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.htmls.css.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.htmls.*; import gplx.xowa.addons.wikis.htmls.css.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.htmls.css.dbs.*; public class Xow_css_mgr { - private final Xow_wiki wiki; + private final Xow_wiki wiki; private boolean db_css_exists; private Xowd_css_core_tbl css_core_tbl; private Xowd_css_file_tbl css_file_tbl; public Xow_css_mgr(Xow_wiki wiki) {this.wiki = wiki;} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xowd_css_core_mgr_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xowd_css_core_mgr_tst.java index c4760e831..86b99ed94 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xowd_css_core_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/htmls/css/mgrs/Xowd_css_core_mgr_tst.java @@ -59,7 +59,7 @@ public class Xowd_css_core_mgr_tst { } } class Xowd_css_core_mgr_fxt { - private final Bry_bfr bfr = Bry_bfr_.Reset(32); + private final Bry_bfr bfr = Bry_bfr_.Reset(32); private Xowd_css_core_tbl core_tbl; private Xowd_css_file_tbl file_tbl; public void Clear() { Datetime_now.Manual_y_(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_addon.java b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_addon.java index 91e5a3dce..041c8dc67 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_addon.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_addon.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.specials.*; public class Xow_import_addon implements Xoax_addon_itm, Xoax_addon_itm__special { - private final Ordered_hash cbks = Ordered_hash_.New(); + private final Ordered_hash cbks = Ordered_hash_.New(); public Xow_special_page[] Special_pages() { return new Xow_special_page[] { Xow_import_special.Prototype diff --git a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_doc.java b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_doc.java index cb9cb895d..3461dcaaf 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_doc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_doc.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.core.ios.*; import gplx.langs.mustaches.*; class Xow_import_doc implements Mustache_doc_itm { - private final boolean is_dir, is_core_xowa; - private final byte[] owner_dir_enc, path, name, date, size, color; - private final byte[] dir_cmd; - private final Xow_import_doc[] subs; + private final boolean is_dir, is_core_xowa; + private final byte[] owner_dir_enc, path, name, date, size, color; + private final byte[] dir_cmd; + private final Xow_import_doc[] subs; public Xow_import_doc(boolean is_dir, boolean is_core_xowa, int color, byte[] owner_dir, byte[] path, byte[] name, byte[] date, byte[] size, byte[] dir_cmd, Xow_import_doc[] subs) { this.is_dir = is_dir; this.is_core_xowa = is_core_xowa; this.color = color % 2 == 0 ? Byte_ascii.Num_0_bry : Byte_ascii.Num_1_bry; @@ -49,7 +49,7 @@ class Xow_import_doc implements Mustache_doc_itm { else if (String_.Eq(key, "subs")) return subs; return Mustache_doc_itm_.Ary__empty; } - public static final Xow_import_doc[] Ary_empty = new Xow_import_doc[0]; + public static final Xow_import_doc[] Ary_empty = new Xow_import_doc[0]; public static Xow_import_doc New(IoItmDir owner_dir, byte[] dir_cmd) { List_adp sub_list = List_adp_.New(); New_subs(owner_dir.Url(), sub_list, owner_dir.SubDirs(), dir_cmd); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_html.java b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_html.java index d3f32a94c..21540003e 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_html.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*; import gplx.core.ios.*; class Xow_import_html extends Xow_special_wtr__base { - private final Io_url owner_url; private final byte[] mode; + private final Io_url owner_url; private final byte[] mode; public Xow_import_html(Io_url owner_url, byte[] mode) { this.owner_url = owner_url; this.mode = mode; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_special.java b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_special.java index bb54bb913..c272de4e0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/imports/Xow_import_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.imports; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; import gplx.core.ios.*; @@ -53,7 +53,7 @@ public class Xow_import_special implements Xow_special_page { } Xow_import_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xow_import_special(Xow_special_meta.New_xo("XowaWikiImport", "Import wiki", "XowaFileBrowser")); + public static final Xow_special_page Prototype = new Xow_import_special(Xow_special_meta.New_xo("XowaWikiImport", "Import wiki", "XowaFileBrowser")); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/Rndm_addon.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/Rndm_addon.java index 4fea94852..f6e2def67 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/Rndm_addon.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/Rndm_addon.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.wikis.pages.randoms.bldrs.*; import gplx.xowa.specials.*; import gplx.xowa.addons.wikis.pages.randoms.specials.*; @@ -20,7 +20,7 @@ import gplx.xowa.addons.wikis.pages.randoms.mgrs.*; public class Rndm_addon implements Xoax_addon_itm, Xoax_addon_itm__bldr, Xoax_addon_itm__special { public Rndm_addon() {this.mgr = null;} // prototype public Rndm_addon(Xow_wiki wiki) {this.mgr = new Rndm_mgr(wiki);} - public Rndm_mgr Mgr() {return mgr;} private final Rndm_mgr mgr; + public Rndm_mgr Mgr() {return mgr;} private final Rndm_mgr mgr; public Xob_cmd[] Bldr_cmds() { return new Xob_cmd[] { Rndm_bldr_cmd.Prototype diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_cmd.java index 2ed54255a..4270f1126 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Rndm_bldr_cmd extends Xob_cmd__base { @@ -30,6 +30,6 @@ public class Rndm_bldr_cmd extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "wiki.random"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Rndm_bldr_cmd(null, null); + public static final Xob_cmd Prototype = new Rndm_bldr_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Rndm_bldr_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_wkr.java index 3188247e6..f16d59113 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/bldrs/Rndm_bldr_wkr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.dbs.*; import gplx.xowa.addons.wikis.pages.randoms.dbs.*; public class Rndm_bldr_wkr { - private final Rndm_qry_tbl qry_tbl; private final Rndm_rng_tbl rng_tbl; private final Rndm_seq_tbl seq_tbl; + private final Rndm_qry_tbl qry_tbl; private final Rndm_rng_tbl rng_tbl; private final Rndm_seq_tbl seq_tbl; private Rndm_qry_itm qry_itm; private Db_stmt rng_stmt, seq_stmt; private int rng_seq_bgn, seq_in_rng; @@ -26,7 +26,7 @@ public class Rndm_bldr_wkr { this.qry_tbl = qry_tbl; this.rng_tbl = rng_tbl; this.seq_tbl = seq_tbl; qry_idx_max = qry_tbl.Select_qry_max(); } - public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_conn Conn() {return conn;} private final Db_conn conn; public int Qry_idx() {return qry_idx;} private int qry_idx; public int Rng_idx() {return rng_idx;} private int rng_idx; public int Seq_in_qry() {return seq_in_qry;} private int seq_in_qry; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_db_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_db_mgr.java index fa9a4ae10..c0f498a60 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_db_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; public class Rndm_db_mgr { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Rndm_db_mgr(Xow_wiki wiki) { this.wiki = wiki; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_itm.java index c6375c07c..b72301018 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; public class Rndm_qry_itm { public Rndm_qry_itm(int qry_idx, int rng_end, String qry_key, String qry_data, String qry_name) { @@ -22,11 +22,11 @@ public class Rndm_qry_itm { this.qry_data = qry_data; this.qry_name = qry_name; } - public int Qry_idx() {return qry_idx;} private final int qry_idx; - public int Rng_end() {return rng_end;} private final int rng_end; - public String Qry_key() {return qry_key;} private final String qry_key; - public String Qry_data() {return qry_data;} private final String qry_data; - public String Qry_name() {return qry_name;} private final String qry_name; + public int Qry_idx() {return qry_idx;} private final int qry_idx; + public int Rng_end() {return rng_end;} private final int rng_end; + public String Qry_key() {return qry_key;} private final String qry_key; + public String Qry_data() {return qry_data;} private final String qry_data; + public String Qry_name() {return qry_name;} private final String qry_name; public int Seq_max() {return seq_max;} private int seq_max; public void Seq_max_(int v) {this.seq_max = v;} public static Rndm_qry_itm New_by_ns(Xow_wiki wiki, int ns_id) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_tbl.java index 7d40242e4..55a861772 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_qry_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.core.ios.*; import gplx.dbs.*; import gplx.dbs.utls.*; public class Rndm_qry_tbl implements Rls_able { - private final String tbl_name = "rndm_qry"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_qry_idx, fld_rng_end, fld_qry_key, fld_qry_data, fld_qry_name; - private final Db_conn conn; + private final String tbl_name = "rndm_qry"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_qry_idx, fld_rng_end, fld_qry_key, fld_qry_data, fld_qry_name; + private final Db_conn conn; public Rndm_qry_tbl(Db_conn conn) { this.conn = conn; fld_qry_idx = flds.Add_int_pkey("qry_idx"); // EX: 0 diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_itm.java index 1f938438b..b8b37a700 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_itm.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; -public class Rndm_rng_itm { - public Rndm_rng_itm(int mgr_idx, int rng_idx, int seq_bgn, int seq_end) { - this.mgr_idx = mgr_idx; this.rng_idx = rng_idx; - this.seq_bgn = seq_bgn; this.seq_end = seq_end; - } - public int Mgr_idx() {return mgr_idx;} private final int mgr_idx; - public int Rng_idx() {return rng_idx;} private final int rng_idx; - public int Seq_bgn() {return seq_bgn;} private final int seq_bgn; - public int Seq_end() {return seq_end;} private final int seq_end; - - public static Rndm_rng_itm Noop() {return new Rndm_rng_itm(-1, -1, 0, 0);} -} +package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; +public class Rndm_rng_itm { + public Rndm_rng_itm(int mgr_idx, int rng_idx, int seq_bgn, int seq_end) { + this.mgr_idx = mgr_idx; this.rng_idx = rng_idx; + this.seq_bgn = seq_bgn; this.seq_end = seq_end; + } + public int Mgr_idx() {return mgr_idx;} private final int mgr_idx; + public int Rng_idx() {return rng_idx;} private final int rng_idx; + public int Seq_bgn() {return seq_bgn;} private final int seq_bgn; + public int Seq_end() {return seq_end;} private final int seq_end; + + public static Rndm_rng_itm Noop() {return new Rndm_rng_itm(-1, -1, 0, 0);} +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_tbl.java index c8e29d89b..7c734e5f6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_rng_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.core.ios.*; import gplx.dbs.*; import gplx.dbs.utls.*; public class Rndm_rng_tbl implements Rls_able { - private final String tbl_name = "rndm_rng"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_qry_idx, fld_rng_idx, fld_seq_bgn, fld_seq_end; - private final Db_conn conn; + private final String tbl_name = "rndm_rng"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_qry_idx, fld_rng_idx, fld_seq_bgn, fld_seq_end; + private final Db_conn conn; public Rndm_rng_tbl(Db_conn conn) { this.conn = conn; fld_qry_idx = flds.Add_int("qry_idx"); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_seq_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_seq_tbl.java index 505bec6d2..168d8f343 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_seq_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/dbs/Rndm_seq_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.core.ios.*; import gplx.dbs.*; import gplx.dbs.utls.*; public class Rndm_seq_tbl implements Rls_able { // list of page_ids w/ random_idx; EX: 0,123|1,23|2,31|... - private final String fld_qry_idx, fld_rng_idx, fld_seq_idx, fld_page_id; - private final Db_conn conn; + private final String fld_qry_idx, fld_rng_idx, fld_seq_idx, fld_page_id; + private final Db_conn conn; public Rndm_seq_tbl(Db_conn conn) { this.conn = conn; fld_qry_idx = flds.Add_int("qry_idx"); @@ -26,8 +26,8 @@ public class Rndm_seq_tbl implements Rls_able { // list of page_ids w/ random_id fld_page_id = flds.Add_int("page_id"); } public Db_conn Conn() {return conn;} - public String Tbl_name() {return tbl_name;} private final String tbl_name = "rndm_seq"; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name = "rndm_seq"; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public String Fld__qry_idx() {return fld_qry_idx;} public String Fld__rng_idx() {return fld_rng_idx;} public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/mgrs/Rndm_ns_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/mgrs/Rndm_ns_mgr.java index 4d2490cec..cd86fefb7 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/mgrs/Rndm_ns_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/mgrs/Rndm_ns_mgr.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.pages.randoms.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; -import gplx.core.lists.hashs.*; -class Rndm_ns_mgr { -// private final Hash_adp__int hash = new Hash_adp__int(); -// public Rndm_ns_itm Get_by_ns(int ns_id) {return (Rndm_ns_itm)hash.Get_by_or_null(ns_id);} - public void Add() { // rndm; - /* - for (mgr : rndm_mgr) - hash.Add(mgr,); - */ - } -} +package gplx.xowa.addons.wikis.pages.randoms.mgrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; +import gplx.core.lists.hashs.*; +class Rndm_ns_mgr { +// private final Hash_adp__int hash = new Hash_adp__int(); +// public Rndm_ns_itm Get_by_ns(int ns_id) {return (Rndm_ns_itm)hash.Get_by_or_null(ns_id);} + public void Add() { // rndm; + /* + for (mgr : rndm_mgr) + hash.Add(mgr,); + */ + } +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/specials/Rndm_page_special.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/specials/Rndm_page_special.java index 93ab4f6e4..c397550e4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/specials/Rndm_page_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/randoms/specials/Rndm_page_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.randoms.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.randoms.*; import gplx.xowa.specials.*; import gplx.xowa.wikis.nss.*; public class Rndm_page_special implements Xow_special_page { @@ -26,8 +26,8 @@ public class Rndm_page_special implements Xow_special_page { } public static final String SPECIAL_KEY = "Randompage"; // NOTE: needs to match lang.gfs - public static final byte[] Display_ttl = Bry_.new_a7("Random Page"); + public static final byte[] Display_ttl = Bry_.new_a7("Random Page"); public Xow_special_meta Special__meta() {return new Xow_special_meta(Xow_special_meta_.Src__mw, SPECIAL_KEY, "random");} - public static final Xow_special_page Prototype = new Rndm_page_special(); + public static final Xow_special_page Prototype = new Rndm_page_special(); public Xow_special_page Special__clone() {return this;} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/Xosync_read_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/Xosync_read_mgr.java index d91c57d26..4e150d4fc 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/Xosync_read_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/Xosync_read_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.dbs.*; import gplx.xowa.htmls.*; @@ -24,8 +24,8 @@ import gplx.xowa.addons.wikis.pages.syncs.wmapis.*; public class Xosync_read_mgr implements Gfo_invk { private int auto_interval = 60 * 24; // in minutes private Db_conn sync_conn; private Xosync_sync_tbl sync_tbl; - private final Xopg_match_mgr auto_page_matcher = new Xopg_match_mgr(); - private final Xosync_update_mgr update_mgr = new Xosync_update_mgr(); + private final Xopg_match_mgr auto_page_matcher = new Xopg_match_mgr(); + private final Xosync_update_mgr update_mgr = new Xosync_update_mgr(); public void Init_by_wiki(Xow_wiki wiki) { this.Auto_scope_("*:Main_Page"); wiki.App().Cfg().Bind_many_wiki(this, wiki, Cfg__manual__enabled, Cfg__auto__enabled, Cfg__auto__interval, Cfg__auto__scope); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader.java index e305e732e..088fb5eaa 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core.loaders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.xowa.addons.wikis.pages.syncs.core.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.*; import gplx.langs.htmls.docs.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.imgs.atrs.*; @@ -20,11 +20,11 @@ import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files import gplx.xowa.wikis.domains.*; import gplx.xowa.addons.wikis.pages.syncs.core.parsers.*; public class Xosync_page_loader { - private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); - private final Gfh_tag_rdr tag_rdr = Gfh_tag_rdr.New__html(); - private final Bry_err_wkr err_wkr = new Bry_err_wkr(); - private final Xoh_img_src_data img_src_parser = new Xoh_img_src_data(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); + private final Gfh_tag_rdr tag_rdr = Gfh_tag_rdr.New__html(); + private final Bry_err_wkr err_wkr = new Bry_err_wkr(); + private final Xoh_img_src_data img_src_parser = new Xoh_img_src_data(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public byte[] Parse(Xow_wiki wiki, Xoh_page hpg, byte[] src) { // init hctx, tag_rdr, err_wkr int src_len = src.length; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__fxt.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__fxt.java index dd686a671..69801424a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__fxt.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__fxt.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core.loaders; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.xowa.addons.wikis.pages.syncs.core.*; import gplx.core.tests.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.addons.wikis.pages.syncs.core.parsers.*; public class Xosync_page_loader__fxt { - private final Xosync_page_loader mgr = new Xosync_page_loader(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private final Xoh_page hpg = new Xoh_page(); + private final Xosync_page_loader mgr = new Xosync_page_loader(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoh_page hpg = new Xoh_page(); private Xowe_wiki wiki; public void Clear() { Xoae_app app = Xoa_app_fxt.Make__app__edit(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__tst.java index 49cab3e41..7e5c945fa 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/loaders/Xosync_page_loader__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.pages.syncs.core.loaders; import gplx.*; import g import org.junit.*; import gplx.langs.htmls.*; public class Xosync_page_loader__tst { - @Before public void init() {fxt.Clear();} private final Xosync_page_loader__fxt fxt = new Xosync_page_loader__fxt(); + @Before public void init() {fxt.Clear();} private final Xosync_page_loader__fxt fxt = new Xosync_page_loader__fxt(); @Test public void File() { fxt.Exec__parse(Gfh_utl.Replace_apos("ab")) .Test__html(Gfh_utl.Replace_apos("ab")) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser.java index f310e443b..a29bb5e73 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.xowa.addons.wikis.pages.syncs.core.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.wkrs.*; @@ -123,5 +123,5 @@ public class Xosync_hdoc_parser { } bfr.Add(Byte_ascii.Angle_end_bry); } - private static final byte[] Bry__span__edit_section = Bry_.new_a7("mw-editsection"); + private static final byte[] Bry__span__edit_section = Bry_.new_a7("mw-editsection"); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__err__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__err__tst.java index 695488cbc..e622f9f21 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__err__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__err__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import g import org.junit.*; import gplx.langs.htmls.*; public class Xosync_hdoc_parser__err__tst { - private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); + private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); @Before public void init() {fxt.Init(false);} @After public void term() {fxt.Term();} @Test public void Url_does_not_start_with_upload_wikimedia_org() { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__file__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__file__tst.java index 9a4536c2f..7956553de 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__file__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__file__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import g import org.junit.*; import gplx.langs.htmls.*; public class Xosync_hdoc_parser__file__tst { - private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); + private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); @Before public void init() {fxt.Init(true);} @After public void term() {fxt.Term();} @Test public void Commons__thumb() { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__fxt.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__fxt.java index 5ea86143d..2d835bbeb 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__fxt.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__fxt.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.xowa.addons.wikis.pages.syncs.core.*; import gplx.core.tests.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; public class Xosync_hdoc_parser__fxt { - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private final Xoh_page hpg = new Xoh_page(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoh_page hpg = new Xoh_page(); private Xowe_wiki wiki; public void Init(boolean print_errors) { if (print_errors) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__misc__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__misc__tst.java index 99088732b..0e8b18f9c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__misc__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__misc__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import g import org.junit.*; import gplx.langs.htmls.*; public class Xosync_hdoc_parser__misc__tst { - private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); + private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); @Before public void init() {fxt.Init(true);} @After public void term() {fxt.Term();} @Test public void Math() { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__tst.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__tst.java index 1264b6b5a..7b9725ddf 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_hdoc_parser__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import g import org.junit.*; import gplx.langs.htmls.*; public class Xosync_hdoc_parser__tst { - private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); + private final Xosync_hdoc_parser__fxt fxt = new Xosync_hdoc_parser__fxt(); @Before public void init() {fxt.Init(true);} @After public void term() {fxt.Term();} @Test public void Remove_edit() { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_img_src_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_img_src_parser.java index 7c90de66d..8a36d4d9a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_img_src_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/core/parsers/Xosync_img_src_parser.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.core.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.xowa.addons.wikis.pages.syncs.core.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.imgs.atrs.*; import gplx.xowa.wikis.domains.*; public class Xosync_img_src_parser { - private final Bry_rdr rdr = new Bry_rdr().Dflt_dlm_(Byte_ascii.Slash); - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private final byte[] wiki_abrv_commons; - private final Xoh_img_src_data img_src_parser = new Xoh_img_src_data(); + private final Bry_rdr rdr = new Bry_rdr().Dflt_dlm_(Byte_ascii.Slash); + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final byte[] wiki_abrv_commons; + private final Xoh_img_src_data img_src_parser = new Xoh_img_src_data(); private Xow_domain_itm wiki_domain; private List_adp imgs; @@ -221,19 +221,19 @@ public class Xosync_img_src_parser { } public static final byte Path__unknown = 0, Path__file_wm = 1, Path__math = 2, Path__file_xo = 3; - private final Btrie_slim_mgr path_trie = Btrie_slim_mgr.cs() + private final Btrie_slim_mgr path_trie = Btrie_slim_mgr.cs() .Add_str_byte("//upload.wikimedia.org/", Path__file_wm) .Add_str_byte("https://wikimedia.org/api/rest_v1/media/math/render/svg/", Path__math) .Add_str_byte("file:///", Path__file_xo) ; - public static final byte[] Bry__xowa_file = Bry_.new_a7("xowa:/file/"), Bry__xowa_math = Bry_.new_a7("xowa:/math/"); + public static final byte[] Bry__xowa_file = Bry_.new_a7("xowa:/file/"), Bry__xowa_math = Bry_.new_a7("xowa:/math/"); public static Btrie_slim_mgr Src_xo_trie = Btrie_slim_mgr.cs() .Add_bry_byte(Bry__xowa_file, Path__file_wm) .Add_bry_byte(Bry__xowa_math, Path__math) ; - private static final byte[] + private static final byte[] Bry__repo_remote = Bry_.new_a7("wikipedia/commons/") , Bry__thumb = Bry_.new_a7("thumb/") , Bry__px = Bry_.new_a7("px") diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/dbs/Xosync_sync_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/dbs/Xosync_sync_tbl.java index 6d0de34b9..1c127bafb 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/dbs/Xosync_sync_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/dbs/Xosync_sync_tbl.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.dbs.*; import gplx.dbs.utls.*; public class Xosync_sync_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_page_id, fld_sync_date; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_page_id, fld_sync_date; + private final Db_conn conn; public Xosync_sync_tbl(Db_conn conn) { this.conn = conn; this.fld_page_id = flds.Add_int_pkey("page_id"); this.fld_sync_date = flds.Add_str("sync_date", 32); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name = "sync"; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "sync"; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public DateAdp Select_sync_date_or_min(int page_id) { Db_rdr rdr = conn.Stmt_select(tbl_name, flds, fld_page_id).Crt_int(fld_page_id, page_id).Exec_select__rls_auto(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/specials/Sync_html_special.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/specials/Sync_html_special.java index aeae70776..cd57a1023 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/specials/Sync_html_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/specials/Sync_html_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.core.net.qargs.*; import gplx.xowa.specials.*; import gplx.xowa.wikis.nss.*; @@ -35,8 +35,8 @@ public class Sync_html_special implements Xow_special_page { } public static final String SPECIAL_KEY = "XowaSyncHtml"; // NOTE: needs to match lang.gfs - public static final byte[] Display_ttl = Bry_.new_a7("Sync HTML"); + public static final byte[] Display_ttl = Bry_.new_a7("Sync HTML"); public Xow_special_meta Special__meta() {return new Xow_special_meta(Xow_special_meta_.Src__mw, SPECIAL_KEY);} - public static final Xow_special_page Prototype = new Sync_html_special(); + public static final Xow_special_page Prototype = new Sync_html_special(); public Xow_special_page Special__clone() {return this;} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_data.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_data.java index 4ec9e7c96..75ae925e4 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_data.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.wmapis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; public class Xowm_parse_data { public Xowm_parse_data(byte[] wiki_domain @@ -24,13 +24,13 @@ public class Xowm_parse_data { this.revn_id = revn_id; this.revn_html = revn_html; } - public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; + public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; - public int Page_id() {return page_id;} private final int page_id; - public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; + public int Page_id() {return page_id;} private final int page_id; + public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; - public int Revn_id() {return revn_id;} private final int revn_id; - public byte[] Revn_html() {return revn_html;} private final byte[] revn_html; + public int Revn_id() {return revn_id;} private final int revn_id; + public byte[] Revn_html() {return revn_html;} private final byte[] revn_html; public byte[] Redirect_to_ttl = null; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_wmf.java b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_wmf.java index d3792b6b4..27e23fbc9 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_wmf.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/pages/syncs/wmapis/Xowm_parse_wmf.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.pages.syncs.wmapis; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.pages.*; import gplx.xowa.addons.wikis.pages.syncs.*; import gplx.langs.jsons.*; import gplx.xowa.files.downloads.*; import gplx.xowa.apps.wms.apis.*; public class Xowm_parse_wmf { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Json_parser json_parser = new Json_parser(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Json_parser json_parser = new Json_parser(); public Xowm_parse_data Get_parse_or_null(Xof_download_wkr download_wkr, Xow_wiki wiki, Xoa_ttl page_ttl) { if (!gplx.core.ios.IoEngine_system.Web_access_enabled) return null; byte[] wiki_domain = wiki.Domain_bry(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_doc.java b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_doc.java index 36f5b7d7d..bf8447aba 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_doc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_doc.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.registrys.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.registrys.*; import gplx.langs.mustaches.*; class Xow_info_doc implements Mustache_doc_itm { - private final Mustache_doc_itm[] ary; + private final Mustache_doc_itm[] ary; public Xow_info_doc(Xow_info_doc_wiki itm) {this.ary = new Mustache_doc_itm[] {itm};} public boolean Mustache__write(String key, Mustache_bfr bfr) {return false;} public Mustache_doc_itm[] Mustache__subs(String key) { @@ -25,8 +25,8 @@ class Xow_info_doc implements Mustache_doc_itm { } } class Xow_info_doc_wiki implements Mustache_doc_itm { - private final byte[] domain; - private final String date, size, dir; + private final byte[] domain; + private final String date, size, dir; public Xow_info_doc_wiki(byte[] domain, String date, String dir, String size) { this.domain = domain; this.date = date; this.dir = dir; this.size = size; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_html.java b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_html.java index a4cbce3ce..7f6efb42d 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_html.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.registrys.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.registrys.*; import gplx.xowa.specials.*; import gplx.langs.mustaches.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.wikis.pages.tags.*; import gplx.xowa.users.data.*; class Xow_info_html extends Xow_special_wtr__base { - private final byte[] wiki_domain; + private final byte[] wiki_domain; public Xow_info_html(byte[] wiki_domain) {this.wiki_domain = wiki_domain;} @Override protected Io_url Get_addon_dir(Xoa_app app) {return app.Fsys_mgr().Http_root().GenSubDir_nest("bin", "any", "xowa", "addon", "wiki", "registry", "info");} @Override protected Io_url Get_mustache_fil(Io_url addon_dir) {return addon_dir.GenSubFil_nest("bin", "xow_info.mustache.html");} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_special.java b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_special.java index cbc9f63c6..9500cdbbe 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/registrys/infos/Xow_info_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.registrys.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.registrys.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; public class Xow_info_special implements Xow_special_page { @@ -49,11 +49,11 @@ public class Xow_info_special implements Xow_special_page { static class Enm_cmd {//#*nested public static final int Tid__delete = 0; - public static final Gfo_qarg_enum_itm Itm = new Gfo_qarg_enum_itm("cmd").Add("delete", Tid__delete); + public static final Gfo_qarg_enum_itm Itm = new Gfo_qarg_enum_itm("cmd").Add("delete", Tid__delete); } Xow_info_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xow_info_special(Xow_special_meta.New_xo("XowaWikiInfo", "Wiki Info")); + public static final Xow_special_page Prototype = new Xow_info_special(Xow_special_meta.New_xo("XowaWikiInfo", "Wiki Info")); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_doc.java b/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_doc.java index 44f2c748b..556ef6373 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_doc.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_doc.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.registrys.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.registrys.*; import gplx.langs.mustaches.*; class Xow_list_doc implements Mustache_doc_itm { - private final byte[] import_root; - private final Xow_list_doc_wiki[] subs; + private final byte[] import_root; + private final Xow_list_doc_wiki[] subs; public Xow_list_doc(byte[] import_root, Xow_list_doc_wiki[] subs) {this.import_root = import_root; this.subs = subs;} public boolean Mustache__write(String key, Mustache_bfr bfr) { if (String_.Eq(key, "import_root")) bfr.Add_bry(import_root); @@ -29,8 +29,8 @@ class Xow_list_doc implements Mustache_doc_itm { } } class Xow_list_doc_wiki implements Mustache_doc_itm { - private final byte[] domain; - private final String date; + private final byte[] domain; + private final String date; public Xow_list_doc_wiki(byte[] domain, String date) { this.domain = domain; this.date = date; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_special.java b/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_special.java index eed9e14d9..2cb6df143 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_special.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/registrys/lists/Xow_list_special.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.registrys.lists; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.registrys.*; import gplx.xowa.specials.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.pages.*; public class Xow_list_special implements Xow_special_page { @@ -32,11 +32,11 @@ public class Xow_list_special implements Xow_special_page { static class Enm_cmd {//#*nested public static final int Tid__add = 0; - public static final Gfo_qarg_enum_itm Itm = new Gfo_qarg_enum_itm("cmd").Add("add", Tid__add); + public static final Gfo_qarg_enum_itm Itm = new Gfo_qarg_enum_itm("cmd").Add("add", Tid__add); } Xow_list_special(Xow_special_meta special__meta) {this.special__meta = special__meta;} - public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; + public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta; public Xow_special_page Special__clone() {return this;} - public static final Xow_special_page Prototype = new Xow_list_special(Xow_special_meta.New_xo("XowaWikiList", "Wikis", "XowaWikis")); + public static final Xow_special_page Prototype = new Xow_list_special(Xow_special_meta.New_xo("XowaWikiList", "Wikis", "XowaWikis")); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/Srch_search_addon.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/Srch_search_addon.java index 3d064e919..e0cc20973 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/Srch_search_addon.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/Srch_search_addon.java @@ -1,33 +1,33 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.xowa.addons.wikis.searchs.searchers.cbks.*; import gplx.xowa.addons.wikis.searchs.gui.urlbars.*; import gplx.xowa.langs.cases.*; public class Srch_search_addon implements Xoax_addon_itm, Srch_search_addon_api { - private final Srch_search_mgr search_mgr; + private final Srch_search_mgr search_mgr; public Srch_search_addon(Xow_wiki wiki) { this.wiki_domain = wiki.Domain_bry(); this.db_mgr = new Srch_db_mgr(wiki.Data__core_mgr()).Init(wiki.Stats().Num_pages()); this.ttl_parser = new Srch_text_parser().Init_for_ttl(wiki.Case_mgr()); this.search_mgr = new Srch_search_mgr(this, wiki, ttl_parser); } - public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; - public Srch_db_mgr Db_mgr() {return db_mgr;} private final Srch_db_mgr db_mgr; - public Srch_text_parser Ttl_parser() {return ttl_parser;} private final Srch_text_parser ttl_parser; + public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; + public Srch_db_mgr Db_mgr() {return db_mgr;} private final Srch_db_mgr db_mgr; + public Srch_text_parser Ttl_parser() {return ttl_parser;} private final Srch_text_parser ttl_parser; public void Search(Srch_search_qry qry, Srch_rslt_cbk cbk) {search_mgr.Search(qry, cbk);} public void Clear_rslts_cache() {search_mgr.Clear_rslts_cache();} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_cmd.java index a3e48e793..733e29bab 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Srch_bldr_cmd extends Xob_cmd__base implements Xob_cmd { @@ -28,5 +28,5 @@ public class Srch_bldr_cmd extends Xob_cmd__base implements Xob_cmd { else if (ctx.Match(k, Invk_progress_interval_)) progress_interval = m.ReadInt("v"); else return Gfo_invk_.Rv_unhandled; return this; - } private static final String Invk_progress_interval_ = "progress_interval_", Invk_commit_interval_ = "commit_interval_"; + } private static final String Invk_progress_interval_ = "progress_interval_", Invk_commit_interval_ = "commit_interval_"; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_wkr.java index 0b99638f3..a6a30f2a6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/Srch_bldr_wkr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; public class Srch_bldr_wkr implements Xob_page_wkr { - private final Xowe_wiki wiki; - private final Srch_temp_tbl_wkr temp_tbl_wkr = new Srch_temp_tbl_wkr(); + private final Xowe_wiki wiki; + private final Srch_temp_tbl_wkr temp_tbl_wkr = new Srch_temp_tbl_wkr(); public Srch_bldr_wkr(Xob_bldr bldr, Xowe_wiki wiki) {this.wiki = wiki;} public String Page_wkr__key() {return Xob_cmd_keys.Key_text_search_wkr;} public void Page_wkr__bgn() { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__link__link_score.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__link__link_score.java index 710c6f3f3..4d76f6d34 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__link__link_score.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__link__link_score.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.bldrs.utils_rankings.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments.*; @@ -21,7 +21,7 @@ public class Xobldr__link__link_score extends Xob_cmd__base { private int score_multiplier = 100000000; private boolean page_rank_enabled = false; private boolean delete_plink_db = false; - private final Adjustment_cmd score_adjustment_mgr; + private final Adjustment_cmd score_adjustment_mgr; public Xobldr__link__link_score(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki); this.score_adjustment_mgr = new Adjustment_cmd(wiki); } @@ -186,6 +186,6 @@ public class Xobldr__link__link_score extends Xob_cmd__base { public static final String BLDR_CMD_KEY = "search.link__link_score"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__link__link_score(null, null); + public static final Xob_cmd Prototype = new Xobldr__link__link_score(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__link__link_score(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__page__page_score.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__page__page_score.java index b50a2ba1f..c2c473348 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__page__page_score.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__page__page_score.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.bldrs.wmdumps.pagelinks.dbs.*; @@ -114,6 +114,6 @@ public class Xobldr__page__page_score extends Xob_cmd__base implements Xob_cmd { public static final String BLDR_CMD_KEY = "search.page__page_score"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__page__page_score(null, null); + public static final Xob_cmd Prototype = new Xobldr__page__page_score(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__page__page_score(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__word__link_count.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__word__link_count.java index d5dada4d9..d733e05b6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__word__link_count.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/Xobldr__word__link_count.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.bldrs.utils_rankings.bldrs.*; @@ -49,6 +49,6 @@ public class Xobldr__word__link_count extends Xob_cmd__base implements Xob_cmd { public static final String BLDR_CMD_KEY = "search.word__link_count"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xobldr__word__link_count(null, null); + public static final Xob_cmd Prototype = new Xobldr__word__link_count(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__word__link_count(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Adjustment_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Adjustment_cmd.java index 59eb0e8e7..1a478d243 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Adjustment_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Adjustment_cmd.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.wikis.nss.*; public class Adjustment_cmd implements Gfo_invk { - private final Xow_wiki wiki; - private final Page_matcher_mgr matcher_mgr; + private final Xow_wiki wiki; + private final Page_matcher_mgr matcher_mgr; private boolean enabled = true; private double median_factor = .001d; public Adjustment_cmd(Xow_wiki wiki) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_itm.java index 079a6cad1..8cc5fb2dc 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.*; import gplx.core.primitives.*; class Page_matcher_itm { @@ -22,10 +22,10 @@ class Page_matcher_itm { this.Val = val; this.Page_filter = page_filter; } - public final byte Match_type; - public final byte Calc_type; - public final double Val; - public final String Page_filter; + public final byte Match_type; + public final byte Calc_type; + public final double Val; + public final String Page_filter; public Int_obj_ref[] Page_ids; public int Calc(int score_old) { switch (this.Calc_type) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_mgr.java index 663b932d2..95ecfdd99 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.*; import gplx.core.lists.hashs.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; class Page_matcher_mgr implements Gfo_invk { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Page_matcher_mgr(Xow_wiki wiki) {this.wiki = wiki;} - private final Hash_adp__int hash = new Hash_adp__int(); + private final Hash_adp__int hash = new Hash_adp__int(); public Page_matcher_wkr Get_by(int ns_id) { Page_matcher_wkr rv = (Page_matcher_wkr)hash.Get_by_or_null(ns_id); if (rv == null) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_wkr.java index 0f3f200a1..d10726000 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_matcher_wkr.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.*; import gplx.core.lists.hashs.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; class Page_matcher_wkr implements Gfo_invk {// NOTE: tries would use less memory, but would be slower, especially for Has*() - private final Xow_wiki wiki; - private final List_adp rule_list = List_adp_.New(); - private final Hash_adp__int page_hash = new Hash_adp__int(); + private final Xow_wiki wiki; + private final List_adp rule_list = List_adp_.New(); + private final Hash_adp__int page_hash = new Hash_adp__int(); public Page_matcher_wkr(Xow_wiki wiki, int ns_id) { this.wiki = wiki; this.ns_id = ns_id; } - public int Ns_id() {return ns_id;} private final int ns_id; + public int Ns_id() {return ns_id;} private final int ns_id; public Page_matcher_itm Get_by_or_null(int page_id) {return (Page_matcher_itm)page_hash.Get_by_or_null(page_id);} public Page_matcher_wkr Load_all() { int len = rule_list.Len(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_stub.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_stub.java index 8a9e78397..c2d113150 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_stub.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/bldrs/cmds/adjustments/Page_stub.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.bldrs.cmds.adjustments; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.cmds.*; class Page_stub implements CompareAble { public Page_stub(int id, boolean is_redirect, int len, int score) { @@ -21,10 +21,10 @@ class Page_stub implements CompareAble { this.Len = len; this.Score = score; } - public final int Id; - public final boolean Is_redirect; - public final int Len; - public final int Score; + public final int Id; + public final boolean Is_redirect; + public final int Len; + public final int Score; public int compareTo(Object obj) { Page_stub comp = (Page_stub)obj; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_mgr.java index c0679c6f7..d3fede8a6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.cfgs.*; import gplx.xowa.wikis.data.*; public class Srch_db_mgr { - private final Xow_db_mgr db_mgr; + private final Xow_db_mgr db_mgr; public Srch_db_mgr(Xow_db_mgr db_mgr) { this.db_mgr = db_mgr; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_upgrade.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_upgrade.java index 7dd7a958a..c592f16a9 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_upgrade.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_db_upgrade.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; public class Srch_db_upgrade { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Srch_db_upgrade(Xow_wiki wiki, Srch_db_mgr search_db_mgr) { this.wiki = wiki; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_reg_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_reg_tbl.java index 198a4d75d..dbb6c247c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_reg_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_reg_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.*; public class Srch_link_reg_tbl implements Rls_able { - private final String tbl_name; public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_id, fld_db_id, fld_db_type, fld_ns_ids, fld_sub_id, fld_score_min, fld_score_max; - private final Db_conn conn; + private final String tbl_name; public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_id, fld_db_id, fld_db_type, fld_ns_ids, fld_sub_id, fld_score_min, fld_score_max; + private final Db_conn conn; public Srch_link_reg_tbl(Db_conn conn) { this.conn = conn; tbl_name = Tbl_name; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_row.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_row.java index e5b31d670..e3fceeca1 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_row.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_row.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; -public class Srch_link_row { - public Srch_link_row(int word_id, int page_id, int link_score) { - this.Word_id = word_id; - this.Page_id = page_id; - this.Link_score = link_score; - } - public final int Word_id; - public final int Page_id; - public final int Link_score; - public int Trg_db_id; - - public int Db_row_size() {return Db_row_size_fixed;} - private static final int Db_row_size_fixed = (3 * 4); // 5 ints -} +package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; +public class Srch_link_row { + public Srch_link_row(int word_id, int page_id, int link_score) { + this.Word_id = word_id; + this.Page_id = page_id; + this.Link_score = link_score; + } + public final int Word_id; + public final int Page_id; + public final int Link_score; + public int Trg_db_id; + + public int Db_row_size() {return Db_row_size_fixed;} + private static final int Db_row_size_fixed = (3 * 4); // 5 ints +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_tbl.java index e1fdce23b..04568af29 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_link_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.*; public class Srch_link_tbl { - public final String fld_word_id, fld_page_id, fld_link_score; - public final Db_conn conn; + public final String fld_word_id, fld_page_id, fld_link_score; + public final Db_conn conn; public Srch_link_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = "search_link"; @@ -25,8 +25,8 @@ public class Srch_link_tbl { fld_page_id = flds.Add_int("page_id"); fld_link_score = flds.Add_int_dflt(Fld_link_score, 0); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public String Tbl_name() {return tbl_name;} private final String tbl_name; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public int Id; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Create_idx__page_id() {} // TODO_OLD: conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "page_id", fld_page_id));} @@ -49,6 +49,6 @@ public class Srch_link_tbl { Gfo_usr_dlg_.Instance.Log_many("", "", "db.search_link: update done"); } - public static final Srch_link_tbl[] Ary_empty = new Srch_link_tbl[0]; + public static final Srch_link_tbl[] Ary_empty = new Srch_link_tbl[0]; public static final String Fld_link_score = "link_score"; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_temp_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_temp_tbl.java index 9abd3e135..a82267010 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_temp_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_temp_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.*; public class Srch_temp_tbl { - public final String tbl_name = "search_temp"; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_word_id, fld_page_id, fld_word_text; - public final Db_conn conn; private Db_stmt stmt_insert; + public final String tbl_name = "search_temp"; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_word_id, fld_page_id, fld_word_text; + public final Db_conn conn; private Db_stmt stmt_insert; public Srch_temp_tbl(Db_conn conn) { this.conn = conn; flds.Add_int_pkey_autonum("word_uid"); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_row.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_row.java index 4c69de51a..dc3c221a9 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_row.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_row.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; public class Srch_word_row { public Srch_word_row(int id, byte[] text, int link_count, int link_count_score, int link_score_min, int link_score_max) { @@ -20,15 +20,15 @@ public class Srch_word_row { this.Link_count = link_count; this.Link_count_score = link_count_score; this.Link_score_min = link_score_min; this.Link_score_max = link_score_max; } - public final int Id; - public final byte[] Text; - public final int Link_count; - public final int Link_count_score; - public final int Link_score_min; - public final int Link_score_max; + public final int Id; + public final byte[] Text; + public final int Link_count; + public final int Link_count_score; + public final int Link_score_min; + public final int Link_score_max; public int Db_row_size() {return Db_row_size_fixed + Text.length;} private static final int Db_row_size_fixed = (5 * 4); // 5 ints - public static final Srch_word_row Empty = new Srch_word_row(-1, Bry_.Empty, 0, 0, 0, 0); + public static final Srch_word_row Empty = new Srch_word_row(-1, Bry_.Empty, 0, 0, 0, 0); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_tbl.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_tbl.java index 5bc96b84d..3e6f805ad 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_tbl.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/dbs/Srch_word_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.dbs.*; public class Srch_word_tbl implements Rls_able { - public final String tbl_name; - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_id, fld_text, fld_link_count, fld_link_count_score, fld_link_score_min, fld_link_score_max; - public final Db_conn conn; private Db_stmt stmt_insert, stmt_select_by; + public final String tbl_name; + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_id, fld_text, fld_link_count, fld_link_count_score, fld_link_score_min, fld_link_score_max; + public final Db_conn conn; private Db_stmt stmt_insert, stmt_select_by; public Srch_word_tbl(Db_conn conn) { this.conn = conn; this.tbl_name = TABLE_NAME; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/htmlbars/Srch_rslt_cbk__js.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/htmlbars/Srch_rslt_cbk__js.java index 486062540..15dd6b416 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/htmlbars/Srch_rslt_cbk__js.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/htmlbars/Srch_rslt_cbk__js.java @@ -17,7 +17,7 @@ package gplx.xowa.addons.wikis.searchs.gui.htmlbars; import gplx.*; import gplx. import gplx.core.js.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; class Srch_rslt_cbk__js implements Srch_rslt_cbk { - protected final Js_wtr js_wtr = new Js_wtr(); + protected final Js_wtr js_wtr = new Js_wtr(); private byte[] cbk_func, search_raw; public Srch_rslt_cbk__js(byte[] cbk_func, byte[] search_raw) { this.cbk_func = cbk_func; @@ -51,7 +51,7 @@ class Srch_rslt_cbk__js implements Srch_rslt_cbk { catch (Exception e) {Xoa_app_.Usr_dlg().Warn_many("", "", "highlight failed; ttl=~{0} err=~{1}", row.Page_ttl_wo_ns, Err_.Message_gplx_log(e));} } } -class Srch_rslt_cbk__swt extends Srch_rslt_cbk__js implements Gfo_invk { private final Xoae_app app; +class Srch_rslt_cbk__swt extends Srch_rslt_cbk__js implements Gfo_invk { private final Xoae_app app; public Srch_rslt_cbk__swt(Xoae_app app, byte[] cbk_func, byte[] search_raw) {super(cbk_func, search_raw); this.app = app; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/urlbars/Srch_urlbar_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/urlbars/Srch_urlbar_mgr.java index 7efcbe1ea..f1be9908e 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/urlbars/Srch_urlbar_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/gui/urlbars/Srch_urlbar_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.gui.urlbars; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.gui.*; import gplx.gfui.controls.standards.*; import gplx.gfui.kits.core.*; @@ -25,7 +25,7 @@ public class Srch_urlbar_mgr implements Gfo_invk { // NOTE: needs to be app-leve private boolean enabled = true; private int max_results = 10; private boolean auto_wildcard = true; - private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr().Add_main_if_empty(); + private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr().Add_main_if_empty(); private Srch_crt_scanner_syms syms = Srch_crt_scanner_syms.New__dflt(); private void Ns_ids_(String s) { int[] ns_ids = Int_ary_.Empty; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr.java index de01a7321..b327af990 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.btries.*; import gplx.xowa.langs.cases.*; public class Srch_highlight_mgr { - private final Xol_case_mgr case_mgr; - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(32); + private final Xol_case_mgr case_mgr; + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(32); private Srch_highlight_itm[] srch_lc_itms; private int srch_words_len; public Srch_highlight_mgr(Xol_case_mgr case_mgr) {this.case_mgr = case_mgr;} @@ -101,9 +101,9 @@ public class Srch_highlight_mgr { } class Srch_highlight_itm { public Srch_highlight_itm(int idx, byte[] word) {this.Idx = idx; this.Word = word; this.Word_len = word.length;} - public final int Idx; - public final byte[] Word; - public final int Word_len; + public final int Idx; + public final byte[] Word; + public final int Word_len; } class Srch_highlight_bry_sorter implements gplx.core.lists.ComparerAble { public int compare(Object lhsObj, Object rhsObj) { @@ -111,5 +111,5 @@ class Srch_highlight_bry_sorter implements gplx.core.lists.ComparerAble { Srch_highlight_itm rhs = (Srch_highlight_itm)rhsObj; return -Int_.Compare(lhs.Word_len, rhs.Word_len); // - for descending } - public static final Srch_highlight_bry_sorter Instance = new Srch_highlight_bry_sorter(); Srch_highlight_bry_sorter() {} + public static final Srch_highlight_bry_sorter Instance = new Srch_highlight_bry_sorter(); Srch_highlight_bry_sorter() {} } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr_tst.java index 24248775f..b1c8b46d0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_highlight_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import org.junit.*; import gplx.xowa.langs.cases.*; public class Srch_highlight_mgr_tst { - private final Srch_highlight_mgr_tstr tstr = new Srch_highlight_mgr_tstr(); + private final Srch_highlight_mgr_tstr tstr = new Srch_highlight_mgr_tstr(); @Test public void Full__one() {tstr.Test("a" , "A" , "A");} @Test public void Full__many() {tstr.Test("a b" , "A B" , "A B");} @Test public void Part__one() {tstr.Test("a" , "A1" , "A1");} @@ -34,8 +34,8 @@ public class Srch_highlight_mgr_tst { // @Test public void Slash() {tstr.Test("b" , "A/B/C" , "A/B/C");} } class Srch_highlight_mgr_tstr { - private final Srch_highlight_mgr mgr; - private final Xol_case_mgr case_mgr = Xol_case_mgr_.A7(); + private final Srch_highlight_mgr mgr; + private final Xol_case_mgr case_mgr = Xol_case_mgr_.A7(); public Srch_highlight_mgr_tstr() { mgr = new Srch_highlight_mgr(case_mgr); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_sym_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_sym_parser.java index d3f43e6dc..a1651884e 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_sym_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_sym_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.btries.*; import gplx.core.primitives.*; interface Srch_sym_parser { @@ -26,7 +26,7 @@ class Srch_sym_parser_ { class Srch_sym_parser__terminal implements Srch_sym_parser { public Srch_sym_parser__terminal(byte[] hook_bry) {this.hooks_ary = Bry_.Ary(hook_bry);} public int Tid() {return Srch_sym_parser_.Tid__terminal;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { if (mgr.Cur__end__chk(hook_end)) { // hook at word_end; EX: "a, b" -> "a", "b" int word_bgn = mgr.Cur__bgn(); @@ -49,8 +49,8 @@ class Srch_sym_parser__terminal implements Srch_sym_parser { } } class Srch_sym_parser__split implements Srch_sym_parser { - private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); - private final boolean handle_eos; + private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); + private final boolean handle_eos; public Srch_sym_parser__split(boolean handle_eos, String... hooks_ary_as_str) { this.handle_eos = handle_eos; this.hooks_ary = Bry_.Ary(hooks_ary_as_str); @@ -61,7 +61,7 @@ class Srch_sym_parser__split implements Srch_sym_parser { } } public int Tid() {return Srch_sym_parser_.Tid__split;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { mgr.Words__add_if_pending_and_clear(hook_bgn); @@ -91,13 +91,13 @@ class Srch_sym_parser__split implements Srch_sym_parser { } } class Srch_sym_parser__paren_bgn implements Srch_sym_parser { - private final byte bgn_byte, end_byte; + private final byte bgn_byte, end_byte; public Srch_sym_parser__paren_bgn(byte bgn_byte, byte end_byte) { this.bgn_byte = bgn_byte; this.end_byte = end_byte; this.hooks_ary = Bry_.Ary(Bry_.New_by_byte(bgn_byte)); } public int Tid() {return Srch_sym_parser_.Tid__enclosure;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int paren_lhs_bgn, int paren_lhs_end) { int word_bgn = mgr.Cur__bgn(); paren_lhs_end = Bry_find_.Find_fwd_while(src, paren_lhs_end, src_end, bgn_byte); @@ -129,10 +129,10 @@ class Srch_sym_parser__paren_bgn implements Srch_sym_parser { } } class Srch_sym_parser__dot implements Srch_sym_parser { // handle periods which will add two entries; EX: "H. G. Wells" -> "H.", "G.", "H", "G", "Wells" - private final byte[] sym; private final int sym_len; + private final byte[] sym; private final int sym_len; public Srch_sym_parser__dot(String sym_str) {this.sym = Bry_.new_u8(sym_str); this.sym_len = sym.length;} public int Tid() {return Srch_sym_parser_.Tid__dot;} - public byte[][] Hooks_ary() {return Hooks_const;} private static final byte[][] Hooks_const = Bry_.Ary("."); + public byte[][] Hooks_ary() {return Hooks_const;} private static final byte[][] Hooks_const = Bry_.Ary("."); public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { int word_bgn = mgr.Cur__bgn(); if (word_bgn == -1) { // dot at start of word; EX: ".NET", "Colt .45" @@ -163,13 +163,13 @@ class Srch_sym_parser__dot implements Srch_sym_parser { // handle periods whi } } class Srch_sym_parser__ellipsis implements Srch_sym_parser { // ellipsis which have variable length; EX: "..", "...", ".... " - private final byte ellipsis_byte; + private final byte ellipsis_byte; public Srch_sym_parser__ellipsis(byte ellipsis_byte, String hook) { this.ellipsis_byte = ellipsis_byte; this.hooks_ary = Bry_.Ary(hook); } public int Tid() {return Srch_sym_parser_.Tid__ellipsis;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { mgr.Words__add_if_pending_and_clear(hook_bgn); // add word; EX: "Dreams" in "Dreams..." int rv = Bry_find_.Find_fwd_while(src, hook_end, src_end, ellipsis_byte); // skip multiple ellipsis; EX: ...... @@ -178,13 +178,13 @@ class Srch_sym_parser__ellipsis implements Srch_sym_parser { // ellipsis which h } } class Srch_sym_parser__apos implements Srch_sym_parser { // apos which can be contraction ("I'm"), possessive ("today's") and plural ("plans'") - private final byte[] hook_bry; + private final byte[] hook_bry; public Srch_sym_parser__apos(String hook) { this.hook_bry = Bry_.new_u8(hook); this.hooks_ary = Bry_.Ary(hook_bry); } public int Tid() {return Srch_sym_parser_.Tid__apos;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { int word_bgn = mgr.Cur__bgn(); int word_end = -1; @@ -225,7 +225,7 @@ class Srch_sym_parser__apos implements Srch_sym_parser { // apos which can be co class Srch_sym_parser__dash implements Srch_sym_parser { public Srch_sym_parser__dash(String hook) {this.hooks_ary = Bry_.Ary(hook);} public int Tid() {return Srch_sym_parser_.Tid__dash;} - public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; + public byte[][] Hooks_ary() {return hooks_ary;} private final byte[][] hooks_ary; public int Parse(Srch_text_parser mgr, byte[] src, int src_end, int hook_bgn, int hook_end) { int cur_bgn = mgr.Cur__bgn(); // get word_bgn if (cur_bgn == -1) { // no word_bgn; "-" is 1st char diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser.java index ce4ed6110..068f6c692 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.btries.*; import gplx.xowa.langs.cases.*; public class Srch_text_parser { private Btrie_slim_mgr parser_trie = Btrie_slim_mgr.cs(); public Btrie_slim_mgr word_end_trie = Btrie_slim_mgr.cs(); private Btrie_slim_mgr word_bgn_trie = Btrie_slim_mgr.cs(); - private final Btrie_rv trv = new Btrie_rv(); + private final Btrie_rv trv = new Btrie_rv(); private Xol_case_mgr case_mgr; - public final Bry_bfr Tmp_bfr = Bry_bfr_.New_w_size(32); + public final Bry_bfr Tmp_bfr = Bry_bfr_.New_w_size(32); private byte[] src; private int end; private Srch_sym_parser__split parser__ws; private Srch_sym_parser__dash parser__dash; public Srch_word_hash word_hash = new Srch_word_hash(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_tst.java index b2c01d596..f8586684a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import org.junit.*; import gplx.xowa.langs.cases.*; public class Srch_text_parser_tst { - private final Srch_text_parser_fxt fxt = new Srch_text_parser_fxt(); + private final Srch_text_parser_fxt fxt = new Srch_text_parser_fxt(); @Before public void init() {fxt.Init();} @Test public void Word__one() {fxt.Clear().Test__split("abcd" , "abcd");} @Test public void Word__many() {fxt.Clear().Test__split("abc d ef" , "abc", "d", "ef");} @@ -100,8 +100,8 @@ public class Srch_text_parser_tst { @Test public void Word_bgn__tilde() {fxt.Clear().Test__split("~a~" , "a");} // EX: "Phantom ~Requiem for the Phantom~" } class Srch_text_parser_fxt { - private final Srch_text_parser word_parser = new Srch_text_parser(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(32); + private final Srch_text_parser word_parser = new Srch_text_parser(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(32); private Xol_case_mgr case_mgr; public void Init() { case_mgr = Xol_case_mgr_.A7(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_wkr.java index 4c420adf5..94efca534 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_text_parser_wkr.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; -public interface Srch_text_parser_wkr { - void Parse_done(Srch_word_itm word); -} -class Srch_text_parser_wkr__noop implements Srch_text_parser_wkr { - public void Parse_done(Srch_word_itm word) {} - public static final Srch_text_parser_wkr__noop Instance = new Srch_text_parser_wkr__noop(); Srch_text_parser_wkr__noop() {} // TS.static -} +package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; +public interface Srch_text_parser_wkr { + void Parse_done(Srch_word_itm word); +} +class Srch_text_parser_wkr__noop implements Srch_text_parser_wkr { + public void Parse_done(Srch_word_itm word) {} + public static final Srch_text_parser_wkr__noop Instance = new Srch_text_parser_wkr__noop(); Srch_text_parser_wkr__noop() {} // TS.static +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_hash.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_hash.java index df64408ec..884b5c894 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_hash.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_hash.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; public class Srch_word_hash { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public void Clear() {hash.Clear();} public int Len() {return hash.Count();} public boolean Has(byte[] word) {return hash.Has(word);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_itm.java index 5ee575be7..482cd5023 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/parsers/Srch_word_itm.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; -public class Srch_word_itm { - public Srch_word_itm(byte[] word) { - this.Word = word; - this.count = 0; - } - public final byte[] Word; - public int Count() {return count;} private int count; - public void Count_add_1_() {++count;} - @gplx.Internal protected Srch_word_itm Count_(int v) {this.count = v; return this;} -} +package gplx.xowa.addons.wikis.searchs.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; +public class Srch_word_itm { + public Srch_word_itm(byte[] word) { + this.Word = word; + this.count = 0; + } + public final byte[] Word; + public int Count() {return count;} private int count; + public void Count_add_1_() {++count;} + @gplx.Internal protected Srch_word_itm Count_(int v) {this.count = v; return this;} +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_ns_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_ns_mgr.java index d0a70a523..3d20772b0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_ns_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_ns_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.primitives.*; import gplx.xowa.wikis.nss.*; public class Srch_ns_mgr { - private final Ordered_hash ns_hash = Ordered_hash_.New(); private final Int_obj_ref tmp_ns_id = Int_obj_ref.New_neg1(); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(32); + private final Ordered_hash ns_hash = Ordered_hash_.New(); private final Int_obj_ref tmp_ns_id = Int_obj_ref.New_neg1(); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(32); private boolean ns_all, ns_main; public void Clear() { ns_hash.Clear(); @@ -93,5 +93,5 @@ public class Srch_ns_mgr { return rv; } } - private static final byte[] Hash_key_all = new byte[] {Srch_search_addon.Wildcard__star}, Hash_key_main = new byte[] {Byte_ascii.Num_0}; + private static final byte[] Hash_key_all = new byte[] {Srch_search_addon.Wildcard__star}, Hash_key_main = new byte[] {Byte_ascii.Num_0}; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_cmd.java index a392e89b4..bb637c825 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_cmd.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Srch_search_cmd implements Cancelable, Gfo_invk { - private final Srch_search_mgr search_mgr; - public final Srch_search_qry qry; - public final Srch_crt_mgr crt_mgr; - private final Srch_rslt_cbk rslt_cbk; - private final Srch_rslt_list rslts_list; + private final Srch_search_mgr search_mgr; + public final Srch_search_qry qry; + public final Srch_crt_mgr crt_mgr; + private final Srch_rslt_cbk rslt_cbk; + private final Srch_rslt_list rslts_list; public Srch_search_cmd(Srch_search_mgr search_mgr, Srch_search_qry qry, Srch_crt_mgr crt_mgr, Srch_rslt_cbk rslt_cbk, Srch_rslt_list rslts_list) { this.search_mgr = search_mgr; this.qry = qry; this.crt_mgr = crt_mgr; this.rslt_cbk = rslt_cbk; this.rslts_list = rslts_list; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_ctx.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_ctx.java index 7dc3908f8..ba75dec46 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_ctx.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_ctx.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.langs.cases.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.searchs.dbs.*; @@ -45,23 +45,23 @@ public class Srch_search_ctx { this.Rslts_needed = rslts_needed; this.Highlight_mgr = new Srch_highlight_mgr(this.Case_mgr).Search_(qry.Phrase.Orig); } - public final Cancelable Cxl; - public final Xow_wiki Wiki; - public final byte[] Wiki_domain; - public final Srch_search_addon Addon; - public final Xol_case_mgr Case_mgr; - public final Srch_rslt_list Cache__page; - public final Hash_adp_bry Cache__word_counts; - public final Xow_db_file Db__core; - public final Xowd_page_tbl Tbl__page; - public final Srch_word_tbl Tbl__word; - public final Srch_link_tbl[] Tbl__link__ary; - public final Srch_search_qry Qry; - public final Srch_crt_scanner_syms Scanner_syms; - public final Srch_rslt_list Rslts_list; - public final int Rslts_needed; - public final Percentile_rng Score_rng = new Percentile_rng(); - public final Srch_crt_mgr Crt_mgr; - public final Srch_crt_itm Crt_mgr__root; - public final Srch_highlight_mgr Highlight_mgr; + public final Cancelable Cxl; + public final Xow_wiki Wiki; + public final byte[] Wiki_domain; + public final Srch_search_addon Addon; + public final Xol_case_mgr Case_mgr; + public final Srch_rslt_list Cache__page; + public final Hash_adp_bry Cache__word_counts; + public final Xow_db_file Db__core; + public final Xowd_page_tbl Tbl__page; + public final Srch_word_tbl Tbl__word; + public final Srch_link_tbl[] Tbl__link__ary; + public final Srch_search_qry Qry; + public final Srch_crt_scanner_syms Scanner_syms; + public final Srch_rslt_list Rslts_list; + public final int Rslts_needed; + public final Percentile_rng Score_rng = new Percentile_rng(); + public final Srch_crt_mgr Crt_mgr; + public final Srch_crt_itm Crt_mgr__root; + public final Srch_highlight_mgr Highlight_mgr; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_mgr.java index 069216786..2c3061b08 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_mgr.java @@ -1,33 +1,33 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.xowa.addons.wikis.searchs.searchers.wkrs.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.visitors.*; import gplx.core.net.*; import gplx.core.net.qargs.*; public class Srch_search_mgr implements Gfo_invk { - private final Srch_search_addon addon; - private final Xow_wiki wiki; - private final Srch_rslt_list cache__page = new Srch_rslt_list(); - private final Hash_adp_bry cache__word_counts = Hash_adp_bry.cs(); - private final Srch_rslt_cache cache__rslts = new Srch_rslt_cache(); - private final Srch_page_tbl_wkr page_tbl_searcher = new Srch_page_tbl_wkr(); - private final Srch_crt_parser crt_parser; - private final Srch_search_cmd[] cur_cmds; - private final Object mutex = new Object(); + private final Srch_search_addon addon; + private final Xow_wiki wiki; + private final Srch_rslt_list cache__page = new Srch_rslt_list(); + private final Hash_adp_bry cache__word_counts = Hash_adp_bry.cs(); + private final Srch_rslt_cache cache__rslts = new Srch_rslt_cache(); + private final Srch_page_tbl_wkr page_tbl_searcher = new Srch_page_tbl_wkr(); + private final Srch_crt_parser crt_parser; + private final Srch_search_cmd[] cur_cmds; + private final Object mutex = new Object(); private int search_count; private boolean upgrade_prompted; public Srch_search_mgr(Srch_search_addon addon, Xow_wiki wiki, Srch_text_parser parser) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase.java index 3185009ed..22b38ddf1 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.btries.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; @@ -23,10 +23,10 @@ public class Srch_search_phrase { this.Wildcard = wildcard; this.Syms = syms; } - public final boolean Wildcard; - public final byte[] Orig; // EX: "Earth" - public final byte[] Compiled; // EX: "earth*" - public final Srch_crt_scanner_syms Syms; + public final boolean Wildcard; + public final byte[] Orig; // EX: "Earth" + public final byte[] Compiled; // EX: "earth*" + public final Srch_crt_scanner_syms Syms; public static Srch_search_phrase New(gplx.xowa.langs.cases.Xol_case_mgr case_mgr, Srch_crt_scanner_syms syms, boolean auto_wildcard, byte[] orig) { int orig_len = orig.length; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase_tst.java index 62049d010..fcd5ce06b 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_phrase_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import org.junit.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Srch_search_phrase_tst { - private final Srch_search_phrase_fxt fxt = new Srch_search_phrase_fxt(); + private final Srch_search_phrase_fxt fxt = new Srch_search_phrase_fxt(); @Test public void Word() {fxt.Test__auto_wildcard("a" , "a*");} @Test public void Paren_end() {fxt.Test__auto_wildcard("(a)" , "(a*)");} @Test public void Quoted() {fxt.Test__auto_wildcard("\"a\"" , "\"a\"");} @@ -35,7 +35,7 @@ public class Srch_search_phrase_tst { @Test public void Auto_wildcard_n() {fxt.Init__auto_wildcard_n_().Test__auto_wildcard("a", "a");} } class Srch_search_phrase_fxt { - private final Srch_crt_scanner_syms syms = Srch_crt_scanner_syms.Dflt; + private final Srch_crt_scanner_syms syms = Srch_crt_scanner_syms.Dflt; private boolean auto_wildcard = true; public Srch_search_phrase_fxt Init__auto_wildcard_n_() {this.auto_wildcard = false; return this;} public void Test__auto_wildcard(String src_str, String expd) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_qry.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_qry.java index 2186749c4..8fef92cf0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_qry.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/Srch_search_qry.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.addons.wikis.searchs.gui.htmlbars.*; @@ -25,11 +25,11 @@ public class Srch_search_qry { this.Slab_bgn = slab_bgn; this.Slab_end = slab_end; } - public final byte Tid; - public final Srch_ns_mgr Ns_mgr; - public final Srch_search_phrase Phrase; - public final int Slab_bgn; // EX: 0 - public final int Slab_end; // EX: 20 + public final byte Tid; + public final Srch_ns_mgr Ns_mgr; + public final Srch_search_phrase Phrase; + public final int Slab_bgn; // EX: 0 + public final int Slab_end; // EX: 20 public static final byte Tid_len = 4, Tid__url_bar = 0, Tid__suggest_box = 1, Tid__search_page = 2, Tid__android = 3; public static Srch_search_qry New__url_bar(Xow_wiki wiki, Srch_ns_mgr ns_mgr, Srch_crt_scanner_syms syms, boolean auto_wildcard, int max_results, byte[] search_orig) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/cbks/Srch_rslt_cbk__url_bar.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/cbks/Srch_rslt_cbk__url_bar.java index 5070324e0..4887994d2 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/cbks/Srch_rslt_cbk__url_bar.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/cbks/Srch_rslt_cbk__url_bar.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.cbks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.gfui.*; import gplx.gfui.controls.standards.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.xowa.apps.apis.xowa.addons.searchs.*; public class Srch_rslt_cbk__url_bar implements Srch_rslt_cbk, Gfo_invk { - private final Xoae_app app; - private final GfuiComboBox url_bar; + private final Xoae_app app; + private final GfuiComboBox url_bar; private String[] cbo_ary; private boolean rslts_finished; private int rslts_in_this_pass; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_itm.java index 37e7d597c..aff31840f 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.langs.regxs.*; public class Srch_crt_itm { @@ -21,11 +21,11 @@ public class Srch_crt_itm { this.Raw = raw; this.Sql_data = raw_data; } - public final int Idx; // itm index; EX: "a b" -> a:0 b:1 - public final int Tid; - public final byte[] Raw; - public final Srch_crt_itm[] Subs; - public final Srch_crt_sql Sql_data; + public final int Idx; // itm index; EX: "a b" -> a:0 b:1 + public final int Tid; + public final byte[] Raw; + public final Srch_crt_itm[] Subs; + public final Srch_crt_sql Sql_data; public void Accept_visitor(Srch_crt_visitor visitor) {visitor.Visit(this);} public static final int @@ -37,7 +37,7 @@ public class Srch_crt_itm { , Tid__invalid = 5 // EX: 'A OR'; incomplete or otherwise invalid ; public static Srch_crt_itm[] Ary_empty = new Srch_crt_itm[0]; - public static final Srch_crt_itm Invalid = new Srch_crt_itm(-1, Srch_crt_itm.Tid__invalid, Srch_crt_itm.Ary_empty, null, null); + public static final Srch_crt_itm Invalid = new Srch_crt_itm(-1, Srch_crt_itm.Tid__invalid, Srch_crt_itm.Ary_empty, null, null); public static Srch_crt_itm New_join(int tid, int idx, Srch_crt_itm... ary) {return new Srch_crt_itm(idx, tid, ary, null, Srch_crt_sql.New_or_null(null, Byte_ascii.Null));} public static Srch_crt_itm New_word(byte wildcard_byte, Srch_crt_tkn tkn, int idx, byte[] src) { int tid = tkn.Tid == Srch_crt_tkn.Tid__word_w_quote ? Srch_crt_itm.Tid__word_quote : Srch_crt_itm.Tid__word; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_mgr.java index f5fd2a719..65e087bee 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; public class Srch_crt_mgr { public Srch_crt_mgr(byte[] key, Srch_crt_tkn[] tkns, Srch_crt_itm root, byte words_tid, Srch_crt_itm[] words_ary, Srch_crt_itm words_nth) { @@ -23,12 +23,12 @@ public class Srch_crt_mgr { this.Words_ary = words_ary; this.Words_nth = words_nth; } - public final byte[] Key; - public final Srch_crt_tkn[] Tkns; - public final Srch_crt_itm Root; - public final byte Words_tid; - public final Srch_crt_itm[] Words_ary; - public final Srch_crt_itm Words_nth; + public final byte[] Key; + public final Srch_crt_tkn[] Tkns; + public final Srch_crt_itm Root; + public final byte Words_tid; + public final Srch_crt_itm[] Words_ary; + public final Srch_crt_itm Words_nth; public int Words_nth__len() { return Words_nth == null ? 0 : Words_nth.Raw.length; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser.java index f4726b84c..2ea6112e0 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.visitors.*; public class Srch_crt_parser { - private final Srch_crt_scanner scanner; - private final Srch_crt_visitor__words words_visitor = new Srch_crt_visitor__words(); - private final Srch_crt_visitor__print print_visitor = new Srch_crt_visitor__print(); - private final byte wildcard_byte; + private final Srch_crt_scanner scanner; + private final Srch_crt_visitor__words words_visitor = new Srch_crt_visitor__words(); + private final Srch_crt_visitor__print print_visitor = new Srch_crt_visitor__print(); + private final byte wildcard_byte; private int uid_next; public Srch_crt_parser(Srch_crt_scanner_syms trie_bldr) { this.wildcard_byte = trie_bldr.Wild(); @@ -90,8 +90,8 @@ class Srch_crt_parser_frame { } private int join_tid = Srch_crt_tkn.Tid__null; private boolean notted = false; - private final List_adp subs = List_adp_.New(); - private final Srch_crt_parser parser; + private final List_adp subs = List_adp_.New(); + private final Srch_crt_parser parser; public int Next_uid() {return parser.Next_uid();} public void Notted_y_() { if (notted) // already notted; disable; EX: "--a" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser_tst.java index 77a17bc95..d9ae81ec6 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.visitors.*; public class Srch_crt_parser_tst { - private final Srch_crt_parser_fxt fxt = new Srch_crt_parser_fxt(); + private final Srch_crt_parser_fxt fxt = new Srch_crt_parser_fxt(); @Test public void Word__one() {fxt.Test__parse("a" , "a");} @Test public void And__one() {fxt.Test__parse("a + b" , "(a AND b)");} @Test public void And__many() {fxt.Test__parse("a + b + c" , "(a AND b AND c)");} @@ -51,8 +51,8 @@ public class Srch_crt_parser_tst { @Test public void Escape__escaped() {fxt.Test__parse("\\\\*" , "\\*");} // '\\' -> '\*' } class Srch_crt_parser_fxt { - private final Srch_crt_parser crt_parser; - private final Srch_crt_visitor__print visitor__to_str = new Srch_crt_visitor__print(); + private final Srch_crt_parser crt_parser; + private final Srch_crt_visitor__print visitor__to_str = new Srch_crt_visitor__print(); public Srch_crt_parser_fxt() { crt_parser = new Srch_crt_parser(Srch_crt_scanner_syms.Dflt); Srch_text_parser text_parser = new Srch_text_parser(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner.java index 9c52b88e1..0161b292a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.core.btries.*; import gplx.xowa.langs.cases.*; import gplx.xowa.addons.wikis.searchs.parsers.*; class Srch_crt_scanner { - private final List_adp tkns = List_adp_.New(); private byte[] src; private int src_len, pos, txt_bgn; - private final Srch_crt_scanner_syms trie_bldr; private final Btrie_slim_mgr trie; private final Btrie_rv trv = new Btrie_rv(); - private final Bry_bfr word_bfr = Bry_bfr_.New(); private boolean word_is_dirty; + private final List_adp tkns = List_adp_.New(); private byte[] src; private int src_len, pos, txt_bgn; + private final Srch_crt_scanner_syms trie_bldr; private final Btrie_slim_mgr trie; private final Btrie_rv trv = new Btrie_rv(); + private final Bry_bfr word_bfr = Bry_bfr_.New(); private boolean word_is_dirty; public Srch_crt_scanner(Srch_crt_scanner_syms trie_bldr) { this.trie_bldr = trie_bldr; this.trie = trie_bldr.Trie(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_syms.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_syms.java index 4b3acd427..af6fa927a 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_syms.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_syms.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.core.btries.*; public class Srch_crt_scanner_syms { @@ -34,7 +34,7 @@ public class Srch_crt_scanner_syms { public byte Paren_bgn() {return paren_bgn;} private byte paren_bgn; public byte Paren_end() {return paren_end;} private byte paren_end; public byte Wild() {return wild;} private byte wild; - public Btrie_slim_mgr Trie() {return trie;} private final Btrie_slim_mgr trie; + public Btrie_slim_mgr Trie() {return trie;} private final Btrie_slim_mgr trie; public byte[] To_bry() { Bry_bfr bfr = Bry_bfr_.New(); To_bry__add(bfr, "wild" , wild); @@ -96,7 +96,7 @@ public class Srch_crt_scanner_syms { , Byte_ascii.Paren_bgn, Byte_ascii.Paren_end, Byte_ascii.Star ); } - public static final Srch_crt_scanner_syms Dflt = New__dflt(); + public static final Srch_crt_scanner_syms Dflt = New__dflt(); private static byte Parse__val(byte[] line, int val_bgn, int line_len) { if (line_len - val_bgn == 1) return line[val_bgn]; if ( line_len - val_bgn == 2 diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_tst.java index 31c91c7bf..9772b8324 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_scanner_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; import gplx.xowa.addons.wikis.searchs.parsers.*; public class Srch_crt_scanner_tst { - private final Srch_crt_scanner_fxt fxt = new Srch_crt_scanner_fxt(); + private final Srch_crt_scanner_fxt fxt = new Srch_crt_scanner_fxt(); @Test public void Word() {fxt.Test__scan("abc" , "abc");} @Test public void Word__many() {fxt.Test__scan("abc d ef" , "abc", "d", "ef");} @Test public void Word__symbol() {fxt.Test__scan("a; b" , "a;", "b");} @@ -46,7 +46,7 @@ public class Srch_crt_scanner_tst { @Test public void Complicated() {fxt.Test__scan("(a + \"b\") , -c", "(", "a", "+", "b", ")", ",", "-", "c");} } class Srch_crt_scanner_fxt { - private final Srch_crt_scanner scanner; + private final Srch_crt_scanner scanner; public Srch_crt_scanner_fxt() { this.scanner = new Srch_crt_scanner(Srch_crt_scanner_syms.Dflt); Srch_text_parser text_parser = new Srch_text_parser(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql.java index 73efa1358..2671538d1 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql.java @@ -1,19 +1,20 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; +import gplx.dbs.sqls.SqlQryWtrUtl; import gplx.langs.regxs.*; public class Srch_crt_sql { public Srch_crt_sql(int tid, String eq, String rng_bgn, String rng_end, String like, Gfo_pattern pattern) { @@ -24,12 +25,12 @@ public class Srch_crt_sql { this.Like = like; this.Pattern = pattern; } - public final int Tid; - public final String Eq; - public final String Rng_bgn; - public final String Rng_end; - public final String Like; - public final Gfo_pattern Pattern; // NOTE: only supports LIKE; GLOB requires regex + public final int Tid; + public final String Eq; + public final String Rng_bgn; + public final String Rng_end; + public final String Like; + public final Gfo_pattern Pattern; // NOTE: only supports LIKE; GLOB requires regex public int Eq_id; public static final int @@ -61,7 +62,7 @@ public class Srch_crt_sql { rng_end = String_.new_u8(gplx.core.intls.Utf8_.Increment_char_at_last_pos(rng_tmp)); break; case Srch_crt_sql.Tid__like: - like = String_.new_u8(Bry_.Replace(raw, wildcard_byte, gplx.dbs.sqls.Sql_qry_wtr_.Like_wildcard)); + like = String_.new_u8(Bry_.Replace(raw, wildcard_byte, SqlQryWtrUtl.Like_wildcard)); byte like_escape_byte = gplx.xowa.addons.wikis.searchs.searchers.wkrs.Srch_link_wkr_sql.Like_escape_byte; Bry_bfr tmp_bfr = Bry_bfr_.Get(); try {pattern_raw = Bry_.Resolve_escape(tmp_bfr, like_escape_byte, raw, 0, raw.length);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql_tst.java index 7ba1dd0ef..0bf790bc9 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_sql_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; public class Srch_crt_sql_tst { - private final Srch_crt_sql_fxt fxt = new Srch_crt_sql_fxt(); + private final Srch_crt_sql_fxt fxt = new Srch_crt_sql_fxt(); @Test public void Eq() {fxt.Exec__new_or_null("a").Test__tid(Srch_crt_sql.Tid__eq).Test__eq("a");} @Test public void Rng() {fxt.Exec__new_or_null("a*").Test__tid(Srch_crt_sql.Tid__rng).Test__rng_bgn("a").Test__rng_end("b").Test__pattern("a*");} @Test public void Like() {fxt.Exec__new_or_null("a*b").Test__tid(Srch_crt_sql.Tid__like).Test__like("a%b").Test__pattern("a*b");} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_tkn.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_tkn.java index 1cdb9cde8..42e1ab7e7 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_tkn.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/Srch_crt_tkn.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; public class Srch_crt_tkn { public Srch_crt_tkn(byte tid, byte[] val) {this.Tid = tid; this.Val = val;} - public final byte Tid; - public final byte[] Val; + public final byte Tid; + public final byte[] Val; public static final byte Tid__escape = 0 , Tid__space = 1 @@ -32,5 +32,5 @@ public class Srch_crt_tkn { , Tid__eos = 10 , Tid__null = 11 ; - public static final Srch_crt_tkn[] Ary_empty = new Srch_crt_tkn[0]; + public static final Srch_crt_tkn[] Ary_empty = new Srch_crt_tkn[0]; } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__print.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__print.java index b2d9df2c0..3b1450aa9 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__print.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__print.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts.visitors; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Srch_crt_visitor__print implements Srch_crt_visitor { - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public byte[] Print(Srch_crt_itm root) { Visit(root); return bfr.To_bry_and_clear(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__words.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__words.java index f4f5925fc..f37a8cdfb 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__words.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/crts/visitors/Srch_crt_visitor__words.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.crts.visitors; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Srch_crt_visitor__words implements Srch_crt_visitor { - private final List_adp words_list = List_adp_.New(); + private final List_adp words_list = List_adp_.New(); public byte Words_tid() {return words_tid;} private byte words_tid; public Srch_crt_itm Words_nth() {return words_nth;} private Srch_crt_itm words_nth; public Srch_crt_itm[] Words_ary() {return (Srch_crt_itm[])words_list.To_ary_and_clear(Srch_crt_itm.class);} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cache.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cache.java index b5e0380b9..f5b5a49dc 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cache.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cache.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; -public class Srch_rslt_cache { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); - public void Clear() {hash.Clear();} - public Srch_rslt_list Get_or_new(byte[] key) { - Srch_rslt_list rv = (Srch_rslt_list)hash.Get_by(key); - if (rv == null) { - rv = new Srch_rslt_list(); - hash.Add(key, rv); - } - rv.Rslts_are_first = true; - rv.Rslts_are_enough = false; - return rv; - } -} +package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; +public class Srch_rslt_cache { + private final Hash_adp_bry hash = Hash_adp_bry.cs(); + public void Clear() {hash.Clear();} + public Srch_rslt_list Get_or_new(byte[] key) { + Srch_rslt_list rv = (Srch_rslt_list)hash.Get_by(key); + if (rv == null) { + rv = new Srch_rslt_list(); + hash.Add(key, rv); + } + rv.Rslts_are_first = true; + rv.Rslts_are_enough = false; + return rv; + } +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cbk_.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cbk_.java index 0948ec593..c80cc9b42 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cbk_.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_cbk_.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; -public class Srch_rslt_cbk_ { - public static final Srch_rslt_cbk Noop = new Srch_rslt_cbk__noop(); -} -class Srch_rslt_cbk__noop implements Srch_rslt_cbk { - public void On_rslts_found(Srch_search_ctx ctx, Srch_search_qry qry, Srch_rslt_list rslts_list, int rslts_bgn, int rslts_end) {} - public void On_cancel() {} -} +package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; +public class Srch_rslt_cbk_ { + public static final Srch_rslt_cbk Noop = new Srch_rslt_cbk__noop(); +} +class Srch_rslt_cbk__noop implements Srch_rslt_cbk { + public void On_rslts_found(Srch_search_ctx ctx, Srch_search_qry qry, Srch_rslt_list rslts_list, int rslts_bgn, int rslts_end) {} + public void On_cancel() {} +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_list.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_list.java index 4eab38e58..0325ab365 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_list.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_list.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.core.lists.hashs.*; public class Srch_rslt_list { - private final Ordered_hash key_hash = Ordered_hash_.New_bry(); - private final Hash_adp__int id_hash = new Hash_adp__int(); + private final Ordered_hash key_hash = Ordered_hash_.New_bry(); + private final Hash_adp__int id_hash = new Hash_adp__int(); public int Score_bgn = gplx.dbs.percentiles.Percentile_rng.Score_null; public int Score_len = gplx.dbs.percentiles.Percentile_rng.Score_null; public boolean Rslts_are_first; @@ -57,5 +57,5 @@ class Srch_rslt_row_sorter implements gplx.core.lists.ComparerAble { if (rv != CompareAble_.Same) return rv; return Bry_.Compare(lhs.Page_ttl.Page_txt(), rhs.Page_ttl.Page_txt()); } - public static final Srch_rslt_row_sorter Score_dsc = new Srch_rslt_row_sorter(); + public static final Srch_rslt_row_sorter Score_dsc = new Srch_rslt_row_sorter(); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row.java index 896e3811a..d2342c2fd 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; public class Srch_rslt_row { public Srch_rslt_row(byte[] key, byte[] wiki_bry, Xoa_ttl page_ttl, int page_ns, byte[] page_ttl_wo_ns, int page_id, int page_len, int page_score, int page_redirect_id) { @@ -26,15 +26,15 @@ public class Srch_rslt_row { this.Page_redirect_id = page_redirect_id; this.Page_score = page_score; } - public final byte[] Key; - public final byte[] Wiki_bry; - public final int Page_id; - public final Xoa_ttl Page_ttl; - public final int Page_ns; - public final byte[] Page_ttl_wo_ns; - public final int Page_len; + public final byte[] Key; + public final byte[] Wiki_bry; + public final int Page_id; + public final Xoa_ttl Page_ttl; + public final int Page_ns; + public final byte[] Page_ttl_wo_ns; + public final int Page_len; public int Page_redirect_id; - public final int Page_score; + public final int Page_score; public byte[] Page_redirect_ttl; public byte[] Page_ttl_highlight; @@ -65,7 +65,7 @@ public class Srch_rslt_row { } public static final int Page_redirect_id_null = gplx.xowa.wikis.data.tbls.Xowd_page_itm.Redirect_id_null; public static final String Str__redirect__text = " -> "; - private static final byte[] + private static final byte[] Bry__redirect__html = Bry_.new_u8(" → ") // 8592; 8594 , Bry__redirect__text = Bry_.new_a7(Str__redirect__text); public static final int diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row_tst.java index 25ecc2d4c..5aabee929 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/rslts/Srch_rslt_row_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.rslts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; import gplx.core.tests.*; public class Srch_rslt_row_tst { - private final Srch_rslt_row_fxt fxt = new Srch_rslt_row_fxt(); + private final Srch_rslt_row_fxt fxt = new Srch_rslt_row_fxt(); @Test public void To_display() { Srch_rslt_row row_straight = fxt.Make__row_straight("Ab", "Ab"); Srch_rslt_row row_redirect = fxt.Make__row_redirect("Ab", "Ab", "C"); @@ -35,7 +35,7 @@ public class Srch_rslt_row_tst { } } class Srch_rslt_row_fxt { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Srch_rslt_row_fxt() { Xoa_app app = Xoa_app_fxt.Make__app__view(); this.wiki = Xoa_app_fxt.Make__wiki__view(app); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm.java index a9bdd316c..bf6764b6c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.addons.wikis.searchs.searchers.slabs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; -public class Srch_slab_itm { - public Srch_slab_itm(byte[] wiki, int bgn, int end) {this.wiki = wiki; this.bgn = bgn; this.end = end;} - public byte[] Wiki() {return wiki;} private final byte[] wiki; - public int Bgn() {return bgn;} private final int bgn; - public int End() {return end;} private final int end; -} +package gplx.xowa.addons.wikis.searchs.searchers.slabs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; +public class Srch_slab_itm { + public Srch_slab_itm(byte[] wiki, int bgn, int end) {this.wiki = wiki; this.bgn = bgn; this.end = end;} + public byte[] Wiki() {return wiki;} private final byte[] wiki; + public int Bgn() {return bgn;} private final int bgn; + public int End() {return end;} private final int end; +} diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm_parser.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm_parser.java index caa434842..e70c4e8d8 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm_parser.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/slabs/Srch_slab_itm_parser.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.slabs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.core.brys.*; public class Srch_slab_itm_parser { - private final List_adp itm_list = List_adp_.New(); - private final Bry_rdr rdr = new Bry_rdr(); + private final List_adp itm_list = List_adp_.New(); + private final Bry_rdr rdr = new Bry_rdr(); public Srch_slab_itm[] Parse(byte[] raw) { // EX: en.wikipedia.org|41|60;en.wiktionary.org|21|40; rdr.Init_by_src(raw); while (!rdr.Pos_is_eos()) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr.java index 7099ca842..9a31039eb 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.dbs.percentiles.*; import gplx.xowa.langs.cases.*; import gplx.xowa.addons.wikis.searchs.parsers.*; public class Srch_link_wkr extends Percentile_select_base { - private final Srch_link_wkr_sql sql_mkr = new Srch_link_wkr_sql(); - private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); - private final Srch_rslt_list tmp_rslts = new Srch_rslt_list(); + private final Srch_link_wkr_sql sql_mkr = new Srch_link_wkr_sql(); + private final Db_attach_mgr attach_mgr = new Db_attach_mgr(); + private final Srch_rslt_list tmp_rslts = new Srch_rslt_list(); private Srch_rslt_list rslts_list; private Srch_rslt_cbk rslt_cbk; private Srch_search_ctx ctx; private Xowd_page_tbl page_tbl; private Db_stmt stmt; private int rslts_bgn, rslts_end; - private Srch_rslt_row cur_row; private final Xowd_page_itm tmp_page_itm = new Xowd_page_itm(); + private Srch_rslt_row cur_row; private final Xowd_page_itm tmp_page_itm = new Xowd_page_itm(); private int link_tbl_idx, link_tbl_nth; private boolean link_loop_done; private Srch_crt_itm sql_root; public void Search(Srch_rslt_list rslts_list, Srch_rslt_cbk rslt_cbk, Srch_search_ctx ctx) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_.java index 3341cf770..32654bae2 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.langs.cases.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; class Srch_link_wkr_ { - private static final Srch_word_count_wkr word_count_wkr = new Srch_word_count_wkr(); + private static final Srch_word_count_wkr word_count_wkr = new Srch_word_count_wkr(); public static Srch_crt_itm Find_sql_root(Srch_search_ctx ctx) { Srch_crt_mgr crt_mgr = ctx.Crt_mgr; // lookup word_ids; needed for one, mixed, and ands @@ -135,5 +135,5 @@ class Srch_word_row_sorter__link_count implements gplx.core.lists.ComparerAble { Srch_word_row rhs = (Srch_word_row)rhsObj; return -Int_.Compare(lhs.Link_count, rhs.Link_count); } - public static final Srch_word_row_sorter__link_count Desc = new Srch_word_row_sorter__link_count(); Srch_word_row_sorter__link_count() {} + public static final Srch_word_row_sorter__link_count Desc = new Srch_word_row_sorter__link_count(); Srch_word_row_sorter__link_count() {} } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql.java index ce95cb16c..6fca31201 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.dbs.*; import gplx.dbs.stmts.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_link_wkr_sql { - private final Db_stmt_mgr stmt_mgr = new Db_stmt_mgr(); + private final Db_stmt_mgr stmt_mgr = new Db_stmt_mgr(); public void Clear() {stmt_mgr.Clear();} public String Dbg(Srch_search_ctx ctx, Db_attach_mgr attach_mgr, Srch_crt_itm sql_root) { stmt_mgr.Mode_is_stmt_(Bool_.N); @@ -109,7 +109,7 @@ public class Srch_link_wkr_sql { stmt_mgr.Add_crt_int(link_tbl.fld_link_score, score_end); stmt_mgr.Write_fmt(Fmt__link); } - private static final byte[] + private static final byte[] Bry__page__bgn = Bry_.new_a7(String_.Concat_lines_nl_skip_last ( "SELECT p.page_id, p.page_namespace, p.page_title, p.page_len, p.page_score, p.page_redirect_id" , "FROM page p" @@ -124,7 +124,7 @@ public class Srch_link_wkr_sql { , "WHERE " )) ; - private static final String + private static final String Str__link__end = String_.Concat_lines_nl_skip_last ( "AND l.link_score >= ~{score_bgn}" , "AND l.link_score < ~{score_end}" @@ -144,7 +144,7 @@ public class Srch_link_wkr_sql { , "AND w~{uid}.link_score_min < ~{score_end}" , "" ); - private static final Bry_fmt + private static final Bry_fmt Fmt__link = Bry_fmt.Auto(Str__link__end) , Fmt__word_id = Bry_fmt.Auto("l.word_id = ~{word_uid}\n") , Fmt__word_text__rng = Bry_fmt.New(Str__word__text__bgn + Str__word__text__rng + Str__word__text__mnx + ")\n", "uid", "and", "index", "word_bgn", "word_end", "score_bgn", "score_end") diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql_tst.java index 209bd0db4..1bc5f9742 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_link_wkr_sql_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.visitors.*; public class Srch_link_wkr_sql_tst { - private final Srch_link_wkr_sql_fxt fxt = new Srch_link_wkr_sql_fxt(); + private final Srch_link_wkr_sql_fxt fxt = new Srch_link_wkr_sql_fxt(); @Test public void Rng() { fxt.Run__search("a").Test__eq ( "select" @@ -24,7 +24,7 @@ public class Srch_link_wkr_sql_tst { } } class Srch_link_wkr_sql_fxt { - private final Srch_link_wkr_sql link_wkr = new Srch_link_wkr_sql(); + private final Srch_link_wkr_sql link_wkr = new Srch_link_wkr_sql(); public Srch_link_wkr_sql_fxt Run__search(String search) { // attach_mgr.Init(cur_link_tbl.conn, new Db_attach_itm("page_db", ctx.Db__core.Conn()), new Db_attach_itm("word_db", ctx.Tbl__word.conn)); // link_wkr.Init(ctx, attach_mgr); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr.java index d6d7595f8..e55a82f40 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; public class Srch_page_tbl_wkr { - private final Xowd_page_itm tmp_page_row = new Xowd_page_itm(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xowd_page_itm tmp_page_row = new Xowd_page_itm(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public void Search(Srch_search_ctx ctx, Srch_rslt_cbk cbk) { byte[] search_raw = To_bry_or_null(tmp_bfr, ctx.Scanner_syms.Wild(), ctx.Crt_mgr); // build up search String but handle escapes "\+" -> "+" if (search_raw == null) return; // search-term has not or symbols; EX: "earth -history"; "(earth & history)" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr_tst.java index 3a7f652ac..cc2a6b8d2 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_page_tbl_wkr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import org.junit.*; import gplx.xowa.addons.wikis.searchs.parsers.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.visitors.*; public class Srch_page_tbl_wkr_tst { - private final Srch_page_tbl_wkr_fxt fxt = new Srch_page_tbl_wkr_fxt(); + private final Srch_page_tbl_wkr_fxt fxt = new Srch_page_tbl_wkr_fxt(); @Test public void Word__one() {fxt.Test__to_bry_or_null("a" , "a");} @Test public void Word__many() {fxt.Test__to_bry_or_null("a b c" , "a b c");} @Test public void Wild__end() {fxt.Test__to_bry_or_null("a*" , "a");} @@ -30,8 +30,8 @@ public class Srch_page_tbl_wkr_tst { @Test public void Parens() {fxt.Test__to_bry_or_null("(a)" , null);} } class Srch_page_tbl_wkr_fxt { - private final Srch_crt_parser crt_parser; - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Srch_crt_parser crt_parser; + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Srch_page_tbl_wkr_fxt() { crt_parser = new Srch_crt_parser(Srch_crt_scanner_syms.Dflt); Srch_text_parser text_parser = new Srch_text_parser(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_word_count_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_word_count_wkr.java index fb91c4ea5..1cd6b2ead 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_word_count_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/searchers/wkrs/Srch_word_count_wkr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.searchers.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.dbs.*; import gplx.dbs.stmts.*; import gplx.dbs.percentiles.*; import gplx.xowa.addons.wikis.searchs.dbs.*; import gplx.xowa.addons.wikis.searchs.searchers.crts.*; @@ -20,7 +20,7 @@ class Srch_word_count_wkr extends Percentile_select_base { private Srch_word_tbl word_tbl; private Srch_db_cfg db_cfg; private Srch_crt_itm sub; private int total_link_count, rows_read; private boolean score_too_low; - private final Db_stmt_mgr stmt_mgr = new Db_stmt_mgr(); private Db_stmt stmt; + private final Db_stmt_mgr stmt_mgr = new Db_stmt_mgr(); private Db_stmt stmt; public int Get_top_10(Srch_search_ctx ctx, Srch_word_tbl word_tbl, Srch_crt_itm sub) { super.cxl = ctx.Cxl; this.db_cfg = ctx.Addon.Db_mgr().Cfg(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_qarg_mgr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_qarg_mgr.java index 271f6b816..082b36f54 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_qarg_mgr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_qarg_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_qarg_mgr { public Srch_qarg_mgr(Srch_ns_mgr ns_mgr) {this.ns_mgr = ns_mgr;} - public Srch_ns_mgr Ns_mgr() {return ns_mgr;} private final Srch_ns_mgr ns_mgr; + public Srch_ns_mgr Ns_mgr() {return ns_mgr;} private final Srch_ns_mgr ns_mgr; public byte[] Search_raw() {return search_raw;} private byte[] search_raw; public Srch_qarg_mgr Search_raw_(byte[] v) {search_raw = v; return this;} public int Slab_idx() {return slab_idx;} private int slab_idx; public byte[] Cancel() {return cancel;} private byte[] cancel; @@ -53,8 +53,8 @@ public class Srch_qarg_mgr { } private static byte[] Ns_bry = Bry_.new_a7("ns"); private static final byte Uid__search = 0, Uid__slab_idx = 1, Uid__cancel = 2; - public static final byte[] Bry__slab_idx = Bry_.new_a7("xowa_page_index"), Bry__cancel = Bry_.new_a7("cancel"); - private static final Hash_adp_bry qarg_regy = Hash_adp_bry.ci_a7() + public static final byte[] Bry__slab_idx = Bry_.new_a7("xowa_page_index"), Bry__cancel = Bry_.new_a7("cancel"); + private static final Hash_adp_bry qarg_regy = Hash_adp_bry.ci_a7() .Add_str_byte("search" , Uid__search) .Add_bry_byte(Bry__slab_idx , Uid__slab_idx) .Add_bry_byte(Bry__cancel , Uid__cancel) diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cfg.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cfg.java index d8b2ab444..4c62f5700 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cfg.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cfg.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*; import gplx.xowa.addons.wikis.searchs.searchers.*; public class Srch_special_cfg implements Gfo_invk { - private final Xow_domain_crt_kv_itm_mgr multi_wikis_mgr = new Xow_domain_crt_kv_itm_mgr(); private byte[] multi_wikis_bry = Dflt_multi_wikis_bry; - private final Xow_domain_crt_kv_itm_mgr multi_sorts_mgr = new Xow_domain_crt_kv_itm_mgr(); private byte[] multi_sorts_bry = Dflt_multi_sorts_bry; + private final Xow_domain_crt_kv_itm_mgr multi_wikis_mgr = new Xow_domain_crt_kv_itm_mgr(); private byte[] multi_wikis_bry = Dflt_multi_wikis_bry; + private final Xow_domain_crt_kv_itm_mgr multi_sorts_mgr = new Xow_domain_crt_kv_itm_mgr(); private byte[] multi_sorts_bry = Dflt_multi_sorts_bry; public Srch_special_cfg() { multi_wikis_mgr.Parse_as_itms(multi_wikis_bry); multi_sorts_mgr.Parse_as_arys(multi_sorts_bry); @@ -31,7 +31,7 @@ public class Srch_special_cfg implements Gfo_invk { public int Results_per_page() {return results_per_page;} private int results_per_page = 100; public boolean Async_db() {return async_db;} private boolean async_db = true; public boolean Auto_wildcard() {return auto_wildcard;} private boolean auto_wildcard = false; // automatically add wild-card; EX: Earth -> *Earth* - public Srch_ns_mgr Ns_mgr() {return ns_mgr;} private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr(); + public Srch_ns_mgr Ns_mgr() {return ns_mgr;} private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr(); public Xow_domain_crt_itm Multi_wikis_crt (Xow_domain_itm cur_domain) {return multi_wikis_mgr.Find_itm(cur_domain, cur_domain);} public Xow_domain_crt_itm[] Multi_sorts_crt (Xow_domain_itm cur_domain) {return multi_sorts_mgr.Find_ary(cur_domain, cur_domain);} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { @@ -60,7 +60,7 @@ public class Srch_special_cfg implements Gfo_invk { , Cfg__multi_wikis = "xowa.addon.search.special.multi_wikis" , Cfg__multi_sorts = "xowa.addon.search.special.multi_sorts" ; - public static final byte[] + public static final byte[] Dflt_multi_wikis_bry = Bry_.new_a7("|") , Dflt_multi_sorts_bry = Bry_.new_a7("|,*.wikipedia,*.wikivoyage,*.wiktionary,*.wikisource,*.wikiquote,*.wikibooks,*.wikiversity,*.wikinews") ; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cmd.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cmd.java index c35026c14..f116f9064 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cmd.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_cmd.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.threads.*; import gplx.xowa.guis.cbks.js.*; import gplx.xowa.guis.views.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.addons.wikis.searchs.specials.htmls.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_special_cmd implements Gfo_invk, Srch_rslt_cbk, Xog_tab_close_lnr { - private final Srch_special_searcher mgr; private final Srch_search_qry qry; - public final Xow_wiki wiki; private final Xog_tab_close_mgr tab_close_mgr; private final Xog_js_wkr js_wkr; - private final Xopg_tab_data tab_data; - private Srch_html_row_wkr html_row_wkr; private final boolean async; - public final byte[] key; private boolean canceled = false; + private final Srch_special_searcher mgr; private final Srch_search_qry qry; + public final Xow_wiki wiki; private final Xog_tab_close_mgr tab_close_mgr; private final Xog_js_wkr js_wkr; + private final Xopg_tab_data tab_data; + private Srch_html_row_wkr html_row_wkr; private final boolean async; + public final byte[] key; private boolean canceled = false; public Srch_special_cmd(Srch_special_searcher mgr, Srch_search_qry qry, Xow_wiki wiki, Xopg_tab_data tab_data, byte[] key, boolean search_is_async) { this.mgr = mgr; this.qry = qry; this.wiki = wiki; this.tab_data = tab_data; this.tab_close_mgr = tab_data.Close_mgr(); this.js_wkr = tab_data.Tab().Html_itm(); this.key = key; diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_page.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_page.java index 0174f472a..e4edb5868 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_page.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_page.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.primitives.*; import gplx.xowa.addons.wikis.searchs.specials.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*; @@ -81,7 +81,7 @@ public class Srch_special_page implements Xow_special_page { } public static final byte Match_tid_all = 0, Match_tid_bgn = 1; public static final byte Version_null = 0, Version_1 = 1, Version_2 = 2; - private static final byte[] Qarg__fulltext = Bry_.new_a7("fulltext"), Qarg__fulltext__y = Bry_.new_a7("y"); + private static final byte[] Qarg__fulltext = Bry_.new_a7("fulltext"), Qarg__fulltext__y = Bry_.new_a7("y"); private static Xow_domain_itm[] Get_by_crt(gplx.xowa.wikis.xwikis.Xow_xwiki_mgr xwiki_mgr, Xow_domain_itm cur, gplx.xowa.wikis.domains.crts.Xow_domain_crt_itm crt) { List_adp rv = List_adp_.New(); int len = xwiki_mgr.Len(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_searcher.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_searcher.java index 19de5238a..1d11b7132 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_searcher.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Srch_special_searcher.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.specials.htmls.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_special_searcher { - private final Xoae_wiki_mgr wiki_mgr; - private final Ordered_hash cancel_hash = Ordered_hash_.New_bry(); - private final Srch_html_page_bldr html_page_bldr = new Srch_html_page_bldr(); + private final Xoae_wiki_mgr wiki_mgr; + private final Ordered_hash cancel_hash = Ordered_hash_.New_bry(); + private final Srch_html_page_bldr html_page_bldr = new Srch_html_page_bldr(); public Srch_special_searcher(Xoae_wiki_mgr wiki_mgr) {this.wiki_mgr = wiki_mgr;} public void Search(Xow_wiki search_wiki, Xoae_page page, boolean search_is_async, Xow_domain_itm[] domains_ary, Srch_search_qry qry) { Bry_bfr tmp_bfr = Bry_bfr_.New(); diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Xow_domain_sorter__manual.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Xow_domain_sorter__manual.java index 8db431d24..4b65ff300 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Xow_domain_sorter__manual.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/Xow_domain_sorter__manual.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.core.primitives.*; import gplx.xowa.langs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*; public class Xow_domain_sorter__manual implements gplx.core.lists.ComparerAble { - private final Xow_domain_itm cur_domain; - private final Xow_domain_crt_itm[] ary; private final int ary_len; + private final Xow_domain_itm cur_domain; + private final Xow_domain_crt_itm[] ary; private final int ary_len; public Xow_domain_sorter__manual(Xow_domain_itm cur_domain, Xow_domain_crt_itm[] ary) { this.cur_domain = cur_domain; this.ary = ary; this.ary_len = ary.length; } @@ -50,7 +50,7 @@ public class Xow_domain_sorter__manual implements gplx.core.lists.ComparerAble { } } class Xow_domain_sorter__manual_tid implements gplx.core.lists.ComparerAble { - private final Hash_adp sort_hash = Hash_adp_.New(); private final Int_obj_ref sort_key = Int_obj_ref.New_neg1(); + private final Hash_adp sort_hash = Hash_adp_.New(); private final Int_obj_ref sort_key = Int_obj_ref.New_neg1(); public Xow_domain_sorter__manual_tid(int[] id_ary) { int len = id_ary.length; for (int i = 0; i < len; ++i) { @@ -84,7 +84,7 @@ class Xow_domain_sorter__manual_tid implements gplx.core.lists.ComparerAble { } } class Xow_domain_sorter__manual_lang implements gplx.core.lists.ComparerAble { - private final Hash_adp sort_hash = Hash_adp_.New(); private final Int_obj_ref sort_key = Int_obj_ref.New_neg1(); + private final Hash_adp sort_hash = Hash_adp_.New(); private final Int_obj_ref sort_key = Int_obj_ref.New_neg1(); public Xow_domain_sorter__manual_lang(int[] id_ary) { int len = id_ary.length; for (int i = 0; i < len; ++i) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr.java index a622104fe..bb765bffb 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.specials.*; import gplx.core.brys.fmtrs.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.core.htmls.utls.*; import gplx.xowa.langs.numbers.*; import gplx.langs.htmls.entitys.*; import gplx.xowa.addons.wikis.searchs.specials.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_html_page_bldr { - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); private Srch_search_qry qry; private Xow_wiki wiki; private Xol_num_mgr num_mgr; private int slab_idx; private Xoh_lnki_bldr lnki_bldr; private Xoh_anchor_kv_bldr self_lnkr = new Xoh_anchor_kv_bldr(); private Srch_html_row_bldr html_row_bldr; @@ -77,12 +77,12 @@ public class Srch_html_page_bldr { } return lnki_bldr.Title_(title).Href_wo_escape_(wiki.Domain_bry(), self_lnkr.Add_int(Srch_qarg_mgr.Bry__slab_idx, qarg_slab_idx).Bld_to_bry()).Img_16x16(img_path).Img_pos_is_left_(img_pos_is_left).Caption_(title).Bld_to_bry(); } - private static final Bry_fmtr fmtr_page = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr_page = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "~{rslts_hdr}~{option_link}" , "
    ~{bwd_a}~{fwd_a}
    ~{tbls}" , "
    ~{bwd_a}~{fwd_a}
    " ), "rslts_hdr", "option_link", "bwd_a", "fwd_a", "tbls"); - private static final Bry_fmtr fmtr_tbl = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr_tbl = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , " " , " " , "
    ~{wiki}~{cancel}" @@ -98,9 +98,9 @@ public class Srch_html_page_bldr { , "
    " ), "wiki", "cancel", "hdr_len", "hdr_ttl", "insert_key", "rows"); - private static final Bry_fmtr fmtr_rslts = Bry_fmtr.new_("Results ~{bgn} of ~{end} for ~{raw}", "bgn", "end", "raw"); - private static final byte[] Bry_paging_fwd = Bry_.new_a7("Next"), Bry_paging_bwd = Bry_.new_a7("Previous")// , Bry_cancel = Bry_.new_a7("Stop searching") + private static final Bry_fmtr fmtr_rslts = Bry_fmtr.new_("Results ~{bgn} of ~{end} for ~{raw}", "bgn", "end", "raw"); + private static final byte[] Bry_paging_fwd = Bry_.new_a7("Next"), Bry_paging_bwd = Bry_.new_a7("Previous")// , Bry_cancel = Bry_.new_a7("Stop searching") , Bry_hdr_len = Bry_.new_a7("Page score"), Bry_hdr_ttl = Bry_.new_a7("Page title") ; - private final byte[] Bry__special_search = Bry_.new_a7("Special:Search/"), Bry__fulltext = Bry_.new_a7("?fulltext=y"); + private final byte[] Bry__special_search = Bry_.new_a7("Special:Search/"), Bry__fulltext = Bry_.new_a7("?fulltext=y"); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr_tst.java index f2eef5482..05408a5f8 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_page_bldr_tst.java @@ -45,7 +45,7 @@ public class Srch_html_page_bldr_tst { } } class Srch_html_page_bldr_fxt { - private Xoae_app app; private Xowe_wiki wiki; private Srch_html_page_bldr html_mgr; private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); + private Xoae_app app; private Xowe_wiki wiki; private Srch_html_page_bldr html_mgr; private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); private int page_id; public Srch_html_page_bldr_fxt Clear() { if (app == null) { diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_bldr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_bldr.java index 6344433b1..cc1cfe66c 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_bldr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_bldr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.specials.*; import gplx.xowa.htmls.core.htmls.utls.*; import gplx.langs.htmls.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_html_row_bldr implements gplx.core.brys.Bfr_arg { - private final Xoh_lnki_bldr lnki_bldr; + private final Xoh_lnki_bldr lnki_bldr; private Srch_rslt_list rslt_list; private int slab_bgn, slab_end; - private final Object thread_lock = new Object(); + private final Object thread_lock = new Object(); public Srch_html_row_bldr(Xoh_lnki_bldr lnki_bldr) {this.lnki_bldr = lnki_bldr;} public Srch_html_row_bldr Init(Srch_rslt_list rslt_list, int slab_bgn, int slab_end) {this.rslt_list = rslt_list; this.slab_bgn = slab_bgn; this.slab_end = slab_end; return this;} public void Bfr_arg__add(Bry_bfr bfr) { // A @@ -38,7 +38,7 @@ public class Srch_html_row_bldr implements gplx.core.brys.Bfr_arg { fmtr.Bld_many(bfr, Gfh_utl.Encode_id_as_str(row.Key), row.Page_score, lnki_bldr.Bld_to_bry()); } } - public Bry_fmt Fmtr() {return fmtr;} private final Bry_fmt fmtr = Bry_fmt.Auto(String_.Concat_lines_nl_skip_last + public Bry_fmt Fmtr() {return fmtr;} private final Bry_fmt fmtr = Bry_fmt.Auto(String_.Concat_lines_nl_skip_last ( "" , " " , " ~{page_len}" diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_wkr.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_wkr.java index e08c85378..8f5aab711 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_wkr.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_html_row_wkr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.addons.wikis.searchs.specials.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.wikis.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.specials.*; import gplx.langs.htmls.*; import gplx.xowa.guis.cbks.js.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.addons.wikis.searchs.searchers.rslts.*; public class Srch_html_row_wkr { - private final Srch_html_row_bldr html_row_bldr; private final Xog_js_wkr js_wkr; - private final Srch_rslt_row[] rows; private final int rows_len; - private final Bry_bfr bfr = Bry_bfr_.New_w_size(255); - private final byte[] insert_new_key; + private final Srch_html_row_bldr html_row_bldr; private final Xog_js_wkr js_wkr; + private final Srch_rslt_row[] rows; private final int rows_len; + private final Bry_bfr bfr = Bry_bfr_.New_w_size(255); + private final byte[] insert_new_key; public Srch_html_row_wkr(Srch_html_row_bldr html_row_bldr, Xog_js_wkr js_wkr, int slab_len, byte[] wiki) { this.html_row_bldr = html_row_bldr; this.js_wkr = js_wkr; this.rows = new Srch_rslt_row[slab_len]; @@ -70,5 +70,5 @@ public class Srch_html_row_wkr { return -Int_.Compare(lhs.Page_score, rhs.Page_score); } public static byte[] Gen_insert_key(byte[] wiki) {return Bry_.Add(Bry_insert_key, wiki);} - private static final byte[] Bry_insert_key = Bry_.new_a7("xowa_insert_"); + private static final byte[] Bry_insert_key = Bry_.new_a7("xowa_insert_"); } diff --git a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_rslt_cbk_tst.java b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_rslt_cbk_tst.java index a50909e4d..c39fd73ba 100644 --- a/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_rslt_cbk_tst.java +++ b/400_xowa/src/gplx/xowa/addons/wikis/searchs/specials/htmls/Srch_rslt_cbk_tst.java @@ -29,7 +29,7 @@ public class Srch_rslt_cbk_tst { } } class Srch_rslt_cbk_fxt { - private Srch_html_row_bldr html_row; private static final byte[] Bry_enwiki = Bry_.new_a7("w"); + private Srch_html_row_bldr html_row; private static final byte[] Bry_enwiki = Bry_.new_a7("w"); private Srch_html_row_wkr async; private Xog_js_wkr__log js_wkr = new Xog_js_wkr__log(); private Xowe_wiki wiki; diff --git a/400_xowa/src/gplx/xowa/apps/Xoa_app_mode.java b/400_xowa/src/gplx/xowa/apps/Xoa_app_mode.java index 1f1d2a7f8..da73202f2 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoa_app_mode.java +++ b/400_xowa/src/gplx/xowa/apps/Xoa_app_mode.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; public class Xoa_app_mode { Xoa_app_mode(int tid) {this.tid = tid;} - public int Tid() {return tid;} private final int tid; + public int Tid() {return tid;} private final int tid; public boolean Tid_is_gui() {return tid == Tid_gui;} public boolean Tid_is_tcp() {return tid == Tid_tcp;} public boolean Tid_is_cmd() {return tid == Tid_cmd;} @@ -40,9 +40,9 @@ public class Xoa_app_mode { } } private static final int Tid_cmd = 1, Tid_gui = 2, Tid_tcp = 3, Tid_http = 4, Tid_file = 5; - private static final byte[] Key_cmd = Bry_.new_a7("cmd"), Key_gui = Bry_.new_a7("gui"), Key_tcp = Bry_.new_a7("server"), Key_http = Bry_.new_a7("http_server"), Key_file = Bry_.new_a7("file"); - public static final Xoa_app_mode Itm_cmd = new Xoa_app_mode(Tid_cmd), Itm_gui = new Xoa_app_mode(Tid_gui), Itm_tcp = new Xoa_app_mode(Tid_tcp), Itm_http = new Xoa_app_mode(Tid_http), Itm_file = new Xoa_app_mode(Tid_file); - private static final Hash_adp_bry type_hash = Hash_adp_bry.cs() + private static final byte[] Key_cmd = Bry_.new_a7("cmd"), Key_gui = Bry_.new_a7("gui"), Key_tcp = Bry_.new_a7("server"), Key_http = Bry_.new_a7("http_server"), Key_file = Bry_.new_a7("file"); + public static final Xoa_app_mode Itm_cmd = new Xoa_app_mode(Tid_cmd), Itm_gui = new Xoa_app_mode(Tid_gui), Itm_tcp = new Xoa_app_mode(Tid_tcp), Itm_http = new Xoa_app_mode(Tid_http), Itm_file = new Xoa_app_mode(Tid_file); + private static final Hash_adp_bry type_hash = Hash_adp_bry.cs() .Add_bry_int(Key_cmd , Tid_cmd) .Add_bry_int(Key_gui , Tid_gui) .Add_bry_int(Key_http , Tid_http) diff --git a/400_xowa/src/gplx/xowa/apps/Xoav_app.java b/400_xowa/src/gplx/xowa/apps/Xoav_app.java index 08a88d46a..0760608e2 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoav_app.java +++ b/400_xowa/src/gplx/xowa/apps/Xoav_app.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; import gplx.core.net.*; import gplx.core.log_msgs.*; import gplx.langs.jsons.*; import gplx.core.brys.*; import gplx.core.threads.*; import gplx.core.ios.*; @@ -53,48 +53,48 @@ public class Xoav_app implements Xoa_app, Gfo_invk { this.bldr = new Xob_bldr(null); } public boolean Tid_is_edit() {return Bool_.N;} - public Xoa_app_mode Mode() {return mode;} private final Xoa_app_mode mode; - public Xou_user User() {return user;} private final Xouv_user user; - public Xoapi_root Api_root() {return api_root;} private final Xoapi_root api_root; - public Xoa_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xoa_fsys_mgr fsys_mgr; - public Xoav_wiki_mgr Wiki_mgr() {return wiki_mgr;} private final Xoav_wiki_mgr wiki_mgr; + public Xoa_app_mode Mode() {return mode;} private final Xoa_app_mode mode; + public Xou_user User() {return user;} private final Xouv_user user; + public Xoapi_root Api_root() {return api_root;} private final Xoapi_root api_root; + public Xoa_fsys_mgr Fsys_mgr() {return fsys_mgr;} private final Xoa_fsys_mgr fsys_mgr; + public Xoav_wiki_mgr Wiki_mgr() {return wiki_mgr;} private final Xoav_wiki_mgr wiki_mgr; public Xoa_wiki_mgr Wiki_mgri() {return wiki_mgr;} - public Xoa_lang_mgr Lang_mgr() {return lang_mgr;} private final Xoa_lang_mgr lang_mgr; - public Xoa_gfs_mgr Gfs_mgr() {return gfs_mgr;} private final Xoa_gfs_mgr gfs_mgr; - public Xof_cache_mgr File__cache_mgr() {return file__cache_mgr;} private final Xof_cache_mgr file__cache_mgr; - public Xof_img_mgr File__img_mgr() {return file__img_mgr;} private final Xof_img_mgr file__img_mgr; - public Io_download_fmt File__download_fmt() {return file__download_fmt;} private final Io_download_fmt file__download_fmt = new Io_download_fmt(); - public Xoh_href_parser Html__href_parser() {return href_parser;} private final Xoh_href_parser href_parser = new Xoh_href_parser(); - public Xoh_href_wtr Html__href_wtr() {return html__href_wtr;} private final Xoh_href_wtr html__href_wtr = new Xoh_href_wtr(); - public Xoa_css_extractor Html__css_installer() {return html__css_installer;} private final Xoa_css_extractor html__css_installer = new Xoa_css_extractor(); - public Xoh_bridge_mgr Html__bridge_mgr() {return html__bridge_mgr;} private final Xoh_bridge_mgr html__bridge_mgr; - public Xoa_meta_mgr Dbmeta_mgr() {return meta_mgr;} private final Xoa_meta_mgr meta_mgr; - public Gfo_inet_conn Utl__inet_conn() {return inet_conn;} private final Gfo_inet_conn inet_conn = Gfo_inet_conn_.new_(); - public Xoa_site_cfg_mgr Site_cfg_mgr() {return site_cfg_mgr;} private final Xoa_site_cfg_mgr site_cfg_mgr; + public Xoa_lang_mgr Lang_mgr() {return lang_mgr;} private final Xoa_lang_mgr lang_mgr; + public Xoa_gfs_mgr Gfs_mgr() {return gfs_mgr;} private final Xoa_gfs_mgr gfs_mgr; + public Xof_cache_mgr File__cache_mgr() {return file__cache_mgr;} private final Xof_cache_mgr file__cache_mgr; + public Xof_img_mgr File__img_mgr() {return file__img_mgr;} private final Xof_img_mgr file__img_mgr; + public Io_download_fmt File__download_fmt() {return file__download_fmt;} private final Io_download_fmt file__download_fmt = new Io_download_fmt(); + public Xoh_href_parser Html__href_parser() {return href_parser;} private final Xoh_href_parser href_parser = new Xoh_href_parser(); + public Xoh_href_wtr Html__href_wtr() {return html__href_wtr;} private final Xoh_href_wtr html__href_wtr = new Xoh_href_wtr(); + public Xoa_css_extractor Html__css_installer() {return html__css_installer;} private final Xoa_css_extractor html__css_installer = new Xoa_css_extractor(); + public Xoh_bridge_mgr Html__bridge_mgr() {return html__bridge_mgr;} private final Xoh_bridge_mgr html__bridge_mgr; + public Xoa_meta_mgr Dbmeta_mgr() {return meta_mgr;} private final Xoa_meta_mgr meta_mgr; + public Gfo_inet_conn Utl__inet_conn() {return inet_conn;} private final Gfo_inet_conn inet_conn = Gfo_inet_conn_.new_(); + public Xoa_site_cfg_mgr Site_cfg_mgr() {return site_cfg_mgr;} private final Xoa_site_cfg_mgr site_cfg_mgr; public boolean Xwiki_mgr__missing(byte[] domain) {return wiki_mgr.Get_by_or_null(domain) == null;} - public Xoa_sitelink_mgr Xwiki_mgr__sitelink_mgr() {return xwiki_mgr__sitelink_mgr;} private final Xoa_sitelink_mgr xwiki_mgr__sitelink_mgr = new Xoa_sitelink_mgr(); - public Xow_xwiki_itm_parser Xwiki_mgr__itm_parser() {return xwiki_mgr__itm_parser;} private final Xow_xwiki_itm_parser xwiki_mgr__itm_parser = new Xow_xwiki_itm_parser(); - public Xoax_addon_mgr Addon_mgr() {return addon_mgr;} private final Xoax_addon_mgr addon_mgr = new Xoax_addon_mgr(); - public Xob_bldr Bldr() {return bldr;} private final Xob_bldr bldr; - public Xoa_special_regy Special_regy() {return special_regy;} private final Xoa_special_regy special_regy = new Xoa_special_regy(); - public Xog_cbk_mgr Gui__cbk_mgr() {return gui__cbk_mgr;} private final Xog_cbk_mgr gui__cbk_mgr = new Xog_cbk_mgr(); - public Xog_tab_mgr Gui__tab_mgr() {return gui__tab_mgr;} private final Xog_tab_mgr gui__tab_mgr; - public Gfo_thread_mgr Thread_mgr() {return thread_mgr;} private final Gfo_thread_mgr thread_mgr = new Gfo_thread_mgr(); - public Xop_amp_mgr Parser_amp_mgr() {return parser_amp_mgr;} private final Xop_amp_mgr parser_amp_mgr = Xop_amp_mgr.Instance; - public Xocfg_mgr Cfg() {return cfg;} private final Xocfg_mgr cfg = new Xocfg_mgr(); - public Xoa_misc_mgr Misc_mgr() {return misc_mgr;} private final Xoa_misc_mgr misc_mgr = new Xoa_misc_mgr(); + public Xoa_sitelink_mgr Xwiki_mgr__sitelink_mgr() {return xwiki_mgr__sitelink_mgr;} private final Xoa_sitelink_mgr xwiki_mgr__sitelink_mgr = new Xoa_sitelink_mgr(); + public Xow_xwiki_itm_parser Xwiki_mgr__itm_parser() {return xwiki_mgr__itm_parser;} private final Xow_xwiki_itm_parser xwiki_mgr__itm_parser = new Xow_xwiki_itm_parser(); + public Xoax_addon_mgr Addon_mgr() {return addon_mgr;} private final Xoax_addon_mgr addon_mgr = new Xoax_addon_mgr(); + public Xob_bldr Bldr() {return bldr;} private final Xob_bldr bldr; + public Xoa_special_regy Special_regy() {return special_regy;} private final Xoa_special_regy special_regy = new Xoa_special_regy(); + public Xog_cbk_mgr Gui__cbk_mgr() {return gui__cbk_mgr;} private final Xog_cbk_mgr gui__cbk_mgr = new Xog_cbk_mgr(); + public Xog_tab_mgr Gui__tab_mgr() {return gui__tab_mgr;} private final Xog_tab_mgr gui__tab_mgr; + public Gfo_thread_mgr Thread_mgr() {return thread_mgr;} private final Gfo_thread_mgr thread_mgr = new Gfo_thread_mgr(); + public Xop_amp_mgr Parser_amp_mgr() {return parser_amp_mgr;} private final Xop_amp_mgr parser_amp_mgr = Xop_amp_mgr.Instance; + public Xocfg_mgr Cfg() {return cfg;} private final Xocfg_mgr cfg = new Xocfg_mgr(); + public Xoa_misc_mgr Misc_mgr() {return misc_mgr;} private final Xoa_misc_mgr misc_mgr = new Xoa_misc_mgr(); - public Xowmf_mgr Wmf_mgr() {return wmf_mgr;} private final Xowmf_mgr wmf_mgr = new Xowmf_mgr(); + public Xowmf_mgr Wmf_mgr() {return wmf_mgr;} private final Xowmf_mgr wmf_mgr = new Xowmf_mgr(); public Gfo_usr_dlg Usr_dlg() {return usr_dlg;} public void Usr_dlg_(Gfo_usr_dlg v) {usr_dlg = v; Xoa_app_.Usr_dlg_(usr_dlg);} private Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.Noop; - public Bry_bfr_mkr Utl__bfr_mkr() {return utl__bry_bfr_mkr;} private final Bry_bfr_mkr utl__bry_bfr_mkr = new Bry_bfr_mkr(); - public Json_parser Utl__json_parser() {return utl__json_parser;} private final Json_parser utl__json_parser = new Json_parser(); + public Bry_bfr_mkr Utl__bfr_mkr() {return utl__bry_bfr_mkr;} private final Bry_bfr_mkr utl__bry_bfr_mkr = new Bry_bfr_mkr(); + public Json_parser Utl__json_parser() {return utl__json_parser;} private final Json_parser utl__json_parser = new Json_parser(); public boolean Bldr__running() {return bldr__running;} public void Bldr__running_(boolean v) {this.bldr__running = v;} private boolean bldr__running; public Xop_amp_mgr Utl_amp_mgr() {return utl_amp_mgr;} private Xop_amp_mgr utl_amp_mgr = Xop_amp_mgr.Instance; public Xol_case_mgr Utl_case_mgr() {return utl_case_mgr;} private Xol_case_mgr utl_case_mgr = Xol_case_mgr_.U8(); // public Gfo_url_encoder Utl_encoder_fsys() {return utl_encoder_fsys;} private Gfo_url_encoder utl_encoder_fsys = Gfo_url_encoder.New_fsys_lnx(); public Gfo_msg_log Utl_msg_log() {return utl_msg_log;} private Gfo_msg_log utl_msg_log; public Xoav_url_parser Utl_url_parser_xo() {return utl_url_parser_xo;} private Xoav_url_parser utl_url_parser_xo = new Xoav_url_parser(); - public Gfo_url_parser Utl_url_parser_gfo() {return utl_url_parser_gfo;} private final Gfo_url_parser utl_url_parser_gfo = new Gfo_url_parser(); + public Gfo_url_parser Utl_url_parser_gfo() {return utl_url_parser_gfo;} private final Gfo_url_parser utl_url_parser_gfo = new Gfo_url_parser(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {throw Err_.new_unimplemented_w_msg("implemented for Xoa_cfg_mgr");} public void Init_by_app(Io_url user_db_url) { user.Init_db(this, wiki_mgr, user_db_url); diff --git a/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java b/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java index 46930177b..3514be2eb 100644 --- a/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/Xoav_wiki_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps; import gplx.*; import gplx.xowa.*; import gplx.xowa.*; import gplx.xowa.langs.cases.*; import gplx.xowa.users.data.*; import gplx.xowa.wikis.*; public class Xoav_wiki_mgr implements Xoa_wiki_mgr { - private final Xoav_app app; private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Xoav_app app; private final Ordered_hash hash = Ordered_hash_.New_bry(); public Xoav_wiki_mgr(Xoav_app app, Xol_case_mgr case_mgr) {this.app = app;} public int Count() {return hash.Count();} public boolean Has(byte[] key) {return hash.Has(key);} diff --git a/400_xowa/src/gplx/xowa/apps/apis/Xoapi_root.java b/400_xowa/src/gplx/xowa/apps/apis/Xoapi_root.java index d7ec4fc6c..0611220aa 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/Xoapi_root.java +++ b/400_xowa/src/gplx/xowa/apps/apis/Xoapi_root.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.guis.cmds.*; public class Xoapi_root implements Gfo_invk { @@ -36,14 +36,14 @@ public class Xoapi_root implements Gfo_invk { html_api.Init_by_app(app); usr_api.Init_by_app(app); } - public Xoapi_addon Addon() {return addon_api;} private final Xoapi_addon addon_api = new Xoapi_addon(); - public Xoapi_app App() {return app_api;} private final Xoapi_app app_api = new Xoapi_app(); - public Xoapi_nav Nav() {return nav_api;} private final Xoapi_nav nav_api = new Xoapi_nav(); - public Xoapi_gui Gui() {return gui_api;} private final Xoapi_gui gui_api = new Xoapi_gui(); - public Xoapi_html Html() {return html_api;} private final Xoapi_html html_api = new Xoapi_html(); - public Xoapi_bldr Bldr() {return bldr_api;} private final Xoapi_bldr bldr_api = new Xoapi_bldr(); - public Xoapi_usr Usr() {return usr_api;} private final Xoapi_usr usr_api = new Xoapi_usr(); - public Xoapi_xtns Xtns() {return xtns_api;} private final Xoapi_xtns xtns_api = new Xoapi_xtns(); + public Xoapi_addon Addon() {return addon_api;} private final Xoapi_addon addon_api = new Xoapi_addon(); + public Xoapi_app App() {return app_api;} private final Xoapi_app app_api = new Xoapi_app(); + public Xoapi_nav Nav() {return nav_api;} private final Xoapi_nav nav_api = new Xoapi_nav(); + public Xoapi_gui Gui() {return gui_api;} private final Xoapi_gui gui_api = new Xoapi_gui(); + public Xoapi_html Html() {return html_api;} private final Xoapi_html html_api = new Xoapi_html(); + public Xoapi_bldr Bldr() {return bldr_api;} private final Xoapi_bldr bldr_api = new Xoapi_bldr(); + public Xoapi_usr Usr() {return usr_api;} private final Xoapi_usr usr_api = new Xoapi_usr(); + public Xoapi_xtns Xtns() {return xtns_api;} private final Xoapi_xtns xtns_api = new Xoapi_xtns(); public String Test_str() {return test_str;} public void Test_str_(String v) {test_str = v;} private String test_str; // TEST private void Exec(String key) { Xog_cmd_itm cmd_itm = app.Gui_mgr().Cmd_mgr().Get_or_null(key); diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_addon.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_addon.java index ccec942fd..4d437e71e 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_addon.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_addon.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; -import gplx.xowa.apps.apis.xowa.addons.*; -public class Xoapi_addon implements Gfo_invk { - public void Ctor_by_app(Xoa_app app) {} - public Xoapi_addon_search Search() {return search;} private final Xoapi_addon_search search = new Xoapi_addon_search(); - public Xoapi_addon_bldr Bldr() {return bldr;} private final Xoapi_addon_bldr bldr = new Xoapi_addon_bldr(); - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk__search)) return search; - else if (ctx.Match(k, Invk__bldr)) return bldr; - else return Gfo_invk_.Rv_unhandled; - } - private static final String Invk__search = "search", Invk__bldr = "bldr"; -} +package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; +import gplx.xowa.apps.apis.xowa.addons.*; +public class Xoapi_addon implements Gfo_invk { + public void Ctor_by_app(Xoa_app app) {} + public Xoapi_addon_search Search() {return search;} private final Xoapi_addon_search search = new Xoapi_addon_search(); + public Xoapi_addon_bldr Bldr() {return bldr;} private final Xoapi_addon_bldr bldr = new Xoapi_addon_bldr(); + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk__search)) return search; + else if (ctx.Match(k, Invk__bldr)) return bldr; + else return Gfo_invk_.Rv_unhandled; + } + private static final String Invk__search = "search", Invk__bldr = "bldr"; +} diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_bldr.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_bldr.java index bd4731f64..6298172b6 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_bldr.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_bldr.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; -import gplx.xowa.apps.apis.xowa.bldrs.*; -public class Xoapi_bldr implements Gfo_invk { - public void Ctor_by_app(Xoa_app app) {wiki.Ctor_by_app(app);} - public Xoapi_bldr_wiki Wiki() {return wiki;} private final Xoapi_bldr_wiki wiki = new Xoapi_bldr_wiki(); - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_wiki)) return wiki; - else return Gfo_invk_.Rv_unhandled; - } - private static final String Invk_wiki = "wiki"; -} +package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; +import gplx.xowa.apps.apis.xowa.bldrs.*; +public class Xoapi_bldr implements Gfo_invk { + public void Ctor_by_app(Xoa_app app) {wiki.Ctor_by_app(app);} + public Xoapi_bldr_wiki Wiki() {return wiki;} private final Xoapi_bldr_wiki wiki = new Xoapi_bldr_wiki(); + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_wiki)) return wiki; + else return Gfo_invk_.Rv_unhandled; + } + private static final String Invk_wiki = "wiki"; +} diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_html.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_html.java index 47faa61ce..ef777cbe1 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_html.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_html.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.html.*; public class Xoapi_html implements Gfo_invk { @@ -21,8 +21,8 @@ public class Xoapi_html implements Gfo_invk { } public void Init_by_app(Xoae_app app) {page.Init_by_app(app);} public void Init_by_kit(Xoae_app app) {modules.Init_by_kit(app);} - public Xoapi_modules Modules() {return modules;} private final Xoapi_modules modules = new Xoapi_modules(); - public Xoapi_page Page() {return page;} private final Xoapi_page page = new Xoapi_page(); + public Xoapi_modules Modules() {return modules;} private final Xoapi_modules modules = new Xoapi_modules(); + public Xoapi_page Page() {return page;} private final Xoapi_page page = new Xoapi_page(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_modules)) return modules; else if (ctx.Match(k, Invk_page)) return page; diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_usr.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_usr.java index 25557d0fa..9fed5ce9a 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_usr.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_usr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.usrs.*; public class Xoapi_usr implements Gfo_invk { @@ -26,8 +26,8 @@ public class Xoapi_usr implements Gfo_invk { bookmarks.Init_by_kit(app); history.Init_by_kit(app); } - public Xoapi_bookmarks Bookmarks() {return bookmarks;} private final Xoapi_bookmarks bookmarks = new Xoapi_bookmarks(); - public Xoapi_history History() {return history;} private final Xoapi_history history = new Xoapi_history(); + public Xoapi_bookmarks Bookmarks() {return bookmarks;} private final Xoapi_bookmarks bookmarks = new Xoapi_bookmarks(); + public Xoapi_history History() {return history;} private final Xoapi_history history = new Xoapi_history(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_bookmarks)) return bookmarks; else if (ctx.Match(k, Invk_history)) return history; diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_xtns.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_xtns.java index 3825c0db4..f429d660b 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_xtns.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/Xoapi_xtns.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; -import gplx.xowa.apps.apis.xowa.xtns.*; -public class Xoapi_xtns implements Gfo_invk { - public void Init_by_kit(Xoae_app app) { - wikibase.Init_by_app(app); - } - public Xoapi_wikibase Wikibase() {return wikibase;} private final Xoapi_wikibase wikibase = new Xoapi_wikibase(); - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_wikibase)) return wikibase; - else return Gfo_invk_.Rv_unhandled; - } - private static final String Invk_wikibase = "wikibase"; -} +package gplx.xowa.apps.apis.xowa; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; +import gplx.xowa.apps.apis.xowa.xtns.*; +public class Xoapi_xtns implements Gfo_invk { + public void Init_by_kit(Xoae_app app) { + wikibase.Init_by_app(app); + } + public Xoapi_wikibase Wikibase() {return wikibase;} private final Xoapi_wikibase wikibase = new Xoapi_wikibase(); + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_wikibase)) return wikibase; + else return Gfo_invk_.Rv_unhandled; + } + private static final String Invk_wikibase = "wikibase"; +} diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_bldr.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_bldr.java index 6a59c2bc5..2ef8d0c48 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_bldr.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_bldr.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.apis.xowa.addons; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; -import gplx.xowa.apps.apis.xowa.addons.bldrs.*; -public class Xoapi_addon_bldr implements Gfo_invk { - public Xoapi_central_api Central() {return central;} private final Xoapi_central_api central = new Xoapi_central_api(); - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk__central)) return central; - else return Gfo_invk_.Rv_unhandled; - } - private static final String Invk__central = "central"; -} +package gplx.xowa.apps.apis.xowa.addons; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; +import gplx.xowa.apps.apis.xowa.addons.bldrs.*; +public class Xoapi_addon_bldr implements Gfo_invk { + public Xoapi_central_api Central() {return central;} private final Xoapi_central_api central = new Xoapi_central_api(); + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk__central)) return central; + else return Gfo_invk_.Rv_unhandled; + } + private static final String Invk__central = "central"; +} diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_search.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_search.java index 59320654d..49a081657 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_search.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/Xoapi_addon_search.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa.addons; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*; import gplx.xowa.apps.apis.xowa.addons.searchs.*; public class Xoapi_addon_search implements Gfo_invk { - @gplx.Internal protected Xoapi_search_box Search_box() {return search_box;} private final Xoapi_search_box search_box = new Xoapi_search_box(); + @gplx.Internal protected Xoapi_search_box Search_box() {return search_box;} private final Xoapi_search_box search_box = new Xoapi_search_box(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk__search_box)) return search_box; else return Gfo_invk_.Rv_unhandled; diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr.java index e4d8526b3..0c60c3055 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa.addons.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.apps.apis.xowa.addons.*; import gplx.xowa.apps.urls.*; public class Xopg_match_mgr { @@ -73,12 +73,12 @@ public class Xopg_match_mgr { } } class Xopg_match_wiki { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); private boolean wildcard_exists; public Xopg_match_wiki(byte[] domain_bry) { this.domain_bry = domain_bry; } - public byte[] Domain_bry() {return domain_bry;} private final byte[] domain_bry; + public byte[] Domain_bry() {return domain_bry;} private final byte[] domain_bry; public boolean Has(byte[] page_db) { return wildcard_exists ? true : hash.Has(page_db); } diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr__tst.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr__tst.java index d36fd60de..50f09b37e 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr__tst.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/addons/bldrs/Xopg_match_mgr__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.apis.xowa.addons.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.apps.apis.xowa.addons.*; import org.junit.*; import gplx.core.tests.*; public class Xopg_match_mgr__tst { - private final Xopg_match_mgr__fxt fxt = new Xopg_match_mgr__fxt(); + private final Xopg_match_mgr__fxt fxt = new Xopg_match_mgr__fxt(); @Before public void init() {fxt.Clear();} @Test public void Specific() { fxt.Init__set("en.w:A"); @@ -46,7 +46,7 @@ public class Xopg_match_mgr__tst { } } class Xopg_match_mgr__fxt { - private final Xopg_match_mgr match_mgr = new Xopg_match_mgr(); + private final Xopg_match_mgr match_mgr = new Xopg_match_mgr(); private Xowe_wiki wiki; public void Clear() { Xoae_app app = Xoa_app_fxt.Make__app__edit(); diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/bldrs/Xoapi_bldr_wiki.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/bldrs/Xoapi_bldr_wiki.java index f44b5dbd4..d7dd832f2 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/bldrs/Xoapi_bldr_wiki.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/bldrs/Xoapi_bldr_wiki.java @@ -1,28 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.xowa.apps.apis.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; -import gplx.xowa.apps.apis.xowa.bldrs.filters.*; -import gplx.xowa.apps.apis.xowa.bldrs.imports.*; -import gplx.xowa.apps.apis.xowa.bldrs.runners.*; +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.xowa.apps.apis.xowa.bldrs; +import gplx.GfoMsg; +import gplx.Gfo_invk; +import gplx.Gfo_invk_; +import gplx.GfsCtx; +import gplx.xowa.Xoa_app; +import gplx.xowa.apps.apis.xowa.bldrs.imports.Xoapi_import; +import gplx.xowa.apps.apis.xowa.bldrs.runners.Xoapi_runner; public class Xoapi_bldr_wiki implements Gfo_invk { public void Ctor_by_app(Xoa_app app) { runner.Ctor_by_app(app); } - public Xoapi_import Import() {return import_api;} private final Xoapi_import import_api = new Xoapi_import(); - public Xoapi_runner Runner() {return runner;} private final Xoapi_runner runner = new Xoapi_runner(); + public Xoapi_import Import() {return import_api;} private final Xoapi_import import_api = new Xoapi_import(); + public Xoapi_runner Runner() {return runner;} private final Xoapi_runner runner = new Xoapi_runner(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_import)) return import_api; else if (ctx.Match(k, Invk_runner)) return runner; diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/gui/pages/Xoapi_view.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/gui/pages/Xoapi_view.java index 2fd3ec547..46021af89 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/gui/pages/Xoapi_view.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/gui/pages/Xoapi_view.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa.gui.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.apps.apis.xowa.gui.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*; import gplx.xowa.wikis.pages.*; import gplx.langs.htmls.encoders.*; public class Xoapi_view implements Gfo_invk { private Xoae_app app; private Xog_win_itm win; - private final Gfo_url_encoder fsys_encoder = Gfo_url_encoder_.New__fsys_wnt().Make(); + private final Gfo_url_encoder fsys_encoder = Gfo_url_encoder_.New__fsys_wnt().Make(); public void Init_by_kit(Xoae_app app) { this.app = app; this.win = app.Gui_mgr().Browser_win(); } diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_page.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_page.java index c77fb5683..93675e5d3 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_page.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_page.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.apis.xowa.html; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; -public class Xoapi_page implements Gfo_invk { - public void Ctor_by_app(Xoae_app app) { - toggle_mgr.Ctor_by_app(app); - } - public void Init_by_app(Xoae_app app) {toggle_mgr.Init_by_app(app);} - public Xoapi_toggle_mgr Toggle_mgr() {return toggle_mgr;} private final Xoapi_toggle_mgr toggle_mgr = new Xoapi_toggle_mgr(); - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_toggles)) return toggle_mgr; - else return Gfo_invk_.Rv_unhandled; - } - private static final String Invk_toggles = "toggles"; -} +package gplx.xowa.apps.apis.xowa.html; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; +public class Xoapi_page implements Gfo_invk { + public void Ctor_by_app(Xoae_app app) { + toggle_mgr.Ctor_by_app(app); + } + public void Init_by_app(Xoae_app app) {toggle_mgr.Init_by_app(app);} + public Xoapi_toggle_mgr Toggle_mgr() {return toggle_mgr;} private final Xoapi_toggle_mgr toggle_mgr = new Xoapi_toggle_mgr(); + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_toggles)) return toggle_mgr; + else return Gfo_invk_.Rv_unhandled; + } + private static final String Invk_toggles = "toggles"; +} diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_itm.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_itm.java index 5a5dd16a2..485955994 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_itm.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_itm.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa.html; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.core.brys.fmtrs.*; public class Xoapi_toggle_itm { - private final Xoae_app app; // NOTE: needed to get "img_dir" below + private final Xoae_app app; // NOTE: needed to get "img_dir" below private byte[] img_title_val_y, img_title_val_n; public Xoapi_toggle_itm(Xoae_app app, byte[] key_bry) { this.app = app; this.key_bry = key_bry; } - public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; + public byte[] Key_bry() {return key_bry;} private final byte[] key_bry; public byte[] Heading_bry() {return heading_bry;} private byte[] heading_bry; public byte[] Icon_src() {return icon_src;} private byte[] icon_src = Bry_.Empty; public byte[] Icon_title() {return icon_title;} private byte[] icon_title = Bry_.Empty; @@ -82,7 +82,7 @@ public class Xoapi_toggle_itm { ; } private static byte[] Img_src_y, Img_src_n; // assume these are the same for all itms - private static final byte[] + private static final byte[] Img_title_msg_y = Bry_.new_a7("hide"), Img_title_msg_n = Bry_.new_a7("show") , Img_display_y = Bry_.new_a7("display:;"), Img_display_n = Bry_.new_a7("display:none;") ; diff --git a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_mgr.java b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_mgr.java index acdfd4643..4193742ad 100644 --- a/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/apis/xowa/html/Xoapi_toggle_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.apis.xowa.html; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.apis.*; import gplx.xowa.apps.apis.xowa.*; import gplx.xowa.apps.cfgs.*; public class Xoapi_toggle_mgr implements Gfo_invk { private Xoae_app app; - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public void Ctor_by_app(Xoae_app app) {this.app = app;} public void Init_by_app(Xoae_app app) { Io_url img_dir = app.Fsys_mgr().Bin_xowa_file_dir().GenSubDir_nest("app.general"); diff --git a/400_xowa/src/gplx/xowa/apps/boots/Xoa_cmd_arg_mgr.java b/400_xowa/src/gplx/xowa/apps/boots/Xoa_cmd_arg_mgr.java index fdbe2712f..134e8b53f 100644 --- a/400_xowa/src/gplx/xowa/apps/boots/Xoa_cmd_arg_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/boots/Xoa_cmd_arg_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.boots; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.core.consoles.*; import gplx.core.envs.*; import gplx.xowa.apps.*; public class Xoa_cmd_arg_mgr { Xoa_cmd_arg_mgr(Gfo_cmd_arg_mgr arg_mgr) {this.arg_mgr = arg_mgr;} - public Gfo_cmd_arg_mgr Arg_mgr() {return arg_mgr;} private final Gfo_cmd_arg_mgr arg_mgr; + public Gfo_cmd_arg_mgr Arg_mgr() {return arg_mgr;} private final Gfo_cmd_arg_mgr arg_mgr; public Xoa_app_mode App_type() {return app_type;} private Xoa_app_mode app_type; public Io_url Fsys__root_dir() {return fsys__root_dir;} private Io_url fsys__root_dir; public String Fsys__bin_dir() {return fsys__bin_dir;} private String fsys__bin_dir; @@ -87,7 +87,7 @@ public class Xoa_cmd_arg_mgr { ); return new Xoa_cmd_arg_mgr(arg_mgr); } - private static final String User_name_default = gplx.xowa.users.Xoue_user.Key_xowa_user; + private static final String User_name_default = gplx.xowa.users.Xoue_user.Key_xowa_user; public static String Bin_dir_name() { String rv = ""; Op_sys op_sys = Op_sys.Cur(); diff --git a/400_xowa/src/gplx/xowa/apps/cfgs/Xowc_xtn_pages.java b/400_xowa/src/gplx/xowa/apps/cfgs/Xowc_xtn_pages.java index bb4dda1e3..8d9178d66 100644 --- a/400_xowa/src/gplx/xowa/apps/cfgs/Xowc_xtn_pages.java +++ b/400_xowa/src/gplx/xowa/apps/cfgs/Xowc_xtn_pages.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.nss.*; public class Xowc_xtn_pages implements Gfo_invk { @@ -70,10 +70,10 @@ public class Xowc_xtn_pages implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } private static final String Invk_ns_names_ = "ns_names_"; - public static final byte[] Xtn_key = Bry_.new_a7("pages"); + public static final byte[] Xtn_key = Bry_.new_a7("pages"); public static final int Ns_index_id_default = 102, Ns_page_id_default = 104; - private static final byte[] + private static final byte[] Default_ns_page_name = Bry_.new_a7("Page") , Default_ns_page_talk_name = Bry_.new_a7("Page_talk") , Default_ns_index_name = Bry_.new_a7("Index") diff --git a/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java index 1d139d303..8fe3d1cc2 100644 --- a/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.core.brys.fmtrs.*; public class Xoa_fmtr_itm implements Gfo_invk { @@ -46,10 +46,10 @@ public class Xoa_fmtr_itm implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } - private static final String Invk_src = "src", Invk_src_ = "src_", Invk_fmt = "fmt", Invk_fmt_ = "fmt_" + private static final String Invk_src = "src", Invk_src_ = "src_", Invk_fmt = "fmt", Invk_fmt_ = "fmt_" , Invk_run = "run" ; - public static final String Invk_get_at = "get_at", Invk_len = "len" + public static final String Invk_get_at = "get_at", Invk_len = "len" , Invk_sorter = "sorter" ; } diff --git a/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java index 9d51932de..6082145ec 100644 --- a/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/fmtrs/Xoa_fmtr_mgr.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; -import gplx.core.ios.*; -public class Xoa_fmtr_mgr implements Gfo_invk { - public Xoa_fmtr_mgr(Xoae_app app) {this.app = app;} private Xoae_app app; - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_new_grp)) return new Xoa_fmtr_itm(app); - else return Gfo_invk_.Rv_unhandled; - } private static final String Invk_new_grp = "new_grp"; -} +package gplx.xowa.apps.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; +import gplx.core.ios.*; +public class Xoa_fmtr_mgr implements Gfo_invk { + public Xoa_fmtr_mgr(Xoae_app app) {this.app = app;} private Xoae_app app; + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_new_grp)) return new Xoa_fmtr_itm(app); + else return Gfo_invk_.Rv_unhandled; + } private static final String Invk_new_grp = "new_grp"; +} diff --git a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java index e8dbbc83b..fd774e82b 100644 --- a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_fsys_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.fsys; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.gfs.*; import gplx.xowa.wikis.domains.*; @@ -32,32 +32,32 @@ public class Xoa_fsys_mgr implements Gfo_invk { this.home_wiki_dir = bin_xowa_dir.GenSubDir_nest("wiki", Xow_domain_itm_.Str__home); this.url_finder = new Xoa_url_finder(this); } - public Io_url Root_dir() {return root_dir;} private final Io_url root_dir; // EX: /xowa/ - public Io_url Wiki_dir() {return wiki_dir;} private final Io_url wiki_dir; // EX: /xowa/wiki/ - public Io_url File_dir() {return file_dir;} private final Io_url file_dir; // EX: /xowa/file/ - public Io_url Css_dir() {return css_dir;} private final Io_url css_dir; // EX: /xowa/user/anonymous/wiki/ - public Io_url Bin_plat_dir() {return bin_plat_dir;} private final Io_url bin_plat_dir; // EX: /xowa/bin/lnx_64/ - public Io_url Bin_any_dir() {return bin_any_dir;} private final Io_url bin_any_dir; // EX: /xowa/bin/any/ - public Io_url Bin_xowa_dir() {return bin_xowa_dir;} private final Io_url bin_xowa_dir; // EX: /xowa/bin/any/xowa/ - public Io_url Bin_xowa_file_dir() {return bin_xowa_file_dir;} private final Io_url bin_xowa_file_dir; - public Io_url Bin_xtns_dir() {return bin_xtns_dir;} private final Io_url bin_xtns_dir; - public Io_url Bin_addon_dir() {return bin_addon_dir;} private final Io_url bin_addon_dir; // EX: /xowa/bin/any/xowa/xtns/ - public Io_url Cfg_lang_core_dir() {return cfg_lang_core_dir;} private final Io_url cfg_lang_core_dir; - public Io_url Cfg_wiki_core_dir() {return cfg_wiki_core_dir;} private final Io_url cfg_wiki_core_dir; - public Io_url Cfg_site_meta_fil() {return cfg_site_meta_fil;} private final Io_url cfg_site_meta_fil; + public Io_url Root_dir() {return root_dir;} private final Io_url root_dir; // EX: /xowa/ + public Io_url Wiki_dir() {return wiki_dir;} private final Io_url wiki_dir; // EX: /xowa/wiki/ + public Io_url File_dir() {return file_dir;} private final Io_url file_dir; // EX: /xowa/file/ + public Io_url Css_dir() {return css_dir;} private final Io_url css_dir; // EX: /xowa/user/anonymous/wiki/ + public Io_url Bin_plat_dir() {return bin_plat_dir;} private final Io_url bin_plat_dir; // EX: /xowa/bin/lnx_64/ + public Io_url Bin_any_dir() {return bin_any_dir;} private final Io_url bin_any_dir; // EX: /xowa/bin/any/ + public Io_url Bin_xowa_dir() {return bin_xowa_dir;} private final Io_url bin_xowa_dir; // EX: /xowa/bin/any/xowa/ + public Io_url Bin_xowa_file_dir() {return bin_xowa_file_dir;} private final Io_url bin_xowa_file_dir; + public Io_url Bin_xtns_dir() {return bin_xtns_dir;} private final Io_url bin_xtns_dir; + public Io_url Bin_addon_dir() {return bin_addon_dir;} private final Io_url bin_addon_dir; // EX: /xowa/bin/any/xowa/xtns/ + public Io_url Cfg_lang_core_dir() {return cfg_lang_core_dir;} private final Io_url cfg_lang_core_dir; + public Io_url Cfg_wiki_core_dir() {return cfg_wiki_core_dir;} private final Io_url cfg_wiki_core_dir; + public Io_url Cfg_site_meta_fil() {return cfg_site_meta_fil;} private final Io_url cfg_site_meta_fil; public Io_url Wiki_css_dir(String wiki) {return css_dir.GenSubDir_nest(wiki, "html");} // EX: /xowa/temp/simple.wikipedia.org/html/xowa_common.css public Io_url Wiki_file_dir(String wiki) {return file_dir.GenSubDir_nest(wiki);} // EX: /xowa/temp/simple.wikipedia.org/orig/ - public Io_url Home_wiki_dir() {return home_wiki_dir;} private final Io_url home_wiki_dir; - public Io_url Cfg_app_fil() {return cfg_app_fil;} private final Io_url cfg_app_fil; - public Io_url Http_root() {return http_root;} private final Io_url http_root; // EX: file:///xowa/ or file:///android_asset/xowa/ - public Xoa_url_finder Url_finder() {return url_finder;} private final Xoa_url_finder url_finder; + public Io_url Home_wiki_dir() {return home_wiki_dir;} private final Io_url home_wiki_dir; + public Io_url Cfg_app_fil() {return cfg_app_fil;} private final Io_url cfg_app_fil; + public Io_url Http_root() {return http_root;} private final Io_url http_root; // EX: file:///xowa/ or file:///android_asset/xowa/ + public Xoa_url_finder Url_finder() {return url_finder;} private final Xoa_url_finder url_finder; public void Init_by_app(Gfo_invk app_mgr_invk) {this.app_mgr_invk = app_mgr_invk;} private Gfo_invk app_mgr_invk; // for gfs and app.launcher public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_apps)) return app_mgr_invk; else if (ctx.Match(k, Invk_root_dir)) return root_dir; else return Gfo_invk_.Rv_unhandled; } - private static final String Invk_apps = "apps", Invk_root_dir = "root_dir"; + private static final String Invk_apps = "apps", Invk_root_dir = "root_dir"; public static Xoa_fsys_mgr New_by_plat(String plat_name, Io_url root_dir) { // TEST: return new Xoa_fsys_mgr(plat_name, root_dir, root_dir.GenSubDir("wiki"), root_dir.GenSubDir("file"), root_dir.GenSubDir("css"), root_dir.GenSubDir("html")); } diff --git a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder.java b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder.java index 50f4f9bd0..74d8273d1 100644 --- a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder.java +++ b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.fsys; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.users.*; public class Xoa_url_finder { - private final Xoa_fsys_mgr app_fsys_mgr; + private final Xoa_fsys_mgr app_fsys_mgr; private Xou_fsys_mgr usr_fsys_mgr; public Xoa_url_finder(Xoa_fsys_mgr app_fsys_mgr) { this.app_fsys_mgr = app_fsys_mgr; diff --git a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder_tst.java b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder_tst.java index 489fb279f..0567f8c58 100644 --- a/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder_tst.java +++ b/400_xowa/src/gplx/xowa/apps/fsys/Xoa_url_finder_tst.java @@ -17,7 +17,7 @@ package gplx.xowa.apps.fsys; import gplx.*; import gplx.xowa.*; import gplx.xowa import org.junit.*; import gplx.core.tests.*; import gplx.xowa.users.*; public class Xoa_url_finder_tst { - private final Xoa_url_finder_fxt fxt = new Xoa_url_finder_fxt(); + private final Xoa_url_finder_fxt fxt = new Xoa_url_finder_fxt(); @Test public void Find_by_css_or_null() { // init String wiki = "en.wikipedia.org"; @@ -46,7 +46,7 @@ public class Xoa_url_finder_tst { } } class Xoa_url_finder_fxt { - private final Xoa_url_finder finder; + private final Xoa_url_finder finder; public Xoa_url_finder_fxt() { Io_url root_dir = Io_url_.mem_dir_("mem/xowa/"); Xoa_fsys_mgr app_fsys_mgr = Xoa_fsys_mgr.New_by_plat("lnx", root_dir); diff --git a/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_gfs__tst.java b/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_gfs__tst.java index fc7a0f1ad..7c0783792 100644 --- a/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_gfs__tst.java +++ b/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_gfs__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.gfs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Gfs_php_converter__to_gfs__tst { - @Before public void init() {fxt.Clear();} private final Gfs_php_converter_fxt fxt = new Gfs_php_converter_fxt(); + @Before public void init() {fxt.Clear();} private final Gfs_php_converter_fxt fxt = new Gfs_php_converter_fxt(); @Test public void Escape_sequences() { fxt.Test__to_gfs("a\\\"b" , "a\"b"); fxt.Test__to_gfs("a\\'b" , "a'b"); @@ -38,7 +38,7 @@ public class Gfs_php_converter__to_gfs__tst { } } class Gfs_php_converter_fxt { - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Clear() {} public void Test__to_gfs(String raw, String expd) { byte[] actl = Gfs_php_converter.To_gfs(bfr, Bry_.new_u8(raw)); diff --git a/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_php__tst.java b/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_php__tst.java index 9ec1fca85..3c3a7f805 100644 --- a/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_php__tst.java +++ b/400_xowa/src/gplx/xowa/apps/gfs/Gfs_php_converter__to_php__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.gfs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Gfs_php_converter__to_php__tst { - @Before public void init() {fxt.Clear();} private final Gfs_php_converter_fxt fxt = new Gfs_php_converter_fxt(); + @Before public void init() {fxt.Clear();} private final Gfs_php_converter_fxt fxt = new Gfs_php_converter_fxt(); @Test public void Xto_php() { fxt.Test_Xto_php_escape_y("a~{0}b" , "a$1b"); // tilde.arg.one fxt.Test_Xto_php_escape_y("a~{0}b~{1}c~{2}d" , "a$1b$2c$3d"); // tilde.arg.many diff --git a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_bldr.java b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_bldr.java index 7bdc39eb0..a9d156557 100644 --- a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_bldr.java +++ b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_bldr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.gfs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_gfs_bldr { public Bry_bfr Bfr() {return bfr;} private Bry_bfr bfr = Bry_bfr_.New(); @@ -69,7 +69,7 @@ public class Xoa_gfs_bldr { bfr.Add(Bry_semic_nl); return this; } - private static final byte[] Bry_eq = Bry_.new_a7(" = "), Bry_semic_nl = Bry_.new_a7(";\n"); + private static final byte[] Bry_eq = Bry_.new_a7(" = "), Bry_semic_nl = Bry_.new_a7(";\n"); private void Add_str_escape_apos(Bry_bfr bfr, byte[] src) { int len = src.length; for (int i = 0; i < len; i++) { @@ -80,7 +80,7 @@ public class Xoa_gfs_bldr { bfr.Add_byte(b); } } - public static final byte[] + public static final byte[] Bry_xquote_bgn = Bry_.new_a7("<:['\n") , Bry_xquote_end = Bry_.new_a7("']:>\n") ; diff --git a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_mgr.java b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_mgr.java index 1af28a217..e850c3694 100644 --- a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_mgr.java @@ -29,17 +29,17 @@ import gplx.xowa.Xoae_app; import gplx.xowa.apps.Xoa_app_eval; import gplx.xowa.apps.fsys.Xoa_fsys_mgr; public class Xoa_gfs_mgr implements Gfo_invk, Gfo_invk_root_wkr { - private final String user_name; + private final String user_name; public Xoa_gfs_mgr(String user_name, Gfo_invk root_invk, Xoa_fsys_mgr app_fsys_mgr) { this.user_name = user_name; this.root_invk = root_invk; this.app_fsys_mgr = app_fsys_mgr; GfsCore.Instance.AddCmd(root_invk, Xoae_app.Invk_app); GfsCore.Instance.AddCmd(root_invk, Xoae_app.Invk_xowa); } - public Gfo_invk Root_invk() {return root_invk;} private final Gfo_invk root_invk; - public Xoa_fsys_mgr App_fsys_mgr() {return app_fsys_mgr;} private final Xoa_fsys_mgr app_fsys_mgr; - public Xoa_app_eval Eval_mgr() {return eval_mgr;} private final Xoa_app_eval eval_mgr = new Xoa_app_eval(); - public Gfs_wtr Wtr() {return wtr;} private final Gfs_wtr wtr = new Gfs_wtr(); + public Gfo_invk Root_invk() {return root_invk;} private final Gfo_invk root_invk; + public Xoa_fsys_mgr App_fsys_mgr() {return app_fsys_mgr;} private final Xoa_fsys_mgr app_fsys_mgr; + public Xoa_app_eval Eval_mgr() {return eval_mgr;} private final Xoa_app_eval eval_mgr = new Xoa_app_eval(); + public Gfs_wtr Wtr() {return wtr;} private final Gfs_wtr wtr = new Gfs_wtr(); public void Run_url(Io_url url) { Run_url_for(GfsCore.Instance.Root(), url); Gfo_usr_dlg_.Instance.Log_wkr().Log_to_session_fmt("gfs.done: ~{0}", url.Raw()); diff --git a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_wtr_.java b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_wtr_.java index bb627e993..b5e7d357a 100644 --- a/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_wtr_.java +++ b/400_xowa/src/gplx/xowa/apps/gfs/Xoa_gfs_wtr_.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.gfs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_gfs_wtr_ { public static byte[] Escape(String v) {return Escape(Bry_.new_u8(v));} public static byte[] Escape(byte[] v) { return Bry_find_.Find_fwd(v, Byte_ascii.Apos) == Bry_find_.Not_found ? v : Bry_.Replace(v, Byte_ascii.Apos_bry, Bry__apos_escaped); - } private static final byte[] Bry__apos_escaped = Bry_.new_a7("''"); + } private static final byte[] Bry__apos_escaped = Bry_.new_a7("''"); public static void Write_prop(Bry_bfr bfr, byte[] prop, byte[] val) { bfr.Add(prop).Add(Bry__val_bgn).Add(Xoa_gfs_wtr_.Escape(val)).Add(Bry__val_end); // EX: "a_('b');\n" - } private static final byte[] Bry__val_bgn = Bry_.new_a7("_('"), Bry__val_end = Bry_.new_a7("');\n"); + } private static final byte[] Bry__val_bgn = Bry_.new_a7("_('"), Bry__val_end = Bry_.new_a7("');\n"); public static String Write_func_chain(String... ary) { // EX: "a.b.c" Bry_bfr bfr = Bry_bfr_.New(); try { diff --git a/400_xowa/src/gplx/xowa/apps/kvs/Xoa_kv_hash.java b/400_xowa/src/gplx/xowa/apps/kvs/Xoa_kv_hash.java index 5d6c29d7c..842f0c2c4 100644 --- a/400_xowa/src/gplx/xowa/apps/kvs/Xoa_kv_hash.java +++ b/400_xowa/src/gplx/xowa/apps/kvs/Xoa_kv_hash.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.kvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_kv_hash { - private final Hash_adp hash = Hash_adp_.New(); + private final Hash_adp hash = Hash_adp_.New(); public Object Get_or_make(Xoa_kv_itm itm) { String key = itm.Kv__key(); Object val = hash.Get_by(key); diff --git a/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java b/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java index 3b01d79c7..04b7f1edb 100644 --- a/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/metas/Xoa_meta_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.bldrs.wms.sites.*; public class Xoa_meta_mgr { - private final Xoa_app app; - private final Hash_adp_bry ns__hash = Hash_adp_bry.cs(); + private final Xoa_app app; + private final Hash_adp_bry ns__hash = Hash_adp_bry.cs(); private Site_core_db core_db; public Xoa_meta_mgr(Xoa_app app) { this.app = app; diff --git a/400_xowa/src/gplx/xowa/apps/servers/Gxw_html_server.java b/400_xowa/src/gplx/xowa/apps/servers/Gxw_html_server.java index c1a556987..ff11e11f9 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/Gxw_html_server.java +++ b/400_xowa/src/gplx/xowa/apps/servers/Gxw_html_server.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.core.primitives.*; import gplx.core.js.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.gxws.*; @@ -20,7 +20,7 @@ import gplx.xowa.apps.servers.tcp.*; import gplx.xowa.apps.servers.http.*; import gplx.xowa.guis.views.*; public class Gxw_html_server implements Gxw_html { private Xosrv_socket_wtr wtr; private Gfo_usr_dlg usr_dlg; - private final Js_wtr js_wtr = new Js_wtr(); + private final Js_wtr js_wtr = new Js_wtr(); public Gxw_html_server(Gfo_usr_dlg usr_dlg, Xosrv_socket_wtr wtr) { this.usr_dlg = usr_dlg; this.wtr = wtr; } diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_file_utl.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_file_utl.java index 392cfb4df..7e963d44c 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_file_utl.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_file_utl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.xowa.files.*; class Http_file_utl { @@ -24,13 +24,13 @@ class Http_file_utl { Object o = mime_hash.Get_by_mid(ext_bry, bgn, end); return o == null ? Mime_octet_stream : (byte[])o; } - private static final byte[] + private static final byte[] Mime_octet_stream = Xof_ext_.Mime_type__ary[Xof_ext_.Id_unknown] , Mime_html = Bry_.new_a7("text/html") , Mime_css = Bry_.new_a7("text/css") , Mime_js = Bry_.new_a7("application/javascript") ; - private static final Hash_adp_bry mime_hash = Mime_hash__new(); + private static final Hash_adp_bry mime_hash = Mime_hash__new(); private static Hash_adp_bry Mime_hash__new() { Hash_adp_bry rv = Hash_adp_bry.ci_a7(); int len = Xof_ext_.Id__max; diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_mgr.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_mgr.java index e2261fb55..5a8f2087d 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ /* This file is part of XOWA: the XOWA Offline Wiki Application Copyright (C) 2013 matthiasjasny@gmail.com; gnosygnu@gmail.com @@ -34,9 +34,9 @@ import gplx.langs.jsons.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.addons.wikis.searchs.gui.htmlbars.*; public class Http_server_mgr implements Gfo_invk { - private final Object thread_lock = new Object(); - private final Gfo_usr_dlg usr_dlg; - private final Http_server_socket wkr; + private final Object thread_lock = new Object(); + private final Gfo_usr_dlg usr_dlg; + private final Http_server_socket wkr; private byte retrieve_mode = File_retrieve_mode.Mode_wait; private boolean running = true; public Http_server_mgr(Xoae_app app) { @@ -45,10 +45,10 @@ public class Http_server_mgr implements Gfo_invk { this.usr_dlg = app.Usr_dlg(); this.request_parser = new Http_request_parser(server_wtr, false); } - public Xoae_app App() {return app;} private final Xoae_app app; - public Http_server_wtr Server_wtr() {return server_wtr;} private final Http_server_wtr server_wtr = Http_server_wtr_.New__console(); - public Http_request_parser Request_parser() {return request_parser;} private final Http_request_parser request_parser; - public Gfo_url_encoder Encoder() {return encoder;} private final Gfo_url_encoder encoder = Gfo_url_encoder_.New__http_url().Make(); + public Xoae_app App() {return app;} private final Xoae_app app; + public Http_server_wtr Server_wtr() {return server_wtr;} private final Http_server_wtr server_wtr = Http_server_wtr_.New__console(); + public Http_request_parser Request_parser() {return request_parser;} private final Http_request_parser request_parser; + public Gfo_url_encoder Encoder() {return encoder;} private final Gfo_url_encoder encoder = Gfo_url_encoder_.New__http_url().Make(); public int Port() {return port;} public Http_server_mgr Port_(int v, boolean caller_is_cfg) { if ( caller_is_cfg @@ -59,8 +59,8 @@ public class Http_server_mgr implements Gfo_invk { port = v; return this; } private int port = Port__default; - public Http_server_wkr_pool Wkr_pool() {return wkr_pool;} private final Http_server_wkr_pool wkr_pool = new Http_server_wkr_pool(); - public Int_pool Uid_pool() {return uid_pool;} private final Int_pool uid_pool = new Int_pool(); + public Http_server_wkr_pool Wkr_pool() {return wkr_pool;} private final Http_server_wkr_pool wkr_pool = new Http_server_wkr_pool(); + public Int_pool Uid_pool() {return uid_pool;} private final Int_pool uid_pool = new Int_pool(); public byte[] Home() {return home;} public void Home_(byte[] v) {home = Bry_.Add(Byte_ascii.Slash_bry, v);} private byte[] home = Bry_.new_a7("/home/wiki/Main_Page"); private void Running_(boolean val) { if (val) { diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page.java index c0a3cdcf5..d27de2e9b 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page.java @@ -32,7 +32,7 @@ import gplx.xowa.specials.Xow_special_meta_; import gplx.xowa.specials.xowa.errors.Xoerror_special; public class Http_server_page { - private final Xoae_app app; + private final Xoae_app app; public Http_server_page(Xoae_app app) { this.app = app; } diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page__tst.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page__tst.java index 5b968244a..69af9a210 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page__tst.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_page__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import org.junit.*; import gplx.core.tests.*; public class Http_server_page__tst { - private final Http_server_page__fxt fxt = new Http_server_page__fxt(); + private final Http_server_page__fxt fxt = new Http_server_page__fxt(); @Test public void Xwiki() { fxt.Init__xwiki("en.wikipedia.org", "it", "it.wikipedia.org"); fxt.Test__make_url(false, "en.wikipedia.org", "it:Roma", ""); @@ -24,8 +24,8 @@ public class Http_server_page__tst { } } class Http_server_page__fxt { - private final Xop_fxt fxt; - private final Http_server_page page; + private final Xop_fxt fxt; + private final Http_server_page page; public Http_server_page__fxt() { this.fxt = new Xop_fxt(); this.page = new Http_server_page(fxt.App()); diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_socket.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_socket.java index ba76bb792..11ff17e15 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_socket.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_socket.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.net.*; import gplx.core.threads.*; import gplx.core.primitives.*; class Http_server_socket implements Gfo_invk { - private final Http_server_mgr server_mgr; + private final Http_server_mgr server_mgr; private Server_socket_adp server_socket; public Http_server_socket(Http_server_mgr server_mgr) {this.server_mgr = server_mgr;} public boolean Canceled() {return canceled;} diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr.java index 361b6c08a..235c1a317 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.core.primitives.*; import gplx.core.net.*; import gplx.langs.htmls.encoders.*; @@ -20,17 +20,17 @@ import gplx.xowa.apps.*; import gplx.xowa.htmls.js.*; import gplx.xowa.wikis.pages.*; public class Http_server_wkr implements Gfo_invk { - private final int uid; - private final Http_server_mgr server_mgr; - private final Http_server_wtr server_wtr; - private final Http_client_wtr client_wtr = Http_client_wtr_.new_stream(); - private final Http_client_rdr client_rdr = Http_client_rdr_.new_stream(); - private final Http_request_parser request_parser; - private final Gfo_url_encoder url_encoder; - private final Xoae_app app; - private final String root_dir_http; - private final byte[] root_dir_fsys; - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(64); + private final int uid; + private final Http_server_mgr server_mgr; + private final Http_server_wtr server_wtr; + private final Http_client_wtr client_wtr = Http_client_wtr_.new_stream(); + private final Http_client_rdr client_rdr = Http_client_rdr_.new_stream(); + private final Http_request_parser request_parser; + private final Gfo_url_encoder url_encoder; + private final Xoae_app app; + private final String root_dir_http; + private final byte[] root_dir_fsys; + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(64); private Socket_adp socket; private Http_data__client data__client; public Http_server_wkr(Http_server_mgr server_mgr, int uid){ @@ -136,9 +136,9 @@ public class Http_server_wkr implements Gfo_invk { rv = Convert_page(rv, root_dir_http , "<>"); Xosrv_http_wkr_.Write_response_as_html(client_wtr, app_mode_itm.Tid() == Xoa_app_mode.Itm_file.Tid(), rv); } - private static final byte[] Key__msg = Bry_.new_a7("msg"), Key__app_mode = Bry_.new_a7("app_mode"); + private static final byte[] Key__msg = Bry_.new_a7("msg"), Key__app_mode = Bry_.new_a7("app_mode"); private static final int Tid_post_url_json = 1, Tid_post_url_gfs = 2; - private static final Hash_adp_bry post_url_hash = Hash_adp_bry.ci_a7() + private static final Hash_adp_bry post_url_hash = Hash_adp_bry.ci_a7() .Add_str_int("/exec/json" , Tid_post_url_json) .Add_str_int("/exec/gfs" , Tid_post_url_gfs) ; @@ -156,14 +156,14 @@ public class Http_server_wkr implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } public static final String Invk_run = "run"; - private static final byte[] + private static final byte[] Url__home = Bry_.new_a7("/") , Url__exec = Bry_.new_a7("/exec/"), Url__exec_2 = Bry_.new_a7("/xowa-cmd:") ; - public static final byte[] + public static final byte[] Url__fsys = Bry_.new_a7("/fsys/") ; - private static final int Url__fsys_len = Url__fsys.length; + private static final int Url__fsys_len = Url__fsys.length; } class Xosrv_http_wkr_ { public static void Write_response_as_html(Http_client_wtr client_wtr, boolean cross_domain, String html) {Write_response_as_html(client_wtr, cross_domain, Bry_.new_u8(html));} @@ -200,7 +200,7 @@ class Xosrv_http_wkr_ { client_wtr.Rls(); } } - public static final byte[] + public static final byte[] Rsp__http_ok = Bry_.new_a7("HTTP/1.1 200 OK:\n") , Rsp__content_type_html = Bry_.new_a7("Content-Type: text/html; charset=utf-8\n") , Rsp__http_redirect = Bry_.new_a7("HTTP/1.1 302 Found:\n") diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack_.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack_.java index c6706f0d0..19ea7a884 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack_.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack_.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.btries.*; class Http_server_wkr_fsys_hack_ { - private static final byte[] + private static final byte[] Bry__file_lhs = Bry_.new_a7("file:///") , Bry__file_fsys = Bry_.new_a7("/fsys") ; - private static final Btrie_slim_mgr xowa_path_segment_trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr xowa_path_segment_trie = Btrie_slim_mgr.ci_a7() .Add_many_str ( "/file/" // most files EX: file:////home/lnxusr/xowa/file/en.wikipedia.org/7/0/A.png , "/user/anonymous/" // wiki css; EX: url(file:///c:/xowa/user/anonymous/wiki/www.wikidata.org/html/logo.png) diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack__tst.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack__tst.java index 608002012..6fe64a68b 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack__tst.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_fsys_hack__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import org.junit.*; import gplx.core.tests.*; public class Http_server_wkr_fsys_hack__tst { - private final Http_server_wkr_fsys_hack__fxt fxt = new Http_server_wkr_fsys_hack__fxt(); + private final Http_server_wkr_fsys_hack__fxt fxt = new Http_server_wkr_fsys_hack__fxt(); @Test public void File_bgn_missing() { // "file:" missing fxt.Test__Replace_fsys_hack("src='file////home/lnxusr/xowa/file/'"); } diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_pool.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_pool.java index bb9e6ea0e..ad4fd035c 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_pool.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_server_wkr_pool.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.primitives.*; public class Http_server_wkr_pool { - private final Ordered_hash hash = Ordered_hash_.New(); private final Int_obj_ref hash_key = Int_obj_ref.New_neg1(); + private final Ordered_hash hash = Ordered_hash_.New(); private final Int_obj_ref hash_key = Int_obj_ref.New_neg1(); public boolean Enabled() {return max != 0;} public int Max() {return max;} private int max; public int Timeout() {return timeout;} private int timeout; diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser.java index 93a83fc78..dec7d8a53 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.langs.htmls.encoders.*; @@ -134,12 +134,12 @@ class Http_url_parser { , Tid__popup_id = 2 , Tid__popup_mode = 3 ; - private static final byte[] + private static final byte[] Qarg__action__popup = Bry_.new_a7("popup") , Qarg__popup_id = Bry_.new_a7("popup_id") , Qarg__popup_mode = Bry_.new_a7("popup_mode") ; - private static final Hash_adp_bry qarg_keys = Hash_adp_bry.ci_a7() + private static final Hash_adp_bry qarg_keys = Hash_adp_bry.ci_a7() .Add_bry_int(Xoa_url_.Qarg__action, Tid__action) .Add_bry_int(Qarg__popup_id , Tid__popup_id) .Add_bry_int(Qarg__popup_mode , Tid__popup_mode) diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser_tst.java b/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser_tst.java index aa67fcfee..4e31d620d 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser_tst.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/Http_url_parser_tst.java @@ -18,7 +18,7 @@ import org.junit.*; import gplx.core.tests.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.wikis.pages.*; public class Http_url_parser_tst { - private final Http_url_parser_fxt fxt = new Http_url_parser_fxt(); + private final Http_url_parser_fxt fxt = new Http_url_parser_fxt(); @Test public void Parse() { // wiki-only fxt.Test__parse("/en.wikipedia.org", fxt.Make().Wiki_("en.wikipedia.org")); diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server.java b/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server.java index eda9f7d53..235d38d46 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.http.hdocs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.xowa.apps.servers.http.*; import gplx.core.btries.*; import gplx.core.primitives.*; import gplx.core.net.*; import gplx.langs.htmls.docs.*; import gplx.xowa.htmls.hrefs.*; @@ -121,8 +121,8 @@ class Xoh_hdoc_wkr__http_server implements Xoh_hdoc_wkr { // add everything after href bfr.Add_mid(src, href_end, itm_end); } - public static final byte[] Path_lnxusr_xowa_file = Bry_.new_a7("file:////home/lnxusr/xowa/file/"); - private static final byte[] Bry__site = Bry_.new_a7("/site"); + public static final byte[] Path_lnxusr_xowa_file = Bry_.new_a7("file:////home/lnxusr/xowa/file/"); + private static final byte[] Bry__site = Bry_.new_a7("/site"); private static final byte Tid__wiki = 1 , Tid__xcmd = 2 @@ -130,7 +130,7 @@ class Xoh_hdoc_wkr__http_server implements Xoh_hdoc_wkr { , Tid__fsys = 4 , Tid__fsys_bug = 5 ; - private static final Btrie_slim_mgr href_trie = Btrie_slim_mgr.ci_u8() + private static final Btrie_slim_mgr href_trie = Btrie_slim_mgr.ci_u8() .Add_bry_byte(Xoh_href_.Bry__wiki , Tid__wiki) .Add_bry_byte(Gfo_protocol_itm.Bry_xcmd , Tid__xcmd) .Add_bry_byte(Bry__site , Tid__site) diff --git a/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server__tst.java b/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server__tst.java index 9c437fc2d..6167e30f3 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server__tst.java +++ b/400_xowa/src/gplx/xowa/apps/servers/http/hdocs/Xoh_hdoc_wkr__http_server__tst.java @@ -18,7 +18,7 @@ import org.junit.*; import gplx.core.tests.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.makes.*; public class Xoh_hdoc_wkr__http_server__tst { - private final Xoh_hdoc_wkr__http_server__fxt fxt = new Xoh_hdoc_wkr__http_server__fxt(); + private final Xoh_hdoc_wkr__http_server__fxt fxt = new Xoh_hdoc_wkr__http_server__fxt(); @Before public void init() {Gfo_usr_dlg_.Instance = Gfo_usr_dlg_.Test_console();} @After public void term() {Gfo_usr_dlg_.Instance = Gfo_usr_dlg_.Noop;} @Test public void Wiki_quot() { @@ -171,9 +171,9 @@ public class Xoh_hdoc_wkr__http_server__tst { } } class Xoh_hdoc_wkr__http_server__fxt { - private final Xow_wiki wiki; - private final Xoh_page hpg; - private final Xoh_make_mgr hdoc_mgr = Xoh_make_mgr.New(new Xoh_hdoc_wkr__http_server()); + private final Xow_wiki wiki; + private final Xoh_page hpg; + private final Xoh_make_mgr hdoc_mgr = Xoh_make_mgr.New(new Xoh_hdoc_wkr__http_server()); public Xoh_hdoc_wkr__http_server__fxt() { Xop_fxt fxt = Xop_fxt.New_app_html(); this.wiki = fxt.Wiki(); diff --git a/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_server.java b/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_server.java index f73557da8..0b589f37f 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_server.java +++ b/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_server.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.tcp; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.primitives.*; import gplx.core.ios.*; import gplx.core.envs.*; import gplx.core.threads.*; import gplx.gfui.controls.standards.*; @@ -79,7 +79,7 @@ public class Xosrv_server implements Gfo_invk { trace.Val_("json_write: " + Object_.Xto_str_strict_or_null_mark(rv_obj)); return json_wtr.Write_root(Bry_xowa_js_result, rv_obj).Bld_as_str(); } catch (Exception e) {throw Err_.new_exc(e, "http", "exec_js error", "trace", trace, "msg", msg_text);} - } private Xosrv_xowa_exec_parser xowa_exec_parser = new Xosrv_xowa_exec_parser(); private Json_doc_srl json_wtr = new Json_doc_srl(); private static final byte[] Bry_xowa_js_result = Bry_.new_a7("xowa_js_result"); + } private Xosrv_xowa_exec_parser xowa_exec_parser = new Xosrv_xowa_exec_parser(); private Json_doc_srl json_wtr = new Json_doc_srl(); private static final byte[] Bry_xowa_js_result = Bry_.new_a7("xowa_js_result"); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_rdr_port)) return rdr_port; else if (ctx.Match(k, Invk_rdr_port_)) rdr_port = m.ReadInt("v"); @@ -93,7 +93,7 @@ public class Xosrv_server implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } - public static final String Invk_stop = "stop", Invk_rdr_port = "rdr_port", Invk_rdr_port_ = "rdr_port_", Invk_wtr_port = "wtr_port", Invk_wtr_port_ = "wtr_port_", Invk_wtr_host = "wtr_host", Invk_wtr_host_ = "wtr_host_" + public static final String Invk_stop = "stop", Invk_rdr_port = "rdr_port", Invk_rdr_port_ = "rdr_port_", Invk_wtr_port = "wtr_port", Invk_wtr_port_ = "wtr_port_", Invk_wtr_host = "wtr_host", Invk_wtr_host_ = "wtr_host_" , Invk_shutdown_interval = "shutdown_interval", Invk_shutdown_interval_ = "shutdown_interval_"; } class Xosrv_xowa_exec_parser { diff --git a/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_socket_rdr.java b/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_socket_rdr.java index c0e0e2f91..6853714e9 100644 --- a/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_socket_rdr.java +++ b/400_xowa/src/gplx/xowa/apps/servers/tcp/Xosrv_socket_rdr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.servers.tcp; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.servers.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; public class Xosrv_socket_rdr implements Gfo_invk { @@ -42,5 +42,5 @@ public class Xosrv_socket_rdr implements Gfo_invk { if (ctx.Match(k, Invk_start)) this.Start(); else return Gfo_invk_.Rv_unhandled; return this; - } public static final String Invk_start = "start"; + } public static final String Invk_start = "start"; } diff --git a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_loader__inet.java b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_loader__inet.java index ba54da579..68cf03137 100644 --- a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_loader__inet.java +++ b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_loader__inet.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.site_cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.core.net.*; import gplx.xowa.bldrs.wms.*; import gplx.langs.jsons.*; import gplx.xowa.wikis.domains.*; public class Xoa_site_cfg_loader__inet implements Xoa_site_cfg_loader { - private final Gfo_inet_conn inet_conn; private final Json_parser json_parser; + private final Gfo_inet_conn inet_conn; private final Json_parser json_parser; private String api_url; private boolean call_api = true; private Json_doc jdoc; - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Xoa_site_cfg_loader__inet(Gfo_inet_conn inet_conn, Json_parser json_parser) {this.inet_conn = inet_conn; this.json_parser = json_parser;} public int Tid() {return Xoa_site_cfg_loader_.Tid__inet;} public void Load_csv__bgn(Xoa_site_cfg_mgr mgr, Xow_wiki wiki) { @@ -54,7 +54,7 @@ public class Xoa_site_cfg_loader__inet implements Xoa_site_cfg_loader { } return first ? null : Xowm_api_mgr.Bld_api_url(domain_str, Qarg__bgn + tmp_bfr.To_str_and_clear()); } - private static final byte[] Bry__query = Bry_.new_a7("query"); + private static final byte[] Bry__query = Bry_.new_a7("query"); public static final String Qarg__all = "action=query&format=json&rawcontinue=&meta=siteinfo&siprop=general|namespaces|statistics|interwikimap|namespacealiases|specialpagealiases|libraries|extensions|skins|magicwords|functionhooks|showhooks|extensiontags|protocols|defaultoptions|languages" , Qarg__bgn = "action=query&format=json&rawcontinue=&meta=siteinfo&siprop=" diff --git a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr.java b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr.java index 4109958c7..e2d34a8c2 100644 --- a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr.java +++ b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.site_cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.bldrs.wms.sites.*; public class Xoa_site_cfg_mgr { - private final Xoa_site_cfg_loader__db loader__db = new Xoa_site_cfg_loader__db(); + private final Xoa_site_cfg_loader__db loader__db = new Xoa_site_cfg_loader__db(); public Xoa_site_cfg_mgr(Xoa_app app) { this.itm_ary = new Xoa_site_cfg_itm__base[] { new Xoa_site_cfg_itm__extensiontags() @@ -29,9 +29,9 @@ public class Xoa_site_cfg_mgr { , new Xoa_site_cfg_loader__fallback() }; } - public Xoa_site_cfg_loader[] Loader_ary() {return loader_ary;} private final Xoa_site_cfg_loader[] loader_ary; - public Xoa_site_cfg_itm__base[] Itm_ary() {return itm_ary;} private final Xoa_site_cfg_itm__base[] itm_ary; - public Hash_adp_bry Data_hash() {return data_hash;} private final Hash_adp_bry data_hash = Hash_adp_bry.cs(); + public Xoa_site_cfg_loader[] Loader_ary() {return loader_ary;} private final Xoa_site_cfg_loader[] loader_ary; + public Xoa_site_cfg_itm__base[] Itm_ary() {return itm_ary;} private final Xoa_site_cfg_itm__base[] itm_ary; + public Hash_adp_bry Data_hash() {return data_hash;} private final Hash_adp_bry data_hash = Hash_adp_bry.cs(); public void Init_loader_bgn(Xow_wiki wiki) { data_hash.Clear(); int loader_len = loader_ary.length; diff --git a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr_tst.java b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr_tst.java index f024d7d5b..6a7235faf 100644 --- a/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/apps/site_cfgs/Xoa_site_cfg_mgr_tst.java @@ -20,7 +20,7 @@ import gplx.dbs.cfgs.*; import gplx.langs.jsons.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.parsers.*; import gplx.xowa.bldrs.wms.*; public class Xoa_site_cfg_mgr_tst { - private final Xoa_site_cfg_mgr_fxt fxt = new Xoa_site_cfg_mgr_fxt(); + private final Xoa_site_cfg_mgr_fxt fxt = new Xoa_site_cfg_mgr_fxt(); @Before public void init() {fxt.Init();} @After public void term() {fxt.Term();} @Test public void Extensiontags__cfg() { @@ -60,11 +60,11 @@ public class Xoa_site_cfg_mgr_tst { // } } class Xoa_site_cfg_mgr_fxt { - private final Xoae_app app; private final Xowe_wiki wiki; - private final Xoa_site_cfg_mgr site_cfg_mgr; - private final Db_cfg_tbl cfg_tbl; - private final Json_printer printer = new Json_printer(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoae_app app; private final Xowe_wiki wiki; + private final Xoa_site_cfg_mgr site_cfg_mgr; + private final Db_cfg_tbl cfg_tbl; + private final Json_printer printer = new Json_printer(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Xoa_site_cfg_mgr_fxt() { // Xoa_app_.Usr_dlg_(Xoa_app_.New__usr_dlg__console()); gplx.core.ios.IoEngine_system.Web_access_enabled = true; // HACK: must manually enable web_access else above tests will fail due to some other test disabling singleton; DATE:2016-12-15 diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__basic__tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__basic__tst.java index c87608542..e1380277b 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__basic__tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__basic__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xoa_url__basic__tst { - private final Xoa_url_fxt fxt = new Xoa_url_fxt(); + private final Xoa_url_fxt fxt = new Xoa_url_fxt(); @Test public void Eq_page() { fxt.Test_eq_page(Bool_.Y, "en.wikipedia.org/wiki/A?redirect=yes", "en.wikipedia.org/wiki/A?redirect=yes"); fxt.Test_eq_page(Bool_.N, "en.wikipedia.org/wiki/A?redirect=no" , "en.wikipedia.org/wiki/A?redirect=yes"); diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__to_str__tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__to_str__tst.java index e9193d92e..777387367 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__to_str__tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xoa_url__to_str__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa import org.junit.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.wikis.nss.*; public class Xoa_url__to_str__tst { - private final Xoa_url__to_str__fxt fxt = new Xoa_url__to_str__fxt(); + private final Xoa_url__to_str__fxt fxt = new Xoa_url__to_str__fxt(); @Test public void Http() {fxt.Chk_to_str_href(Bool_.N, "http://a.org/b" , "http://a.org/b");} @Test public void File() {fxt.Chk_to_str_href(Bool_.N, "file:///C/xowa/file/a.png" , "file:///C/xowa/file/a.png");} @Test public void Abrv__page() {fxt.Chk_to_str_href(Bool_.N, "/wiki/A" , "A");} @@ -44,11 +44,11 @@ public class Xoa_url__to_str__tst { } @Test public void Unknown() {fxt.Chk_to_str_href(Bool_.N, "/wiki/{{{extlink}}}" , "");} // {{{extlink}}} not a valid title; return empty } -class Xoa_url__to_str__fxt extends Xow_url_parser_fxt { private final Xoh_href_parser href_parser = new Xoh_href_parser(); +class Xoa_url__to_str__fxt extends Xow_url_parser_fxt { private final Xoh_href_parser href_parser = new Xoh_href_parser(); public void Chk_to_str_href(boolean full, String raw, String expd) {Chk_to_str_href(cur_wiki, full, raw, expd);} public void Chk_to_str_href(Xowe_wiki wiki, boolean full, String raw, String expd) { href_parser.Parse_as_url(actl_url, Bry_.new_u8(raw), wiki, Bry__page); this.Test__to_str(full, expd); } - private static final byte[] Bry__page = Bry_.new_a7("Page_1"); + private static final byte[] Bry__page = Bry_.new_a7("Page_1"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser.java index 69d657a11..3dbd24cb8 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.core.primitives.*; import gplx.core.net.*; import gplx.core.net.qargs.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.htmls.hrefs.*; @@ -20,19 +20,19 @@ import gplx.xowa.langs.*; import gplx.xowa.langs.vnts.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.files.*; public class Xow_url_parser { - private final Object thread_lock = new Object(); - private final Gfo_url_encoder encoder; - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); - private final Gfo_url_parser url_parser = new Gfo_url_parser(); - private final Gfo_url_encoder gfs_encoder = Gfo_url_encoder_.New__gfs().Make(); - private final Xoa_app app; private final Xow_wiki wiki; private final byte[] domain_bry; + private final Object thread_lock = new Object(); + private final Gfo_url_encoder encoder; + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Gfo_url_parser url_parser = new Gfo_url_parser(); + private final Gfo_url_encoder gfs_encoder = Gfo_url_encoder_.New__gfs().Make(); + private final Xoa_app app; private final Xow_wiki wiki; private final byte[] domain_bry; private byte tmp_protocol_tid; private int tmp_tid; private byte[] tmp_raw, tmp_orig, tmp_wiki, tmp_page, tmp_anch, tmp_protocol_bry; private Gfo_qarg_itm[] tmp_qargs; private byte[][] tmp_segs; private int tmp_segs_len; private boolean tmp_protocol_is_relative, tmp_page_is_main, tmp_wiki_is_missing; private byte[] tmp_vnt; - private final Xol_vnt_mgr vnt_mgr; + private final Xol_vnt_mgr vnt_mgr; public Xow_url_parser(Xow_wiki wiki) { this.app = wiki.App(); this.wiki = wiki; this.domain_bry = wiki.Domain_bry(); @@ -308,13 +308,13 @@ public class Xow_url_parser { if (v[pos + 2] != Byte_ascii.Dot) return v; return Bry_.Add(Bry_.Mid(v, 0, pos), Bry_.Mid(v, pos + 2)); // skip ".m" } - private static final byte[] Qarg__title = Bry_.new_a7("title"); - private static final byte[] + private static final byte[] Qarg__title = Bry_.new_a7("title"); + private static final byte[] Bry_upload_wikimedia_org = Bry_.new_a7("upload.wikimedia.org") , Bry_file = Bry_.new_a7("File:") // NOTE: File does not need i18n; is a canonical namespace , Bry_wiki = Bry_.new_a7("wiki") ; - public static final byte[] + public static final byte[] Bry_dot_org = Bry_.new_a7(".org") ; } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__proto_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__proto_tst.java index af92aaa7e..225300e08 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__proto_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__proto_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__proto_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Relative() { tstr.Exec__parse("//en.wikipedia.org/wiki/A").Test__wiki("en.wikipedia.org").Test__page("A"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__qarg__tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__qarg__tst.java index b5016e47d..409b70cc4 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__qarg__tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__qarg__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__qarg__tst { - private final Xow_url_parser_fxt fxt = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt fxt = new Xow_url_parser_fxt(); @Test public void Redirect() { fxt.Exec__parse("A?redirect=no").Test__wiki("en.wikipedia.org").Test__page("A").Test__qargs("?redirect=no"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__ttl_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__ttl_tst.java index dc0c42cd7..cd4ba016c 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__ttl_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__ttl_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__ttl_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Name() { tstr.Exec__parse("A").Test__wiki("en.wikipedia.org").Test__page("A"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__url_bar_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__url_bar_tst.java index 851c32024..0e4590f82 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__url_bar_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__url_bar_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__url_bar_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Basic() { tstr.Exec__parse_from_url_bar("Page_1").Test__to_str("en.wikipedia.org/wiki/Page_1"); // basic } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__wiki_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__wiki_tst.java index 9e4195525..fce37e938 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__wiki_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__wiki_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__wiki_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Basic() { tstr.Exec__parse("en.wikipedia.org/wiki/A").Test__tid(Xoa_url_.Tid_page).Test__wiki("en.wikipedia.org").Test__page("A"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xcmd_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xcmd_tst.java index 690601e43..3107f8cfe 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xcmd_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xcmd_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; public class Xow_url_parser__xcmd_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Basic() { tstr.Exec__parse("xowa-cmd:xowa.app.version").Test__tid(Xoa_url_.Tid_xcmd).Test__page("xowa.app.version"); } diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xwiki_tst.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xwiki_tst.java index 9998f8aa3..2e1285d2f 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xwiki_tst.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser__xwiki_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; import gplx.xowa.wikis.nss.*; public class Xow_url_parser__xwiki_tst { - private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); + private final Xow_url_parser_fxt tstr = new Xow_url_parser_fxt(); @Test public void Commons() { // PURPOSE: "C" was being picked up as an xwiki to commons; PAGE:no.b:C/Variabler; DATE:2014-10-14 tstr.Prep_add_xwiki_to_user("c", "commons.wikimedia.org"); // add alias of "c" tstr.Exec__parse("C/D").Test__tid(Xoa_url_.Tid_page).Test__wiki("en.wikipedia.org").Test__page("C/D"); // should use current wiki (enwiki), not xwiki to commons; also, page should be "C/D", not "D" diff --git a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser_fxt.java b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser_fxt.java index ff8fa4fc6..52eecb57f 100644 --- a/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser_fxt.java +++ b/400_xowa/src/gplx/xowa/apps/urls/Xow_url_parser_fxt.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.nss.*; public class Xow_url_parser_fxt { - protected final Xoae_app app; protected final Xowe_wiki cur_wiki; - protected final Xow_url_parser parser; + protected final Xoae_app app; protected final Xowe_wiki cur_wiki; + protected final Xow_url_parser parser; protected Xoa_url actl_url; public Xow_url_parser_fxt() { this.app = Xoa_app_fxt.Make__app__edit(); diff --git a/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder.java b/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder.java index 80dbffc00..17bd6100e 100644 --- a/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder.java +++ b/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; public class Xoa_url_encoder { // NOTE: redundant with Gfo_url_encoder, but is simpler; DATE:2016-09-15 - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public byte[] Encode(byte[] src) { int src_len = src.length; boolean dirty = false; @@ -47,7 +47,7 @@ public class Xoa_url_encoder { // NOTE: redundant with Gfo_url_encoder, but is s } return dirty ? bfr.To_bry_and_clear() : src; } - private static final byte[] Bry__amp = Bry_.new_a7("%26"), Bry__eq = Bry_.new_a7("%3D") + private static final byte[] Bry__amp = Bry_.new_a7("%26"), Bry__eq = Bry_.new_a7("%3D") , Bry__plus = Bry_.new_a7("%2B"), Bry__apos = Bry_.new_a7("%27") , Bry__underline = new byte[] {Byte_ascii.Underline} ; diff --git a/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder__tst.java b/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder__tst.java index 722aadbc7..eab27e1c9 100644 --- a/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder__tst.java +++ b/400_xowa/src/gplx/xowa/apps/utls/Xoa_url_encoder__tst.java @@ -16,13 +16,13 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.apps.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import org.junit.*; import gplx.core.tests.*; public class Xoa_url_encoder__tst { - private final Xoa_url_encoder__fxt fxt = new Xoa_url_encoder__fxt(); + private final Xoa_url_encoder__fxt fxt = new Xoa_url_encoder__fxt(); @Test public void Syms__diff() {fxt.Test__encode(" &'=+", "_%26%27%3D%2B");} @Test public void Syms__same() {fxt.Test__encode("!\"#$%()*,-./:;<>?@[\\]^_`{|}~", "!\"#$%()*,-./:;<>?@[\\]^_`{|}~");} @Test public void Mixed() {fxt.Test__encode("a &'=+b", "a_%26%27%3D%2Bb");} // PURPOSE: make sure dirty flag is set } class Xoa_url_encoder__fxt { - private final Xoa_url_encoder encoder = new Xoa_url_encoder(); + private final Xoa_url_encoder encoder = new Xoa_url_encoder(); public void Test__encode(String raw, String expd) { Gftest.Eq__bry(Bry_.new_u8(expd), encoder.Encode(Bry_.new_u8(raw))); } diff --git a/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_mok.java b/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_mok.java index 923b5fc76..0e461fd49 100644 --- a/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_mok.java +++ b/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_mok.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.wms.apis.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.wms.*; import gplx.xowa.apps.wms.apis.*; import gplx.xowa.files.downloads.*; public class Xoapi_orig_mok extends Xoapi_orig_base { @@ -30,5 +30,5 @@ public class Xoapi_orig_mok extends Xoapi_orig_base { rv.Init_all(repo_wiki_key, orig_page, orig_w, orig_h); return true; } - public static final Xoapi_orig_mok Instance = new Xoapi_orig_mok(); Xoapi_orig_mok() {} + public static final Xoapi_orig_mok Instance = new Xoapi_orig_mok(); Xoapi_orig_mok() {} } \ No newline at end of file diff --git a/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_wmf.java b/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_wmf.java index dfd1e07b4..40fa12fd4 100644 --- a/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_wmf.java +++ b/400_xowa/src/gplx/xowa/apps/wms/apis/origs/Xoapi_orig_wmf.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.wms.apis.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.wms.*; import gplx.xowa.apps.wms.apis.*; import gplx.core.primitives.*; import gplx.core.net.*; import gplx.core.envs.*; import gplx.langs.htmls.encoders.*; @@ -81,8 +81,8 @@ public class Xoapi_orig_wmf extends Xoapi_orig_base { } } private static Gfo_url_encoder tmp_encoder = Gfo_url_encoder_.New__http_url().Init__diff__one(Byte_ascii.Space, Byte_ascii.Underline).Make(); - private static final Bry_bfr tmp_bfr = Bry_bfr_.New(); - private static final byte[] + private static final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private static final byte[] Bry_api = Bry_.new_a7("/w/api.php?action=query&format=xml&prop=imageinfo&iiprop=size|url&redirects&titles=File:") // NOTE: using File b/c it should be canonical , Bry_width = Bry_.new_a7("&iiurlwidth=") , Bry_height = Bry_.new_a7("&iiurlheight=") diff --git a/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revision_base.java b/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revision_base.java index dbed477be..df3e8f8a4 100644 --- a/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revision_base.java +++ b/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revision_base.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.wms.apis.revisions; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.wms.*; import gplx.xowa.apps.wms.apis.*; import gplx.langs.jsons.*; import gplx.xowa.files.downloads.*; public abstract class Xowm_revision_base { } class Xowm_revision_wmf extends Xowm_revision_base { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Json_parser json_parser = new Json_parser(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Json_parser json_parser = new Json_parser(); public Xowm_revn_data Get_revn_or_null(Xof_download_wkr download_wkr, Xow_wiki wiki, Xoa_ttl page_ttl) { if (!gplx.core.ios.IoEngine_system.Web_access_enabled) return null; // create a ctx Object @@ -64,7 +64,7 @@ class Xowm_revision_wmf extends Xowm_revision_base { byte[] revn_text = revn_nde.Get_as_bry("*"); return new Xowm_revn_data(wiki_domain, page_id, page_ns, page_ttl, revn_id, revn_time, revn_text); } - private final byte[] Path__query = Bry_.new_a7("query"), Path__pages = Bry_.new_a7("pages"); + private final byte[] Path__query = Bry_.new_a7("query"), Path__pages = Bry_.new_a7("pages"); } /* { diff --git a/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revn_data.java b/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revn_data.java index fd5f876e8..c6fd90ae5 100644 --- a/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revn_data.java +++ b/400_xowa/src/gplx/xowa/apps/wms/apis/revisions/Xowm_revn_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.apps.wms.apis.revisions; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.wms.*; import gplx.xowa.apps.wms.apis.*; public class Xowm_revn_data { public Xowm_revn_data(byte[] wiki_domain @@ -26,13 +26,13 @@ public class Xowm_revn_data { this.revn_time = revn_time; this.revn_text = revn_text; } - public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; + public byte[] Wiki_domain() {return wiki_domain;} private final byte[] wiki_domain; - public int Page_id() {return page_id;} private final int page_id; - public int Page_ns() {return page_ns;} private final int page_ns; - public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; + public int Page_id() {return page_id;} private final int page_id; + public int Page_ns() {return page_ns;} private final int page_ns; + public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; - public int Revn_id() {return revn_id;} private final int revn_id; - public DateAdp Revn_time() {return revn_time;} private final DateAdp revn_time; - public byte[] Revn_text() {return revn_text;} private final byte[] revn_text; + public int Revn_id() {return revn_id;} private final int revn_id; + public DateAdp Revn_time() {return revn_time;} private final DateAdp revn_time; + public byte[] Revn_text() {return revn_text;} private final byte[] revn_text; } diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java b/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java index 5e2d6b934..acb309043 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_bldr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.consoles.*; import gplx.core.envs.*; import gplx.xowa.apps.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.xmls.*; import gplx.xowa.langs.bldrs.*; @@ -27,9 +27,9 @@ public class Xob_bldr implements Gfo_invk { this.import_marker = new Xob_import_marker(); this.wiki_cfg_bldr = new Xob_wiki_cfg_bldr(this); } - public Xoae_app App() {return app;} private final Xoae_app app; - public Xob_cmd_regy Cmd_regy() {return cmd_regy;} private final Xob_cmd_regy cmd_regy = new Xob_cmd_regy(); - public Xob_cmd_mgr Cmd_mgr() {return cmd_mgr;} private final Xob_cmd_mgr cmd_mgr; + public Xoae_app App() {return app;} private final Xoae_app app; + public Xob_cmd_regy Cmd_regy() {return cmd_regy;} private final Xob_cmd_regy cmd_regy = new Xob_cmd_regy(); + public Xob_cmd_mgr Cmd_mgr() {return cmd_mgr;} private final Xob_cmd_mgr cmd_mgr; public Gfo_usr_dlg Usr_dlg() {return app.Usr_dlg();} public int Sort_mem_len() {return sort_mem_len;} public Xob_bldr Sort_mem_len_(int v) {sort_mem_len = v; return this;} private int sort_mem_len = 16 * Io_mgr.Len_mb; public int Dump_fil_len() {return dump_fil_len;} public Xob_bldr Dump_fil_len_(int v) {dump_fil_len = v; return this;} private int dump_fil_len = 1 * Io_mgr.Len_mb; diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java b/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java index 3b1410d9f..725ea4f84 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; import gplx.xowa.wikis.*; import gplx.xowa.xtns.wbases.imports.*; @@ -23,11 +23,11 @@ import gplx.xowa.files.origs.*; import gplx.xowa.htmls.core.bldrs.*; import gplx.xowa.addons.wikis.searchs.bldrs.*; import gplx.xowa.addons.bldrs.files.cmds.*; import gplx.xowa.addons.wikis.htmls.css.bldrs.*; public class Xob_cmd_mgr implements Gfo_invk { - private final Xob_bldr bldr; - public final Xob_cmd_regy cmd_regy; + private final Xob_bldr bldr; + public final Xob_cmd_regy cmd_regy; public Xob_cmd_mgr(Xob_bldr bldr, Xob_cmd_regy cmd_regy) {this.bldr = bldr; this.cmd_regy = cmd_regy;} public void Clear() {list.Clear(); dump_rdrs.Clear();} - public int Len() {return list.Count();} private final List_adp list = List_adp_.New(); + public int Len() {return list.Count();} private final List_adp list = List_adp_.New(); public Xob_cmd Get_at(int i) {return (Xob_cmd)list.Get_at(i);} public Xob_cmd Add(Xob_cmd cmd) {list.Add(cmd); return cmd;} public Gfo_invk Add_cmd(Xowe_wiki wiki, String cmd_key) { diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_regy.java b/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_regy.java index 8ee6f9052..cfc86d76c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_regy.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_cmd_regy.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; -import gplx.xowa.bldrs.wkrs.*; -public class Xob_cmd_regy { - private final Ordered_hash regy = Ordered_hash_.New(); - public Xob_cmd Get_or_null(String key) {return (Xob_cmd)regy.Get_by(key);} - public void Add_many(Xob_cmd... ary) { - int len = ary.length; - for (int i = 0; i < len; ++i) { - Xob_cmd cmd = ary[i]; - regy.Add(cmd.Cmd_key(), cmd); - } - } -} +package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; +import gplx.xowa.bldrs.wkrs.*; +public class Xob_cmd_regy { + private final Ordered_hash regy = Ordered_hash_.New(); + public Xob_cmd Get_or_null(String key) {return (Xob_cmd)regy.Get_by(key);} + public void Add_many(Xob_cmd... ary) { + int len = ary.length; + for (int i = 0; i < len; ++i) { + Xob_cmd cmd = ary[i]; + regy.Add(cmd.Cmd_key(), cmd); + } + } +} diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_db_file.java b/400_xowa/src/gplx/xowa/bldrs/Xob_db_file.java index 4eb7a4953..990def951 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_db_file.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_db_file.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; public class Xob_db_file { @@ -20,9 +20,9 @@ public class Xob_db_file { this.url = url; this.conn = conn; this.tbl__cfg = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(conn); } - public Io_url Url() {return url;} private final Io_url url; - public Db_conn Conn() {return conn;} private final Db_conn conn; - public Db_cfg_tbl Tbl__cfg() {return tbl__cfg;} private final Db_cfg_tbl tbl__cfg; + public Io_url Url() {return url;} private final Io_url url; + public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_cfg_tbl Tbl__cfg() {return tbl__cfg;} private final Db_cfg_tbl tbl__cfg; public static Xob_db_file New__file_make(Io_url dir) {return New(dir, Name__file_make);} public static Xob_db_file New__page_regy(Io_url dir) {return New(dir, Name__page_regy);} public static Xob_db_file New__wiki_image(Io_url dir) {return New(dir, Name__wiki_image);} diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_ns_to_db_mgr.java b/400_xowa/src/gplx/xowa/bldrs/Xob_ns_to_db_mgr.java index bdf38fe35..3fb70546b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_ns_to_db_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_ns_to_db_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.cmds.*; public class Xob_ns_to_db_mgr { - private final Xob_ns_to_db_wkr wkr; private final Xow_db_mgr db_mgr; private final long db_max; private boolean one_file_conn_init = true; - private final Ordered_hash db_list = Ordered_hash_.New(); + private final Xob_ns_to_db_wkr wkr; private final Xow_db_mgr db_mgr; private final long db_max; private boolean one_file_conn_init = true; + private final Ordered_hash db_list = Ordered_hash_.New(); public Xob_ns_to_db_mgr(Xob_ns_to_db_wkr wkr, Xow_db_mgr db_mgr, long db_max) { this.wkr = wkr; this.db_mgr = db_mgr; this.db_max = db_max; } diff --git a/400_xowa/src/gplx/xowa/bldrs/Xob_page_wkr_cmd.java b/400_xowa/src/gplx/xowa/bldrs/Xob_page_wkr_cmd.java index b8a4222ce..626eb04a6 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xob_page_wkr_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xob_page_wkr_cmd.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.consoles.*; import gplx.core.ios.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.parsers.tmpls.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.xmls.*; public class Xob_page_wkr_cmd implements Xob_cmd { - private final Xob_bldr bldr; private final Xowe_wiki wiki; + private final Xob_bldr bldr; private final Xowe_wiki wiki; public Xob_page_wkr_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.bldr = bldr; this.wiki = wiki;} - public String Cmd_key() {return KEY;} public static final String KEY = "dump_mgr"; + public String Cmd_key() {return KEY;} public static final String KEY = "dump_mgr"; public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return null;} public void Cmd_run() { Xob_page_wkr[] wkr_ary = (Xob_page_wkr[])wkrs.To_ary(Xob_page_wkr.class); int wkr_ary_len = wkr_ary.length; diff --git a/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java index 3594a7f09..48887f0b7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobd_parser.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.btries.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.wikis.data.tbls.*; public class Xobd_parser implements Xob_page_wkr { - private final Xob_bldr bldr; - private final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7(); // NOTE:ci.ascii:MW_const.en; ctg.v1 assumes [[Category: - private final Btrie_rv trv = new Btrie_rv(); - private final List_adp wkr_list = List_adp_.New(); + private final Xob_bldr bldr; + private final Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7(); // NOTE:ci.ascii:MW_const.en; ctg.v1 assumes [[Category: + private final Btrie_rv trv = new Btrie_rv(); + private final List_adp wkr_list = List_adp_.New(); public String Page_wkr__key() {return KEY;} static final String KEY = "page_parser"; public Xobd_parser(Xob_bldr bldr) {this.bldr = bldr;} public void Wkr_add(Xobd_parser_wkr wkr) {wkr_list.Add(wkr);} diff --git a/400_xowa/src/gplx/xowa/bldrs/Xobldr_cfg.java b/400_xowa/src/gplx/xowa/bldrs/Xobldr_cfg.java index 3bcd4707f..48b12bd69 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xobldr_cfg.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobldr_cfg.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.ios.*; import gplx.xowa.wikis.data.*; @@ -57,5 +57,5 @@ public class Xobldr_cfg { } return new Xowd_core_db_props(2, layout_text, layout_html, layout_file, Zip_mode__text(app), Zip_mode__html(app), hzip_enabled, hzip_mode_is_b256); } - public static final byte[] Ns_file_map__each = Bry_.new_a7(""); + public static final byte[] Ns_file_map__each = Bry_.new_a7(""); } diff --git a/400_xowa/src/gplx/xowa/bldrs/Xobldr_fxt.java b/400_xowa/src/gplx/xowa/bldrs/Xobldr_fxt.java index 6b227761b..bb8e00c2a 100644 --- a/400_xowa/src/gplx/xowa/bldrs/Xobldr_fxt.java +++ b/400_xowa/src/gplx/xowa/bldrs/Xobldr_fxt.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs; import gplx.*; import gplx.xowa.*; import gplx.core.tests.*; import gplx.core.times.*; import gplx.dbs.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.bldrs.wkrs.*; public class Xobldr_fxt { - private final DateAdp_parser dateParser = DateAdp_parser.new_(); + private final DateAdp_parser dateParser = DateAdp_parser.new_(); public Xoae_app App() {return app;} private Xoae_app app; public Xob_bldr Bldr() {return bldr;} private Xob_bldr bldr; public Xowe_wiki Wiki() {return wiki;} private Xowe_wiki wiki; diff --git a/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java b/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java index 293842841..ee09af432 100644 --- a/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/aria2/Aria2_lib_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.aria2; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.envs.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.bldrs.wms.dumps.*; @@ -35,8 +35,8 @@ public class Aria2_lib_mgr implements Gfo_invk { if (ctx.Match(k, Invk_lib)) return lib; else return Gfo_invk_.Rv_unhandled; } - private static final String Invk_lib = "lib"; - private static final String Lib_args_fmt = String_.Concat + private static final String Invk_lib = "lib"; + private static final String Lib_args_fmt = String_.Concat ( "--max-connection-per-server=2" , " --max-concurrent-downloads=20" , " --split=4" diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java index 3bff3a6c1..4f2196aa4 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_dump_mgr_base.java @@ -249,7 +249,7 @@ public abstract class Xob_dump_mgr_base extends Xob_itm_basic_base implements Xo private void Notify_restoring(String itm, int val) { usr_dlg.Note_many("", "", "restoring: itm=~{0} val=~{1}", itm, val); } - public static final String + public static final String Invk_progress_interval_ = "progress_interval_", Invk_commit_interval_ = "commit_interval_", Invk_cleanup_interval_ = "cleanup_interval_", Invk_rate_interval_ = "rate_interval_" , Invk_select_size_ = "select_size_" , Invk_ns_bgn_ = "ns_bgn_", Invk_db_bgn_ = "db_bgn_", Invk_pg_bgn_ = "pg_bgn_" diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java index 651271171..dab9bd3e8 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.*; @@ -21,9 +21,9 @@ public class Xob_ns_file_itm { this.db_file_tid = db_file_tid; this.file_name = file_name; this.ns_ids = ns_ids; this.nth_db_id = Nth_db_id_null; this.nth_db_idx = 1; } - public byte Db_file_tid() {return db_file_tid;} private final byte db_file_tid; - public String File_name() {return file_name;} private final String file_name; - public int[] Ns_ids() {return ns_ids;} private final int[] ns_ids; + public byte Db_file_tid() {return db_file_tid;} private final byte db_file_tid; + public String File_name() {return file_name;} private final String file_name; + public int[] Ns_ids() {return ns_ids;} private final int[] ns_ids; public int Nth_db_id() {return nth_db_id;} public void Nth_db_id_(int v) {nth_db_id = v;} private int nth_db_id; public int Nth_db_idx() {return nth_db_idx;} private int nth_db_idx; public String Make_file_name() { // EX: en.wikipedia.org-text-ns.000-001.xowa diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java index c2fc5d561..4c1b9d851 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_ns_file_itm_parser.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.langs.dsvs.*; import gplx.xowa.wikis.nss.*; public class Xob_ns_file_itm_parser extends Dsv_wkr_base { - private byte[] ns_ids_bry; private String name; private final List_adp rslts = List_adp_.New(); + private byte[] ns_ids_bry; private String name; private final List_adp rslts = List_adp_.New(); private Xow_ns_mgr ns_mgr; private byte db_file_tid; private boolean mode_each = false; public void Ctor(byte db_file_tid, Xow_ns_mgr ns_mgr) { this.db_file_tid = db_file_tid; this.ns_mgr = ns_mgr; @@ -80,7 +80,7 @@ public class Xob_ns_file_itm_parser extends Dsv_wkr_base { this.Load_by_bry(bry); return (Xob_ns_file_itm[])rslts.To_ary(Xob_ns_file_itm.class); } - public static final byte[] Ns_file_map__few = Bry_.new_a7("few"), Ns_file_map__each = Bry_.new_a7(""); + public static final byte[] Ns_file_map__few = Bry_.new_a7("few"), Ns_file_map__each = Bry_.new_a7(""); /* "" -> no rules; return "default"; generates "text-001" and lumps all ns into it "*||3700|2" -> auto-generate per ns diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_parse_all_src_sql.java b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_parse_all_src_sql.java index 33a1eb448..241b9d60d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_parse_all_src_sql.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/Xob_parse_all_src_sql.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.stores.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.dbs.*; import gplx.dbs.*; import gplx.dbs.qrys.*; import gplx.xowa.wikis.data.tbls.*; @@ -73,7 +73,7 @@ class Xob_dump_src_id { default: throw Err_.new_unhandled(redirect); } } - private static final String Sql_select_clause = String_.Concat_lines_nl + private static final String Sql_select_clause = String_.Concat_lines_nl ( "SELECT p.page_id" , ", p.page_title" , ", t.text_data" diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_cmd.java index 054674fe9..e8a71fec0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_cmd.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.wkrs.*; public class Xob_diff_build_cmd implements Xob_cmd { - private final Xob_bldr bldr; private final Xowe_wiki wiki; + private final Xob_bldr bldr; private final Xowe_wiki wiki; private String prev_url, curr_url, diff_url; private int commit_interval; private int[] db_ids = Int_ary_.Empty; private String bld_name = "all"; public Xob_diff_build_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.bldr = bldr; this.wiki = wiki;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_wkr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_wkr.java index cc7bfd1e3..af992a035 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_wkr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xob_diff_build_wkr.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.brys.*; import gplx.core.brys.fmts.*; import gplx.dbs.*; import gplx.dbs.metas.*; import gplx.dbs.diffs.*; import gplx.dbs.diffs.builds.*; import gplx.dbs.diffs.itms.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; class Xob_diff_build_wkr { - private final Gfdb_diff_bldr dif_bldr = new Gfdb_diff_bldr(); - private final Xowe_wiki wiki; + private final Gfdb_diff_bldr dif_bldr = new Gfdb_diff_bldr(); + private final Xowe_wiki wiki; private Db_conn old_conn, new_conn, dif_conn; - private final Xowd_tbl_mapr tbl_mapr; + private final Xowd_tbl_mapr tbl_mapr; public Xob_diff_build_wkr(Xob_bldr bldr, Xowe_wiki wiki, String old_url, String new_url, String dif_url, int commit_interval, Xowd_tbl_mapr tbl_mapr) { this.wiki = wiki; wiki.Init_by_wiki(); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xowd_tbl_mapr.java b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xowd_tbl_mapr.java index aa18ba717..aaf6aee08 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xowd_tbl_mapr.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/diffs/Xowd_tbl_mapr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.diffs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.wikis.data.*; class Xowd_tbl_mapr { @@ -20,8 +20,8 @@ class Xowd_tbl_mapr { this.Name = name; this.Db_ids = db_ids; } - public final String Name; - public final int[] Db_ids; + public final String Name; + public final int[] Db_ids; public boolean Db_ids__has(int id) {return true;} // private static List_adp Fill_tbl_names(List_adp rv, int db_tid) { // switch (db_tid) { diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_delete_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_delete_cmd.java index 6f66ea5cc..f4fbffa72 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_delete_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_page_delete_cmd.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.bldrs.wkrs.*; public class Xob_page_delete_cmd extends Xob_cmd_base { - private final Xow_wiki wiki; + private final Xow_wiki wiki; public Xob_page_delete_cmd(Xob_bldr bldr, Xow_wiki wiki) {this.wiki = wiki;} @Override public String Cmd_key() {return Xob_cmd_keys.Key_text_delete_page;} @Override public void Cmd_run() { diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_term_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_term_cmd.java index 1b569d55b..f2313d070 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_term_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/sqls/Xob_term_cmd.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.texts.sqls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.dbs.cfgs.*; import gplx.xowa.wikis.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*; public class Xob_term_cmd extends Xob_term_base { public Xob_term_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Ctor(bldr, wiki); this.wiki = wiki;} private Xowe_wiki wiki; - @Override public String Cmd_key() {return KEY;} public static final String KEY = "text.term"; + @Override public String Cmd_key() {return KEY;} public static final String KEY = "text.term"; @Override public void Cmd_end_hook() { // delete wiki's temp dir Io_mgr.Instance.DeleteDirDeep(wiki.Fsys_mgr().Tmp_dir()); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java index ccc5e8325..e7fd4d3d0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/tdbs/Xob_parse_dump_templates_cmd.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.texts.tdbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.core.ios.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.tdbs.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.bldrs.wkrs.*; public class Xob_parse_dump_templates_cmd extends Xob_itm_dump_base implements Xob_page_wkr, Gfo_invk { public Xob_parse_dump_templates_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.Cmd_ctor(bldr, wiki);} - public String Page_wkr__key() {return KEY;} public static final String KEY = "parse.dump_templates"; + public String Page_wkr__key() {return KEY;} public static final String KEY = "parse.dump_templates"; public static final int FixedLen_page = 1 + 5 + 1 + 5 + 1 + 1 + 1; // \tid|date|title|text\n public void Page_wkr__bgn() { Init_dump(KEY); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser_.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser_.java index eb3e64cf3..e8e3c30ee 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser_.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.texts.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.langs.xmls.*; // NOTE: gplx.langs.xmls does not support Android; DATE:2013-01-17 import gplx.xowa.wikis.nss.*; @@ -75,5 +75,5 @@ public class Xob_siteinfo_parser_ { } ns_mgr.Init_w_defaults(); } - private static final byte[] Bry_siteinfo_bgn = Bry_.new_a7(""), Bry_siteinfo_end = Bry_.new_a7(""); + private static final byte[] Bry_siteinfo_bgn = Bry_.new_a7(""), Bry_siteinfo_end = Bry_.new_a7(""); } diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser__tst.java b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser__tst.java index 9e3294d51..dfb06566f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser__tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/texts/xmls/Xob_siteinfo_parser__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.bldrs.cmds.texts.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.cmds.texts.*; import org.junit.*; import gplx.xowa.wikis.nss.*; public class Xob_siteinfo_parser__tst { - private final Xob_siteinfo_parser__fxt fxt = new Xob_siteinfo_parser__fxt(); + private final Xob_siteinfo_parser__fxt fxt = new Xob_siteinfo_parser__fxt(); @Test public void Basic__simplewikt() { // PURPOSE: basic test of siteinfo parse; DATE:2015-11-01 fxt.Test__parse(String_.Concat_lines_nl_skip_last ( " " @@ -98,8 +98,8 @@ public class Xob_siteinfo_parser__tst { } } class Xob_siteinfo_parser__fxt { - private final Xow_ns_mgr ns_mgr = new Xow_ns_mgr(gplx.xowa.langs.cases.Xol_case_mgr_.U8()); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Xow_ns_mgr ns_mgr = new Xow_ns_mgr(gplx.xowa.langs.cases.Xol_case_mgr_.U8()); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Test__parse(String src_str, String expd) { Xob_siteinfo_nde nde = Xob_siteinfo_parser_.Parse(src_str, ns_mgr); nde.To_bfr(bfr); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_alert_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_alert_cmd.java index 27eb5cd2e..55812e373 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_alert_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_alert_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.wkrs.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; @@ -33,6 +33,6 @@ public class Xob_alert_cmd extends Xob_cmd__base implements Xob_cmd { public static final String BLDR_CMD_KEY = "ui.alert"; @Override public String Cmd_key() {return BLDR_CMD_KEY;} - public static final Xob_cmd Prototype = new Xob_alert_cmd(null, null); + public static final Xob_cmd Prototype = new Xob_alert_cmd(null, null); @Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xob_alert_cmd(bldr, wiki);} } diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java index aab7c2e56..487508a2d 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_core_batch_utl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.bldrs.wms.dumps.*; public class Xob_core_batch_utl implements Gfo_invk { - private final Xob_bldr bldr; - private final Bry_fmtr fmtr = Bry_fmtr.keys_("bz2_fil", "wiki_key"); + private final Xob_bldr bldr; + private final Bry_fmtr fmtr = Bry_fmtr.keys_("bz2_fil", "wiki_key"); public Xob_core_batch_utl(Xob_bldr bldr, byte[] raw) {this.bldr = bldr; fmtr.Fmt_(raw);} private void Run() { Io_url[] bz2_fils = Io_mgr.Instance.QueryDir_fils(bldr.App().Fsys_mgr().Wiki_dir().GenSubDir_nest(Dir_dump, "todo")); diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java index 5590a3acc..4ca16a58b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_site_meta_cmd.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.core.net.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.wms.*; import gplx.xowa.bldrs.wms.sites.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.apps.site_cfgs.*; public class Xob_site_meta_cmd implements Xob_cmd { - private final Xob_bldr bldr; + private final Xob_bldr bldr; private String[] wikis; private Io_url db_url; private DateAdp cutoff_time; public Xob_site_meta_cmd(Xob_bldr bldr, Xow_wiki wiki) {this.bldr = bldr;} public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return null;} diff --git a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_xml_dumper_cmd.java b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_xml_dumper_cmd.java index b96a6a710..e05f8511c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_xml_dumper_cmd.java +++ b/400_xowa/src/gplx/xowa/bldrs/cmds/utils/Xob_xml_dumper_cmd.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.cmds.utils; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.bldrs.xmls.*; import gplx.xowa.wikis.dbs.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_xml_dumper_cmd implements Xob_cmd { - private final Xowe_wiki wiki; private final Gfo_usr_dlg usr_dlg; - private final Xob_xml_dumper xml_dumper = new Xob_xml_dumper(); private int commit_interval = 1000; + private final Xowe_wiki wiki; private final Gfo_usr_dlg usr_dlg; + private final Xob_xml_dumper xml_dumper = new Xob_xml_dumper(); private int commit_interval = 1000; private Io_url dump_url; public Xob_xml_dumper_cmd(Xob_bldr bldr, Xowe_wiki wiki) {this.wiki = wiki; this.usr_dlg = wiki.Appe().Usr_dlg();} public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return null;} diff --git a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java index b74720464..d87f495e5 100644 --- a/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java +++ b/400_xowa/src/gplx/xowa/bldrs/css/Xoa_css_extractor.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.css; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.brys.fmtrs.*; import gplx.core.ios.*; import gplx.core.envs.*; import gplx.xowa.htmls.*; import gplx.langs.htmls.encoders.*; @@ -37,7 +37,7 @@ public class Xoa_css_extractor { public Xoa_css_extractor Url_encoder_(Gfo_url_encoder v) {url_encoder = v; return this;} private Gfo_url_encoder url_encoder; public Xoa_css_extractor Wiki_code_(byte[] v) {this.wiki_code = v; return this;} private byte[] wiki_code = null; private byte[] mainpage_html; private boolean lang_is_ltr = true; - private final Gfo_url_parser url_parser = new Gfo_url_parser(); + private final Gfo_url_parser url_parser = new Gfo_url_parser(); public void Init_by_app(Xoae_app app) { this.usr_dlg = app.Usr_dlg(); this.home_css_dir = app.Usere().Fsys_mgr().Wiki_html_dir("home").GenSubDir("html"); @@ -153,7 +153,7 @@ public class Xoa_css_extractor { bry = Bry_.Replace(bry, gplx.xowa.bldrs.xmls.Xob_xml_parser_.Bry_tab_ent, gplx.xowa.bldrs.xmls.Xob_xml_parser_.Bry_tab); Io_mgr.Instance.SaveFilBry(trg_fil, bry); return true; - } private static final byte[] Ttl_common_css = Bry_.new_a7("Common.css"), Ttl_vector_css = Bry_.new_a7("Vector.css"); + } private static final byte[] Ttl_common_css = Bry_.new_a7("Common.css"), Ttl_vector_css = Bry_.new_a7("Vector.css"); private boolean Css_wiki_generate_section(Bry_bfr bfr, byte[] ttl) { byte[] page = page_fetcher.Get_by(Xow_ns_.Tid__mediawiki, ttl); if (page == null) return false; @@ -161,7 +161,7 @@ public class Xoa_css_extractor { Css_wiki_section_hdr.Bld_bfr_many(bfr, ttl); // add "/*XOWA:MediaWiki:Common.css*/\n" bfr.Add(page); // add page return true; - } private static final Bry_fmtr Css_wiki_section_hdr = Bry_fmtr.new_("/*XOWA:MediaWiki:~{ttl}*/\n", "ttl"); + } private static final Bry_fmtr Css_wiki_section_hdr = Bry_fmtr.new_("/*XOWA:MediaWiki:~{ttl}*/\n", "ttl"); public void Logo_setup() { boolean logo_missing = true; Io_url logo_url = wiki_html_dir.GenSubFil("logo.png"); @@ -196,7 +196,7 @@ public class Xoa_css_extractor { Io_url src_fil = wiki_html_dir.GenSubFil(String_.new_u8(src_bry)); Io_mgr.Instance.CopyFil(src_fil, trg_fil, true); return true; - } private static final byte[] Bry_mw_wiki_logo = Bry_.new_a7(".mw-wiki-logo{background-image:url(\""); + } private static final byte[] Bry_mw_wiki_logo = Bry_.new_a7(".mw-wiki-logo{background-image:url(\""); private String Logo_find_src() { if (mainpage_html == null) return null; int main_page_html_len = mainpage_html.length; @@ -208,7 +208,7 @@ public class Xoa_css_extractor { byte[] logo_bry = Bry_.Mid(mainpage_html, logo_bgn, logo_end); return protocol_prefix + String_.new_u8(logo_bry); } - private static final byte[] Logo_find_bgn = Bry_.new_a7("
    <-30> - private final Hash_adp_bry word_idx_hash = Hash_adp_bry.cs(); + private final Hash_adp_bry word_idx_hash = Hash_adp_bry.cs(); public Dg_rule(int file_id, int id, int idx, int tid, byte[] key, int score, Dg_word[] words) { this.file_id = file_id; this.id = id; this.idx = idx; this.tid = tid; this.key = key; this.score = score; this.words = words; @@ -34,21 +34,21 @@ class Dg_rule {// EX: < wikipedia ><-30> } } } - public int File_id() {return file_id;} private final int file_id; - public int Id() {return id;} private final int id; - public int Idx() {return idx;} private final int idx; - public int Tid() {return tid;} private final int tid; - public byte[] Key() {return key;} private final byte[] key; - public Dg_word[] Words() {return words;} private final Dg_word[] words; + public int File_id() {return file_id;} private final int file_id; + public int Id() {return id;} private final int id; + public int Idx() {return idx;} private final int idx; + public int Tid() {return tid;} private final int tid; + public byte[] Key() {return key;} private final byte[] key; + public Dg_word[] Words() {return words;} private final Dg_word[] words; public Hash_adp_bry Word_idx_hash() {return word_idx_hash;} - public int Score() {return score;} private final int score; + public int Score() {return score;} private final int score; public static final int Tid_rule = 0 , Tid_comment = 1 , Tid_blank = 3 , Tid_invalid = 4 ; - public static final Dg_rule + public static final Dg_rule Itm_comment = new Dg_rule(-1, -1, -1, Tid_comment, null, -1, null) , Itm_blank = new Dg_rule(-1, -1, -1, Tid_blank, null, -1, null) , Itm_invalid = new Dg_rule(-1, -1, -1, Tid_invalid, null, -1, null) @@ -57,7 +57,7 @@ class Dg_rule {// EX: < wikipedia ><-30> } class Dg_word { public Dg_word(byte[] raw) {this.raw = raw;} - public byte[] Raw() {return raw;} private final byte[] raw; + public byte[] Raw() {return raw;} private final byte[] raw; public static String Ary_concat(Dg_word[] ary, Bry_bfr bfr, byte dlm) { if (ary == null) return String_.Empty; int len = ary.length; diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_log_mgr.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_log_mgr.java index 72f180bd1..e04a37634 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_log_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_log_mgr.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.filters.dansguardians; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; import gplx.dbs.*; class Dg_log_mgr { private Db_conn conn; - private final Dg_file_tbl tbl_file = new Dg_file_tbl(); - private final Dg_rule_tbl tbl_rule = new Dg_rule_tbl(); - private final Dg_page_score_tbl tbl_page_score = new Dg_page_score_tbl(); - private final Dg_page_rule_tbl tbl_page_rule = new Dg_page_rule_tbl(); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(16); + private final Dg_file_tbl tbl_file = new Dg_file_tbl(); + private final Dg_rule_tbl tbl_rule = new Dg_rule_tbl(); + private final Dg_page_score_tbl tbl_page_score = new Dg_page_score_tbl(); + private final Dg_page_rule_tbl tbl_page_rule = new Dg_page_rule_tbl(); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(16); public void Init(Io_url db_url) { Db_conn_bldr_data conn_data = Db_conn_bldr.Instance.Get_or_new(db_url); conn = conn_data.Conn(); boolean created = conn_data.Created(); @@ -41,7 +41,7 @@ class Dg_log_mgr { public void Rls() {conn.Txn_end();} } class Dg_file_tbl { - private String tbl_name = "dg_file"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "dg_file"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_file_id, fld_file_path, fld_rule_count; private Db_conn conn; private Db_stmt stmt_insert; public void Conn_(Db_conn new_conn, boolean created) { @@ -67,7 +67,7 @@ class Dg_file_tbl { } } class Dg_rule_tbl implements Rls_able { - private String tbl_name = "dg_rule"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "dg_rule"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_file_id, fld_rule_id, fld_rule_idx, fld_rule_score, fld_rule_text; private Db_conn conn; private Db_stmt stmt_insert; public void Conn_(Db_conn new_conn, boolean created) { @@ -100,7 +100,7 @@ class Dg_rule_tbl implements Rls_able { } } class Dg_page_score_tbl implements Rls_able { - private String tbl_name = "dg_page_score"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "dg_page_score"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_log_tid, fld_page_id, fld_page_ns, fld_page_ttl, fld_page_len, fld_page_score, fld_page_rule_count, fld_clude_type; private Db_conn conn; private Db_stmt stmt_insert; public void Conn_(Db_conn new_conn, boolean created) { @@ -140,7 +140,7 @@ class Dg_page_score_tbl implements Rls_able { } } class Dg_page_rule_tbl implements Rls_able { - private String tbl_name = "dg_page_rule"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "dg_page_rule"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_log_tid, fld_page_id, fld_rule_id, fld_rule_score_total; private Db_conn conn; private Db_stmt stmt_insert; public void Conn_(Db_conn new_conn, boolean created) { diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java index db2eb2513..6005ea418 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.filters.dansguardians; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; import gplx.core.primitives.*; import gplx.core.btries.*; import gplx.xowa.addons.apps.cfgs.*; @@ -20,13 +20,13 @@ import gplx.xowa.langs.*; import gplx.xowa.bldrs.filters.core.*; public class Dg_match_mgr { private int score_init, score_fail; private boolean log_enabled, case_match; - private final Btrie_slim_mgr btrie = Btrie_slim_mgr.cs(); - private final Ordered_hash rules = Ordered_hash_.New_bry(); - private final Ordered_hash rule_group_hash = Ordered_hash_.New_bry(), rule_tally_hash = Ordered_hash_.New_bry(); - private final Dg_parser parser = new Dg_parser(); - private final Xob_ttl_filter_mgr ttl_filter_mgr = new Xob_ttl_filter_mgr(); - private final Dg_ns_skip_mgr ns_skip_mgr = new Dg_ns_skip_mgr(); - private final Dg_log_mgr log_mgr = new Dg_log_mgr(); + private final Btrie_slim_mgr btrie = Btrie_slim_mgr.cs(); + private final Ordered_hash rules = Ordered_hash_.New_bry(); + private final Ordered_hash rule_group_hash = Ordered_hash_.New_bry(), rule_tally_hash = Ordered_hash_.New_bry(); + private final Dg_parser parser = new Dg_parser(); + private final Xob_ttl_filter_mgr ttl_filter_mgr = new Xob_ttl_filter_mgr(); + private final Dg_ns_skip_mgr ns_skip_mgr = new Dg_ns_skip_mgr(); + private final Dg_log_mgr log_mgr = new Dg_log_mgr(); public Dg_match_mgr(Io_url root_dir, int score_init, int score_fail, boolean case_match, boolean log_enabled, Io_url log_url) { this.score_init = score_init; this.score_fail = score_fail; this.case_match = case_match; this.log_enabled = log_enabled; if (log_enabled) log_mgr.Init(log_url); @@ -155,8 +155,8 @@ public class Dg_match_mgr { } class Dg_rule_group { public Dg_rule_group(byte[] word) {this.word = word;} - public byte[] Word() {return word;} private final byte[] word; - public List_adp Rules_list() {return rules_list;} private final List_adp rules_list = List_adp_.New(); + public byte[] Word() {return word;} private final byte[] word; + public List_adp Rules_list() {return rules_list;} private final List_adp rules_list = List_adp_.New(); public Dg_rule[] Rules_ary() { if (rules_ary == null) rules_ary = (Dg_rule[])rules_list.To_ary_and_clear(Dg_rule.class); @@ -170,8 +170,8 @@ class Dg_rule_tally { this.results_len = words.length; this.results = new int[results_len]; } - public Dg_rule Rule() {return rule;} private final Dg_rule rule; - public int[] Results() {return results;} private final int[] results; private final int results_len; + public Dg_rule Rule() {return rule;} private final Dg_rule rule; + public int[] Results() {return results;} private final int[] results; private final int results_len; public void Process(byte[] word) { Int_obj_ref idx = (Int_obj_ref)rule.Word_idx_hash().Get_by_bry(word); int idx_val = idx.Val(); diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr_tst.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr_tst.java index eb2f5f905..2e27bd0a9 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_match_mgr_tst.java @@ -25,7 +25,7 @@ public class Dg_match_mgr_tst { } class Dg_match_mgr_fxt { private Dg_match_mgr match_mgr; - private final List_adp rule_list = List_adp_.New(); + private final List_adp rule_list = List_adp_.New(); public void Clear() { Db_conn_bldr.Instance.Reg_default_mem(); Io_url root_dir = Io_url_.mem_dir_("mem/dg/"); diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_ns_skip_mgr.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_ns_skip_mgr.java index 90aab1725..e0bdc291c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_ns_skip_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_ns_skip_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.filters.dansguardians; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; import gplx.core.lists.hashs.*; class Dg_ns_skip_mgr { - private final Hash_adp__int ns_hash = new Hash_adp__int(); + private final Hash_adp__int ns_hash = new Hash_adp__int(); private boolean is_empty = true; public boolean Has(int ns) {return is_empty ? false : ns_hash.Get_by_or_null(ns) != null;} public void Load(Io_url url) { diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java index 6174f7640..3ce9af561 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.filters.dansguardians; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.filters.*; class Dg_parser { - private Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.Instance; private final Bry_bfr key_bldr = Bry_bfr_.Reset(32); - private final List_adp files = List_adp_.New(), lines = List_adp_.New(), words = List_adp_.New(); + private Gfo_usr_dlg usr_dlg = Gfo_usr_dlg_.Instance; private final Bry_bfr key_bldr = Bry_bfr_.Reset(32); + private final List_adp files = List_adp_.New(), lines = List_adp_.New(), words = List_adp_.New(); private int next_id = 0; public Dg_file[] Parse_dir(Io_url dir) { Io_url[] fil_urls = Io_mgr.Instance.QueryDir_args(dir).Recur_(true).ExecAsUrlAry(); diff --git a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser_tst.java index 1626c6d55..c15c1c1a7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/filters/dansguardians/Dg_parser_tst.java @@ -37,8 +37,8 @@ public class Dg_parser_tst { // } } class Dg_parser_fxt { - private final Dg_parser parser = new Dg_parser(); private final Bry_bfr bfr = Bry_bfr_.Reset(32); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(16); + private final Dg_parser parser = new Dg_parser(); private final Bry_bfr bfr = Bry_bfr_.Reset(32); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(16); public void Init() {} public Dg_rule Make_line(int score, String... words) {return new Dg_rule(-1, -1, -1, Dg_rule.Tid_rule, null, score, Dg_word.Ary_new_by_str_ary(words));} public void Test_parse_line(String str, Dg_rule expd) { diff --git a/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_file.java b/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_file.java index e5f7dafbb..074a9696e 100644 --- a/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_file.java +++ b/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_file.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; public class Xob_info_file { @@ -20,14 +20,14 @@ public class Xob_info_file { this.id = id; this.type = type; this.ns_ids = ns_ids; this.part_id = part_id; this.guid = guid; this.schema_version = schema_version; this.core_file_name = core_file_name; this.orig_file_name = orig_file_name; } - public int Id() {return id;} private final int id; - public String Type() {return type;} private final String type; - public String Ns_ids() {return ns_ids;} private final String ns_ids; - public int Part_id() {return part_id;} private final int part_id; - public Guid_adp Guid() {return guid;} private final Guid_adp guid; - public int Schema_version() {return schema_version;} private final int schema_version; - public String Core_file_name() {return core_file_name;} private final String core_file_name; - public String Orig_file_name() {return orig_file_name;} private final String orig_file_name; + public int Id() {return id;} private final int id; + public String Type() {return type;} private final String type; + public String Ns_ids() {return ns_ids;} private final String ns_ids; + public int Part_id() {return part_id;} private final int part_id; + public Guid_adp Guid() {return guid;} private final Guid_adp guid; + public int Schema_version() {return schema_version;} private final int schema_version; + public String Core_file_name() {return core_file_name;} private final String core_file_name; + public String Orig_file_name() {return orig_file_name;} private final String orig_file_name; public void Save(Db_cfg_tbl tbl) { tbl.Conn().Txn_bgn("make__info__file"); tbl.Insert_int (Cfg_grp, Cfg_key__id , id); diff --git a/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_session.java b/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_session.java index de4a699d1..0eed7eeb3 100644 --- a/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_session.java +++ b/400_xowa/src/gplx/xowa/bldrs/infos/Xob_info_session.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.infos; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.dbs.cfgs.*; public class Xob_info_session { Xob_info_session(String user, String version, String wiki_domain, String dump_name, DateAdp time, Guid_adp guid) { this.user = user; this.version = version; this.wiki_domain = wiki_domain; this.dump_name = dump_name; this.time = time; this.guid = guid; } - public String User() {return user;} private final String user; - public String Version() {return version;} private final String version; - public String Wiki_domain() {return wiki_domain;} private final String wiki_domain; - public String Dump_name() {return dump_name;} private final String dump_name; - public DateAdp Time() {return time;} private final DateAdp time; - public Guid_adp Uuid() {return guid;} private final Guid_adp guid; + public String User() {return user;} private final String user; + public String Version() {return version;} private final String version; + public String Wiki_domain() {return wiki_domain;} private final String wiki_domain; + public String Dump_name() {return dump_name;} private final String dump_name; + public DateAdp Time() {return time;} private final DateAdp time; + public Guid_adp Uuid() {return guid;} private final Guid_adp guid; public void Save(Db_cfg_tbl tbl) { tbl.Conn().Txn_bgn("make__info__session"); tbl.Insert_str (Cfg_grp, Cfg_key__user , user); @@ -55,5 +55,5 @@ public class Xob_info_session { , Cfg_key__guid = "guid" // EX: 00000000-0000-0000-0000-000000000000 ; public static Xob_info_session new_(String user, String wiki_domain, String dump_name) {return new Xob_info_session(user, Xoa_app_.Version, wiki_domain, dump_name, Datetime_now.Get(), Guid_adp_.New());} - public static final Xob_info_session Test = new_("anonymous", "en.wikipedia.org", "enwiki-latest-pages-articles"); + public static final Xob_info_session Test = new_("anonymous", "en.wikipedia.org", "enwiki-latest-pages-articles"); } diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java index ec0e060a0..198b80d77 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_imageMagick_download.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.core.threads.*; -class Xoi_cmd_imageMagick_download extends Gfo_thread_cmd_download implements Gfo_thread_cmd {// private static final byte[] Bry_windows_zip = Bry_.new_a7("-windows.zip"); +class Xoi_cmd_imageMagick_download extends Gfo_thread_cmd_download implements Gfo_thread_cmd {// private static final byte[] Bry_windows_zip = Bry_.new_a7("-windows.zip"); // static final String Src_imageMagick = "ftp://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/"; public Xoi_cmd_imageMagick_download(Gfo_usr_dlg usr_dlg, Gfui_kit kit, Io_url trg) {this.Ctor(usr_dlg, kit); this.trg = trg;} Io_url trg; @Override public byte Async_init() { // diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_mgr.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_mgr.java index 9c569b3c8..35ce02941 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_cmd_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.brys.fmtrs.*; import gplx.core.threads.*; public class Xoi_cmd_mgr implements Gfo_invk { @@ -116,7 +116,7 @@ public class Xoi_cmd_mgr implements Gfo_invk { else if (String_.Eq(cmd_key, Xoi_cmd_search2_build.KEY)) return new Xoi_cmd_search2_build(install_mgr, wiki_key).Owner_(this); else throw Err_.new_unhandled(cmd_key); } - public static final String Wiki_cmd_custom = "wiki.custom", Wiki_cmd_dump_file = "wiki.dump_file"; + public static final String Wiki_cmd_custom = "wiki.custom", Wiki_cmd_dump_file = "wiki.dump_file"; public Gfo_thread_cmd Cmd_add(GfoMsg m) {Gfo_thread_cmd rv = Cmd_clone(m); cmds.Add(rv); return rv;} Gfo_thread_cmd Cmd_clone(GfoMsg m) { String cmd_key = m.ReadStr("v"); diff --git a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java index 42f904089..cd8fb456b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/installs/Xoi_mirror_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.installs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; public class Xoi_mirror_parser { public String[] Parse(String raw_str) { @@ -33,7 +33,7 @@ public class Xoi_mirror_parser { rv.Add(String_.new_u8(date)); } return rv.To_str_ary(); - } private static final byte[] CONST_href_bgn = Bry_.new_a7(" -1; i--) { diff --git a/400_xowa/src/gplx/xowa/bldrs/setups/addons/Xoi_firefox_installer.java b/400_xowa/src/gplx/xowa/bldrs/setups/addons/Xoi_firefox_installer.java index 3c50061ae..edbf715d1 100644 --- a/400_xowa/src/gplx/xowa/bldrs/setups/addons/Xoi_firefox_installer.java +++ b/400_xowa/src/gplx/xowa/bldrs/setups/addons/Xoi_firefox_installer.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.setups.addons; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.setups.*; import gplx.core.ios.zips.*; import gplx.core.envs.*; import gplx.xowa.apps.fsys.*; @@ -58,5 +58,5 @@ public class Xoi_firefox_installer implements Gfo_invk { if (ctx.Match(k, Invk_install)) Install_via_process(); else return Gfo_invk_.Rv_unhandled; return this; - } private static final String Invk_install = "install"; + } private static final String Invk_install = "install"; } diff --git a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Wmf_latest_parser.java b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Wmf_latest_parser.java index b6b402801..400810092 100644 --- a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Wmf_latest_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Wmf_latest_parser.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.setups.maints; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.setups.*; import gplx.core.btries.*; import gplx.core.ios.*; public class Wmf_latest_parser { private Ordered_hash hash = Ordered_hash_.New_bry(); - private final Btrie_rv trv = new Btrie_rv(); + private final Btrie_rv trv = new Btrie_rv(); public int Count() {return hash.Count();} public Wmf_latest_itm Get_at(int i) {return (Wmf_latest_itm)hash.Get_at(i);} public Wmf_latest_itm Get_by(byte[] k) {return (Wmf_latest_itm)hash.Get_by(k);} diff --git a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xoa_maint_wikis_mgr.java b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xoa_maint_wikis_mgr.java index 5177db545..88d593049 100644 --- a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xoa_maint_wikis_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xoa_maint_wikis_mgr.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.setups.maints; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.setups.*; public class Xoa_maint_wikis_mgr implements Gfo_invk { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public Xoa_maint_wikis_mgr(Xoae_app app) {this.app = app;} private Xoae_app app; public int Len() {return hash.Count();} public Xowe_wiki Get_at(int i) { diff --git a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xow_maint_mgr.java b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xow_maint_mgr.java index 4d53ee40a..00003ab3b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xow_maint_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/setups/maints/Xow_maint_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.setups.maints; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.setups.*; public class Xow_maint_mgr implements Gfo_invk { public Xow_maint_mgr(Xowe_wiki wiki) { @@ -49,7 +49,7 @@ public class Xow_maint_mgr implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } - private static final String Invk_wmf_dump_date = "wmf_dump_date", Invk_wmf_dump_date_ = "wmf_dump_date_", Invk_wmf_dump_done = "wmf_dump_done", Invk_wmf_dump_done_ = "wmf_dump_done_" + private static final String Invk_wmf_dump_date = "wmf_dump_date", Invk_wmf_dump_date_ = "wmf_dump_date_", Invk_wmf_dump_done = "wmf_dump_done", Invk_wmf_dump_done_ = "wmf_dump_done_" , Invk_wmf_dump_status = "wmf_dump_status", Invk_wmf_dump_status_ = "wmf_dump_status_", Invk_wiki_dump_date = "wiki_dump_date", Invk_wiki_dump_date_ = "wiki_dump_date_" , Invk_wiki_update_needed = "wiki_update_needed" ; diff --git a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser.java b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser.java index bac7373a0..045749ea2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.sql_dumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.flds.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; public class Xosql_dump_parser { @@ -154,6 +154,6 @@ public class Xosql_dump_parser { } public Xosql_dump_parser Src_rdr_bfr_len_(int v) {src_rdr_bfr_len = v; return this;} // TEST: - private static final byte[] Bry_insert_into = Bry_.new_a7("INSERT INTO "), Bry_values = Bry_.new_a7(" VALUES ("); + private static final byte[] Bry_insert_into = Bry_.new_a7("INSERT INTO "), Bry_values = Bry_.new_a7(" VALUES ("); private static final byte Mode__sql_bgn = 0, Mode__row_bgn = 1, Mode__row_end = 2, Mode__fld = 3, Mode__quote = 4, Mode__escape = 5; } diff --git a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser__tst.java b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser__tst.java index 7e4ecb7d8..b38537a76 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser__tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_dump_parser__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.bldrs.sql_dumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; import gplx.core.ios.*; import gplx.core.tests.*; public class Xosql_dump_parser__tst { - private final Xosql_dump_parser__fxt fxt = new Xosql_dump_parser__fxt(); + private final Xosql_dump_parser__fxt fxt = new Xosql_dump_parser__fxt(); private static final String table_def = "\n KEY \n) ENGINE; "; @Test public void One() { fxt.Init(String_.Ary("c1", "c2"), "c2").Test__parse(table_def + "INSERT INTO 'tbl_1' VALUES (1,2);", "2|"); @@ -74,7 +74,7 @@ class Xosql_dump_parser__fxt { } class Xosql_dump_cbk__test implements Xosql_dump_cbk { private int prv_idx = -1; - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Clear() {prv_idx = -1; bfr.Clear();} public void On_fld_done(int fld_idx, byte[] src, int val_bgn, int val_end) { if (fld_idx <= prv_idx) { diff --git a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_fld_itm.java b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_fld_itm.java index dadb84be3..1a331ab3f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_fld_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_fld_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.sql_dumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; class Xosql_fld_itm implements gplx.CompareAble { public Xosql_fld_itm(int uid, byte[] key, int idx) { @@ -21,7 +21,7 @@ class Xosql_fld_itm implements gplx.CompareAble { this.idx = idx; } public int Uid() {return uid;} private int uid; - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public int Idx() {return idx;} private int idx; public void Idx_(int v) {this.idx = v;} public void Uid_(int v) {this.uid = v;} @@ -32,7 +32,7 @@ class Xosql_fld_itm implements gplx.CompareAble { } } class Xosql_fld_hash { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); private int hash_len; public int Len() {return hash.Len();} public Xosql_fld_itm Get_by_key(byte[] k) {return (Xosql_fld_itm)hash.Get_by(k);} diff --git a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser.java b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser.java index c50970823..d5f4a7e5f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.sql_dumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.ios.*; class Xosql_tbl_parser { @@ -57,7 +57,7 @@ class Xosql_tbl_parser { if (rv == Int_.Max_value__31) throw Err_.new_wo_type("could not find 'PRIMARY KEY', 'UNIQUE KEY', or 'KEY' in SQL", "raw", Bry_.Mid(raw, bgn, end)); return Bry_.Mid(raw, bgn, rv); } - private final byte[] + private final byte[] Tkn__create_table = Bry_.new_a7("CREATE TABLE") , Tkn__ukey = Bry_.new_a7("\n UNIQUE KEY") , Tkn__pkey = Bry_.new_a7("\n PRIMARY KEY") diff --git a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser__tst.java b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser__tst.java index a7d5b2533..ffaf081ee 100644 --- a/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser__tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/sql_dumps/Xosql_tbl_parser__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.bldrs.sql_dumps; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; import gplx.core.tests.*; public class Xosql_tbl_parser__tst { - private final Xosql_tbl_parser__fxt fxt = new Xosql_tbl_parser__fxt(); + private final Xosql_tbl_parser__fxt fxt = new Xosql_tbl_parser__fxt(); @Test public void Unique_key() { fxt.Exec__parse(String_.Concat_lines_nl ( "ignore" @@ -70,7 +70,7 @@ public class Xosql_tbl_parser__tst { } } class Xosql_tbl_parser__fxt { - private final Xosql_tbl_parser parser = new Xosql_tbl_parser(); + private final Xosql_tbl_parser parser = new Xosql_tbl_parser(); private Ordered_hash tbl_flds; public void Exec__parse(String v) {this.tbl_flds = parser.Parse(Bry_.new_a7(v));} public void Test__count(int expd) {Gftest.Eq__int(expd, tbl_flds.Len());} diff --git a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_cmd__base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_cmd__base.java index 976e4f3f4..20e087269 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_cmd__base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_cmd__base.java @@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; public abstract class Xob_cmd__base implements Xob_cmd, Gfo_invk { - protected final Xoae_app app; protected final Xob_bldr bldr; protected Xowe_wiki wiki; protected final Gfo_usr_dlg usr_dlg; + protected final Xoae_app app; protected final Xob_bldr bldr; protected Xowe_wiki wiki; protected final Gfo_usr_dlg usr_dlg; public Xob_cmd__base(Xob_bldr bldr, Xowe_wiki wiki) { this.bldr = bldr; this.wiki = wiki; diff --git a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_io_utl__tst.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_io_utl__tst.java index 198a74eab..d1e172993 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_io_utl__tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_io_utl__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import org.junit.*; import gplx.core.tests.*; public class Xob_io_utl__tst { - private final Xob_io_utl__fxt fxt = new Xob_io_utl__fxt(); + private final Xob_io_utl__fxt fxt = new Xob_io_utl__fxt(); @Test public void Basic() { fxt.Test__match(String_.Ary("a.txt", "b.txt", "c.txt"), "b", String_.Ary(".txt"), "b.txt"); } diff --git a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java index 123a13bd9..fc19334c2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java +++ b/400_xowa/src/gplx/xowa/bldrs/wkrs/Xob_sql_dump_base.java @@ -17,7 +17,7 @@ package gplx.xowa.bldrs.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xow import gplx.core.flds.*; import gplx.core.ios.*; import gplx.xowa.wikis.tdbs.*; import gplx.xowa.bldrs.sql_dumps.*; import gplx.xowa.wikis.tdbs.bldrs.*; public abstract class Xob_sql_dump_base extends Xob_itm_dump_base implements Xob_cmd, Gfo_invk { - private final Xosql_dump_parser parser; protected boolean fail = false; + private final Xosql_dump_parser parser; protected boolean fail = false; public abstract String Cmd_key(); public Xob_sql_dump_base() { this.parser = New_parser(); diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/Xowmf_mgr.java b/400_xowa/src/gplx/xowa/bldrs/wms/Xowmf_mgr.java index e657464ef..e9cecf7dc 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/Xowmf_mgr.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/Xowmf_mgr.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.bldrs.wms; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; -import gplx.core.net.*; -import gplx.xowa.apps.wms.apis.*; import gplx.xowa.files.downloads.*; -public class Xowmf_mgr { - public Xowmf_mgr() { - download_wkr.Download_xrg().User_agent_(Xoa_app_.User_agent); - } - public void Init_by_app(Xoa_app app) { - download_wkr.Download_xrg().Prog_dlg_(Xoa_app_.Usr_dlg()); - } - public Xowmf_api_mgr Api_mgr() {return api_mgr;} private Xowmf_api_mgr api_mgr = new Xowmf_api_mgr(); - public Xof_download_wkr Download_wkr() {return download_wkr;} private final Xof_download_wkr download_wkr = new Xof_download_wkr_io(); -} +package gplx.xowa.bldrs.wms; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; +import gplx.core.net.*; +import gplx.xowa.apps.wms.apis.*; import gplx.xowa.files.downloads.*; +public class Xowmf_mgr { + public Xowmf_mgr() { + download_wkr.Download_xrg().User_agent_(Xoa_app_.User_agent); + } + public void Init_by_app(Xoa_app app) { + download_wkr.Download_xrg().Prog_dlg_(Xoa_app_.Usr_dlg()); + } + public Xowmf_api_mgr Api_mgr() {return api_mgr;} private Xowmf_api_mgr api_mgr = new Xowmf_api_mgr(); + public Xof_download_wkr Download_wkr() {return download_wkr;} private final Xof_download_wkr download_wkr = new Xof_download_wkr_io(); +} diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/dump_pages/Xowmf_wiki_dump_dirs_parser.java b/400_xowa/src/gplx/xowa/bldrs/wms/dump_pages/Xowmf_wiki_dump_dirs_parser.java index e1b16f2aa..dc473165c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/dump_pages/Xowmf_wiki_dump_dirs_parser.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/dump_pages/Xowmf_wiki_dump_dirs_parser.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.dump_pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; public class Xowmf_wiki_dump_dirs_parser { public static String[] Parse(byte[] wiki, byte[] src) { @@ -29,5 +29,5 @@ public class Xowmf_wiki_dump_dirs_parser { } return (String[])rv.To_ary_and_clear(String.class); } - private static final byte[] Tkn_href = Bry_.new_a7(" href=\""), Tkn_owner = Bry_.new_a7(".."); + private static final byte[] Tkn_href = Bry_.new_a7(" href=\""), Tkn_owner = Bry_.new_a7(".."); } diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/revs/Xowm_rev_sync.java b/400_xowa/src/gplx/xowa/bldrs/wms/revs/Xowm_rev_sync.java index 3c4b03943..66d1dc20b 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/revs/Xowm_rev_sync.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/revs/Xowm_rev_sync.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.revs; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.xowa.bldrs.wms.*; class Xowm_rev_sync { - private final Ordered_hash cur_hash = Ordered_hash_.New_bry(), new_hash = Ordered_hash_.New_bry(); - private final List_adp del_list = List_adp_.New(); + private final Ordered_hash cur_hash = Ordered_hash_.New_bry(), new_hash = Ordered_hash_.New_bry(); + private final List_adp del_list = List_adp_.New(); public int Batch_size() {return batch_size;} public void Batch_size_(int v) {batch_size = v;} private int batch_size = 50; public Xowm_rev_wkr__meta Wkr__cur_meta() {return wkr__cur_meta;} private Xowm_rev_wkr__meta wkr__cur_meta; public Xowm_rev_wkr__meta Wkr__new_meta() {return wkr__new_meta;} private Xowm_rev_wkr__meta wkr__new_meta; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_db.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_db.java index 61c131c32..1f3e360c7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_db.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_db.java @@ -1,42 +1,42 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.xwikis.bldrs.*; public class Site_core_db { private Db_conn conn; - private final Site_core_tbl tbl__core; - private final Site_kv_tbl tbl__general; - private final Site_namespace_tbl tbl__namespace; - private final Site_statistic_tbl tbl__statistic; - private final Site_interwikimap_tbl tbl__interwikimap; - private final Site_namespacealias_tbl tbl__namespacealias; - private final Site_specialpagealias_tbl tbl__specialpagealias; - private final Site_library_tbl tbl__library; - private final Site_extension_tbl tbl__extension; - private final Site_skin_tbl tbl__skin; - private final Site_magicword_tbl tbl__magicword; - private final Site_val_tbl tbl__functionhook; - private final Site_showhook_tbl tbl__showhook; - private final Site_val_tbl tbl__extensiontag; - private final Site_val_tbl tbl__protocol; - private final Site_kv_tbl tbl__defaultoption; - private final Site_language_tbl tbl__language; - private final Db_tbl[] tbl_ary; + private final Site_core_tbl tbl__core; + private final Site_kv_tbl tbl__general; + private final Site_namespace_tbl tbl__namespace; + private final Site_statistic_tbl tbl__statistic; + private final Site_interwikimap_tbl tbl__interwikimap; + private final Site_namespacealias_tbl tbl__namespacealias; + private final Site_specialpagealias_tbl tbl__specialpagealias; + private final Site_library_tbl tbl__library; + private final Site_extension_tbl tbl__extension; + private final Site_skin_tbl tbl__skin; + private final Site_magicword_tbl tbl__magicword; + private final Site_val_tbl tbl__functionhook; + private final Site_showhook_tbl tbl__showhook; + private final Site_val_tbl tbl__extensiontag; + private final Site_val_tbl tbl__protocol; + private final Site_kv_tbl tbl__defaultoption; + private final Site_language_tbl tbl__language; + private final Db_tbl[] tbl_ary; public Site_core_db(Io_url db_url) { Db_conn_bldr_data conn_data = Db_conn_bldr.Instance.Get_or_new(db_url); this.conn = conn_data.Conn(); boolean created = conn_data.Created(); diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_tbl.java index 4311226da..91585a5cc 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_core_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; public class Site_core_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_site_domain, fld_json_completed, fld_json_date, fld_json_text; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_site_domain, fld_json_completed, fld_json_date, fld_json_text; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete, stmt_update; public Site_core_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_extension_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_extension_tbl.java index 56f5625eb..4495aee92 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_extension_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_extension_tbl.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_extension_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_type, fld_name, fld_namemsg, fld_description, fld_descriptionmsg, fld_author, fld_url, fld_version + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_type, fld_name, fld_namemsg, fld_description, fld_descriptionmsg, fld_author, fld_url, fld_version , fld_vcs_system, fld_vcs_version, fld_vcs_url, fld_vcs_date, fld_license_name, fld_license, fld_credits; - private final Db_conn conn; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_extension_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_itm.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_itm.java index d710efcc3..35e8b8b8c 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; class Site_interwikimap_itm implements To_str_able { public Site_interwikimap_itm(byte[] prefix, boolean local @@ -28,14 +28,14 @@ class Site_interwikimap_itm implements To_str_able { this.Url = url; this.Protorel = protorel; } - public final byte[] Prefix; - public final boolean Local; - public final boolean Extralanglink; - public final byte[] Linktext; - public final byte[] Sitename; - public final byte[] Language; - public final boolean Localinterwiki; - public final byte[] Url; - public final boolean Protorel; + public final byte[] Prefix; + public final boolean Local; + public final boolean Extralanglink; + public final byte[] Linktext; + public final byte[] Sitename; + public final byte[] Language; + public final boolean Localinterwiki; + public final byte[] Url; + public final boolean Protorel; public String To_str() {return String_.Concat_with_obj("|", Prefix, Local, Extralanglink, Linktext, Sitename, Language, Localinterwiki, Url, Protorel);} } diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_tbl.java index d0947ecb9..332b750a5 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_interwikimap_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_interwikimap_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_prefix, fld_local, fld_extralanglink, fld_linktext, fld_sitename, fld_language, fld_localinterwiki, fld_url, fld_protorel; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_prefix, fld_local, fld_extralanglink, fld_linktext, fld_sitename, fld_language, fld_localinterwiki, fld_url, fld_protorel; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_interwikimap_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_json_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_json_parser_tst.java index 07953f6f7..5582d2f47 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_json_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_json_parser_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import org.junit.*; import gplx.langs.jsons.*; import gplx.xowa.wikis.nss.*; public class Site_json_parser_tst { - private final Site_json_parser_fxt fxt = new Site_json_parser_fxt(); + private final Site_json_parser_fxt fxt = new Site_json_parser_fxt(); @Before public void init() {Gfo_usr_dlg_.Instance = Gfo_usr_dlg_.Test_console();} @After public void term() {Gfo_usr_dlg_.Instance = Gfo_usr_dlg_.Noop;} @Test public void General() { @@ -379,8 +379,8 @@ public class Site_json_parser_tst { // } } class Site_json_parser_fxt { - private final Json_parser json_parser = new Json_parser(); - private final Site_json_parser site_meta_parser; + private final Json_parser json_parser = new Json_parser(); + private final Site_json_parser site_meta_parser; private Site_meta_itm site_meta; public Site_json_parser_fxt() { this.site_meta_parser = new Site_json_parser(json_parser); diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_kv_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_kv_tbl.java index 5e33c1a4e..c190efe48 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_kv_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_kv_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_kv_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_key, fld_val; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_key, fld_val; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_kv_tbl(Db_conn conn, String tbl_name) { this.conn = conn; this.tbl_name = tbl_name; @@ -27,7 +27,7 @@ class Site_kv_tbl implements Db_tbl { this.fld_val = flds.Add_str("val", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds, Dbmeta_idx_itm.new_unique_by_name(tbl_name, Dbmeta_idx_itm.Bld_idx_name(tbl_name, "main"), fld_site_abrv, fld_key)));} public void Delete_all() {conn.Stmt_delete(tbl_name, Dbmeta_fld_itm.Str_ary_empty).Exec_delete();} public void Rls() { diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_itm.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_itm.java index d9a725fc7..8a68201c7 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_itm.java @@ -13,15 +13,15 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; -class Site_language_itm implements To_str_able { - public Site_language_itm(byte[] code, byte[] bcp47, byte[] name) { - this.code = code; - this.bcp47 = bcp47; - this.name = name; - } - public byte[] Code() {return code;} private final byte[] code; - public byte[] Bcp47() {return bcp47;} private final byte[] bcp47; - public byte[] Name() {return name;} private final byte[] name; - public String To_str() {return String_.Concat_with_obj("|", code, bcp47, name);} -} +package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; +class Site_language_itm implements To_str_able { + public Site_language_itm(byte[] code, byte[] bcp47, byte[] name) { + this.code = code; + this.bcp47 = bcp47; + this.name = name; + } + public byte[] Code() {return code;} private final byte[] code; + public byte[] Bcp47() {return bcp47;} private final byte[] bcp47; + public byte[] Name() {return name;} private final byte[] name; + public String To_str() {return String_.Concat_with_obj("|", code, bcp47, name);} +} diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_tbl.java index 5a5da74ab..c5f3301c1 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_language_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_language_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_code, fld_name, fld_bcp47; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_code, fld_name, fld_bcp47; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_language_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_library_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_library_tbl.java index fe9e54c71..08232c556 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_library_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_library_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_library_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_name, fld_version; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_name, fld_version; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_library_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_magicword_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_magicword_tbl.java index c55817463..3b0186cdc 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_magicword_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_magicword_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_magicword_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_name, fld_case_match, fld_aliases; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_name, fld_case_match, fld_aliases; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_magicword_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_itm.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_itm.java index 997d47c63..16dd2a9cb 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_itm.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_itm.java @@ -1,36 +1,36 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; public class Site_meta_itm { - public Ordered_hash General_list() {return general_list;} private final Ordered_hash general_list = Ordered_hash_.New_bry(); - public Ordered_hash Namespace_list() {return namespace_list;} private final Ordered_hash namespace_list = Ordered_hash_.New(); - public Site_statistic_itm Statistic_itm() {return statistic_itm;} private final Site_statistic_itm statistic_itm = new Site_statistic_itm(); - public Ordered_hash Interwikimap_list() {return interwikimap_list;} private final Ordered_hash interwikimap_list = Ordered_hash_.New_bry(); - public List_adp Namespacealias_list() {return namespacealias_list;} private final List_adp namespacealias_list = List_adp_.New(); - public Ordered_hash Specialpagealias_list() {return specialpagealias_list;} private final Ordered_hash specialpagealias_list = Ordered_hash_.New_bry(); - public Ordered_hash Library_list() {return library_list;} private final Ordered_hash library_list = Ordered_hash_.New_bry(); - public Ordered_hash Extension_list() {return extension_list;} private final Ordered_hash extension_list = Ordered_hash_.New_bry(); - public Ordered_hash Skin_list() {return skin_list;} private final Ordered_hash skin_list = Ordered_hash_.New_bry(); - public Ordered_hash Magicword_list() {return magicword_list;} private final Ordered_hash magicword_list = Ordered_hash_.New_bry(); - public Ordered_hash Functionhook_list() {return functionhook_list;} private final Ordered_hash functionhook_list = Ordered_hash_.New_bry(); - public Ordered_hash Showhook_list() {return showhook_list;} private final Ordered_hash showhook_list = Ordered_hash_.New_bry(); - public Ordered_hash Extensiontag_list() {return extensiontag_list;} private final Ordered_hash extensiontag_list = Ordered_hash_.New_bry(); - public Ordered_hash Protocol_list() {return protocol_list;} private final Ordered_hash protocol_list = Ordered_hash_.New_bry(); - public Ordered_hash Defaultoption_list() {return defaultoption_list;} private final Ordered_hash defaultoption_list = Ordered_hash_.New(); - public Ordered_hash Language_list() {return language_list;} private final Ordered_hash language_list = Ordered_hash_.New_bry(); + public Ordered_hash General_list() {return general_list;} private final Ordered_hash general_list = Ordered_hash_.New_bry(); + public Ordered_hash Namespace_list() {return namespace_list;} private final Ordered_hash namespace_list = Ordered_hash_.New(); + public Site_statistic_itm Statistic_itm() {return statistic_itm;} private final Site_statistic_itm statistic_itm = new Site_statistic_itm(); + public Ordered_hash Interwikimap_list() {return interwikimap_list;} private final Ordered_hash interwikimap_list = Ordered_hash_.New_bry(); + public List_adp Namespacealias_list() {return namespacealias_list;} private final List_adp namespacealias_list = List_adp_.New(); + public Ordered_hash Specialpagealias_list() {return specialpagealias_list;} private final Ordered_hash specialpagealias_list = Ordered_hash_.New_bry(); + public Ordered_hash Library_list() {return library_list;} private final Ordered_hash library_list = Ordered_hash_.New_bry(); + public Ordered_hash Extension_list() {return extension_list;} private final Ordered_hash extension_list = Ordered_hash_.New_bry(); + public Ordered_hash Skin_list() {return skin_list;} private final Ordered_hash skin_list = Ordered_hash_.New_bry(); + public Ordered_hash Magicword_list() {return magicword_list;} private final Ordered_hash magicword_list = Ordered_hash_.New_bry(); + public Ordered_hash Functionhook_list() {return functionhook_list;} private final Ordered_hash functionhook_list = Ordered_hash_.New_bry(); + public Ordered_hash Showhook_list() {return showhook_list;} private final Ordered_hash showhook_list = Ordered_hash_.New_bry(); + public Ordered_hash Extensiontag_list() {return extensiontag_list;} private final Ordered_hash extensiontag_list = Ordered_hash_.New_bry(); + public Ordered_hash Protocol_list() {return protocol_list;} private final Ordered_hash protocol_list = Ordered_hash_.New_bry(); + public Ordered_hash Defaultoption_list() {return defaultoption_list;} private final Ordered_hash defaultoption_list = Ordered_hash_.New(); + public Ordered_hash Language_list() {return language_list;} private final Ordered_hash language_list = Ordered_hash_.New_bry(); public Site_meta_itm Clear() { general_list.Clear(); namespace_list.Clear(); diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_parser__general.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_parser__general.java index bf4699de6..c6962aee6 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_parser__general.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_meta_parser__general.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.core.primitives.*; import gplx.langs.jsons.*; class Site_meta_parser__general extends Json_parser__list_nde__base { - private final Site_meta_parser__general__kv parser__image = new Site_meta_parser__general__kv("imagelimits", "width", "height"); - private final Site_meta_parser__general__lone parser__fallback = new Site_meta_parser__general__lone("fallback", "code"); - private final Site_meta_parser__general__kv parser__variants = new Site_meta_parser__general__kv("variants", "code", "name"); + private final Site_meta_parser__general__kv parser__image = new Site_meta_parser__general__kv("imagelimits", "width", "height"); + private final Site_meta_parser__general__lone parser__fallback = new Site_meta_parser__general__lone("fallback", "code"); + private final Site_meta_parser__general__kv parser__variants = new Site_meta_parser__general__kv("variants", "code", "name"); private String cur_context; public void Parse(String context, Ordered_hash list, Json_nde nde) { this.cur_context = context + ".general"; @@ -36,7 +36,7 @@ class Site_meta_parser__general extends Json_parser__list_nde__base { } } private static final int Tid__fallback = 1, Tid__variants = 2, Tid__thumblimits = 3, Tid__imagelimits = 4, Tid__imagelimits__width = 5, Tid__imagelimits__height = 6; - private static final Hash_adp_bry complex_props = Hash_adp_bry.cs() + private static final Hash_adp_bry complex_props = Hash_adp_bry.cs() .Add_str_int("fallback" , Tid__fallback) .Add_str_int("variants" , Tid__variants) .Add_str_int("thumblimits" , Tid__thumblimits) @@ -247,7 +247,7 @@ class Site_meta_parser__showhook extends Json_parser__list_nde__base { } list.Add(key, new Site_showhook_itm(key, scribunto, subscribers_bry_ary)); } - private final static byte[] Key__scribunto = Bry_.new_a7("scribunto"); + private final static byte[] Key__scribunto = Bry_.new_a7("scribunto"); } class Site_meta_parser__language extends Json_parser__list_nde__base { private Ordered_hash list; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespace_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespace_tbl.java index 53a682599..562621df2 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespace_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespace_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; public class Site_namespace_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_id, fld_case_tid, fld_canonical, fld_localized, fld_subpages, fld_content, fld_defaultcontentmodel; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_id, fld_case_tid, fld_canonical, fld_localized, fld_subpages, fld_content, fld_defaultcontentmodel; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_namespace_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespacealias_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespacealias_tbl.java index 9bf05a683..f3fac2f28 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespacealias_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_namespacealias_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_namespacealias_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_id, fld_alias; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_id, fld_alias; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_namespacealias_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_showhook_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_showhook_tbl.java index e9ae3b2da..e15bf788f 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_showhook_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_showhook_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_showhook_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_name, fld_scribunto, fld_subscribers; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_name, fld_scribunto, fld_subscribers; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_showhook_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_skin_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_skin_tbl.java index a9658d45f..1cec670a6 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_skin_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_skin_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_skin_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_code, fld_dflt, fld_name, fld_unusable; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_code, fld_dflt, fld_name, fld_unusable; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_skin_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_specialpagealias_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_specialpagealias_tbl.java index 5cb5600c4..a99e11984 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_specialpagealias_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_specialpagealias_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_specialpagealias_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_realname, fld_aliases; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_realname, fld_aliases; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_specialpagealias_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_statistic_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_statistic_tbl.java index fe281b733..18ed5f4ef 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_statistic_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_statistic_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_statistic_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_pages, fld_articles, fld_edits, fld_images, fld_users, fld_activeusers, fld_admins, fld_jobs, fld_queued_massmessages; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_pages, fld_articles, fld_edits, fld_images, fld_users, fld_activeusers, fld_admins, fld_jobs, fld_queued_massmessages; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_statistic_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_val_tbl.java b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_val_tbl.java index fd6a558c6..fd52118bd 100644 --- a/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_val_tbl.java +++ b/400_xowa/src/gplx/xowa/bldrs/wms/sites/Site_val_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.wms.sites; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wms.*; import gplx.dbs.*; class Site_val_tbl implements Db_tbl { - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_site_abrv, fld_val; - private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_site_abrv, fld_val; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete; public Site_val_tbl(Db_conn conn, String tbl_name) { this.conn = conn; @@ -27,7 +27,7 @@ class Site_val_tbl implements Db_tbl { this.fld_val = flds.Add_str("val", 255); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds, Dbmeta_idx_itm.new_unique_by_name(tbl_name, Dbmeta_idx_itm.Bld_idx_name(tbl_name, "main"), fld_site_abrv, fld_val)));} public void Delete_all() {conn.Stmt_delete(tbl_name, Dbmeta_fld_itm.Str_ary_empty).Exec_delete();} public void Rls() { diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_import_marker.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_import_marker.java index 0e20e0c7d..09068a463 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_import_marker.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_import_marker.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; 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."); diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_page_bldr.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_page_bldr.java index 079193f92..c0c762a54 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_page_bldr.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_page_bldr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.ios.*; import gplx.xowa.wikis.data.tbls.*; public class Xob_xml_page_bldr { @@ -54,9 +54,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"); } /* diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_.java index 2b5303070..979845592 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.bldrs.xmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.bldrs.*; import gplx.core.btries.*; public class Xob_xml_parser_ { @@ -27,7 +27,7 @@ public class Xob_xml_parser_ { trie_add(rv, Bry_tab, Id_tab, Bry_tab_ent); trie_add(rv, Bry_cr_nl, Id_cr_nl, Byte_ascii.Nl); trie_add(rv, Bry_cr, Id_cr, Byte_ascii.Nl); return rv; } - public static final byte[] + public static final byte[] Bry_page_bgn = Bry_.new_a7(""), Bry_page_bgn_frag = Bry_.new_a7("") , Bry_title_bgn = Bry_.new_a7(""), Bry_title_bgn_frag = Bry_.new_a7("<title"), Bry_title_end = Bry_.new_a7("") , Bry_id_bgn = Bry_.new_a7(""), Bry_id_bgn_frag = Bry_.new_a7("") diff --git a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java index 200971aee..3e8927fa0 100644 --- a/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java +++ b/400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser_tst.java @@ -112,7 +112,7 @@ 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_(); + 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(); @@ -134,7 +134,7 @@ public class Xob_xml_parser_tst { } } class Xob_xml_parser_fxt { -// private final Xob_xml_parser page_parser = new Xob_xml_parser(); +// private final Xob_xml_parser page_parser = new Xob_xml_parser(); // public void Test__parse(Io_buffer_rdr fil, Xowd_page_itm expd, int cur_pos) { // Xowd_page_itm actl = new Xowd_page_itm(); // int rv = page_parser.Parse_page(actl, usr_dlg, fil, fil.Bfr(), cur_pos, ns_mgr); diff --git a/400_xowa/src/gplx/xowa/drds/Xod_app.java b/400_xowa/src/gplx/xowa/drds/Xod_app.java index 031068a94..79776ab54 100644 --- a/400_xowa/src/gplx/xowa/drds/Xod_app.java +++ b/400_xowa/src/gplx/xowa/drds/Xod_app.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.drds; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.pages.*; import gplx.xowa.drds.files.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.data.tbls.*; @@ -22,10 +22,10 @@ import gplx.langs.htmls.encoders.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.addons.wikis.searchs.*; import gplx.xowa.addons.wikis.searchs.searchers.*; import gplx.xowa.langs.cases.*; public class Xod_app { - private final Xoav_app app; - private final Xod_page_mgr page_mgr = new Xod_page_mgr(); - private final Xod_file_mgr file_mgr = new Xod_file_mgr(); - private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr(); + private final Xoav_app app; + private final Xod_page_mgr page_mgr = new Xod_page_mgr(); + private final Xod_file_mgr file_mgr = new Xod_file_mgr(); + private final Srch_ns_mgr ns_mgr = new Srch_ns_mgr(); public Xod_app(Xoav_app app) { this.app = app; ns_mgr.Add_main_if_empty(); diff --git a/400_xowa/src/gplx/xowa/drds/Xod_app_tst.java b/400_xowa/src/gplx/xowa/drds/Xod_app_tst.java index 47ccc0159..dd0c9b022 100644 --- a/400_xowa/src/gplx/xowa/drds/Xod_app_tst.java +++ b/400_xowa/src/gplx/xowa/drds/Xod_app_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.drds; import gplx.*; import gplx.xowa.*; import org.junit.*; import gplx.xowa.drds.pages.*; import gplx.xowa.wikis.*; import gplx.xowa.htmls.sections.*; public class Xod_app_tst { - private final Xod_app_tstr tstr = new Xod_app_tstr(); + private final Xod_app_tstr tstr = new Xod_app_tstr(); @Before public void init() {tstr.Init_mem();} // COMMENTED: broke from changes to auto-init wiki; DATE:2016-06-16 // @Test public void Get() { @@ -34,8 +34,8 @@ public class Xod_app_tst { } } class Xod_app_tstr { - private final gplx.xowa.apps.Xoav_app app; private final Xowv_wiki wiki; - private final Xod_app drd_provider; + private final gplx.xowa.apps.Xoav_app app; private final Xowv_wiki wiki; + private final Xod_app drd_provider; public Xod_app_tstr() { this.app = Xoa_app_fxt.Make__app__view(); this.wiki = Xoa_app_fxt.Make__wiki__view(app); @@ -43,7 +43,7 @@ class Xod_app_tstr { Xoa_test_.Init__db__view(wiki); drd_provider = new Xod_app(app); } - public Xowd_data_tstr Data_mgr() {return data_mgr;} private final Xowd_data_tstr data_mgr = new Xowd_data_tstr(); + public Xowd_data_tstr Data_mgr() {return data_mgr;} private final Xowd_data_tstr data_mgr = new Xowd_data_tstr(); public void Init_mem() { Io_mgr.Instance.InitEngine_mem(); } diff --git a/400_xowa/src/gplx/xowa/drds/files/Xod_file_mgr.java b/400_xowa/src/gplx/xowa/drds/files/Xod_file_mgr.java index 7a66a2442..6c9d8d054 100644 --- a/400_xowa/src/gplx/xowa/drds/files/Xod_file_mgr.java +++ b/400_xowa/src/gplx/xowa/drds/files/Xod_file_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.drds.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*; import gplx.core.threads.*; import gplx.xowa.drds.pages.*; import gplx.xowa.files.*; import gplx.xowa.guis.cbks.js.*; import gplx.xowa.htmls.*; public class Xod_file_mgr { - private final Gfo_thread_pool thread_pool = new Gfo_thread_pool(); + private final Gfo_thread_pool thread_pool = new Gfo_thread_pool(); public void Load_files(Xow_wiki wiki, Xod_page_itm pg, Xog_js_wkr js_wkr) { Xoh_page hpg = pg.Hpg(); List_adp img_list = To_img_list(hpg.Img_mgr()); diff --git a/400_xowa/src/gplx/xowa/drds/ios/media_scanners/Xod_media_scanner__base.java b/400_xowa/src/gplx/xowa/drds/ios/media_scanners/Xod_media_scanner__base.java index 0816b8453..ba1208435 100644 --- a/400_xowa/src/gplx/xowa/drds/ios/media_scanners/Xod_media_scanner__base.java +++ b/400_xowa/src/gplx/xowa/drds/ios/media_scanners/Xod_media_scanner__base.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.drds.ios.media_scanners; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*; import gplx.xowa.drds.ios.*; public abstract class Xod_media_scanner__base implements Xod_media_scanner { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public Xod_media_scanner__base() { this.evt_mgr = new Gfo_evt_mgr(this); Gfo_evt_mgr_.Sub_same(Io_mgr.Instance, Io_mgr.Evt__fil_created, this); } - public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr; + public Gfo_evt_mgr Evt_mgr() {return evt_mgr;} private final Gfo_evt_mgr evt_mgr; public Xod_media_scanner Add(Io_url url) {list.Add(url.Xto_api()); return this;} public void Scan() { String[] urls = list.To_str_ary_and_clear(); diff --git a/400_xowa/src/gplx/xowa/drds/pages/Xod_page_itm.java b/400_xowa/src/gplx/xowa/drds/pages/Xod_page_itm.java index 0ae441aa4..477d94e7c 100644 --- a/400_xowa/src/gplx/xowa/drds/pages/Xod_page_itm.java +++ b/400_xowa/src/gplx/xowa/drds/pages/Xod_page_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.drds.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.sections.*; import gplx.xowa.wikis.data.tbls.*; @@ -35,8 +35,8 @@ public class Xod_page_itm { public String First_allowed_editor_role() {return first_allowed_editor_role;} private String first_allowed_editor_role; public List_adp Section_list() {return section_list;} private List_adp section_list = List_adp_.New(); public Xoh_page Hpg() {return hpg;} private Xoh_page hpg; - public Xopg_tag_mgr Head_tags() {return head_tags;} private final Xopg_tag_mgr head_tags = new Xopg_tag_mgr(Bool_.Y); - public Xopg_tag_mgr Tail_tags() {return tail_tags;} private final Xopg_tag_mgr tail_tags = new Xopg_tag_mgr(Bool_.N); + public Xopg_tag_mgr Head_tags() {return head_tags;} private final Xopg_tag_mgr head_tags = new Xopg_tag_mgr(Bool_.Y); + public Xopg_tag_mgr Tail_tags() {return tail_tags;} private final Xopg_tag_mgr tail_tags = new Xopg_tag_mgr(Bool_.N); public void Init(int page_id, int rev_id , String ttl_text, String ttl_db, String redirected, String description, String modified_on , boolean is_editable, boolean is_main_page, boolean is_disambiguation, int lang_count diff --git a/400_xowa/src/gplx/xowa/drds/powers/Xod_power_mgr_.java b/400_xowa/src/gplx/xowa/drds/powers/Xod_power_mgr_.java index 687954120..cf3e3a164 100644 --- a/400_xowa/src/gplx/xowa/drds/powers/Xod_power_mgr_.java +++ b/400_xowa/src/gplx/xowa/drds/powers/Xod_power_mgr_.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.drds.powers; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*; -public class Xod_power_mgr_ { - public static Xod_power_mgr Instance = new Xod_power_mgr__shim(); -} -class Xod_power_mgr__shim implements Xod_power_mgr { - // private final Ordered_hash hash = Ordered_hash_.New(); - public void Wake_lock__get(String name) { - // if (hash.Has(name)) {hash.Clear(); throw Err_.new_("itm exists", "name", name);} - // hash.Add(name, name); - } - public void Wake_lock__rls(String name) { - // if (!hash.Has(name)) throw Err_.new_("itm missing", "name", name); - // hash.Del(name); - } -} +package gplx.xowa.drds.powers; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*; +public class Xod_power_mgr_ { + public static Xod_power_mgr Instance = new Xod_power_mgr__shim(); +} +class Xod_power_mgr__shim implements Xod_power_mgr { + // private final Ordered_hash hash = Ordered_hash_.New(); + public void Wake_lock__get(String name) { + // if (hash.Has(name)) {hash.Clear(); throw Err_.new_("itm exists", "name", name);} + // hash.Add(name, name); + } + public void Wake_lock__rls(String name) { + // if (!hash.Has(name)) throw Err_.new_("itm missing", "name", name); + // hash.Del(name); + } +} diff --git a/400_xowa/src/gplx/xowa/files/Xoa_file_mgr.java b/400_xowa/src/gplx/xowa/files/Xoa_file_mgr.java index 9ec419cb8..0027358f2 100644 --- a/400_xowa/src/gplx/xowa/files/Xoa_file_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xoa_file_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ //namespace gplx.xowa.files { // using gplx.xowa.files.caches; // public class Xoa_file_mgr { -// private final List_adp list = List_adp_.New(); +// private final List_adp list = List_adp_.New(); // public void Clear() {list.Clear();} // public boolean Check_cache(Xow_wiki wiki, byte[] page_url, Xof_fsdb_itm fsdb_itm) { // fsdb_itm.Init_at_cache(0, 0, null); diff --git a/400_xowa/src/gplx/xowa/files/Xoa_repo_mgr.java b/400_xowa/src/gplx/xowa/files/Xoa_repo_mgr.java index b4e412725..c8b41c9e7 100644 --- a/400_xowa/src/gplx/xowa/files/Xoa_repo_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xoa_repo_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.repos.*; public class Xoa_repo_mgr implements Gfo_invk { - private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; + private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; public Xoa_repo_mgr(Xoa_fsys_mgr app_fsys, Xof_rule_mgr ext_rule_mgr) {this.app_fsys = app_fsys; this.ext_rule_mgr = ext_rule_mgr;} public int Count() {return hash.Count();} public Xof_repo_itm Get_at(int i) {return (Xof_repo_itm)hash.Get_at(i);} diff --git a/400_xowa/src/gplx/xowa/files/Xof_bin_updater.java b/400_xowa/src/gplx/xowa/files/Xof_bin_updater.java index c3e1382c6..bf73b1602 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_bin_updater.java +++ b/400_xowa/src/gplx/xowa/files/Xof_bin_updater.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.fsdb.data.*; import gplx.fsdb.meta.*; import gplx.xowa.files.fsdb.*; public class Xof_bin_updater { - private final Fsd_thm_itm tmp_thm_itm = Fsd_thm_itm.new_(); + private final Fsd_thm_itm tmp_thm_itm = Fsd_thm_itm.new_(); public int Save_bin(Fsm_mnt_itm mnt, Fsm_atr_fil atr_fil, Fsm_bin_fil bin_fil, Xof_fsdb_itm fsdb, Io_stream_rdr rdr, long rdr_len) { int db_uid = -1; int orig_ext_id = fsdb.Orig_ext().Id(); diff --git a/400_xowa/src/gplx/xowa/files/Xof_ext_.java b/400_xowa/src/gplx/xowa/files/Xof_ext_.java index b487e1cea..0a6d15cea 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_ext_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_ext_.java @@ -32,7 +32,7 @@ public class Xof_ext_ { , Id_stl = 20, Id_webp = 21; ; public static final int Id__max = 22; - public static final byte[] + public static final byte[] Bry_png = Bry_.new_a7("png"), Bry_jpg = Bry_.new_a7("jpg"), Bry_jpeg = Bry_.new_a7("jpeg") , Bry_gif = Bry_.new_a7("gif"), Bry_tif = Bry_.new_a7("tif"), Bry_tiff = Bry_.new_a7("tiff") , Bry_svg = Bry_.new_a7("svg"), Bry_djvu = Bry_.new_a7("djvu"), Bry_pdf = Bry_.new_a7("pdf") @@ -41,7 +41,7 @@ public class Xof_ext_ { , Bry_bmp = Bry_.new_a7("bmp"), Bry_xcf = Bry_.new_a7("xcf"), Bry_wav = Bry_.new_a7("wav"), Bry_opus = Bry_.new_a7("opus") , Bry_stl = Bry_.new_a7("stl"), Bry_webp = Bry_.new_a7("webp") ; - public static final byte[][] Bry__ary = new byte[][] + public static final byte[][] Bry__ary = new byte[][] { Bry_.Empty, Bry_png, Bry_jpg, Bry_jpeg , Bry_gif, Bry_tif, Bry_tiff , Bry_svg, Bry_djvu, Bry_pdf @@ -50,7 +50,7 @@ public class Xof_ext_ { , Bry_bmp, Bry_xcf, Bry_wav, Bry_opus , Bry_stl, Bry_webp }; - public static final byte[][] Mime_type__ary = new byte[][] + public static final byte[][] Mime_type__ary = new byte[][] { Bry_.new_a7("application/octet-stream"), Bry_.new_a7("image/png"), Bry_.new_a7("image/jpg"), Bry_.new_a7("image/jpeg") , Bry_.new_a7("image/gif"), Bry_.new_a7("image/tiff"), Bry_.new_a7("image/tiff") , Bry_.new_a7("image/svg+xml"), Bry_.new_a7("image/x.djvu"), Bry_.new_a7("application/pdf") @@ -61,7 +61,7 @@ public class Xof_ext_ { , Bry_.new_a7("audio/x-wav"), Bry_.new_a7("audio/opus") , Bry_.new_a7("model/stl"), Bry_.new_a7("video/webp") }; - private static final Hash_adp id_hash = id_hash_new_(); + private static final Hash_adp id_hash = id_hash_new_(); private static Hash_adp id_hash_new_() { Hash_adp rv = Hash_adp_bry.cs(); id_hash_new_(rv, Bry_png, Id_png); id_hash_new_(rv, Bry_jpg, Id_jpg); id_hash_new_(rv, Bry_jpeg, Id_jpeg); @@ -75,7 +75,7 @@ public class Xof_ext_ { } private static void id_hash_new_(Hash_adp hash, byte[] key, int val) {hash.Add(key, new Int_obj_val(val));} - private static final Hash_adp_bry ext_hash = Hash_adp_bry.ci_a7() + private static final Hash_adp_bry ext_hash = Hash_adp_bry.ci_a7() .Add_bry_bry(Bry_png).Add_bry_bry(Bry_jpg).Add_bry_bry(Bry_jpeg) .Add_bry_bry(Bry_gif).Add_bry_bry(Bry_tif).Add_bry_bry(Bry_tiff) .Add_bry_bry(Bry_svg).Add_bry_bry(Bry_djvu).Add_bry_bry(Bry_pdf) @@ -84,7 +84,7 @@ public class Xof_ext_ { .Add_bry_bry(Bry_bmp).Add_bry_bry(Bry_xcf).Add_bry_bry(Bry_wav) .Add_bry_bry(Bry_opus).Add_bry_bry(Bry_stl).Add_bry_bry(Bry_webp) ; - private static final Xof_ext[] Ary = new Xof_ext[Id__max]; + private static final Xof_ext[] Ary = new Xof_ext[Id__max]; public static byte[] Get_ext_by_id_(int id) { if (id < 0 || id >= Id__max) throw Err_.new_wo_type("index out of bounds", "id", id); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_fxt.java b/400_xowa/src/gplx/xowa/files/Xof_file_fxt.java index 8631d1830..4296be323 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_fxt.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_fxt.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.dbs.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.repos.*; public class Xof_file_fxt { - private final Xowe_wiki wiki; + private final Xowe_wiki wiki; Xof_file_fxt(Xowe_wiki wiki) { this.wiki = wiki; Io_mgr.Instance.InitEngine_mem(); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java b/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java index 807a2b066..b1ec391db 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.dbs.*; import gplx.xowa.files.commons.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.caches.*; import gplx.xowa.files.imgs.*; @@ -20,9 +20,9 @@ import gplx.xowa.bldrs.wms.*; import gplx.xowa.xtns.math.*; public class Xof_file_mgr implements Gfo_invk { public Xoa_repo_mgr Repo_mgr() {return repo_mgr;} private Xoa_repo_mgr repo_mgr; - public Xof_img_mgr Img_mgr() {return img_mgr;} private final Xof_img_mgr img_mgr = new Xof_img_mgr(); + public Xof_img_mgr Img_mgr() {return img_mgr;} private final Xof_img_mgr img_mgr = new Xof_img_mgr(); public Xof_cache_mgr Cache_mgr() {return cache_mgr;} private Xof_cache_mgr cache_mgr; - public Xof_rule_mgr Ext_rules() {return ext_rules;} private final Xof_rule_mgr ext_rules = new Xof_rule_mgr(); + public Xof_rule_mgr Ext_rules() {return ext_rules;} private final Xof_rule_mgr ext_rules = new Xof_rule_mgr(); public void Ctor_by_app(Xoae_app app) { Gfo_usr_dlg usr_dlg = app.Usr_dlg(); this.cache_mgr = new Xof_cache_mgr(usr_dlg, app.Wiki_mgr(), repo_mgr); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_wkr.java b/400_xowa/src/gplx/xowa/files/Xof_file_wkr.java index 231733176..4cf669849 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_wkr.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_wkr.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.threads.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.fsdb.data.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.imgs.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.caches.*; import gplx.xowa.guis.cbks.js.*; public class Xof_file_wkr implements Gfo_thread_wkr { - private final Xof_orig_mgr orig_mgr; private final Xof_bin_mgr bin_mgr; private final Fsm_mnt_mgr mnt_mgr; private final Xou_cache_mgr cache_mgr; - private final Gfo_usr_dlg usr_dlg; private final Xow_repo_mgr repo_mgr; private final Xog_js_wkr js_wkr; - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Xof_img_size img_size = new Xof_img_size(); - private final Xoa_page hpg; private final List_adp imgs; + private final Xof_orig_mgr orig_mgr; private final Xof_bin_mgr bin_mgr; private final Fsm_mnt_mgr mnt_mgr; private final Xou_cache_mgr cache_mgr; + private final Gfo_usr_dlg usr_dlg; private final Xow_repo_mgr repo_mgr; private final Xog_js_wkr js_wkr; + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Xof_img_size img_size = new Xof_img_size(); + private final Xoa_page hpg; private final List_adp imgs; public Xof_file_wkr(Xof_orig_mgr orig_mgr, Xof_bin_mgr bin_mgr, Fsm_mnt_mgr mnt_mgr, Xou_cache_mgr cache_mgr, Xow_repo_mgr repo_mgr, Xog_js_wkr js_wkr, Xoa_page hpg, List_adp imgs) { this.orig_mgr = orig_mgr; this.bin_mgr = bin_mgr; this.mnt_mgr = mnt_mgr; this.cache_mgr = cache_mgr; this.usr_dlg = Gfo_usr_dlg_.Instance; this.repo_mgr = repo_mgr; this.js_wkr = js_wkr; diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java b/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java index 2f9f3097d..fca1547ff 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_wkr_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.consoles.*; import gplx.langs.htmls.encoders.*; import gplx.core.security.algos.*; public class Xof_file_wkr_ { - private static final Hash_algo md5_hash = Hash_algo_.New__md5(); - public static final Gfo_url_encoder Md5_decoder = Gfo_url_encoder_.New__http_url().Init__same__many(Byte_ascii.Plus).Make(); + private static final Hash_algo md5_hash = Hash_algo_.New__md5(); + public static final Gfo_url_encoder Md5_decoder = Gfo_url_encoder_.New__http_url().Init__same__many(Byte_ascii.Plus).Make(); public static byte[] Md5_fast(byte[] v) { synchronized (md5_hash) { return Hash_algo_utl.Calc_hash_as_bry(md5_hash, v); diff --git a/400_xowa/src/gplx/xowa/files/Xof_file_wkr__tst.java b/400_xowa/src/gplx/xowa/files/Xof_file_wkr__tst.java index 81f7298b0..94b4be128 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_file_wkr__tst.java +++ b/400_xowa/src/gplx/xowa/files/Xof_file_wkr__tst.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import org.junit.*; public class Xof_file_wkr__tst { - private final Xof_file_wkr___fxt fxt = new Xof_file_wkr___fxt(); + private final Xof_file_wkr___fxt fxt = new Xof_file_wkr___fxt(); @Test public void Ttl_standardize() { fxt.Test__ttl_standardize("Abc.png" , "Abc.png"); // basic fxt.Test__ttl_standardize("A b.png" , "A_b.png"); // spaces -> unders diff --git a/400_xowa/src/gplx/xowa/files/Xof_fsdb_itm_fxt.java b/400_xowa/src/gplx/xowa/files/Xof_fsdb_itm_fxt.java index 88f7b3f4a..bd78b17f3 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_fsdb_itm_fxt.java +++ b/400_xowa/src/gplx/xowa/files/Xof_fsdb_itm_fxt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.files.repos.*; @@ -75,5 +75,5 @@ public class Xof_fsdb_itm_fxt { rv.Init_at_orig(orig_repo_id, orig_repo_name, orig_ttl, orig_ext, orig_w, orig_h, orig_redirect); return rv; } - private final static byte[] Abrv__en_w = Bry_.new_a7("en.w"); + private final static byte[] Abrv__en_w = Bry_.new_a7("en.w"); } diff --git a/400_xowa/src/gplx/xowa/files/Xof_img_size.java b/400_xowa/src/gplx/xowa/files/Xof_img_size.java index 7b78a4e79..86259707d 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_img_size.java +++ b/400_xowa/src/gplx/xowa/files/Xof_img_size.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.bits.*; import gplx.xowa.parsers.lnkis.*; @@ -133,7 +133,7 @@ public class Xof_img_size { } public static final int Null = -1; public static final int Thumb_width_img = 220, Thumb_width_ogv = 220; - public static final double Upright_null = -1, Upright_default_marker = 0; // REF:MW: if ( isset( $fp['upright'] ) && $fp['upright'] == 0 ) + public static final double Upright_null = -1, Upright_default_marker = 0; // REF:MW: if ( isset( $fp['upright'] ) && $fp['upright'] == 0 ) public static final int Size__neg1 = -1, Size_null = 0; // Size_null = 0, b/c either imageMagick / inkscape fails when -1 is passed public static final int Size__same_as_orig = -1; private static final int Svg_max_width = 2048; diff --git a/400_xowa/src/gplx/xowa/files/Xof_mime_minor_.java b/400_xowa/src/gplx/xowa/files/Xof_mime_minor_.java index 2164b2428..52be3dda2 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_mime_minor_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_mime_minor_.java @@ -21,11 +21,11 @@ public class Xof_mime_minor_ { int id = id_obj == null ? Xof_ext_.Id_unknown : id_obj.Val(); return Xof_ext_.new_by_id_(id); } - private static final byte[] + private static final byte[] Mime_svg = Bry_.new_a7("svg+xml"), Mime_djvu = Bry_.new_a7("vnd.djvu"), Mime_midi = Bry_.new_a7("midi") , Mime_xcf = Bry_.new_a7("x-xcf"), Mime_flac = Bry_.new_a7("x-flac") , Mime_bmp = Bry_.new_a7("x-bmp"), Mime_bmp_2 = Bry_.new_a7("x-ms-bmp"); - private static final Hash_adp mime_hash = mime_hash_(); + private static final Hash_adp mime_hash = mime_hash_(); private static Hash_adp mime_hash_() { Hash_adp rv = Hash_adp_bry.cs(); mime_hash_itm_(rv, Xof_ext_.Bry_png , Xof_ext_.Id_png); diff --git a/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java b/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java index eec4a0414..9b35d6443 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java +++ b/400_xowa/src/gplx/xowa/files/Xof_url_bldr.java @@ -18,8 +18,8 @@ import gplx.core.envs.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.imgs.*; public class Xof_url_bldr { - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(400); - private final Gfo_url_encoder encoder_src_http = Gfo_url_encoder_.New__http_url().Make(); // NOTE: changed from new_html_href_mw_ to new_url_ on 2012-11-19; issues with A%2Cb becoming A%252Cb + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(400); + private final Gfo_url_encoder encoder_src_http = Gfo_url_encoder_.New__http_url().Make(); // NOTE: changed from new_html_href_mw_ to new_url_ on 2012-11-19; issues with A%2Cb becoming A%252Cb private byte[] ttl; private byte[] md5; private Xof_ext ext; private boolean file_is_thumb; private int file_w; private double time = Xof_lnki_time.Null; private int page = Xof_lnki_page.Null; private byte time_dlm = Byte_ascii.At; private byte repo_tid; @@ -82,7 +82,7 @@ public class Xof_url_bldr { byte mode = orig ? Xof_img_mode_.Tid__orig : Xof_img_mode_.Tid__thumb; return this.Init_for_trg_file(repo_itm, mode, itm.Orig_ttl(), itm.Orig_ttl_md5(), itm.Orig_ext_itm(), itm.File_w(), itm.Lnki_time(), itm.Lnki_page()).Xto_url(); } - private static final byte[] Bry__http = Bry_.new_a7("http"); + private static final byte[] Bry__http = Bry_.new_a7("http"); private void Bld() { if (repo_tid == Xof_repo_tid_.Tid__math) { tmp_bfr.Add(root); // add root; EX: "C:\xowa\file\"; assume trailing dir_spr @@ -209,13 +209,13 @@ public class Xof_url_bldr { repo_tid = Xof_repo_tid_.Tid__null; return this; } - public static final byte[] + public static final byte[] Bry_reg = Bry_.new_a7("reg.csv") , Bry_px = Bry_.new_a7("px"), Bry_px_dash = Bry_.new_a7("px-") , Bry_thumb = Bry_.new_a7("thumb") , Bry_thumnbail_w_dot = Bry_.new_a7("thumbnail.") ; - private static final byte[] + private static final byte[] Bry_lossy_page = Bry_.new_a7("lossy-page"), Bry_page = Bry_.new_a7("page") , Bry_lossy_page1 = Bry_.new_a7("lossy-page1-"), Bry_page1 = Bry_.new_a7("page1-"), Bry_seek = Bry_.new_a7("seek%3D"); public static Xof_url_bldr new_v2() { diff --git a/400_xowa/src/gplx/xowa/files/Xof_url_bldr__tst.java b/400_xowa/src/gplx/xowa/files/Xof_url_bldr__tst.java index 1c07f342d..838bcecf1 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_url_bldr__tst.java +++ b/400_xowa/src/gplx/xowa/files/Xof_url_bldr__tst.java @@ -38,7 +38,7 @@ public class Xof_url_bldr__tst { @Test public void Math__file() {fxt.Repo_tid_(Xof_repo_tid_.Tid__math).Fsys_is_wnt_(Bool_.Y).Root_("file://xowa/").Ttl_("random_md5.svg").Expd_src_("file://xowa/random_md5.svg").Test();} // NOTE: keep ".svg" if online } class Xof_url_bldr__fxt { - private final Xof_url_bldr url_bldr = new Xof_url_bldr(); + private final Xof_url_bldr url_bldr = new Xof_url_bldr(); public Xof_url_bldr__fxt Clear() { dir_spr = Byte_.Zero; ext = null; root = md5 = ttl = expd_src = null; seek = Xof_lnki_time.Null; diff --git a/400_xowa/src/gplx/xowa/files/Xof_xfer_itm.java b/400_xowa/src/gplx/xowa/files/Xof_xfer_itm.java index 52cef26b0..f8ca9527a 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_xfer_itm.java +++ b/400_xowa/src/gplx/xowa/files/Xof_xfer_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; import gplx.xowa.guis.cbks.js.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; @@ -286,7 +286,7 @@ public class Xof_xfer_itm implements Xof_file_itm { file_exists = true; return true; } - private static final Xof_url_bldr dflt_url_bldr = new Xof_url_bldr(); // NOTE: only used by v1 + private static final Xof_url_bldr dflt_url_bldr = new Xof_url_bldr(); // NOTE: only used by v1 } /* NOTE_1:Lnki_thumbable diff --git a/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java b/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java index 3cc05c394..c2cb86c1c 100644 --- a/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xofv_repo_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.core.primitives.*; public class Xofv_repo_mgr { - private final Hash_adp_bry key_regy = Hash_adp_bry.cs(); - private final Hash_adp tid_regy = Hash_adp_.New(); private final Byte_obj_ref tid_key = Byte_obj_ref.zero_(); + private final Hash_adp_bry key_regy = Hash_adp_bry.cs(); + private final Hash_adp tid_regy = Hash_adp_.New(); private final Byte_obj_ref tid_key = Byte_obj_ref.zero_(); public Xofv_repo_mgr Add(Xofv_repo_itm itm) { key_regy.Add(itm.Key(), itm); tid_regy.Add(Byte_obj_ref.new_(itm.Tid()), itm); diff --git a/400_xowa/src/gplx/xowa/files/Xog_redlink_thread.java b/400_xowa/src/gplx/xowa/files/Xog_redlink_thread.java index 6a15dbebe..0c82a453e 100644 --- a/400_xowa/src/gplx/xowa/files/Xog_redlink_thread.java +++ b/400_xowa/src/gplx/xowa/files/Xog_redlink_thread.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files; import gplx.*; import gplx.xowa.*; -import gplx.core.threads.*; import gplx.xowa.guis.cbks.js.*; -public class Xog_redlink_thread implements Gfo_thread_wkr { - private final int[] redlink_ary; private final Xog_js_wkr js_wkr; - public Xog_redlink_thread(int[] redlink_ary, Xog_js_wkr js_wkr) {this.redlink_ary = redlink_ary; this.js_wkr = js_wkr;} - public String Thread__name() {return "xowa.gui.html.redlinks.set";} - public boolean Thread__resume() {return true;} - public void Thread__exec() { - int len = redlink_ary.length; - for (int i = 0; i < len; ++i) { - js_wkr.Html_redlink(gplx.xowa.wikis.pages.lnkis.Xopg_lnki_list.Lnki_id_prefix + Int_.To_str(redlink_ary[i])); - } - } -} +package gplx.xowa.files; import gplx.*; import gplx.xowa.*; +import gplx.core.threads.*; import gplx.xowa.guis.cbks.js.*; +public class Xog_redlink_thread implements Gfo_thread_wkr { + private final int[] redlink_ary; private final Xog_js_wkr js_wkr; + public Xog_redlink_thread(int[] redlink_ary, Xog_js_wkr js_wkr) {this.redlink_ary = redlink_ary; this.js_wkr = js_wkr;} + public String Thread__name() {return "xowa.gui.html.redlinks.set";} + public boolean Thread__resume() {return true;} + public void Thread__exec() { + int len = redlink_ary.length; + for (int i = 0; i < len; ++i) { + js_wkr.Html_redlink(gplx.xowa.wikis.pages.lnkis.Xopg_lnki_list.Lnki_id_prefix + Int_.To_str(redlink_ary[i])); + } + } +} diff --git a/400_xowa/src/gplx/xowa/files/Xow_file_mgr.java b/400_xowa/src/gplx/xowa/files/Xow_file_mgr.java index a2a0b556e..3eb04cdb7 100644 --- a/400_xowa/src/gplx/xowa/files/Xow_file_mgr.java +++ b/400_xowa/src/gplx/xowa/files/Xow_file_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files; import gplx.*; import gplx.xowa.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*; @@ -27,7 +27,7 @@ public class Xow_file_mgr implements Gfo_invk { 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(); diff --git a/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr_.java b/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr_.java index 02a87515e..92ba6955b 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr_.java +++ b/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr_.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.core.ios.*; import gplx.core.ios.streams.*; -public class Io_download_mgr_ { - public static Io_download_mgr new_system() {return new Io_download_mgr__system();} - public static Io_download_mgr__memory new_memory() {return new Io_download_mgr__memory();} -} -class Io_download_mgr__system implements Io_download_mgr { - private final IoEngine_xrg_downloadFil download_wkr = IoEngine_xrg_downloadFil.new_("", Io_url_.Empty); - public void Upload_data(String url, byte[] data) {throw Err_.new_unimplemented();} - public Io_stream_rdr Download_as_rdr(String url) { - download_wkr.Init(url, Io_url_.Empty); - return download_wkr.Exec_as_rdr(); - } -} +package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; +import gplx.core.ios.*; import gplx.core.ios.streams.*; +public class Io_download_mgr_ { + public static Io_download_mgr new_system() {return new Io_download_mgr__system();} + public static Io_download_mgr__memory new_memory() {return new Io_download_mgr__memory();} +} +class Io_download_mgr__system implements Io_download_mgr { + private final IoEngine_xrg_downloadFil download_wkr = IoEngine_xrg_downloadFil.new_("", Io_url_.Empty); + public void Upload_data(String url, byte[] data) {throw Err_.new_unimplemented();} + public Io_stream_rdr Download_as_rdr(String url) { + download_wkr.Init(url, Io_url_.Empty); + return download_wkr.Exec_as_rdr(); + } +} diff --git a/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr__memory.java b/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr__memory.java index 6eb3db290..5987ec544 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr__memory.java +++ b/400_xowa/src/gplx/xowa/files/bins/Io_download_mgr__memory.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.core.ios.*; import gplx.core.ios.streams.*; -public class Io_download_mgr__memory implements Io_download_mgr { - private final Ordered_hash hash = Ordered_hash_.New(); - public void Clear() {hash.Clear();} - public void Upload_data(String url, byte[] data) {hash.Add(url, data);} - public Io_stream_rdr Download_as_rdr(String url) { - byte[] data = (byte[])hash.Get_by(url); if (data == null) return Io_stream_rdr_.Noop; - return Io_stream_rdr_.New__mem(data); - } -} +package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; +import gplx.core.ios.*; import gplx.core.ios.streams.*; +public class Io_download_mgr__memory implements Io_download_mgr { + private final Ordered_hash hash = Ordered_hash_.New(); + public void Clear() {hash.Clear();} + public void Upload_data(String url, byte[] data) {hash.Add(url, data);} + public Io_stream_rdr Download_as_rdr(String url) { + byte[] data = (byte[])hash.Get_by(url); if (data == null) return Io_stream_rdr_.Noop; + return Io_stream_rdr_.New__mem(data); + } +} diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java index 55d63557c..76b0f453a 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_mgr.java @@ -1,30 +1,30 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; 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; diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_skip_mgr.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_skip_mgr.java index 0e9b92e57..cbf7a4786 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_skip_mgr.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_skip_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.fsdb.meta.*; import gplx.xowa.files.fsdb.*; @@ -67,7 +67,7 @@ class Xof_bin_skip_wkr__page_gt_1 implements Xof_bin_skip_wkr { // prior to v2.4 public void Skip_term(Fsm_cfg_mgr cfg_mgr) { cfg_mgr.Patch__save(Fsm_cfg_mgr.Key_patch__page_gt_1); } - public static final Xof_bin_skip_wkr__page_gt_1 Instance = new Xof_bin_skip_wkr__page_gt_1(); Xof_bin_skip_wkr__page_gt_1() {} + public static final Xof_bin_skip_wkr__page_gt_1 Instance = new Xof_bin_skip_wkr__page_gt_1(); Xof_bin_skip_wkr__page_gt_1() {} } class Xof_bin_skip_wkr__small_size implements Xof_bin_skip_wkr {// downloads can randomly be broken; assume that anything with a small size is broken and redownload again; DATE:2015-04-21 public String Key() {return Xof_bin_skip_wkr_.Key__small_size;} @@ -83,5 +83,5 @@ class Xof_bin_skip_wkr__small_size implements Xof_bin_skip_wkr {// downloads can return rv; } public void Skip_term(Fsm_cfg_mgr cfg_mgr) {} - public static final Xof_bin_skip_wkr__small_size Instance = new Xof_bin_skip_wkr__small_size(); Xof_bin_skip_wkr__small_size() {} + public static final Xof_bin_skip_wkr__small_size Instance = new Xof_bin_skip_wkr__small_size(); Xof_bin_skip_wkr__small_size() {} } diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java index b3741ac58..e7140b282 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__fsdb_sql.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.core.caches.*; import gplx.xowa.files.fsdb.*; import gplx.fsdb.*; import gplx.fsdb.data.*; import gplx.fsdb.meta.*; public class Xof_bin_wkr__fsdb_sql implements Xof_bin_wkr { - private final Xof_bin_wkr_ids tmp_ids = new Xof_bin_wkr_ids(); + private final Xof_bin_wkr_ids tmp_ids = new Xof_bin_wkr_ids(); private Xof_bin_skip_mgr skip_mgr; Xof_bin_wkr__fsdb_sql(Fsm_mnt_mgr mnt_mgr) {this.mnt_mgr = mnt_mgr;} public byte Tid() {return Xof_bin_wkr_.Tid_fsdb_xowa;} public String Key() {return Xof_bin_wkr_.Key_fsdb_wiki;} - public Fsm_mnt_mgr Mnt_mgr() {return mnt_mgr;} private final Fsm_mnt_mgr mnt_mgr; + public Fsm_mnt_mgr Mnt_mgr() {return mnt_mgr;} private final Fsm_mnt_mgr mnt_mgr; public boolean Resize_allowed() {return bin_wkr_resize;} public void Resize_allowed_(boolean v) {bin_wkr_resize = v;} private boolean bin_wkr_resize = false; public Xof_bin_skip_mgr Skip_mgr() {return skip_mgr;} public void Skip_mgr_init(Fsm_cfg_mgr cfg_mgr, String[] wkrs) {this.skip_mgr = new Xof_bin_skip_mgr(cfg_mgr, wkrs);} diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf.java index 7562d3fe1..d886bb950 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.core.threads.*; import gplx.xowa.apps.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; import gplx.xowa.wikis.domains.*; public class Xof_bin_wkr__http_wmf implements Xof_bin_wkr { - private final Xow_repo_mgr repo_mgr; private final IoEngine_xrg_downloadFil download_wkr; - private final Io_download_mgr download_mgr; - private final Xof_url_bldr url_bldr = new Xof_url_bldr(); + private final Xow_repo_mgr repo_mgr; private final IoEngine_xrg_downloadFil download_wkr; + private final Io_download_mgr download_mgr; + private final Xof_url_bldr url_bldr = new Xof_url_bldr(); public Xof_bin_wkr__http_wmf(Xow_repo_mgr repo_mgr, Io_download_mgr download_mgr, IoEngine_xrg_downloadFil download_wkr) { this.repo_mgr = repo_mgr; this.download_mgr = download_mgr; this.download_wkr = download_wkr; } diff --git a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf__tst.java b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf__tst.java index 57b1d2226..426d922a9 100644 --- a/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf__tst.java +++ b/400_xowa/src/gplx/xowa/files/bins/Xof_bin_wkr__http_wmf__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.files.bins; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import org.junit.*; import gplx.core.ios.*; import gplx.core.ios.streams.*; import gplx.xowa.files.repos.*; public class Xof_bin_wkr__http_wmf__tst { - private final Xof_bin_wkr__http_wmf__fxt fxt = new Xof_bin_wkr__http_wmf__fxt(); + private final Xof_bin_wkr__http_wmf__fxt fxt = new Xof_bin_wkr__http_wmf__fxt(); @Before public void init() {fxt.Clear();} @Test public void Basic() { fxt.Init__Http("mem/http/commons.wikimedia.org/thumb/7/70/A.png/220px-A.png", "test_data"); @@ -40,10 +40,10 @@ public class Xof_bin_wkr__http_wmf__tst { } } class Xof_bin_wkr__http_wmf__fxt { - private final Xof_bin_wkr__http_wmf wkr; - private final Io_download_mgr__memory download_mgr; + private final Xof_bin_wkr__http_wmf wkr; + private final Io_download_mgr__memory download_mgr; private Io_stream_rdr get_as_rdr__rdr; - public Xof_fsdb_itm_fxt Fsdb_itm_mkr() {return fsdb_itm_mkr;} private final Xof_fsdb_itm_fxt fsdb_itm_mkr = new Xof_fsdb_itm_fxt(); + public Xof_fsdb_itm_fxt Fsdb_itm_mkr() {return fsdb_itm_mkr;} private final Xof_fsdb_itm_fxt fsdb_itm_mkr = new Xof_fsdb_itm_fxt(); public Xof_bin_wkr__http_wmf__fxt() { Xoae_app app = Xoa_app_fxt.Make__app__edit(); Xowe_wiki wiki = Xoa_app_fxt.Make__wiki__edit(app); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java index 494451e49..9f21711c1 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xof_cache_mgr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.core.envs.*; import gplx.dbs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wikis.*; public class Xof_cache_mgr implements Gfo_invk { - private final Gfo_usr_dlg usr_dlg; private final Xoae_wiki_mgr wiki_mgr; private final Xoa_repo_mgr repo_mgr; - private final Xofc_cfg_mgr cfg_mgr = new Xofc_cfg_mgr(); private final Xofc_dir_mgr dir_mgr; private final Xofc_fil_mgr fil_mgr; - private final Bool_obj_ref fil_created = Bool_obj_ref.n_(); + private final Gfo_usr_dlg usr_dlg; private final Xoae_wiki_mgr wiki_mgr; private final Xoa_repo_mgr repo_mgr; + private final Xofc_cfg_mgr cfg_mgr = new Xofc_cfg_mgr(); private final Xofc_dir_mgr dir_mgr; private final Xofc_fil_mgr fil_mgr; + private final Bool_obj_ref fil_created = Bool_obj_ref.n_(); public Xof_cache_mgr(Gfo_usr_dlg usr_dlg, Xoae_wiki_mgr wiki_mgr, Xoa_repo_mgr repo_mgr) { this.usr_dlg = usr_dlg; this.wiki_mgr = wiki_mgr; this.repo_mgr = repo_mgr; this.dir_mgr = new Xofc_dir_mgr(this); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_mgr.java index aafff2e29..50eeaa8a9 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; class Xofc_dir_mgr { - private final Xofc_dir_tbl tbl = new Xofc_dir_tbl(); - private final Ordered_hash hash_by_names = Ordered_hash_.New_bry(); private final Hash_adp hash_by_ids = Hash_adp_.New(); + private final Xofc_dir_tbl tbl = new Xofc_dir_tbl(); + private final Ordered_hash hash_by_names = Ordered_hash_.New_bry(); private final Hash_adp hash_by_ids = Hash_adp_.New(); private Xof_cache_mgr cache_mgr; public Xofc_dir_mgr(Xof_cache_mgr v) {this.cache_mgr = v;} public void Conn_(Db_conn v, boolean created, boolean schema_is_1) {tbl.Conn_(v, created, schema_is_1);} diff --git a/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_tbl.java b/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_tbl.java index f35ea4cac..ed90c8fa7 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_tbl.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xofc_dir_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; class Xofc_dir_tbl implements Rls_able { - private String tbl_name = "file_cache_dir"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "file_cache_dir"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_id, fld_name; - private Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_stmt; + private Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_stmt; public void Conn_(Db_conn new_conn, boolean created, boolean schema_is_1) { this.conn = new_conn; flds.Clear(); String fld_prefix = ""; diff --git a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_itm.java b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_itm.java index 414506fea..d1b1c99ab 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_itm.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; public class Xofc_fil_itm implements CompareAble { @@ -23,14 +23,14 @@ public class Xofc_fil_itm implements CompareAble { } public String Key; public int Uid() {return uid;} public void Uid_(int v) {uid = v;} private int uid; - public int Dir_id() {return dir_id;} private final int dir_id; - public byte[] Name() {return name;} private final byte[] name; - public boolean Is_orig() {return is_orig;} private final boolean is_orig; - 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; - public Xof_ext Ext() {return ext;} private final Xof_ext ext; + public int Dir_id() {return dir_id;} private final int dir_id; + public byte[] Name() {return name;} private final byte[] name; + public boolean Is_orig() {return is_orig;} private final boolean is_orig; + 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; + public Xof_ext Ext() {return ext;} private final Xof_ext ext; public long Size() {return size;} private long size; public void Size_(long v) { this.size = v; @@ -67,5 +67,5 @@ public class Xofc_fil_itm implements CompareAble { return bfr.To_bry_and_clear(); } public int compareTo(Object obj) {Xofc_fil_itm comp = (Xofc_fil_itm)obj; return -Long_.Compare(cache_time, comp.cache_time);} // - for DESC sort - public static final Xofc_fil_itm Null = null; + public static final Xofc_fil_itm Null = null; } diff --git a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_mgr.java index 089610519..ac4773eac 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.fsdb.*; import gplx.xowa.wikis.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; class Xofc_fil_mgr { private Xof_cache_mgr cache_mgr; - private final Xofc_fil_tbl tbl = new Xofc_fil_tbl(); private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Bry_bfr key_bldr = Bry_bfr_.Reset(255); + private final Xofc_fil_tbl tbl = new Xofc_fil_tbl(); private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Bry_bfr key_bldr = Bry_bfr_.Reset(255); public Xofc_fil_mgr(Xof_cache_mgr v) {this.cache_mgr = v;} public void Conn_(Db_conn v, boolean created, boolean schema_is_1) {tbl.Conn_(v, created, schema_is_1);} public void Save_all() { diff --git a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_tbl.java b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_tbl.java index 19f0277c7..f9253123a 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_tbl.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xofc_fil_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; import gplx.dbs.engines.sqlite.*; class Xofc_fil_tbl implements Rls_able { - private String tbl_name = "file_cache_fil"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "file_cache_fil"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_uid, fld_dir_id, fld_name, fld_is_orig, fld_w, fld_h, fld_time, fld_page, fld_ext, fld_size, fld_cache_time; - private Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_itm_stmt, select_itm_v2_stmt; + private Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_itm_stmt, select_itm_v2_stmt; public Db_conn Conn() {return conn;} public void Conn_(Db_conn new_conn, boolean created, boolean schema_is_1) { this.conn = new_conn; flds.Clear(); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_.java index 6c62fede9..b96308b2d 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; public class Xou_cache_finder_ { - public static final Xou_cache_finder Noop = new Xou_cache_finder_noop(); + public static final Xou_cache_finder Noop = new Xou_cache_finder_noop(); public static Xou_cache_finder_mem New_mem() {return new Xou_cache_finder_mem();} public static Xou_cache_finder New_db(Xou_cache_mgr cache_mgr) {return new Xou_cache_finder_db(cache_mgr);} } @@ -29,8 +29,8 @@ class Xou_cache_finder_noop implements Xou_cache_finder { public void Add(Xof_fsdb_itm fsdb_itm) {} } class Xou_cache_finder_db implements Xou_cache_finder { - private final Xou_cache_mgr cache_mgr; - private final Xof_img_size img_size = new Xof_img_size(); private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); + private final Xou_cache_mgr cache_mgr; + private final Xof_img_size img_size = new Xof_img_size(); private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); public Xou_cache_finder_db(Xou_cache_mgr cache_mgr) {this.cache_mgr = cache_mgr;} public boolean Find(Xow_wiki wiki, byte[] page_url, Xof_fsdb_itm cur) { Xou_cache_itm cache_itm = cache_mgr.Get_or_null(cur); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_mem.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_mem.java index 7310ebdbb..cce8d93b4 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_mem.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_finder_mem.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; public class Xou_cache_finder_mem implements Xou_cache_finder { - private final Ordered_hash hash = Ordered_hash_.New_bry(); - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); - private final Xof_img_size img_size = new Xof_img_size(); - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(255); + private final Xof_img_size img_size = new Xof_img_size(); + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); public boolean Find(Xow_wiki wiki, byte[] page_url, Xof_fsdb_itm cur) { byte[] key = Xou_cache_itm.Key_gen(tmp_bfr, cur.Lnki_wiki_abrv(), cur.Lnki_ttl(), cur.Lnki_type(), cur.Lnki_upright(), cur.Lnki_w(), cur.Lnki_h(), cur.Lnki_time(), cur.Lnki_page(), cur.User_thumb_w()); Xof_fsdb_itm mem = (Xof_fsdb_itm)hash.Get_by(key); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_itm.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_itm.java index 7682504ee..d7859ccac 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_itm.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; public class Xou_cache_itm { @@ -33,32 +33,32 @@ public class Xou_cache_itm { this.lnki_key = Key_gen(lnki_key_bfr, lnki_wiki_abrv, lnki_ttl, lnki_type, lnki_upright, lnki_w, lnki_h, lnki_time, lnki_page, user_thumb_w); } public byte Db_state() {return db_state;} public void Db_state_(byte v) {db_state = v;} private byte db_state; - public byte[] Lnki_wiki_abrv() {return lnki_wiki_abrv;} private final byte[] lnki_wiki_abrv; // differentiate commonwiki rows inserted by one wiki vs another - public byte[] Lnki_key() {return lnki_key;} private final byte[] lnki_key; // unique key by lnki props - public byte[] Lnki_ttl() {return lnki_ttl;} private final byte[] lnki_ttl; - public int Lnki_type() {return lnki_type;} private final int lnki_type; - public double Lnki_upright() {return lnki_upright;} private final double lnki_upright; - public int Lnki_w() {return lnki_w;} private final int lnki_w; - public int Lnki_h() {return lnki_h;} private final int lnki_h; - public double Lnki_time() {return lnki_time;} private final double lnki_time; - public int Lnki_page() {return lnki_page;} private final int lnki_page; - public int User_thumb_w() {return user_thumb_w;} private final int user_thumb_w; - public int Orig_repo_id() {return orig_repo_id;} private final int orig_repo_id; - public byte[] Orig_ttl() {return orig_ttl;} private final byte[] orig_ttl; + public byte[] Lnki_wiki_abrv() {return lnki_wiki_abrv;} private final byte[] lnki_wiki_abrv; // differentiate commonwiki rows inserted by one wiki vs another + public byte[] Lnki_key() {return lnki_key;} private final byte[] lnki_key; // unique key by lnki props + public byte[] Lnki_ttl() {return lnki_ttl;} private final byte[] lnki_ttl; + public int Lnki_type() {return lnki_type;} private final int lnki_type; + public double Lnki_upright() {return lnki_upright;} private final double lnki_upright; + public int Lnki_w() {return lnki_w;} private final int lnki_w; + public int Lnki_h() {return lnki_h;} private final int lnki_h; + public double Lnki_time() {return lnki_time;} private final double lnki_time; + public int Lnki_page() {return lnki_page;} private final int lnki_page; + public int User_thumb_w() {return user_thumb_w;} private final int user_thumb_w; + public int Orig_repo_id() {return orig_repo_id;} private final int orig_repo_id; + public byte[] Orig_ttl() {return orig_ttl;} private final byte[] orig_ttl; public byte[] Orig_ttl_md5() {if (orig_ttl_md5 == null) orig_ttl_md5 = Xof_file_wkr_.Md5_fast(orig_ttl); return orig_ttl_md5;} private byte[] orig_ttl_md5; - public int Orig_ext_id() {return orig_ext_id;} private final int orig_ext_id; + public int Orig_ext_id() {return orig_ext_id;} private final int orig_ext_id; public Xof_ext Orig_ext_itm() {if (orig_ext_itm == null) orig_ext_itm = Xof_ext_.new_by_id_(orig_ext_id); return orig_ext_itm;} private Xof_ext orig_ext_itm; - public int Orig_w() {return orig_w;} private final int orig_w; - public int Orig_h() {return orig_h;} private final int orig_h; - public int Html_w() {return html_w;} private final int html_w; - public int Html_h() {return html_h;} private final int html_h; - public double Html_time() {return html_time;} private final double html_time; - public int Html_page() {return html_page;} private final int html_page; - public boolean File_is_orig() {return file_is_orig;} private final boolean file_is_orig; + public int Orig_w() {return orig_w;} private final int orig_w; + public int Orig_h() {return orig_h;} private final int orig_h; + public int Html_w() {return html_w;} private final int html_w; + public int Html_h() {return html_h;} private final int html_h; + public double Html_time() {return html_time;} private final double html_time; + public int Html_page() {return html_page;} private final int html_page; + public boolean File_is_orig() {return file_is_orig;} private final boolean file_is_orig; public int File_w() {return file_w;} private int file_w; - public double File_time() {return file_time;} private final double file_time; - public int File_page() {return file_page;} private final int file_page; - public long File_size() {return file_size;} private final long file_size; + public double File_time() {return file_time;} private final double file_time; + public int File_page() {return file_page;} private final int file_page; + public long File_size() {return file_size;} private final long file_size; public Io_url File_url() {return file_url;} public void File_url_(Io_url v) {file_url = v;} private Io_url file_url; public int View_count() {return view_count;} private int view_count; public long View_date() {return view_date;} private long view_date; @@ -67,7 +67,7 @@ public class Xou_cache_itm { view_date = Datetime_now.Get().Timestamp_unix(); db_state = Db_cmd_mode.To_update(db_state); } - public static final Xou_cache_itm Null = null; + public static final Xou_cache_itm Null = null; public static byte[] Key_gen(Bry_bfr key_bfr, byte[] lnki_wiki_abrv, byte[] ttl, int type, double upright, int w, int h, double time, int page, int user_thumb_w) { key_bfr.Add(lnki_wiki_abrv).Add_byte_pipe() .Add(ttl).Add_byte_pipe().Add_int_variable(type).Add_byte_pipe().Add_double(upright).Add_byte_pipe() @@ -83,5 +83,5 @@ class Xof_cache_mgr_sorter implements gplx.core.lists.ComparerAble { Xou_cache_itm rhs = (Xou_cache_itm)rhsObj; return -Long_.Compare(lhs.View_date(), rhs.View_date()); // - for DESC sort } - public static final Xof_cache_mgr_sorter Instance = new Xof_cache_mgr_sorter(); Xof_cache_mgr_sorter() {} + public static final Xof_cache_mgr_sorter Instance = new Xof_cache_mgr_sorter(); Xof_cache_mgr_sorter() {} } diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java index 9f6295d44..6e64e64d5 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.imgs.*; @@ -21,9 +21,9 @@ public class Xou_cache_mgr implements Gfo_invk { private long fsys_size_cur = 0; private long fsys_size_min = Io_mgr.Len_mb * 75; private long fsys_size_max = Io_mgr.Len_mb * 100; - private final Xoa_wiki_mgr wiki_mgr; private final Xou_cache_tbl cache_tbl; private final Db_cfg_tbl cfg_tbl; private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(512); - private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Object thread_lock = new Object(); - private final Io_url cache_dir; private boolean db_load_needed = true; + private final Xoa_wiki_mgr wiki_mgr; private final Xou_cache_tbl cache_tbl; private final Db_cfg_tbl cfg_tbl; private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(512); + private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); private final Object thread_lock = new Object(); + private final Io_url cache_dir; private boolean db_load_needed = true; public Xou_cache_mgr(Xoa_wiki_mgr wiki_mgr, Io_url cache_dir, Xou_db_file db_file) { this.wiki_mgr = wiki_mgr; this.cache_dir = cache_dir; this.cfg_tbl = db_file.Tbl__cfg(); @@ -208,11 +208,11 @@ public class Xou_cache_mgr implements Gfo_invk { } } class Xou_cache_grp { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public Xou_cache_grp(Io_url file_url) {this.file_url = file_url;} public long View_date() {return view_date;} private long view_date; public long File_size() {return file_size;} private long file_size; - public Io_url File_url() {return file_url;} private final Io_url file_url; + public Io_url File_url() {return file_url;} private final Io_url file_url; public int Len() {return list.Count();} public void Add(Xou_cache_itm itm) { if (itm.View_date() > view_date) view_date = itm.View_date(); @@ -246,5 +246,5 @@ class Xou_cache_grp_sorter implements gplx.core.lists.ComparerAble { Xou_cache_grp rhs = (Xou_cache_grp)rhsObj; return -Long_.Compare(lhs.View_date(), rhs.View_date()); // - for DESC sort } - public static final Xou_cache_grp_sorter Instance = new Xou_cache_grp_sorter(); Xou_cache_grp_sorter() {} + public static final Xou_cache_grp_sorter Instance = new Xou_cache_grp_sorter(); Xou_cache_grp_sorter() {} } diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr_tst.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr_tst.java index a7bf9b323..42e91c5b8 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import org.junit.*; import gplx.dbs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.repos.*; public class Xou_cache_mgr_tst { - @Before public void init() {fxt.Clear();} private final Xou_cache_mgr_fxt fxt = new Xou_cache_mgr_fxt(); + @Before public void init() {fxt.Clear();} private final Xou_cache_mgr_fxt fxt = new Xou_cache_mgr_fxt(); @Test public void Update() { Xof_fsdb_itm itm_1 = fxt.Make_itm("en.w", "1.png", 2); fxt.Exec_update(itm_1); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl.java index 427134b51..f6432c77f 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; public class Xou_cache_tbl implements Rls_able { - private String tbl_name = "file_cache"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private String tbl_name = "file_cache"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String fld_lnki_wiki_abrv, fld_lnki_ttl, fld_lnki_type, fld_lnki_upright, fld_lnki_w, fld_lnki_h, fld_lnki_time, fld_lnki_page, fld_user_thumb_w , fld_orig_repo, fld_orig_ttl, fld_orig_ext, fld_orig_w, fld_orig_h @@ -26,8 +26,8 @@ public class Xou_cache_tbl implements Rls_able { ; public String Tbl_name() {return tbl_name;} public String Fld_orig_ttl() {return fld_orig_ttl;} - private final Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_stmt; - private final Bry_bfr lnki_key_bfr = Bry_bfr_.Reset(255); + private final Db_conn conn; private final Db_stmt_bldr stmt_bldr = new Db_stmt_bldr(); private Db_stmt select_stmt; + private final Bry_bfr lnki_key_bfr = Bry_bfr_.Reset(255); public Db_conn Conn() {return conn;} public Xou_cache_tbl(Db_conn conn) { this.conn = conn; diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl_tst.java b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl_tst.java index 8ca9180f7..1c82e5427 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl_tst.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_cache_tbl_tst.java @@ -16,12 +16,12 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import org.junit.*; import gplx.dbs.*; public class Xou_cache_tbl_tst { - @Before public void init() {fxt.Clear();} private final Xou_cache_tbl_fxt fxt = new Xou_cache_tbl_fxt(); + @Before public void init() {fxt.Clear();} private final Xou_cache_tbl_fxt fxt = new Xou_cache_tbl_fxt(); @Test public void Orig_ttl__same() {fxt.Test_save_orig_ttl("A.png", "A.png", "");} @Test public void Orig_ttl__redirect() {fxt.Test_save_orig_ttl("A.png", "B.png", "B.png");} } class Xou_cache_tbl_fxt { - private final Bry_bfr lnki_key_bfr = Bry_bfr_.New_w_size(255); + private final Bry_bfr lnki_key_bfr = Bry_bfr_.New_w_size(255); private Xou_cache_tbl tbl; public void Clear() { Io_mgr.Instance.InitEngine_mem(); diff --git a/400_xowa/src/gplx/xowa/files/caches/Xou_file_itm_finder.java b/400_xowa/src/gplx/xowa/files/caches/Xou_file_itm_finder.java index 9146949c1..e73e28ac7 100644 --- a/400_xowa/src/gplx/xowa/files/caches/Xou_file_itm_finder.java +++ b/400_xowa/src/gplx/xowa/files/caches/Xou_file_itm_finder.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.ios.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.bins.*; import gplx.xowa.guis.cbks.js.*; public class Xou_file_itm_finder { - private final Xou_cache_mgr cache_mgr; private final Xof_img_size img_size = new Xof_img_size(); + private final Xou_cache_mgr cache_mgr; private final Xof_img_size img_size = new Xof_img_size(); public Xou_file_itm_finder(Xou_cache_mgr cache_mgr) {this.cache_mgr = cache_mgr;} public boolean Find(Xowe_wiki wiki, int exec_tid, Xof_file_itm xfer, byte[] page_url) { byte[] lnki_ttl = xfer.Lnki_ttl(); diff --git a/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_mok.java b/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_mok.java index 1f9b56ede..a0d958d23 100644 --- a/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_mok.java +++ b/400_xowa/src/gplx/xowa/files/cnvs/Xof_img_wkr_resize_img_mok.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files.cnvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -import gplx.core.primitives.*; -import gplx.gfui.*; import gplx.gfui.imgs.*; -import gplx.xowa.files.cnvs.*; -public class Xof_img_wkr_resize_img_mok implements Xof_img_wkr_resize_img { - public boolean Resize_exec(Io_url src, Io_url trg, int trg_w, int trg_h, int ext_id, String_obj_ref rslt_val) { - SizeAdp src_size = ImageAdp_.txt_fil_(src).Size(); - int src_w = src_size.Width(), src_h = src_size.Height(); - if (trg_w < 1) throw Err_.new_wo_type("trg_w must be > 0", "trg_w", trg_w); - if (trg_h < 1) trg_h = Xof_xfer_itm_.Scale_h(src_w, src_h, trg_w); - Io_mgr.Instance.SaveFilStr(trg, SizeAdp_.new_(trg_w, trg_h).To_str()); - return true; - } - public static final Xof_img_wkr_resize_img_mok Instance = new Xof_img_wkr_resize_img_mok(); Xof_img_wkr_resize_img_mok() {} -} +package gplx.xowa.files.cnvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; +import gplx.core.primitives.*; +import gplx.gfui.*; import gplx.gfui.imgs.*; +import gplx.xowa.files.cnvs.*; +public class Xof_img_wkr_resize_img_mok implements Xof_img_wkr_resize_img { + public boolean Resize_exec(Io_url src, Io_url trg, int trg_w, int trg_h, int ext_id, String_obj_ref rslt_val) { + SizeAdp src_size = ImageAdp_.txt_fil_(src).Size(); + int src_w = src_size.Width(), src_h = src_size.Height(); + if (trg_w < 1) throw Err_.new_wo_type("trg_w must be > 0", "trg_w", trg_w); + if (trg_h < 1) trg_h = Xof_xfer_itm_.Scale_h(src_w, src_h, trg_w); + Io_mgr.Instance.SaveFilStr(trg, SizeAdp_.new_(trg_w, trg_h).To_str()); + return true; + } + public static final Xof_img_wkr_resize_img_mok Instance = new Xof_img_wkr_resize_img_mok(); Xof_img_wkr_resize_img_mok() {} +} diff --git a/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java index 2ebced225..5a1f17995 100644 --- a/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java +++ b/400_xowa/src/gplx/xowa/files/commons/Xof_commons_image_tbl.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.commons; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.dbs.*; public class Xof_commons_image_tbl implements Rls_able { @@ -50,8 +50,8 @@ public class Xof_commons_image_tbl implements Rls_able { ); } finally {rdr.Rls();} } - private static final String tbl_name = "image"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private static final String + private static final String tbl_name = "image"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private static final String fld_img_name = flds.Add_str("img_name", 255) // varbinary(255) , fld_img_media_type = flds.Add_str("img_media_type", 255) // enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE')" , fld_img_minor_mime = flds.Add_str("img_minor_mime", 255) // DEFAULT 'unknown'" diff --git a/400_xowa/src/gplx/xowa/files/exts/Xof_rule_grp.java b/400_xowa/src/gplx/xowa/files/exts/Xof_rule_grp.java index bcfd99a7a..5ef59987d 100644 --- a/400_xowa/src/gplx/xowa/files/exts/Xof_rule_grp.java +++ b/400_xowa/src/gplx/xowa/files/exts/Xof_rule_grp.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.exts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; public class Xof_rule_grp implements Gfo_invk { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); public Xof_rule_grp(Xof_rule_mgr owner, byte[] key) {this.owner = owner; this.key = key;} - public Xof_rule_mgr Owner() {return owner;} private final Xof_rule_mgr owner; - public byte[] Key() {return key;} private final byte[] key; + public Xof_rule_mgr Owner() {return owner;} private final Xof_rule_mgr owner; + public byte[] Key() {return key;} private final byte[] key; public Xof_rule_itm Get_or_null(byte[] ext_bry) {return (Xof_rule_itm)hash.Get_by_bry(ext_bry);} public Xof_rule_itm Get_or_new(byte[] ext_bry) { Xof_rule_itm rv = Get_or_null(ext_bry); diff --git a/400_xowa/src/gplx/xowa/files/exts/Xof_rule_mgr.java b/400_xowa/src/gplx/xowa/files/exts/Xof_rule_mgr.java index 71bc11792..d64a3c976 100644 --- a/400_xowa/src/gplx/xowa/files/exts/Xof_rule_mgr.java +++ b/400_xowa/src/gplx/xowa/files/exts/Xof_rule_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.exts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.apps.*; public class Xof_rule_mgr implements Gfo_invk { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); public Xof_rule_mgr() { Xof_rule_grp app_default = new Xof_rule_grp(this, Xof_rule_grp.Grp_app_default); Set_app_default(app_default, Io_mgr.Len_gb, Xof_ext_.Bry__ary); diff --git a/400_xowa/src/gplx/xowa/files/fsdb/Xof_fsdb_mgr__sql.java b/400_xowa/src/gplx/xowa/files/fsdb/Xof_fsdb_mgr__sql.java index b42579fd4..87a63a5a5 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/Xof_fsdb_mgr__sql.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/Xof_fsdb_mgr__sql.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.core.ios.*; @@ -21,7 +21,7 @@ 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.guis.cbks.js.*; 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(); + private Xow_repo_mgr repo_mgr; private Xof_url_bldr url_bldr; private final Xof_img_size img_size = new Xof_img_size(); public String Key() {return "fsdb.sql";} public Xof_bin_mgr Bin_mgr() {return bin_mgr;} private Xof_bin_mgr bin_mgr; public Fsm_mnt_mgr Mnt_mgr() {return mnt_mgr;} private Fsm_mnt_mgr mnt_mgr = new Fsm_mnt_mgr(); diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_core.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_core.java index a3a9aa6b8..bfdf38298 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_core.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_core.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.guis.cbks.js.*; public class Fs_root_core implements Xof_fsdb_mgr, Gfo_invk { // reads images from file-system dir private Xowe_wiki wiki; - private final Fs_root_mgr mgr; + private final Fs_root_mgr mgr; public Fs_root_core(Xowe_wiki wiki) { this.Init_by_wiki(wiki); this.mgr = new Fs_root_mgr(wiki); diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_mgr.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_mgr.java index d0a8ce03a..fef5b5c3e 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_mgr.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Fs_root_mgr.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.fsdb.meta.*; class Fs_root_mgr { - private final Xowe_wiki wiki; - private final Fs_root_wkr wkr = new Fs_root_wkr(); - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); - private final Xof_img_size img_size = new Xof_img_size(); - private final String_obj_ref tmp_resize_result = String_obj_ref.null_(); + private final Xowe_wiki wiki; + private final Fs_root_wkr wkr = new Fs_root_wkr(); + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); + private final Xof_img_size img_size = new Xof_img_size(); + private final String_obj_ref tmp_resize_result = String_obj_ref.null_(); private Xof_repo_itm repo; private Io_url orig_dir; public Fs_root_mgr(Xowe_wiki wiki) { diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_mgr.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_mgr.java index 79d71ed92..7a5e96e91 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_mgr.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_mgr.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; -class Orig_fil_mgr { - private final Ordered_hash hash = Ordered_hash_.New_bry(); - public boolean Has(byte[] lnki_ttl) {return hash.Has(lnki_ttl);} - public Orig_fil_row Get_by_ttl(byte[] lnki_ttl) {return (Orig_fil_row)hash.Get_by(lnki_ttl);} - public void Add(Orig_fil_row fil) {hash.Add(fil.Name(), fil);} -} +package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; +class Orig_fil_mgr { + private final Ordered_hash hash = Ordered_hash_.New_bry(); + public boolean Has(byte[] lnki_ttl) {return hash.Has(lnki_ttl);} + public Orig_fil_row Get_by_ttl(byte[] lnki_ttl) {return (Orig_fil_row)hash.Get_by(lnki_ttl);} + public void Add(Orig_fil_row fil) {hash.Add(fil.Name(), fil);} +} diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_row.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_row.java index ceb94a6ec..84cdff1b5 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_row.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_row.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; class Orig_fil_row { Orig_fil_row(int uid, byte[] name, int ext_id, int w, int h, Io_url url) { @@ -24,18 +24,18 @@ class Orig_fil_row { this.url = url; } public int Uid() {return uid;} private int uid; - public byte[] Name() {return name;} private final byte[] name; - public int Ext_id() {return ext_id;} private final int ext_id; + public byte[] Name() {return name;} private final byte[] name; + public int Ext_id() {return ext_id;} private final int ext_id; public int W() {return w;} private int w; public int H() {return h;} private int h; - public Io_url Url() {return url;} private final Io_url url; + public Io_url Url() {return url;} private final Io_url url; public Orig_fil_row Init_by_fs(int uid, int w, int h) { this.uid = uid; this.w = w; this.h = h; return this; } - public static final Orig_fil_row Null = null; + public static final Orig_fil_row Null = null; public static Orig_fil_row New_by_db(int uid, byte[] name, int ext_id, int w, int h, Io_url dir) { return new Orig_fil_row(uid, name, ext_id, w, h, dir.GenSubFil(String_.new_u8(name))); } diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_tbl.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_tbl.java index d920f1693..8b95c72cb 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_tbl.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Orig_fil_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.dbs.*; class Orig_fil_tbl implements Rls_able { - private final Db_conn conn; - private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final Db_conn conn; + private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); private String tbl_name = "orig_fil"; private String fld_uid, fld_name, fld_ext_id, fld_w, fld_h, fld_dir_url; private Db_stmt stmt_insert, stmt_select; diff --git a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Xof_orig_wkr__fs_root.java b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Xof_orig_wkr__fs_root.java index ba947a502..a48b7d52e 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Xof_orig_wkr__fs_root.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/fs_roots/Xof_orig_wkr__fs_root.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.fs_roots; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.dbs.*; import gplx.xowa.files.origs.*; class Xof_orig_wkr__fs_root implements Xof_orig_wkr { - private final Fs_root_wkr wkr; + private final Fs_root_wkr wkr; public Xof_orig_wkr__fs_root(Fs_root_wkr wkr) {this.wkr = wkr;} public byte Tid() {return Xof_orig_wkr_.Tid_fs_root;} public void Find_by_list(Ordered_hash rv, List_adp itms) {Xof_orig_wkr_.Find_by_list(this, rv, itms);} diff --git a/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java b/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java index aeebe67be..455dd89bb 100644 --- a/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java +++ b/400_xowa/src/gplx/xowa/files/fsdb/tsts/Xof_file_fxt.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.fsdb.tsts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.core.envs.*; import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.dbs.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.cnvs.*; import gplx.xowa.files.exts.*; import gplx.xowa.guis.cbks.js.*; @@ -22,7 +22,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_thm_itm tmp_thm = Fsd_thm_itm.new_(); 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 @@ -105,11 +105,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);} @@ -126,17 +126,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);} diff --git a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mode_.java b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mode_.java index b75e8c6f4..b0aee2943 100644 --- a/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mode_.java +++ b/400_xowa/src/gplx/xowa/files/imgs/Xof_img_mode_.java @@ -13,12 +13,12 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files.imgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; -public class Xof_img_mode_ { - public static final byte - Tid__orig = 0 - , Tid__thumb = 1 - ; - public static byte By_bool(boolean is_thumb) {return is_thumb ? Tid__thumb : Tid__orig;} - public static final byte[][] Names_ary = new byte[][] {Bry_.new_a7("orig"), Bry_.new_a7("thumb")}; -} +package gplx.xowa.files.imgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; +public class Xof_img_mode_ { + public static final byte + Tid__orig = 0 + , Tid__thumb = 1 + ; + public static byte By_bool(boolean is_thumb) {return is_thumb ? Tid__thumb : Tid__orig;} + public static final byte[][] Names_ary = new byte[][] {Bry_.new_a7("orig"), Bry_.new_a7("thumb")}; +} diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_itm.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_itm.java index 418235f89..63a2a228d 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_itm.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.wikis.*; import gplx.xowa.files.*; public class Xof_orig_itm { @@ -20,19 +20,19 @@ public class Xof_orig_itm { this.repo = repo; this.ttl = ttl; this.ext_id = ext_id; this.w = w; this.h = h; this.redirect = redirect; } - public byte Repo() {return repo;} private final byte repo; - public byte[] Ttl() {return ttl;} private final byte[] ttl; // without file ns; EX: "A.png" not "File:A.png" - public int Ext_id() {return ext_id;} private final int ext_id; + public byte Repo() {return repo;} private final byte repo; + public byte[] Ttl() {return ttl;} private final byte[] ttl; // without file ns; EX: "A.png" not "File:A.png" + public int Ext_id() {return ext_id;} private final int ext_id; public Xof_ext Ext() {if (ext == null) ext = Xof_ext_.new_by_id_(ext_id); return ext;} private Xof_ext ext; - 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; // redirect trg; EX: A.png is redirected to B.jpg; record will have A.png|jpg|220|200|B.jpg where jpg|220|200 are the attributes of B.jpg + 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; // redirect trg; EX: A.png is redirected to B.jpg; record will have A.png|jpg|220|200|B.jpg where jpg|220|200 are the attributes of B.jpg public boolean Insert_new() {return insert_new;} public void Insert_new_y_() {insert_new = Bool_.Y;} private boolean insert_new; public int Db_row_size() {return Db_row_size_fixed + redirect.length + ttl.length;} private static final int Db_row_size_fixed = (5 * 4); // 3 ints; 2 bytes public static final byte Repo_comm = 0, Repo_wiki = 1, Repo_null = Byte_.Max_value_127; // SERIALIZED: "wiki_orig.orig_repo" - public static final Xof_orig_itm Null = null; + public static final Xof_orig_itm Null = null; public static final int File_len_null = -1; // file_len used for filters (EX: don't download ogg > 1 MB) public static String dump(Xof_orig_itm itm) { if (itm == null) diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java index 4acfc7192..66f6d045b 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.downloads.*; import gplx.xowa.apps.wms.apis.*; import gplx.xowa.apps.wms.apis.origs.*; public class Xof_orig_mgr { private Xof_orig_wkr[] wkrs; private int wkrs_len; - private Xof_url_bldr url_bldr; private Xow_repo_mgr repo_mgr; private final Xof_img_size img_size = new Xof_img_size(); + private Xof_url_bldr url_bldr; private Xow_repo_mgr repo_mgr; private final Xof_img_size img_size = new Xof_img_size(); public Xof_orig_mgr() {this.Wkrs__clear();} public void Init_by_wiki(Xow_wiki wiki, Xof_fsdb_mode fsdb_mode, Xof_orig_tbl[] orig_tbls, Xof_url_bldr url_bldr) { this.repo_mgr = wiki.File__repo_mgr(); this.url_bldr = url_bldr; diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_tbl.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_tbl.java index 3193834c1..b327791e1 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_tbl.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_tbl.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.dbs.*; import gplx.dbs.utls.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.repos.*; public class Xof_orig_tbl implements Db_tbl { - public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public final String fld_repo, fld_ttl, fld_status, fld_ext, fld_w, fld_h, fld_redirect; - public final Db_conn conn; private final Xof_orig_tbl__in_wkr select_in_wkr = new Xof_orig_tbl__in_wkr(); + public final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public final String fld_repo, fld_ttl, fld_status, fld_ext, fld_w, fld_h, fld_redirect; + public final Db_conn conn; private final Xof_orig_tbl__in_wkr select_in_wkr = new Xof_orig_tbl__in_wkr(); public Db_conn Conn() {return conn;} public Xof_orig_tbl(Db_conn conn, boolean schema_is_1) { this.conn = conn; @@ -37,7 +37,7 @@ public class Xof_orig_tbl implements Db_tbl { select_in_wkr.Ctor(this, tbl_name, flds, fld_ttl); conn.Rls_reg(this); } - public String Tbl_name() {return tbl_name;} private final String tbl_name; + public String Tbl_name() {return tbl_name;} private final String tbl_name; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds, Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "main", fld_ttl)));} public void Select_by_list(Ordered_hash rv, List_adp itms) {select_in_wkr.Init(rv, itms).Select_in(Cancelable_.Never, conn, 0, itms.Count());} public Xof_orig_itm Select_itm(byte[] ttl) { diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java index 592ee9284..6bbafe9f9 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.apps.wms.apis.*; import gplx.xowa.files.fsdb.*; public class Xof_orig_wkr_ { - public static final Xof_orig_wkr[] Ary_empty = new Xof_orig_wkr[0]; + public static final Xof_orig_wkr[] Ary_empty = new Xof_orig_wkr[0]; public static void Find_by_list(Xof_orig_wkr wkr, Ordered_hash rv, List_adp itms) { int len = itms.Count(); for (int i = 0; i < len; ++i) { diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__mock.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__mock.java index 45fb9574b..bf236a388 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__mock.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__mock.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.flds.*; import gplx.dbs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wikis.tdbs.metas.*; public class Xof_orig_wkr__mock implements Xof_orig_wkr { - private final Ordered_hash hash = Ordered_hash_.New_bry(); + private final Ordered_hash hash = Ordered_hash_.New_bry(); public byte Tid() {return Xof_orig_wkr_.Tid_mock;} public void Find_by_list(Ordered_hash rv, List_adp itms) {Xof_orig_wkr_.Find_by_list(this, rv, itms);} public Xof_orig_itm Find_as_itm(byte[] ttl, int list_idx, int list_len) { diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__orig_db.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__orig_db.java index b7fe82f71..8522bc207 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__orig_db.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__orig_db.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ 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) { diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java index 0fb479676..0fa0ecb8c 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__wmf_api.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.apps.wms.apis.*; import gplx.xowa.files.downloads.*; import gplx.xowa.apps.wms.apis.origs.*; public class Xof_orig_wkr__wmf_api implements Xof_orig_wkr { - private final Xoapi_orig_base orig_api; private final Xof_download_wkr download_wkr; private final Xow_repo_mgr repo_mgr; private final byte[] wiki_domain; - private final Xoapi_orig_rslts api_rv = new Xoapi_orig_rslts(); + private final Xoapi_orig_base orig_api; private final Xof_download_wkr download_wkr; private final Xow_repo_mgr repo_mgr; private final byte[] wiki_domain; + private final Xoapi_orig_rslts api_rv = new Xoapi_orig_rslts(); public Xof_orig_wkr__wmf_api(Xoapi_orig_base orig_api, Xof_download_wkr download_wkr, Xow_repo_mgr repo_mgr, byte[] wiki_domain) { this.orig_api = orig_api; this.download_wkr = download_wkr; this.repo_mgr = repo_mgr; this.wiki_domain = wiki_domain; } diff --git a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__xo_meta.java b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__xo_meta.java index 82e9e2016..71f9771ce 100644 --- a/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__xo_meta.java +++ b/400_xowa/src/gplx/xowa/files/origs/Xof_orig_wkr__xo_meta.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.origs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.flds.*; import gplx.dbs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.wikis.tdbs.metas.*; public class Xof_orig_wkr__xo_meta implements Xof_orig_wkr { - private final Io_url wiki_meta_dir; private final byte dir_spr_byte; private final Bry_bfr url_bfr = Bry_bfr_.New_w_size(255); - private final Gfo_fld_rdr meta_rdr = Gfo_fld_rdr.xowa_(); private final Xof_meta_thumb_parser parser = new Xof_meta_thumb_parser(); + private final Io_url wiki_meta_dir; private final byte dir_spr_byte; private final Bry_bfr url_bfr = Bry_bfr_.New_w_size(255); + private final Gfo_fld_rdr meta_rdr = Gfo_fld_rdr.xowa_(); private final Xof_meta_thumb_parser parser = new Xof_meta_thumb_parser(); public Xof_orig_wkr__xo_meta(Io_url wiki_meta_dir) {this.wiki_meta_dir = wiki_meta_dir; this.dir_spr_byte = wiki_meta_dir.Info().DirSpr_byte();} public byte Tid() {return Xof_orig_wkr_.Tid_xowa_meta;} public void Find_by_list(Ordered_hash rv, List_adp itms) {Xof_orig_wkr_.Find_by_list(this, rv, itms);} diff --git a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java index ffbfdc04e..785e18f39 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.consoles.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.imgs.*; import gplx.xowa.wikis.domains.*; public class Xof_repo_itm implements Gfo_invk { - private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; + private final Xoa_fsys_mgr app_fsys; private final Xof_rule_mgr ext_rule_mgr; public Xof_repo_itm(byte[] key, Xoa_fsys_mgr app_fsys, Xof_rule_mgr ext_rule_mgr, byte[] wiki_domain) { this.key = key; this.app_fsys = app_fsys; this.ext_rule_mgr = ext_rule_mgr; Wiki_domain_(wiki_domain); } - public byte[] Key() {return key;} private final byte[] key; // EX: "src_http_commons" + public byte[] Key() {return key;} private final byte[] key; // EX: "src_http_commons" public byte Tid() {return tid;} private byte tid; // EX: Xof_repo_tid_.Tid__remote public byte[] Wiki_domain() {return wiki_domain;} private byte[] wiki_domain; // EX: "commons.wikimedia.org" public byte[] Wiki_abrv_xo() {return wiki_abrv_xo;} private byte[] wiki_abrv_xo; // EX: "c" diff --git a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm__tst.java b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm__tst.java index 1e5afbe6c..b7e5f771a 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm__tst.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_itm__tst.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*; import gplx.xowa.apps.fsys.*; import gplx.xowa.files.exts.*; public class Xof_repo_itm__tst { - private final Xof_repo_itm__fxt fxt = new Xof_repo_itm__fxt(); + private final Xof_repo_itm__fxt fxt = new Xof_repo_itm__fxt(); @Test public void Gen_name_trg__long() { // make a windows repo with a long directory name Xof_repo_itm repo = fxt.Make__repo(Op_sys.Wnt.Os_name(), "C:\\xowa0123456789", "commons.wikimedia.org"); @@ -39,7 +39,7 @@ public class Xof_repo_itm__tst { } } class Xof_repo_itm__fxt { - private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Bry_bfr tmp_bfr = Bry_bfr_.New(); public Xof_repo_itm Make__repo(String plat_name, String root_dir_str, String wiki_domain) { String key = "test_repo"; Io_url root_dir = Io_url_.new_dir_(root_dir_str); diff --git a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_pair.java b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_pair.java index e601e7d7c..f3886c90a 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_pair.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_pair.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; public class Xof_repo_pair implements Gfo_invk { public Xof_repo_pair(byte id, byte[] wiki_domain, Xof_repo_itm src, Xof_repo_itm trg) { @@ -20,8 +20,8 @@ public class Xof_repo_pair implements Gfo_invk { } public byte Id() {return id;} private byte id; public byte[] Wiki_domain() {return wiki_domain;} private byte[] wiki_domain; - public Xof_repo_itm Src() {return src;} private final Xof_repo_itm src; - public Xof_repo_itm Trg() {return trg;} private final Xof_repo_itm trg; + public Xof_repo_itm Src() {return src;} private final Xof_repo_itm src; + public Xof_repo_itm Trg() {return trg;} private final Xof_repo_itm trg; public void Wiki_domain_(byte[] v) {wiki_domain = v;} public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { diff --git a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_tid_.java b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_tid_.java index 834e7c192..1290006f0 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xof_repo_tid_.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xof_repo_tid_.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; public class Xof_repo_tid_ { public static final byte @@ -28,7 +28,7 @@ public class Xof_repo_tid_ { else if (String_.Eq(v, "math")) return Tid__math; else throw Err_.new_unhandled_default(v); } - public static final byte[] + public static final byte[] Bry__math = Bry_.new_a7("wikimedia.org/math") // EX: https://wikimedia.org/api/rest_v1/media/math/render/svg/596f8baf206a81478afd4194b44138715dc1a05c ; } diff --git a/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java b/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java index 13a85b921..222eae774 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xofw_wiki_wkr_base.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.data.tbls.*; @@ -66,5 +66,5 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder { else return Xop_redirect_mgr.Redirect_null_bry; } - private static final Xowd_page_itm tmp_db_page = Xowd_page_itm.new_tmp(); + private static final Xowd_page_itm tmp_db_page = Xowd_page_itm.new_tmp(); } diff --git a/400_xowa/src/gplx/xowa/files/repos/Xowe_repo_mgr.java b/400_xowa/src/gplx/xowa/files/repos/Xowe_repo_mgr.java index 39de4f1aa..b2e0f0be0 100644 --- a/400_xowa/src/gplx/xowa/files/repos/Xowe_repo_mgr.java +++ b/400_xowa/src/gplx/xowa/files/repos/Xowe_repo_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.repos; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.xowa.files.xfers.*; import gplx.xowa.wikis.domains.*; @@ -20,7 +20,7 @@ import gplx.xowa.parsers.utils.*; import gplx.xowa.wikis.tdbs.metas.*; public class Xowe_repo_mgr implements Xow_repo_mgr, Gfo_invk { private Xofw_file_finder_rslt tmp_rslt = new Xofw_file_finder_rslt(); - private Xowe_wiki wiki; private final List_adp repos = List_adp_.New(); + private Xowe_wiki wiki; private final List_adp repos = List_adp_.New(); public Xowe_repo_mgr(Xowe_wiki wiki) { this.wiki = wiki; Xoae_app app = wiki.Appe(); diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java index 9e2e368cc..fc1399be9 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.gfui.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.exts.*; import gplx.xowa.files.downloads.*; import gplx.xowa.files.imgs.*; import gplx.xowa.bldrs.wms.*; import gplx.xowa.apps.wms.apis.*; import gplx.xowa.apps.wms.apis.origs.*; import gplx.xowa.wikis.tdbs.metas.*; public class Xof_xfer_mgr { - public Xof_xfer_mgr(Xof_file_mgr file_mgr, Xowmf_mgr wmf_mgr) {this.file_mgr = file_mgr; this.wmf_mgr = wmf_mgr;} private final Xof_file_mgr file_mgr; private final Xowmf_mgr wmf_mgr; + public Xof_xfer_mgr(Xof_file_mgr file_mgr, Xowmf_mgr wmf_mgr) {this.file_mgr = file_mgr; this.wmf_mgr = wmf_mgr;} private final Xof_file_mgr file_mgr; private final Xowmf_mgr wmf_mgr; public Xof_xfer_rslt Rslt() {return rslt;} private Xof_xfer_rslt rslt = new Xof_xfer_rslt(); public boolean Force_orig() {return force_orig;} public Xof_xfer_mgr Force_orig_(boolean v) {force_orig = v; return this;} private boolean force_orig; public Xof_xfer_mgr Force_orig_y_() {return Force_orig_(Bool_.Y);} public Xof_xfer_mgr Force_orig_n_() {return Force_orig_(Bool_.N);} diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue.java index 2cb339d20..cc99153a5 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import gplx.core.primitives.*; import gplx.core.envs.*; import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.bins.*; import gplx.xowa.files.origs.*; import gplx.xowa.guis.cbks.js.*; import gplx.xowa.wikis.tdbs.metas.*; public class Xof_xfer_queue { - private final List_adp xfer_list = List_adp_.New(); private final Ordered_hash dirty_meta_mgrs = Ordered_hash_.New_bry(); + private final List_adp xfer_list = List_adp_.New(); private final Ordered_hash dirty_meta_mgrs = Ordered_hash_.New_bry(); public Int_obj_ref Html_uid() {return html_uid;} private Int_obj_ref html_uid = Int_obj_ref.New_neg1(); public int Count() {return xfer_list.Count();} public void Clear() { diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java index b7a4f5f91..978b7d3c9 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_fxt.java @@ -18,7 +18,7 @@ import gplx.core.primitives.*; import gplx.dbs.*; import gplx.core.ios.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.files.*; import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*; public class Xof_xfer_queue_html_fxt extends Xof_xfer_queue_base_fxt { - private final Xof_xfer_queue queue = new Xof_xfer_queue(); + private final Xof_xfer_queue queue = new Xof_xfer_queue(); @Override public void Clear(boolean src_repo_is_wmf) { Db_conn_bldr.Instance.Reg_default_mem(); super.Clear(src_repo_is_wmf); diff --git a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_wmf_api_tst.java b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_wmf_api_tst.java index c3c4ad3f8..e4091d464 100644 --- a/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_wmf_api_tst.java +++ b/400_xowa/src/gplx/xowa/files/xfers/Xof_xfer_queue_html_wmf_api_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.files.xfers; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; import org.junit.*; import gplx.xowa.parsers.lnkis.*; public class Xof_xfer_queue_html_wmf_api_tst { - private final Xof_xfer_queue_html_fxt fxt = new Xof_xfer_queue_html_fxt(); + private final Xof_xfer_queue_html_fxt fxt = new Xof_xfer_queue_html_fxt(); @Before public void init() { gplx.core.ios.IoEngine_system.Web_access_enabled = true; // NOTE: must set to true, else Wmf_api calls below will always return false fxt.Clear(true); fxt.Src_commons_repo().Wmf_api_(true); fxt.Src_en_wiki_repo().Wmf_api_(true); diff --git a/400_xowa/src/gplx/xowa/guis/Xoa_gui_mgr.java b/400_xowa/src/gplx/xowa/guis/Xoa_gui_mgr.java index 54b3b4173..3386dab24 100644 --- a/400_xowa/src/gplx/xowa/guis/Xoa_gui_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/Xoa_gui_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis; import gplx.*; import gplx.xowa.*; import gplx.core.brys.fmtrs.*; import gplx.core.envs.*; import gplx.gfui.*; import gplx.gfui.ipts.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.windows.*; import gplx.gfui.controls.standards.*; @@ -32,7 +32,7 @@ public class Xoa_gui_mgr implements Gfo_evt_itm, Gfo_invk { } public Gfo_evt_mgr Evt_mgr() {return ev_mgr;} private Gfo_evt_mgr ev_mgr; public Xoae_app App() {return app;} private Xoae_app app; - public Xog_win_itm Browser_win() {return browser_win;} private final Xog_win_itm browser_win; + public Xog_win_itm Browser_win() {return browser_win;} private final Xog_win_itm browser_win; public IptCfgRegy Ipt_cfgs() {return ipt_cfgs;} IptCfgRegy ipt_cfgs = new IptCfgRegy(); public Xog_bnd_mgr Bnd_mgr() {return bnd_mgr;} private Xog_bnd_mgr bnd_mgr; public Gfui_kit Kit() {return kit;} private Gfui_kit kit = Gfui_kit_.Mem(); @@ -41,8 +41,8 @@ public class Xoa_gui_mgr implements Gfo_evt_itm, Gfo_invk { public Xog_layout Layout() {return layout;} private Xog_layout layout = new Xog_layout(); public Xog_html_mgr Html_mgr() {return html_mgr;} private Xog_html_mgr html_mgr; public Xog_menu_mgr Menu_mgr() {return menu_mgr;} private Xog_menu_mgr menu_mgr; - public Xog_url_macro_mgr Url_macro_mgr() {return url_macro_mgr;} private final Xog_url_macro_mgr url_macro_mgr = new Xog_url_macro_mgr(); - public Xog_nightmode_mgr Nightmode_mgr() {return nightmode_mgr;} private final Xog_nightmode_mgr nightmode_mgr = new Xog_nightmode_mgr(); + public Xog_url_macro_mgr Url_macro_mgr() {return url_macro_mgr;} private final Xog_url_macro_mgr url_macro_mgr = new Xog_url_macro_mgr(); + public Xog_nightmode_mgr Nightmode_mgr() {return nightmode_mgr;} private final Xog_nightmode_mgr nightmode_mgr = new Xog_nightmode_mgr(); public void Show_prog() { // get rects for positioning RectAdp statusbar_rect = browser_win.Statusbar_grp().Rect(); diff --git a/400_xowa/src/gplx/xowa/guis/Xogv_page_load_wkr.java b/400_xowa/src/gplx/xowa/guis/Xogv_page_load_wkr.java index 895b4657b..e49dc872a 100644 --- a/400_xowa/src/gplx/xowa/guis/Xogv_page_load_wkr.java +++ b/400_xowa/src/gplx/xowa/guis/Xogv_page_load_wkr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis; import gplx.*; import gplx.xowa.*; import gplx.core.threads.*; import gplx.core.net.*; import gplx.xowa.guis.history.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.*; import gplx.xowa.htmls.*; class Xogv_page_load_wkr implements Gfo_thread_wkr, Gfo_invk { - private final Xoav_wiki_mgr wiki_mgr; private final Gfo_url_parser url_parser; - private final Xogv_tab_base tab; private final Xog_history_itm old_itm, new_itm; + private final Xoav_wiki_mgr wiki_mgr; private final Gfo_url_parser url_parser; + private final Xogv_tab_base tab; private final Xog_history_itm old_itm, new_itm; public Xogv_page_load_wkr(Xoav_wiki_mgr wiki_mgr, Gfo_url_parser url_parser, Xogv_tab_base tab, Xog_history_itm old_itm, Xog_history_itm new_itm) { this.wiki_mgr = wiki_mgr; this.url_parser = url_parser; this.tab = tab; this.old_itm = old_itm; this.new_itm = new_itm; } diff --git a/400_xowa/src/gplx/xowa/guis/Xogv_tab_base.java b/400_xowa/src/gplx/xowa/guis/Xogv_tab_base.java index 34d03e78d..7ff33f261 100644 --- a/400_xowa/src/gplx/xowa/guis/Xogv_tab_base.java +++ b/400_xowa/src/gplx/xowa/guis/Xogv_tab_base.java @@ -23,7 +23,7 @@ public abstract class Xogv_tab_base { private Xoav_wiki_mgr wiki_mgr; private Gfo_thread_pool thread_pool; public void Ctor(Xoav_wiki_mgr wiki_mgr, Gfo_thread_pool thread_pool, Gfo_url_parser url_parser) {this.wiki_mgr = wiki_mgr; this.thread_pool = thread_pool; this.url_parser = url_parser;} - public Xog_history_stack History_stack() {return history_stack;} private final Xog_history_stack history_stack = new Xog_history_stack(); + public Xog_history_stack History_stack() {return history_stack;} private final Xog_history_stack history_stack = new Xog_history_stack(); public Xog_history_itm Cur_itm() {return history_stack.Cur_itm();} public Xow_wiki Get_wiki_or_null(byte[] key) {return wiki_mgr.Get_by_or_null(key);} public Xoh_page Go_to(byte[] page) {return Go_to(history_stack.Cur_itm().Wiki(), page, Bry_.Empty, Bry_.Empty, false, "");} diff --git a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box.java b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box.java index 7034ced7d..49646bf90 100644 --- a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box.java +++ b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.bnds; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Xog_bnd_box { - private final Ordered_hash key_hash = Ordered_hash_.New(); - private final Hash_adp cmd_hash = Hash_adp_.New(); + private final Ordered_hash key_hash = Ordered_hash_.New(); + private final Hash_adp cmd_hash = Hash_adp_.New(); public Xog_bnd_box(int tid, String key) { this.tid = tid; this.key = key; } - public int Tid() {return tid;} private final int tid; - public String Key() {return key;} private final String key; + public int Tid() {return tid;} private final int tid; + public String Key() {return key;} private final String key; public int Len() {return key_hash.Count();} public Xog_bnd_itm Get_at(int i) {return (Xog_bnd_itm)key_hash.Get_at(i);} public void Add(Xog_bnd_itm itm) { diff --git a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box_.java b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box_.java index 0b4e1a4fa..33d5f25a6 100644 --- a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box_.java +++ b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_box_.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.bnds; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.gfui.*; import gplx.gfui.ipts.*; import gplx.gfui.controls.elems.*; import gplx.xowa.guis.views.*; import gplx.xowa.guis.cmds.*; public class Xog_bnd_box_ { - public static final String Key_browser = "browser", Key_browser_url = "browser.url", Key_browser_search = "browser.search", Key_browser_allpages = "browser.allpages", Key_browser_html = "browser.html", Key_browser_find = "browser.find", Key_browser_prog = "browser.prog", Key_browser_info = "browser.info"; - public static final String Gui_browser = "Window", Gui_browser_url = "Url bar", Gui_browser_search = "Search box", Gui_browser_allpages = "Allpages box", Gui_browser_html = "HTML browser", Gui_browser_find = "Find box", Gui_browser_prog = "Status bar", Gui_browser_info = "System Messages box"; + public static final String Key_browser = "browser", Key_browser_url = "browser.url", Key_browser_search = "browser.search", Key_browser_allpages = "browser.allpages", Key_browser_html = "browser.html", Key_browser_find = "browser.find", Key_browser_prog = "browser.prog", Key_browser_info = "browser.info"; + public static final String Gui_browser = "Window", Gui_browser_url = "Url bar", Gui_browser_search = "Search box", Gui_browser_allpages = "Allpages box", Gui_browser_html = "HTML browser", Gui_browser_find = "Find box", Gui_browser_prog = "Status bar", Gui_browser_info = "System Messages box"; public static final int Tid__max = 8, Tid_browser = 0, Tid_browser_url = 1, Tid_browser_search = 2, Tid_browser_allpages = 3, Tid_browser_html = 4, Tid_browser_find = 5, Tid_browser_prog = 6, Tid_browser_info = 7; public static final int Ary_len = Tid__max; public static Xog_bnd_box[] Ary() { diff --git a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_temp.java b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_temp.java index cb9280492..1fbed3cba 100644 --- a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_temp.java +++ b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_temp.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.bnds; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.gfui.ipts.*; import gplx.xowa.guis.cmds.*; interface Xog_bnd_wkr { @@ -23,8 +23,8 @@ class Xog_bnd_wkr__null implements Xog_bnd_wkr { } class Xog_bnd_temp implements Gfo_invk { private Xoae_app app; - private final Ordered_hash regy = Ordered_hash_.New(); - private final Xog_bnd_wkr bnd_wkr = new Xog_bnd_wkr__null(); + private final Ordered_hash regy = Ordered_hash_.New(); + private final Xog_bnd_wkr bnd_wkr = new Xog_bnd_wkr__null(); private Xog_bnd_box[] boxs = Xog_bnd_box_.Ary(); public void Init_by_app(Xoae_app app) { this.app = app; @@ -56,8 +56,8 @@ class Xog_bnd_cfg_itm { this.box = box; this.ipt = ipt; } - public String Box() {return box;} private final String box; - public String Ipt() {return ipt;} private final String ipt; + public String Box() {return box;} private final String box; + public String Ipt() {return ipt;} private final String ipt; public static Xog_bnd_cfg_itm Parse(String s) { String[] parts = String_.Split(s, "|"); return new Xog_bnd_cfg_itm(parts[0], parts[1]); diff --git a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_win.java b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_win.java index c455f927a..f3880e0b2 100644 --- a/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_win.java +++ b/400_xowa/src/gplx/xowa/guis/bnds/Xog_bnd_win.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.bnds; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.gfui.*; import gplx.gfui.draws.*; import gplx.gfui.ipts.*; import gplx.gfui.kits.core.*; import gplx.gfui.envs.*; import gplx.gfui.controls.windows.*; import gplx.gfui.controls.elems.*; import gplx.gfui.controls.standards.*; import gplx.gfui.layouts.swts.*; @@ -85,7 +85,7 @@ public class Xog_bnd_win implements Gfo_invk { elem_2.X_(elem_1.X_max()); } - private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(gplx.xowa.addons.apps.cfgs.specials.edits.pages.Xocfg_edit_special.Prototype.Special__meta().Ttl_bry()); + private final Xog_cbk_trg cbk_trg = Xog_cbk_trg.New_by_page(gplx.xowa.addons.apps.cfgs.specials.edits.pages.Xocfg_edit_special.Prototype.Special__meta().Ttl_bry()); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk__when_key_down)) When_key_down(m); else if (ctx.Match(k, Invk__when_key_press)) When_key_up(m); diff --git a/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_trg.java b/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_trg.java index 367b99795..bebcc1a5d 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_trg.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_trg.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cbks; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Xog_cbk_trg { Xog_cbk_trg(byte tid, byte[] page_ttl, String page_guid) { @@ -20,13 +20,13 @@ public class Xog_cbk_trg { this.page_ttl = page_ttl; this.page_guid = page_guid; } - public byte Tid() {return tid;} private final byte tid; - public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; // same as ttl.Full_db(); EX: Special:XowaDownloadCentral - public String Page_guid() {return page_guid;} private final String page_guid; + public byte Tid() {return tid;} private final byte tid; + public byte[] Page_ttl() {return page_ttl;} private final byte[] page_ttl; // same as ttl.Full_db(); EX: Special:XowaDownloadCentral + public String Page_guid() {return page_guid;} private final String page_guid; public static final byte Tid__cbk_enabled = 0, Tid__specific_page = 1, Tid__page_guid = 2; - public static final Xog_cbk_trg Any = new Xog_cbk_trg(Tid__cbk_enabled, null, String_.Empty); + public static final Xog_cbk_trg Any = new Xog_cbk_trg(Tid__cbk_enabled, null, String_.Empty); public static Xog_cbk_trg New_by_page(byte[] page_ttl) {return new Xog_cbk_trg(Tid__specific_page, page_ttl , String_.Empty);} public static Xog_cbk_trg New_by_guid(String page_guid) {return new Xog_cbk_trg(Tid__page_guid , Bry_.Empty , page_guid);} } diff --git a/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_wkr.java b/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_wkr.java index df665a447..6d898460c 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_wkr.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/Xog_cbk_wkr.java @@ -13,11 +13,11 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.guis.cbks; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; -import gplx.core.gfobjs.*; -public interface Xog_cbk_wkr { - Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data); -} -class Xog_cbk_wkr_ { - public static final Xog_cbk_wkr[] Ary_empty = new Xog_cbk_wkr[0]; -} +package gplx.xowa.guis.cbks; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; +import gplx.core.gfobjs.*; +public interface Xog_cbk_wkr { + Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data); +} +class Xog_cbk_wkr_ { + public static final Xog_cbk_wkr[] Ary_empty = new Xog_cbk_wkr[0]; +} diff --git a/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr_.java b/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr_.java index cddf9617d..cf81bc49d 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr_.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr_.java @@ -13,17 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.guis.cbks.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; -public class Xog_js_wkr_ { - public static final Xog_js_wkr Noop = new Xog_js_wkr__noop(); -} -class Xog_js_wkr__noop implements Xog_js_wkr { - public void Html_img_update (String uid, String src, int w, int h) {} - public void Html_atr_set (String uid, String key, String val) {} - public void Html_elem_replace_html (String uid, String html) {} - public void Html_elem_append_above (String uid, String html) {} - public void Html_redlink (String html_uid) {} - public void Html_elem_delete (String elem_id) {} - public void Html_gallery_packed_exec() {} - public void Html_popups_bind_hover_to_doc() {} -} +package gplx.xowa.guis.cbks.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; +public class Xog_js_wkr_ { + public static final Xog_js_wkr Noop = new Xog_js_wkr__noop(); +} +class Xog_js_wkr__noop implements Xog_js_wkr { + public void Html_img_update (String uid, String src, int w, int h) {} + public void Html_atr_set (String uid, String key, String val) {} + public void Html_elem_replace_html (String uid, String html) {} + public void Html_elem_append_above (String uid, String html) {} + public void Html_redlink (String html_uid) {} + public void Html_elem_delete (String elem_id) {} + public void Html_gallery_packed_exec() {} + public void Html_popups_bind_hover_to_doc() {} +} diff --git a/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr__log.java b/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr__log.java index aa83b9fe9..a3b3ef955 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr__log.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/js/Xog_js_wkr__log.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cbks.js; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; public class Xog_js_wkr__log implements Xog_js_wkr { - private final List_adp log_list = List_adp_.New(); + private final List_adp log_list = List_adp_.New(); public void Html_img_update (String uid, String src, int w, int h) {log_list.Add(Object_.Ary(Proc_img_update, uid, src, w, h));} public void Html_atr_set (String uid, String key, String val) {log_list.Add(Object_.Ary(Proc_atr_set, uid, key, val));} public void Html_redlink (String uid) {log_list.Add(Object_.Ary(Proc_redlink, uid));} diff --git a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfo_log__swt.java b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfo_log__swt.java index 5c68029d6..9bc2d49a4 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfo_log__swt.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfo_log__swt.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cbks.swts; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; import gplx.core.logs.*; import gplx.core.gfobjs.*; import gplx.xowa.guis.cbks.*; -public class Gfo_log__swt extends Gfo_log__file { private final Xog_cbk_mgr cbk_mgr; +public class Gfo_log__swt extends Gfo_log__file { private final Xog_cbk_mgr cbk_mgr; public Gfo_log__swt(Xog_cbk_mgr cbk_mgr, Io_url url, Gfo_log_itm_wtr fmtr) {super(url, fmtr);this.cbk_mgr = cbk_mgr;} @Override public void Exec(byte type, long time, long elapsed, String msg, Object[] args) { if (type == Gfo_log_itm.Type__prog) return; diff --git a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser.java b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser.java index a1430d02b..01dbfaeae 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cbks.swts; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; -public class Gfobj_wtr__json__browser extends Gfobj_wtr__json { private final Object thread_lock = new Object(); - private final Bry_bfr bfr; +public class Gfobj_wtr__json__browser extends Gfobj_wtr__json { private final Object thread_lock = new Object(); + private final Bry_bfr bfr; public Gfobj_wtr__json__browser() { this.Opt_ws_(Bool_.N).Opt_backslash_2x_(Bool_.Y); this.bfr = this.Bfr(); @@ -33,7 +33,7 @@ public class Gfobj_wtr__json__browser extends Gfobj_wtr__json { private final return this.To_str(); } } - private static final byte[] + private static final byte[] Bry__func_bgn = Bry_.new_a7("return ") , Bry__args_bgn = Bry_.new_a7("('") , Bry__args_end = Bry_.new_a7("');") diff --git a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser__tst.java b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser__tst.java index ff85b635e..24f7c6fa2 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser__tst.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/swts/Gfobj_wtr__json__browser__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.guis.cbks.swts; import gplx.*; import gplx.xowa.*; import gplx import org.junit.*; import gplx.core.tests.*; import gplx.core.gfobjs.*; public class Gfobj_wtr__json__browser__tst { - private final Gfobj_wtr__json__browser__fxt fxt = new Gfobj_wtr__json__browser__fxt(); + private final Gfobj_wtr__json__browser__fxt fxt = new Gfobj_wtr__json__browser__fxt(); @Test public void Json_proc() { fxt.Test__json_proc ( "proc_name" diff --git a/400_xowa/src/gplx/xowa/guis/cbks/swts/Xog_cbk_wkr__swt.java b/400_xowa/src/gplx/xowa/guis/cbks/swts/Xog_cbk_wkr__swt.java index 91d1cd099..a9146bf52 100644 --- a/400_xowa/src/gplx/xowa/guis/cbks/swts/Xog_cbk_wkr__swt.java +++ b/400_xowa/src/gplx/xowa/guis/cbks/swts/Xog_cbk_wkr__swt.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cbks.swts; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*; public class Xog_cbk_wkr__swt implements Xog_cbk_wkr { - private final Xoa_gui_mgr gui_mgr; - private final Xog_browser_func browser_func; - private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser(); + private final Xoa_gui_mgr gui_mgr; + private final Xog_browser_func browser_func; + private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser(); public Xog_cbk_wkr__swt(Xoa_gui_mgr gui_mgr) { this.gui_mgr = gui_mgr; this.browser_func = new Xog_browser_func(); diff --git a/400_xowa/src/gplx/xowa/guis/cmds/Xog_cmd_itm_.java b/400_xowa/src/gplx/xowa/guis/cmds/Xog_cmd_itm_.java index afbdd39aa..a94953756 100644 --- a/400_xowa/src/gplx/xowa/guis/cmds/Xog_cmd_itm_.java +++ b/400_xowa/src/gplx/xowa/guis/cmds/Xog_cmd_itm_.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.cmds; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Xog_cmd_itm_ { - private static final Ordered_hash regy = Ordered_hash_.New(); // NOTE: must be defined at top - public static final String + private static final Ordered_hash regy = Ordered_hash_.New(); // NOTE: must be defined at top + public static final String Key_app_exit = new_dflt_(Xog_ctg_itm_.Tid_app , "xowa.app.exit") , Key_nav_go_bwd = new_dflt_(Xog_ctg_itm_.Tid_nav , "xowa.nav.go_bwd") @@ -172,7 +172,7 @@ public class Xog_cmd_itm_ { public static Xog_cmd_itm Regy_get_at(int i) {return (Xog_cmd_itm)regy.Get_at(i);} public static Xog_cmd_itm Regy_get_or_null(String key) {return (Xog_cmd_itm)regy.Get_by(key);} public static void Regy_add(Xog_cmd_itm itm) {regy.Add(itm.Key(), itm);} - public static final byte[] + public static final byte[] Msg_pre_api = Bry_.new_a7("api-") , Msg_pre_ctg = Bry_.new_a7("api.ctg-") , Msg_suf_name = Bry_.new_a7("-name") diff --git a/400_xowa/src/gplx/xowa/guis/history/Xog_history_itm.java b/400_xowa/src/gplx/xowa/guis/history/Xog_history_itm.java index 51268d00c..de13cad4f 100644 --- a/400_xowa/src/gplx/xowa/guis/history/Xog_history_itm.java +++ b/400_xowa/src/gplx/xowa/guis/history/Xog_history_itm.java @@ -1,31 +1,31 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.history; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Xog_history_itm { - private final boolean redirect_force; + private final boolean redirect_force; public Xog_history_itm(byte[] wiki, byte[] page, byte[] anch, byte[] qarg, boolean redirect_force, String bmk_pos) { this.key = Bry_.Add_w_dlm(Byte_ascii.Pipe, wiki, page, anch, qarg, redirect_force ? Bool_.Y_bry : Bool_.N_bry); this.wiki = wiki; this.page = page; this.anch = anch; this.qarg = qarg; this.redirect_force = redirect_force; this.bmk_pos = bmk_pos; } - public byte[] Key() {return key;} private final byte[] key; - public byte[] Wiki() {return wiki;} private final byte[] wiki; - public byte[] Page() {return page;} private final byte[] page; - public byte[] Anch() {return anch;} private final byte[] anch; - public byte[] Qarg() {return qarg;} private final byte[] qarg; + public byte[] Key() {return key;} private final byte[] key; + public byte[] Wiki() {return wiki;} private final byte[] wiki; + public byte[] Page() {return page;} private final byte[] page; + public byte[] Anch() {return anch;} private final byte[] anch; + public byte[] Qarg() {return qarg;} private final byte[] qarg; public String Bmk_pos() {return bmk_pos;} public void Bmk_pos_(String v) {bmk_pos = v;} private String bmk_pos; public boolean Eq_wo_bmk_pos(Xog_history_itm comp) { return Bry_.Eq(wiki, comp.wiki) @@ -36,5 +36,5 @@ public class Xog_history_itm { ; } public static final String Html_doc_pos_toc = "top"; - public static final Xog_history_itm Null = new Xog_history_itm(null, null, null, null, false, null); + public static final Xog_history_itm Null = new Xog_history_itm(null, null, null, null, false, null); } diff --git a/400_xowa/src/gplx/xowa/guis/history/Xog_history_mgr.java b/400_xowa/src/gplx/xowa/guis/history/Xog_history_mgr.java index ec2b03ef8..5b1d8401e 100644 --- a/400_xowa/src/gplx/xowa/guis/history/Xog_history_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/history/Xog_history_mgr.java @@ -1,101 +1,101 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2020 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.xowa.guis.history; - -import gplx.Bool_; -import gplx.Bry_; -import gplx.Byte_ascii; -import gplx.Ordered_hash; -import gplx.Ordered_hash_; -import gplx.xowa.Xoa_ttl; -import gplx.xowa.Xoa_url; -import gplx.xowa.Xoa_url_; -import gplx.xowa.Xoae_page; -import gplx.xowa.Xowe_wiki; - -public class Xog_history_mgr { - private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Xog_history_stack stack = new Xog_history_stack(); - public int Count() {return hash.Count();} - public Xoae_page Cur_page(Xowe_wiki wiki) {return Get_or_fetch(wiki, stack.Cur_itm());} - public Xoae_page Go_bwd(Xowe_wiki wiki) {return Go_by_dir(wiki, Bool_.N);} - public Xoae_page Go_fwd(Xowe_wiki wiki) {return Go_by_dir(wiki, Bool_.Y);} - public Xoae_page Go_by_dir(Xowe_wiki wiki, boolean fwd) { - Xog_history_itm itm = fwd ? stack.Go_fwd() : stack.Go_bwd(); - if (itm == Xog_history_itm.Null) return Xoae_page.Empty; - Xoae_page rv = Get_or_fetch(wiki, itm); - byte[] anch_key = itm.Anch(); - rv.Url().Anch_bry_(anch_key); // must override anchor as it may be different for cached page - rv.Html_data().Bmk_pos_(itm.Bmk_pos()); - return rv; - } - public void Add(Xoae_page page) { - this.Add(page, Xog_history_mgr.new_(page)); - } - public void Add(Xoae_page page, Xoa_url url) { - this.Add(page, Xog_history_mgr.new_(url, page.Html_data().Bmk_pos())); - } - private void Add(Xoae_page page, Xog_history_itm new_itm) { - stack.Add(new_itm); - byte[] page_key = Build_page_key(page); - if (!hash.Has(page_key)) - hash.Add(page_key, page); - } - public void Update_html_doc_pos(Xoae_page page, byte history_nav_type) { - Xog_history_itm itm = Get_recent(page, history_nav_type); - if (itm != null) itm.Bmk_pos_(page.Html_data().Bmk_pos()); - } - private Xog_history_itm Get_recent(Xoae_page page, byte history_nav_type) { - int pos = -1; - int list_pos = stack.Cur_pos(); - switch (history_nav_type) { - case Xog_history_stack.Nav_fwd: pos = list_pos - 1; break; - case Xog_history_stack.Nav_bwd: pos = list_pos + 1; break; - case Xog_history_stack.Nav_by_anchor: pos = list_pos; break; - } - if (pos < 0 || pos >= stack.Len()) return null; - Xog_history_itm recent = stack.Get_at(pos); - Xog_history_itm page_itm = Xog_history_mgr.new_(page); - return page_itm.Eq_wo_bmk_pos(recent) ? recent : null; // check that recent page actually matches current; DATE:2014-05-10 - } - private Xoae_page Get_or_fetch(Xowe_wiki wiki, Xog_history_itm itm) { - byte[] page_key = Build_page_key(itm.Wiki(), itm.Page(), itm.Qarg()); - Xoae_page rv = (Xoae_page)hash.Get_by(page_key); - if (rv != null) return rv; - Xoa_ttl ttl = Xoa_ttl.Parse(wiki, itm.Page()); - return wiki.Data_mgr().Load_page_by_ttl(ttl); - } - private static byte[] Build_page_key(Xoae_page page) {return Build_page_key(page.Wiki().Domain_bry(), page.Ttl().Full_url(), page.Url().Qargs_mgr().To_bry());} - private static byte[] Build_page_key(byte[] wiki_key, byte[] page_key, byte[] args_key) {return Bry_.Add_w_dlm(Byte_ascii.Pipe, wiki_key, page_key, args_key);} - public static Xog_history_itm new_(Xoae_page pg) { - byte[] wiki = pg.Wiki().Domain_bry(); - byte[] page = pg.Ttl().Full_url(); // get page_name only (no anchor; no query args) - byte[] anch = pg.Url().Anch_bry(); - byte[] qarg = pg.Url().Qargs_mgr().To_bry(); - boolean redirect_force = pg.Url().Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__no); - String bmk_pos = pg.Html_data().Bmk_pos(); - if (bmk_pos == null) bmk_pos = Xog_history_itm.Html_doc_pos_toc; // never allow null doc_pos; set to top - return new Xog_history_itm(wiki, page, anch, qarg, redirect_force, bmk_pos); - } - public static Xog_history_itm new_(Xoa_url url, String bmk_pos) { - byte[] wiki = url.Wiki_bry(); - byte[] page = url.Page_bry(); - byte[] anch = url.Anch_bry(); - byte[] qarg = url.Qargs_mgr().To_bry(); - boolean redirect_force = url.Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__no); - if (bmk_pos == null) bmk_pos = Xog_history_itm.Html_doc_pos_toc; // never allow null doc_pos; set to top - return new Xog_history_itm(wiki, page, anch, qarg, redirect_force, bmk_pos); - } -} +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2020 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.xowa.guis.history; + +import gplx.Bool_; +import gplx.Bry_; +import gplx.Byte_ascii; +import gplx.Ordered_hash; +import gplx.Ordered_hash_; +import gplx.xowa.Xoa_ttl; +import gplx.xowa.Xoa_url; +import gplx.xowa.Xoa_url_; +import gplx.xowa.Xoae_page; +import gplx.xowa.Xowe_wiki; + +public class Xog_history_mgr { + private final Ordered_hash hash = Ordered_hash_.New_bry(); private final Xog_history_stack stack = new Xog_history_stack(); + public int Count() {return hash.Count();} + public Xoae_page Cur_page(Xowe_wiki wiki) {return Get_or_fetch(wiki, stack.Cur_itm());} + public Xoae_page Go_bwd(Xowe_wiki wiki) {return Go_by_dir(wiki, Bool_.N);} + public Xoae_page Go_fwd(Xowe_wiki wiki) {return Go_by_dir(wiki, Bool_.Y);} + public Xoae_page Go_by_dir(Xowe_wiki wiki, boolean fwd) { + Xog_history_itm itm = fwd ? stack.Go_fwd() : stack.Go_bwd(); + if (itm == Xog_history_itm.Null) return Xoae_page.Empty; + Xoae_page rv = Get_or_fetch(wiki, itm); + byte[] anch_key = itm.Anch(); + rv.Url().Anch_bry_(anch_key); // must override anchor as it may be different for cached page + rv.Html_data().Bmk_pos_(itm.Bmk_pos()); + return rv; + } + public void Add(Xoae_page page) { + this.Add(page, Xog_history_mgr.new_(page)); + } + public void Add(Xoae_page page, Xoa_url url) { + this.Add(page, Xog_history_mgr.new_(url, page.Html_data().Bmk_pos())); + } + private void Add(Xoae_page page, Xog_history_itm new_itm) { + stack.Add(new_itm); + byte[] page_key = Build_page_key(page); + if (!hash.Has(page_key)) + hash.Add(page_key, page); + } + public void Update_html_doc_pos(Xoae_page page, byte history_nav_type) { + Xog_history_itm itm = Get_recent(page, history_nav_type); + if (itm != null) itm.Bmk_pos_(page.Html_data().Bmk_pos()); + } + private Xog_history_itm Get_recent(Xoae_page page, byte history_nav_type) { + int pos = -1; + int list_pos = stack.Cur_pos(); + switch (history_nav_type) { + case Xog_history_stack.Nav_fwd: pos = list_pos - 1; break; + case Xog_history_stack.Nav_bwd: pos = list_pos + 1; break; + case Xog_history_stack.Nav_by_anchor: pos = list_pos; break; + } + if (pos < 0 || pos >= stack.Len()) return null; + Xog_history_itm recent = stack.Get_at(pos); + Xog_history_itm page_itm = Xog_history_mgr.new_(page); + return page_itm.Eq_wo_bmk_pos(recent) ? recent : null; // check that recent page actually matches current; DATE:2014-05-10 + } + private Xoae_page Get_or_fetch(Xowe_wiki wiki, Xog_history_itm itm) { + byte[] page_key = Build_page_key(itm.Wiki(), itm.Page(), itm.Qarg()); + Xoae_page rv = (Xoae_page)hash.Get_by(page_key); + if (rv != null) return rv; + Xoa_ttl ttl = Xoa_ttl.Parse(wiki, itm.Page()); + return wiki.Data_mgr().Load_page_by_ttl(ttl); + } + private static byte[] Build_page_key(Xoae_page page) {return Build_page_key(page.Wiki().Domain_bry(), page.Ttl().Full_url(), page.Url().Qargs_mgr().To_bry());} + private static byte[] Build_page_key(byte[] wiki_key, byte[] page_key, byte[] args_key) {return Bry_.Add_w_dlm(Byte_ascii.Pipe, wiki_key, page_key, args_key);} + public static Xog_history_itm new_(Xoae_page pg) { + byte[] wiki = pg.Wiki().Domain_bry(); + byte[] page = pg.Ttl().Full_url(); // get page_name only (no anchor; no query args) + byte[] anch = pg.Url().Anch_bry(); + byte[] qarg = pg.Url().Qargs_mgr().To_bry(); + boolean redirect_force = pg.Url().Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__no); + String bmk_pos = pg.Html_data().Bmk_pos(); + if (bmk_pos == null) bmk_pos = Xog_history_itm.Html_doc_pos_toc; // never allow null doc_pos; set to top + return new Xog_history_itm(wiki, page, anch, qarg, redirect_force, bmk_pos); + } + public static Xog_history_itm new_(Xoa_url url, String bmk_pos) { + byte[] wiki = url.Wiki_bry(); + byte[] page = url.Page_bry(); + byte[] anch = url.Anch_bry(); + byte[] qarg = url.Qargs_mgr().To_bry(); + boolean redirect_force = url.Qargs_mgr().Match(Xoa_url_.Qarg__redirect, Xoa_url_.Qarg__redirect__no); + if (bmk_pos == null) bmk_pos = Xog_history_itm.Html_doc_pos_toc; // never allow null doc_pos; set to top + return new Xog_history_itm(wiki, page, anch, qarg, redirect_force, bmk_pos); + } +} diff --git a/400_xowa/src/gplx/xowa/guis/history/Xog_history_stack.java b/400_xowa/src/gplx/xowa/guis/history/Xog_history_stack.java index 59ce3009f..c50bffe90 100644 --- a/400_xowa/src/gplx/xowa/guis/history/Xog_history_stack.java +++ b/400_xowa/src/gplx/xowa/guis/history/Xog_history_stack.java @@ -1,21 +1,21 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.history; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Xog_history_stack { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); public int Len() {return list.Count();} public void Clear() {list.Clear(); cur_pos = 0;} public Xog_history_itm Get_at(int i) {return (Xog_history_itm)list.Get_at(i);} diff --git a/400_xowa/src/gplx/xowa/guis/menus/Xog_menu_bldr.java b/400_xowa/src/gplx/xowa/guis/menus/Xog_menu_bldr.java index 082ff59f2..5157b4250 100644 --- a/400_xowa/src/gplx/xowa/guis/menus/Xog_menu_bldr.java +++ b/400_xowa/src/gplx/xowa/guis/menus/Xog_menu_bldr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.cmds.*; class Xog_menu_bldr { @@ -51,7 +51,7 @@ class Xog_menu_bldr { bfr.Add(Const_itm_btn_bgn_rhs); return this; } - private static final byte[] + private static final byte[] Const_spr = Bry_.new_a7("add_spr;\n") , Const_itm_btn_bgn_lhs = Bry_.new_a7("add_btn_default('") , Const_itm_btn_bgn_rhs = Bry_.new_a7("');\n") @@ -59,5 +59,5 @@ class Xog_menu_bldr { , Const_itm_grp_bgn_rhs = Bry_.new_a7("') {\n") , Const_itm_grp_end = Bry_.new_a7("}\n") ; - public static final Xog_menu_bldr Instance = new Xog_menu_bldr(); Xog_menu_bldr() {} + public static final Xog_menu_bldr Instance = new Xog_menu_bldr(); Xog_menu_bldr() {} } diff --git a/400_xowa/src/gplx/xowa/guis/menus/Xog_popup_mnu_mgr.java b/400_xowa/src/gplx/xowa/guis/menus/Xog_popup_mnu_mgr.java index dc15875a3..d6c7982c6 100644 --- a/400_xowa/src/gplx/xowa/guis/menus/Xog_popup_mnu_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/menus/Xog_popup_mnu_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.menus.dom.*; import gplx.xowa.langs.*; public class Xog_popup_mnu_mgr implements Gfo_invk { - private final Ordered_hash hash = Ordered_hash_.New(); - private final Xog_mnu_grp[] mnus = new Xog_mnu_grp[6]; + private final Ordered_hash hash = Ordered_hash_.New(); + private final Xog_mnu_grp[] mnus = new Xog_mnu_grp[6]; private Xoa_gui_mgr gui_mgr; public Xog_popup_mnu_mgr(Xoa_gui_mgr gui_mgr, Xog_menu_mgr menu_mgr) { this.gui_mgr = gui_mgr; diff --git a/400_xowa/src/gplx/xowa/guis/menus/Xog_window_mnu_mgr.java b/400_xowa/src/gplx/xowa/guis/menus/Xog_window_mnu_mgr.java index aec67b8d4..c720bbf97 100644 --- a/400_xowa/src/gplx/xowa/guis/menus/Xog_window_mnu_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/menus/Xog_window_mnu_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.menus; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.menus.dom.*; import gplx.xowa.langs.*; public class Xog_window_mnu_mgr implements Gfo_invk { - private final Ordered_hash hash = Ordered_hash_.New(); + private final Ordered_hash hash = Ordered_hash_.New(); public Xog_mnu_grp Browser() {return browser;} private Xog_mnu_grp browser; public Xog_window_mnu_mgr(Xoa_gui_mgr gui_mgr, Xog_menu_mgr menu_mgr) { this.gui_mgr = gui_mgr; diff --git a/400_xowa/src/gplx/xowa/guis/menus/dom/Xog_mnu_itm.java b/400_xowa/src/gplx/xowa/guis/menus/dom/Xog_mnu_itm.java index c29e4b0e9..84b94057e 100644 --- a/400_xowa/src/gplx/xowa/guis/menus/dom/Xog_mnu_itm.java +++ b/400_xowa/src/gplx/xowa/guis/menus/dom/Xog_mnu_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.menus.dom; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.menus.*; import gplx.gfui.*; import gplx.gfui.kits.core.*; import gplx.xowa.langs.*; import gplx.xowa.guis.cmds.*; import gplx.xowa.langs.msgs.*; @@ -78,9 +78,9 @@ public class Xog_mnu_itm extends Xog_mnu_base { else return super.Invk(ctx, ikey, k, m); return this; } - private static final String Invk_text = "text", Invk_text_ = "text_", Invk_shortcut = "shortcut", Invk_shortcut_ = "shortcut_", Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_img = "img", Invk_img_ = "img_" + private static final String Invk_text = "text", Invk_text_ = "text_", Invk_shortcut = "shortcut", Invk_shortcut_ = "shortcut_", Invk_cmd = "cmd", Invk_cmd_ = "cmd_", Invk_img = "img", Invk_img_ = "img_" ; public static final byte Tid_nil = 0, Tid_grp = 1, Tid_spr = 2, Tid_btn = 3, Tid_chk = 4, Tid_rdo = 5; private static String[] Img_nest_of(String img) {return String_.Len_eq_0(img) ? String_.Ary_empty : String_.Split(img, "/");} - public static final Xog_mnu_itm Null = new Xog_mnu_itm(null, "null"); + public static final Xog_mnu_itm Null = new Xog_mnu_itm(null, "null"); } diff --git a/400_xowa/src/gplx/xowa/guis/tabs/Xog_tab_mgr__swt.java b/400_xowa/src/gplx/xowa/guis/tabs/Xog_tab_mgr__swt.java index ad84b8cad..053e73a25 100644 --- a/400_xowa/src/gplx/xowa/guis/tabs/Xog_tab_mgr__swt.java +++ b/400_xowa/src/gplx/xowa/guis/tabs/Xog_tab_mgr__swt.java @@ -13,18 +13,18 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.guis.tabs; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; -public class Xog_tab_mgr__swt implements Xog_tab_mgr { - private final Xoa_gui_mgr gui_mgr; - public Xog_tab_mgr__swt(Xoa_gui_mgr gui_mgr) {this.gui_mgr = gui_mgr;} - public void New_tab(boolean focus, String site, String page) { - // gui_mgr.Browser_win().Tab_mgr().Tabs_new_link(url, focus); // TODO_OLD: handle html dumps - } - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Xog_tab_mgr_.Invk__new_tab)) gui_mgr.Kit().New_cmd_sync(this).Invk(ctx, ikey, Invk__new_tab_async, m); - else if (ctx.Match(k, Invk__new_tab_async)) this.New_tab(m.ReadYn("focus"), m.ReadStr("site"), m.ReadStr("page")); - else return Gfo_invk_.Rv_unhandled; - return this; - } - private static final String Invk__new_tab_async = "new_tab_async"; -} +package gplx.xowa.guis.tabs; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; +public class Xog_tab_mgr__swt implements Xog_tab_mgr { + private final Xoa_gui_mgr gui_mgr; + public Xog_tab_mgr__swt(Xoa_gui_mgr gui_mgr) {this.gui_mgr = gui_mgr;} + public void New_tab(boolean focus, String site, String page) { + // gui_mgr.Browser_win().Tab_mgr().Tabs_new_link(url, focus); // TODO_OLD: handle html dumps + } + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Xog_tab_mgr_.Invk__new_tab)) gui_mgr.Kit().New_cmd_sync(this).Invk(ctx, ikey, Invk__new_tab_async, m); + else if (ctx.Match(k, Invk__new_tab_async)) this.New_tab(m.ReadYn("focus"), m.ReadStr("site"), m.ReadStr("page")); + else return Gfo_invk_.Rv_unhandled; + return this; + } + private static final String Invk__new_tab_async = "new_tab_async"; +} diff --git a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr.java b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr.java index c15861939..8ae0c82b1 100644 --- a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr.java +++ b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr.java @@ -1,98 +1,98 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2020 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.xowa.guis.urls; - -import gplx.Bry_; -import gplx.Err_; -import gplx.String_; -import gplx.xowa.Xoa_ttl; -import gplx.xowa.Xoa_url; -import gplx.xowa.Xoa_url_; -import gplx.xowa.Xoae_app; -import gplx.xowa.Xoae_page; -import gplx.xowa.Xowe_wiki; -import gplx.xowa.guis.views.Xog_js_procs; -import gplx.xowa.guis.views.Xog_win_itm; - -public class Xog_url_wkr { - private final Xoa_url tmp_url = Xoa_url.blank(); - private Xoae_app app; private Xog_win_itm win; private Xowe_wiki wiki; private Xoae_page page; - public Xoa_url Parse(Xog_win_itm win, String href_str) { - if (href_str == null) return tmp_url; // text is not link; return; - byte[] href_bry = Bry_.new_u8(href_str); - this.win = win; this.app = win.App(); - this.page = win.Active_page(); - this.wiki = win.Active_tab().Wiki(); - app.Html__href_parser().Parse_as_url(tmp_url, href_bry, wiki, page.Ttl().Page_url()); - return tmp_url; - } - public void Init(Xowe_wiki wiki) { // TEST: - this.wiki = wiki; - } - public Xoa_url Exec_url(Xoa_url url) { - switch (url.Tid()) { - case Xoa_url_.Tid_unknown: return Xoa_url.Null; // unknown; return null which will become a noop - case Xoa_url_.Tid_inet: return Exec_url_http(app); // http://site.org - case Xoa_url_.Tid_anch: return Exec_url_anchor(win); // #anchor - case Xoa_url_.Tid_xcmd: return Exec_url_xowa(app); // xowa:app.version or /xcmd/app.version - case Xoa_url_.Tid_file: return Exec_url_file(app, wiki, page, win, url.Raw()); // file:///xowa/A.png - case Xoa_url_.Tid_page: return Exec_url_page(wiki, url.Orig()); // /wiki/Page - default: throw Err_.new_unhandled(url.Tid()); - } - } - private Xoa_url Exec_url_xowa(Xoae_app app) { // EX: xowa:app.version - // NOTE: must catch exception else it will bubble to SWT browser and raise secondary exception of xowa is not a registered protocol - try {app.Gfs_mgr().Run_str(String_.new_u8(tmp_url.Page_bry()));} - catch (Exception e) {app.Gui_mgr().Kit().Ask_ok("", "", Err_.Message_gplx_full(e));} - return Rslt_handled; - } - private Xoa_url Exec_url_http(Xoae_app app) { // EX: http://a.org - app.Prog_mgr().Exec_view_web(tmp_url.Raw()); - return Rslt_handled; - } - private Xoa_url Exec_url_anchor(Xog_win_itm win) { // EX: #anchor - // 2014-05-03|was originally called directly; changed to call on thread - win.Active_html_itm().Scroll_page_by_id_gui(tmp_url.Anch_str()); - - // 2020-09-22|ISSUE#:799|SWT 4.16 changes anchors from "file:///#anchor" to "en.w/wiki/page/#anchor" - if (app.Mode().Tid_is_gui()) { - // manually update url box - win.Gui_mgr().Browser_win().Url_box().Text_(tmp_url.To_str()); - - // manually register url; note that tmp_url needs to be passed b/c page.Url() doesn't have #anchor info - win.Tab_mgr().Active_tab().History_mgr().Add(page, tmp_url); - } - - return Rslt_handled; - } - private Xoa_url Exec_url_file(Xoae_app app, Xowe_wiki cur_wiki, Xoae_page page, Xog_win_itm win, byte[] href_bry) { // EX: file:///xowa/A.png - Xog_url_wkr__file wkr = new Xog_url_wkr__file(app, cur_wiki, page); - wkr.Extract_data(win.Active_html_box().Html_js_eval_proc_as_str(Xog_js_procs.Doc__root_html_get), href_bry); - wkr.Download_and_run(); - return Rslt_handled; - } - private Xoa_url Exec_url_page(Xowe_wiki wiki, byte[] href_bry) { // EX: "Page"; "/wiki/Page"; // rewritten; DATE:2014-01-19 - return wiki.Utl__url_parser().Parse(href_bry); - } - public static Xoa_url Rslt_handled = null; - public static Xoa_url Exec_url(Xog_win_itm win, String href_str) { - Xog_url_wkr url_wkr = new Xog_url_wkr(); - Xoa_url url = url_wkr.Parse(win, href_str); - return url_wkr.Exec_url(url); - } - public static void Get_href_url() { - } -} +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2020 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.xowa.guis.urls; + +import gplx.Bry_; +import gplx.Err_; +import gplx.String_; +import gplx.xowa.Xoa_ttl; +import gplx.xowa.Xoa_url; +import gplx.xowa.Xoa_url_; +import gplx.xowa.Xoae_app; +import gplx.xowa.Xoae_page; +import gplx.xowa.Xowe_wiki; +import gplx.xowa.guis.views.Xog_js_procs; +import gplx.xowa.guis.views.Xog_win_itm; + +public class Xog_url_wkr { + private final Xoa_url tmp_url = Xoa_url.blank(); + private Xoae_app app; private Xog_win_itm win; private Xowe_wiki wiki; private Xoae_page page; + public Xoa_url Parse(Xog_win_itm win, String href_str) { + if (href_str == null) return tmp_url; // text is not link; return; + byte[] href_bry = Bry_.new_u8(href_str); + this.win = win; this.app = win.App(); + this.page = win.Active_page(); + this.wiki = win.Active_tab().Wiki(); + app.Html__href_parser().Parse_as_url(tmp_url, href_bry, wiki, page.Ttl().Page_url()); + return tmp_url; + } + public void Init(Xowe_wiki wiki) { // TEST: + this.wiki = wiki; + } + public Xoa_url Exec_url(Xoa_url url) { + switch (url.Tid()) { + case Xoa_url_.Tid_unknown: return Xoa_url.Null; // unknown; return null which will become a noop + case Xoa_url_.Tid_inet: return Exec_url_http(app); // http://site.org + case Xoa_url_.Tid_anch: return Exec_url_anchor(win); // #anchor + case Xoa_url_.Tid_xcmd: return Exec_url_xowa(app); // xowa:app.version or /xcmd/app.version + case Xoa_url_.Tid_file: return Exec_url_file(app, wiki, page, win, url.Raw()); // file:///xowa/A.png + case Xoa_url_.Tid_page: return Exec_url_page(wiki, url.Orig()); // /wiki/Page + default: throw Err_.new_unhandled(url.Tid()); + } + } + private Xoa_url Exec_url_xowa(Xoae_app app) { // EX: xowa:app.version + // NOTE: must catch exception else it will bubble to SWT browser and raise secondary exception of xowa is not a registered protocol + try {app.Gfs_mgr().Run_str(String_.new_u8(tmp_url.Page_bry()));} + catch (Exception e) {app.Gui_mgr().Kit().Ask_ok("", "", Err_.Message_gplx_full(e));} + return Rslt_handled; + } + private Xoa_url Exec_url_http(Xoae_app app) { // EX: http://a.org + app.Prog_mgr().Exec_view_web(tmp_url.Raw()); + return Rslt_handled; + } + private Xoa_url Exec_url_anchor(Xog_win_itm win) { // EX: #anchor + // 2014-05-03|was originally called directly; changed to call on thread + win.Active_html_itm().Scroll_page_by_id_gui(tmp_url.Anch_str()); + + // 2020-09-22|ISSUE#:799|SWT 4.16 changes anchors from "file:///#anchor" to "en.w/wiki/page/#anchor" + if (app.Mode().Tid_is_gui()) { + // manually update url box + win.Gui_mgr().Browser_win().Url_box().Text_(tmp_url.To_str()); + + // manually register url; note that tmp_url needs to be passed b/c page.Url() doesn't have #anchor info + win.Tab_mgr().Active_tab().History_mgr().Add(page, tmp_url); + } + + return Rslt_handled; + } + private Xoa_url Exec_url_file(Xoae_app app, Xowe_wiki cur_wiki, Xoae_page page, Xog_win_itm win, byte[] href_bry) { // EX: file:///xowa/A.png + Xog_url_wkr__file wkr = new Xog_url_wkr__file(app, cur_wiki, page); + wkr.Extract_data(win.Active_html_box().Html_js_eval_proc_as_str(Xog_js_procs.Doc__root_html_get), href_bry); + wkr.Download_and_run(); + return Rslt_handled; + } + private Xoa_url Exec_url_page(Xowe_wiki wiki, byte[] href_bry) { // EX: "Page"; "/wiki/Page"; // rewritten; DATE:2014-01-19 + return wiki.Utl__url_parser().Parse(href_bry); + } + public static Xoa_url Rslt_handled = null; + public static Xoa_url Exec_url(Xog_win_itm win, String href_str) { + Xog_url_wkr url_wkr = new Xog_url_wkr(); + Xoa_url url = url_wkr.Parse(win, href_str); + return url_wkr.Exec_url(url); + } + public static void Get_href_url() { + } +} diff --git a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file.java b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file.java index 6f6c991e2..92837447f 100644 --- a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file.java +++ b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.files.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.repos.*; import gplx.xowa.htmls.doms.*; import gplx.xowa.parsers.lnkis.*; class Xog_url_wkr__file { - private final Xoae_app app; - private final Xowe_wiki page_wiki; - private final Xoae_page page; - private final Xof_img_size img_size = new Xof_img_size(); - private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); + private final Xoae_app app; + private final Xowe_wiki page_wiki; + private final Xoae_page page; + private final Xof_img_size img_size = new Xof_img_size(); + private final Xof_url_bldr url_bldr = Xof_url_bldr.new_v2(); public Xog_url_wkr__file(Xoae_app app, Xowe_wiki page_wiki, Xoae_page page) { this.app = app; this.page_wiki = page_wiki; diff --git a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file__tst.java b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file__tst.java index d94081358..429b27c52 100644 --- a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file__tst.java +++ b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__file__tst.java @@ -17,7 +17,7 @@ package gplx.xowa.guis.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa import org.junit.*; import gplx.core.tests.*; import gplx.xowa.files.origs.*; public class Xog_url_wkr__file__tst { - private final Xog_url_wkr__file__fxt fxt = new Xog_url_wkr__file__fxt(); + private final Xog_url_wkr__file__fxt fxt = new Xog_url_wkr__file__fxt(); @Test public void Basic() { fxt.Test__extract("A.png", "file:///mem/xowa/file/commons.wikimedia.org/orig/7/0/A.png", 300, 200); } @@ -29,10 +29,10 @@ public class Xog_url_wkr__file__tst { } } class Xog_url_wkr__file__fxt { - private final Xowe_wiki wiki; - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Xog_url_wkr__file wkr; - private final Xof_orig_wkr__mock orig_wkr = new Xof_orig_wkr__mock(); + private final Xowe_wiki wiki; + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Xog_url_wkr__file wkr; + private final Xof_orig_wkr__mock orig_wkr = new Xof_orig_wkr__mock(); public Xog_url_wkr__file__fxt() { Xoae_app app = Xoa_app_fxt.Make__app__edit(); wiki = Xoa_app_fxt.Make__wiki__edit(app); diff --git a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__tst.java b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__tst.java index 42b5feced..f09b44077 100644 --- a/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__tst.java +++ b/400_xowa/src/gplx/xowa/guis/urls/Xog_url_wkr__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.guis.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import org.junit.*; import gplx.core.tests.*; public class Xog_url_wkr__tst { - private final Xog_url_wkr__fxt fxt = new Xog_url_wkr__fxt(); + private final Xog_url_wkr__fxt fxt = new Xog_url_wkr__fxt(); @Test public void Basic() { fxt.Exec__parse("/wiki/A?k1=B%26C"); fxt.Test__raw("/wiki/A?k1=B%26C"); @@ -28,8 +28,8 @@ public class Xog_url_wkr__tst { } } class Xog_url_wkr__fxt { - private final Xowe_wiki wiki; - private final Xog_url_wkr wkr = new Xog_url_wkr(); + private final Xowe_wiki wiki; + private final Xog_url_wkr wkr = new Xog_url_wkr(); private Xoa_url url; public Xog_url_wkr__fxt() { Xoae_app app = Xoa_app_fxt.Make__app__edit(); diff --git a/400_xowa/src/gplx/xowa/guis/urls/url_macros/Xog_url_macro_mgr.java b/400_xowa/src/gplx/xowa/guis/urls/url_macros/Xog_url_macro_mgr.java index 53d3cfc64..2a677012e 100644 --- a/400_xowa/src/gplx/xowa/guis/urls/url_macros/Xog_url_macro_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/urls/url_macros/Xog_url_macro_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.urls.url_macros; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.urls.*; public class Xog_url_macro_mgr { private Bry_bfr bfr = Bry_bfr_.Reset(255); @@ -86,5 +86,5 @@ public class Xog_url_macro_mgr { return this; } private static final String Invk_lang_default = "lang_default", Invk_lang_default_ = "lang_default_", Invk_types = "types", Invk_custom = "custom"; - public static final byte[] Unhandled = null; + public static final byte[] Unhandled = null; } diff --git a/400_xowa/src/gplx/xowa/guis/views/Gfo_usr_dlg__gui__swt.java b/400_xowa/src/gplx/xowa/guis/views/Gfo_usr_dlg__gui__swt.java index 221d6bbb8..5b9422139 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Gfo_usr_dlg__gui__swt.java +++ b/400_xowa/src/gplx/xowa/guis/views/Gfo_usr_dlg__gui__swt.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.core.lists.rings.*; import gplx.gfui.*; import gplx.gfui.draws.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.standards.*; public class Gfo_usr_dlg__gui__swt implements Gfo_usr_dlg__gui, Gfo_invk { - private final GfuiInvkCmd cmd_sync; private final GfuiTextBox prog_box, info_box; + private final GfuiInvkCmd cmd_sync; private final GfuiTextBox prog_box, info_box; private boolean show_warn, show_note; public Gfo_usr_dlg__gui__swt(Xoa_app app, Gfui_kit kit, GfuiTextBox prog_box, GfuiTextBox info_box, GfuiTextBox warn_box) { this.cmd_sync = kit.New_cmd_sync(this); // NOTE: cmd_sync needed else progress messages may be sent out of order diff --git a/400_xowa/src/gplx/xowa/guis/views/Load_page_wkr.java b/400_xowa/src/gplx/xowa/guis/views/Load_page_wkr.java index 69222a8af..b6ed1a52c 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Load_page_wkr.java +++ b/400_xowa/src/gplx/xowa/guis/views/Load_page_wkr.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.core.threads.*; import gplx.core.envs.*; public class Load_page_wkr implements Gfo_thread_wkr { - private final Xog_tab_itm tab; + private final Xog_tab_itm tab; public Load_page_wkr(Xog_tab_itm tab, Xowe_wiki wiki, Xoa_url url, Xoa_ttl ttl) {this.tab = tab; this.wiki = wiki; this.url = url; this.ttl = ttl;} public String Thread__name() {return "xowa.load_page_wkr";} public boolean Thread__resume() {return false;} - public Xowe_wiki Wiki() {return wiki;} private final Xowe_wiki wiki; - public Xoa_url Url() {return url;} private final Xoa_url url; - public Xoa_ttl Ttl() {return ttl;} private final Xoa_ttl ttl; + public Xowe_wiki Wiki() {return wiki;} private final Xowe_wiki wiki; + public Xoa_url Url() {return url;} private final Xoa_url url; + public Xoa_ttl Ttl() {return ttl;} private final Xoa_ttl ttl; public Xoae_page Page() {return page;} private Xoae_page page; public Exception Exec_err() {return exec_err;} private Exception exec_err; public void Thread__exec() { @@ -43,7 +43,7 @@ public class Load_page_wkr implements Gfo_thread_wkr { Running_(false); } } - private static final Object thread_lock = new Object(); private static boolean running = false; + private static final Object thread_lock = new Object(); private static boolean running = false; public static boolean Running() { boolean rv = false; synchronized (thread_lock) { diff --git a/400_xowa/src/gplx/xowa/guis/views/Rect_ref.java b/400_xowa/src/gplx/xowa/guis/views/Rect_ref.java index df2545de1..166051b77 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Rect_ref.java +++ b/400_xowa/src/gplx/xowa/guis/views/Rect_ref.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; public class Rect_ref { public Rect_ref(int x, int y, int w, int h) {this.x = x; this.y = y; this.w = w; this.h = h;} @@ -25,7 +25,7 @@ public class Rect_ref { public gplx.gfui.RectAdp XtoRectAdp() {return gplx.gfui.RectAdp_.new_(x, y, w, h);} public gplx.gfui.RectAdp XtoRectAdp_add(Rect_ref v) {return gplx.gfui.RectAdp_.new_(x + v.x, y + v.y, w + v.w, h + v.h);} @Override public String toString() {return String_.Format("{0},{1},{2},{3}", x, y, w, h);} - public static final Rect_ref Zero = new Rect_ref(0, 0, 0, 0); + public static final Rect_ref Zero = new Rect_ref(0, 0, 0, 0); public static Rect_ref rectAdp_(gplx.gfui.RectAdp v) {return new Rect_ref(v.X(), v.Y(), v.Width(), v.Height());} public static Rect_ref parse(String raw) { try { diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_html_itm.java b/400_xowa/src/gplx/xowa/guis/views/Xog_html_itm.java index c20b95671..ff492d050 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_html_itm.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_html_itm.java @@ -20,8 +20,8 @@ import gplx.xowa.guis.menus.*; import gplx.xowa.guis.menus.dom.*; import gplx.xo import gplx.langs.htmls.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.htmls.js.*; import gplx.xowa.htmls.heads.*; import gplx.xowa.wikis.pages.*; import gplx.xowa.htmls.*; public class Xog_html_itm implements Xog_js_wkr, Gfo_invk, Gfo_evt_itm, Xoh_page_html_source { - private Xoae_app app; private final Object thread_lock = new Object(); - private final String_obj_ref scroll_top = String_obj_ref.null_(), node_path = String_obj_ref.null_(); + private Xoae_app app; private final Object thread_lock = new Object(); + private final String_obj_ref scroll_top = String_obj_ref.null_(), node_path = String_obj_ref.null_(); protected Xog_html_itm() {} // TEST: for prefs_mgr public Xog_html_itm(Xog_tab_itm owner_tab) { this.owner_tab = owner_tab; diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_launcher_tabs.java b/400_xowa/src/gplx/xowa/guis/views/Xog_launcher_tabs.java index 3adbb3adf..7cc7ab4fd 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_launcher_tabs.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_launcher_tabs.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.apps.urls.*; class Xog_launcher_tabs { @@ -63,7 +63,7 @@ class Xog_launcher_tabs { Xog_tab_itm tab = win.Tab_mgr().Tabs_new_init(launch_wiki, Xoae_page.New(launch_wiki, launch_ttl)); // WORKAROUND: set the tab to an empty page, else null ref later; DATE:2014-07-23 tab.Show_url_bgn(launch_url); } - public static final Xog_launcher_tabs Instance = new Xog_launcher_tabs(); Xog_launcher_tabs() {} + public static final Xog_launcher_tabs Instance = new Xog_launcher_tabs(); Xog_launcher_tabs() {} } class Io_fil_marker { private Io_url url; diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_.java b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_.java index dae13bffd..128322611 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_.java @@ -13,16 +13,16 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; -public class Xog_tab_itm_ { - public static String Tab_name_min(String name, int min) { - int name_len = String_.Len(name); - return min == Tab_name_min_disabled || name_len > min ? name : name + String_.Repeat(" ", min - name_len); - } - public static String Tab_name_max(String name, int max) { - int name_len = String_.Len(name); - return max == Tab_name_max_disabled || name_len <= max ? name : String_.Mid(name, 0, max) + "..."; - } - public static final int Tab_name_min_disabled = -1, Tab_name_max_disabled = -1; - public static final Xog_tab_itm Null = null; -} +package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; +public class Xog_tab_itm_ { + public static String Tab_name_min(String name, int min) { + int name_len = String_.Len(name); + return min == Tab_name_min_disabled || name_len > min ? name : name + String_.Repeat(" ", min - name_len); + } + public static String Tab_name_max(String name, int max) { + int name_len = String_.Len(name); + return max == Tab_name_max_disabled || name_len <= max ? name : String_.Mid(name, 0, max) + "..."; + } + public static final int Tab_name_min_disabled = -1, Tab_name_max_disabled = -1; + public static final Xog_tab_itm Null = null; +} diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_read_mgr.java b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_read_mgr.java index d06cc1993..e0e3186d6 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_read_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_itm_read_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.core.threads.*; import gplx.gfui.*; import gplx.gfui.controls.standards.*; import gplx.xowa.guis.langs.*; import gplx.xowa.guis.history.*; @@ -85,7 +85,7 @@ public class Xog_tab_itm_read_mgr { win.Url_box().Text_(url_str); win.Win_box().Text_(win_str); } - private static final byte[] Win_text_suffix_page = Bry_.new_a7(" - XOWA"); private static final String Win_text_blank = "XOWA"; + private static final byte[] Win_text_suffix_page = Bry_.new_a7(" - XOWA"); private static final String Win_text_blank = "XOWA"; public static void Show_page_err(Xog_win_itm win, Xog_tab_itm tab, Xowe_wiki wiki, Xoa_url url, Xoa_ttl ttl, Exception e) { String err_msg = String_.Format("page_load fail: page={0} err={1}", String_.new_u8(url.Raw()), Err_.Message_gplx_full(e)); win.Usr_dlg().Warn_many("", "", err_msg); diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_mgr.java b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_mgr.java index 669b56cbe..0474a80a6 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_tab_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_tab_mgr.java @@ -1,311 +1,311 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2020 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ -package gplx.xowa.guis.views; - -import gplx.Bool_; -import gplx.Err_; -import gplx.GfoMsg; -import gplx.Gfo_evt_itm; -import gplx.Gfo_evt_mgr; -import gplx.Gfo_evt_mgr_; -import gplx.Gfo_invk_; -import gplx.GfsCtx; -import gplx.Int_; -import gplx.List_adp; -import gplx.List_adp_; -import gplx.Ordered_hash; -import gplx.Ordered_hash_; -import gplx.String_; -import gplx.gfui.controls.gxws.Gxw_html_load_tid_; -import gplx.gfui.controls.standards.Gfui_tab_itm; -import gplx.gfui.controls.standards.Gfui_tab_itm_data; -import gplx.gfui.controls.standards.Gfui_tab_mgr; -import gplx.gfui.controls.tabs.TabBox_; -import gplx.gfui.kits.core.Gfui_kit; -import gplx.gfui.kits.swts.Swt_html_utl; -import gplx.xowa.Xoa_ttl; -import gplx.xowa.Xoa_url; -import gplx.xowa.Xoae_page; -import gplx.xowa.Xowe_wiki; -import gplx.xowa.htmls.hrefs.Xoh_href_; -import gplx.xowa.specials.Xow_special_meta_; - -public class Xog_tab_mgr implements Gfo_evt_itm { - private Ordered_hash tab_regy = Ordered_hash_.New(); private int tab_uid = 0; - private boolean btns__hide_if_one; private int btns__height; - public Xog_tab_mgr(Xog_win_itm win) { - this.win = win; - ev_mgr = new Gfo_evt_mgr(this); - } - public Gfo_evt_mgr Evt_mgr() {return ev_mgr;} private Gfo_evt_mgr ev_mgr; - public Xog_win_itm Win() {return win;} private Xog_win_itm win; - public Gfui_tab_mgr Tab_mgr() {return tab_mgr;} private Gfui_tab_mgr tab_mgr; - public int Btns__min_chars() {return btns__min_chars;} private int btns__min_chars; - public int Btns__max_chars() {return btns__max_chars;} private int btns__max_chars; - public boolean Javascript_enabled() {return javascript_enabled;} private boolean javascript_enabled = true; - private byte page_load_mode; - public boolean Page_load_mode_is_url() {return page_load_mode == Gxw_html_load_tid_.Tid_url;} - public void Init_by_kit(Gfui_kit kit) { - tab_mgr = kit.New_tab_mgr("xowa.tab_mgr", win.Win_box()); - active_tab = Xog_tab_itm_.Null; - Gfo_evt_mgr_.Sub_same_many(tab_mgr, this, Gfui_tab_mgr.Evt_tab_selected, Gfui_tab_mgr.Evt_tab_closed, Gfui_tab_mgr.Evt_tab_switched); - win.App().Cfg().Bind_many_app(this, Cfg__page_load_mode - , Cfg__place_on_top, Cfg__height, Cfg__hide_if_one, Cfg__curved, Cfg__close_btn_visible, Cfg__unselected_close_btn_visible, Cfg__max_chars, Cfg__min_chars); - } - public Xog_tab_itm Active_tab() {return active_tab;} private Xog_tab_itm active_tab; - public Xog_tab_itm Active_tab_assert() { - if (active_tab == Xog_tab_itm_.Null) this.Tabs_new_dflt(true); - return active_tab; - } - public boolean Active_tab_is_null() {return active_tab == Xog_tab_itm_.Null;} - private void Btns_text_recalc() { - int len = this.Tabs_len(); - for (int i = 0; i < len; i++) { - Xog_tab_itm tab_itm = this.Tabs_get_at(i); - tab_itm.Tab_name_(); - } - } - public int Tabs_len() {return tab_regy.Count();} - public Xog_tab_itm Tabs_new_init(Xowe_wiki wiki, Xoae_page page) {return this.Tabs_new(true, true, wiki, page);} - public Xog_tab_itm Tabs_get_at(int i) {return (Xog_tab_itm)tab_regy.Get_at(i);} - public Xog_tab_itm Tabs_new_dflt() {return Tabs_new_dflt(false);} - public Xog_tab_itm Tabs_new_dflt(boolean focus) { - boolean active_tab_is_null = this.Active_tab_is_null(); - Xowe_wiki cur_wiki = active_tab_is_null ? win.App().Usere().Wiki() : active_tab.Wiki(); - Xoa_ttl ttl = Xoa_ttl.Parse(cur_wiki, Xow_special_meta_.Itm__default_tab.Ttl_bry()); - Xoa_url url = cur_wiki.Utl__url_parser().Parse_by_urlbar_or_null(ttl.Full_db_as_str()); if (url == null) throw Err_.new_("url", "invalid url", "url", url); - Xog_tab_itm rv = Tabs_new(focus, active_tab_is_null, cur_wiki, Xoae_page.New(cur_wiki, ttl)); - rv.Page_update_ui(); - rv.Show_url_bgn(url); - return rv; - } - private Xog_tab_itm Tabs_new(boolean focus, boolean active_tab_is_null, Xowe_wiki wiki, Xoae_page page) { - String tab_key = "tab_" + Int_.To_str(tab_uid++); int tab_idx = tab_regy.Count(); - Gfui_tab_itm_data tab_data = new Gfui_tab_itm_data(tab_key, tab_idx); - Xog_tab_itm rv = new Xog_tab_itm(this, tab_data, wiki, page); - Gfui_tab_itm tab_box = tab_mgr.Tabs_add(tab_data); - rv.Make_html_box(tab_uid, tab_box, win, tab_mgr); - rv.Html_itm().Js_enabled_(javascript_enabled); - tab_box.Subs_add(rv.Html_itm().Html_box()); - tab_regy.Add(tab_key, rv); - if ( focus - || active_tab_is_null // NOTE: must select 1st tab, else nothing will show in tab box - ) { - tab_mgr.Tabs_select_by_idx(rv.Tab_idx()); - active_tab = rv; - } - Tabs_hide_if_one_chk(false); - return rv; - } - public void Tabs_new_dupe(boolean focus) { - if (this.Active_tab_is_null()) return; - String url = active_tab.Page().Url().To_str(); - Tabs_new_dflt(focus); - win.Page__navigate_by_url_bar(url); - } - public void Tabs_javascript_enabled_(boolean v) { - this.javascript_enabled = v; - int len = tab_regy.Count(); - for (int i = 0; i < len; i++) { - Xog_tab_itm tab = Tabs_get_by_idx_or_warn(i); - tab.Html_itm().Js_enabled_(v); - } - } - private void Tabs_selected(String key) { - Xog_tab_itm tab = Tabs_get_by_key_or_warn(key); if (tab == null) return; - active_tab = tab; - Xoae_page page = tab.Page(); - Xog_tab_itm_read_mgr.Update_selected_tab(win, page.Url(), page.Ttl()); - tab.Html_itm().Tab_selected(page); - } - public void Tabs_close_cur() { - if (this.Active_tab_is_null()) return; - Tabs__pub_close(active_tab); - tab_mgr.Tabs_close_by_idx(active_tab.Tab_idx()); - Xog_tab_itm cur_tab = this.Active_tab(); // get new current tab for line below - if (cur_tab != null) cur_tab.Html_box().Focus(); // NOTE: needed to focus tab box else tab button will be focused; DATE:2014-07-13 - } - public void Tabs_close_others() {this.Tabs_close_to_bgn(); this.Tabs_close_to_end();} - public void Tabs_close_to_bgn() {if (Active_tab_is_null()) return; Tabs_close_rng(0 , active_tab.Tab_idx());} - public void Tabs_close_to_end() {if (Active_tab_is_null()) return; Tabs_close_rng(active_tab.Tab_idx() + 1 , tab_regy.Count());} - public void Tabs_close_rng(int bgn, int end) { - for (int i = bgn; i < end; i++) { - Xog_tab_itm tab = Tabs_get_at(bgn); - if (!Tabs__pub_close(tab)) return; - } - for (int i = bgn; i < end; i++) - tab_mgr.Tabs_close_by_idx(bgn); // NOTE: close at bgn, not at i, b/c each close will remove a tab from collection - } - public boolean Tabs__pub_close_all() {return Tabs__pub_close_rng(0, this.Tabs_len());} - public boolean Tabs__pub_close_rng(int bgn, int end) { - boolean rv = true; - for (int i = bgn; i < end; i++) { - Xog_tab_itm tab = Tabs_get_at(i); - boolean close_allowed = Tabs__pub_close(tab); - if (!close_allowed) rv = false; - } - return rv; - } - public boolean Tabs__pub_close(Xog_tab_itm tab) { - return tab.Page().Tab_data().Close_mgr().When_close(tab, Xoa_url.Null); - } - public void Tabs_close_undo() { - if (closed_undo_list.Count() == 0) return; - String url = (String)List_adp_.Pop(closed_undo_list); - Tabs_new_dflt(true); - win.Page__navigate_by_url_bar(url); - } - private List_adp closed_undo_list = List_adp_.New(); - private void Tabs_closed(String key) { - Xog_tab_itm itm = Tabs_get_by_key_or_warn(key); if (itm == null) return; - itm.Html_box().Html_dispose(); - closed_undo_list.Add(itm.Page().Url().To_str()); - tab_regy.Del(key); - if (tab_regy.Count() == 0) { - active_tab = Xog_tab_itm_.Null; - Xog_tab_itm_read_mgr.Update_selected_tab_blank(win); - } - else - Tabs_recalc_idx(); - Tabs_hide_if_one_chk(false); - } - private Xog_tab_itm Tabs_get_by_key_or_warn(String key) { - Xog_tab_itm rv = (Xog_tab_itm)tab_regy.Get_by(key); if (rv == null) win.App().Usr_dlg().Warn_many("", "", "tab.selected could not find tab; key={0}", key); - return rv; - } - private Xog_tab_itm Tabs_get_by_idx_or_warn(int idx) { - Xog_tab_itm rv = (Xog_tab_itm)tab_regy.Get_at(idx); if (rv == null) win.App().Usr_dlg().Warn_many("", "", "tab.selected could not find tab; idx={0}", idx); - return rv; - } - private void Tabs_recalc_idx() { - int len = tab_regy.Count(); - for (int i = 0; i < len; i++) { - Xog_tab_itm itm = Tabs_get_by_idx_or_warn(i); - itm.Tab_idx_(i); - } - } - public void Tabs_select(boolean fwd) { - if (this.Active_tab_is_null()) return; - int new_idx = TabBox_.Cycle(fwd, active_tab.Tab_idx(), tab_regy.Count()); - tab_mgr.Tabs_select_by_idx(new_idx); - } - public void Tabs_select_by_idx(int v) { - if (v < 0 || v >= tab_regy.Count()) return; - tab_mgr.Tabs_select_by_idx(v); - } - public void Tabs_move(boolean fwd) { - if (this.Active_tab_is_null()) return; - int src_idx = active_tab.Tab_idx(); - int trg_idx = TabBox_.Cycle(fwd, src_idx, tab_regy.Count()); - tab_mgr.Tabs_switch(src_idx, trg_idx); - } - private void Tabs_switched(String src_key, String trg_key) { - Xog_tab_itm src_itm = Tabs_get_by_key_or_warn(src_key); - Xog_tab_itm trg_itm = Tabs_get_by_key_or_warn(trg_key); - src_itm.Switch_mem(trg_itm); - active_tab = trg_itm; // NOTE: src_itm initiated switch, but trg_itm is now active b/c everything in src_itm has now been reparented to trg_itm; DATE:2014-05-12 - } - public void Tabs_new_link(boolean focus, String link) { // handle empty link - if (String_.Len_eq_0(link)) { - if (this.Active_tab_is_null()) return; - link = active_tab.Html_itm().Html_selected_get_active_or_selection(); - // 2020-12-16|ISSUE#:823|Open in new tab creates links like `about:/wiki/PAGE_NAME` or `about:/site/WIKI_NAME/wiki/PAGE_NAME` - link = Swt_html_utl.NormalizeSwtUrl(link); - if (link.startsWith(Xoh_href_.Str__site)) { - link = link.substring(Xoh_href_.Str__site.length()); - } - else if (link.startsWith(Xoh_href_.Str__wiki)) { - link = active_tab.Wiki().Domain_str() + link; - } - link = gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Decode_str(link); // NOTE: must decode else url-encoded special pages don't work; EX:home/wiki/Special:XowaCfg%3Fgrp%3Dxowa.html.css; DATE:2017-01-02 - } - if (String_.Len_eq_0(link)) {win.App().Usr_dlg().Prog_many("", "", "no link or text selected"); return;} - Tabs_new_link(link, focus); - } - public void Tabs_new_link(String link, boolean focus) { - Xowe_wiki wiki = active_tab.Wiki(); - Xog_tab_itm new_tab = Tabs_new(focus, false, wiki, Xoae_page.New(wiki, active_tab.Page().Ttl())); // NOTE: do not use ttl from link, else middle-clicking pages with anchors won't work; DATE:2015-05-03 - Xoa_url url = wiki.Utl__url_parser().Parse_by_urlbar_or_null(link); if (url == null) return; // NOTE: link must be of form domain/wiki/page; DATE:2014-05-27 - new_tab.Show_url_bgn(url); - if (focus) - tab_mgr.Tabs_select_by_idx(new_tab.Tab_idx()); - } - private void Tabs_hide_if_one_chk(boolean force) { - if (btns__hide_if_one || force) {// run code only if enabled or forced - if (tab_regy.Count() == 1) { - int desired_height = btns__hide_if_one ? 0 : btns__height; - if (tab_mgr.Btns_height() != desired_height) - tab_mgr.Btns_height_(desired_height); - } - else { - if (tab_mgr.Btns_height() != btns__height) - tab_mgr.Btns_height_(btns__height); - } - } - } - public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { - if (ctx.Match(k, Invk_tabs_new_dflt__at_dflt__focus_y)) Tabs_new_dflt(Bool_.Y); - else if (ctx.Match(k, Invk_tabs_new_link__at_dflt__focus_n)) Tabs_new_link(Bool_.N, m.ReadStrOr("v", null)); - else if (ctx.Match(k, Invk_tabs_new_link__at_dflt__focus_y)) Tabs_new_link(Bool_.Y, m.ReadStrOr("v", null)); - else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_selected)) Tabs_selected(m.ReadStr("key")); - else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_closed)) Tabs_closed(m.ReadStr("key")); - else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_switched)) Tabs_switched(m.ReadStr("src"), m.ReadStr("trg")); - else if (ctx.Match(k, Invk_tabs_close_cur)) Tabs_close_cur(); - else if (ctx.Match(k, Invk_tabs_select_bwd)) Tabs_select(Bool_.N); - else if (ctx.Match(k, Invk_tabs_select_fwd)) Tabs_select(Bool_.Y); - else if (ctx.Match(k, Invk_tabs_switch_cur_bwd)) Tabs_move(Bool_.N); - else if (ctx.Match(k, Invk_tabs_switch_cur_fwd)) Tabs_move(Bool_.Y); - - else if (ctx.Match(k, Cfg__place_on_top)) tab_mgr.Btns_place_on_top_(m.ReadYn("v")); - else if (ctx.Match(k, Cfg__height)) {btns__height = m.ReadInt("v"); tab_mgr.Btns_height_(btns__height);} - else if (ctx.Match(k, Cfg__hide_if_one)) {btns__hide_if_one = m.ReadYn("v"); Tabs_hide_if_one_chk(true);} - else if (ctx.Match(k, Cfg__curved)) tab_mgr.Btns_curved_(m.ReadYn("v")); - else if (ctx.Match(k, Cfg__close_btn_visible)) tab_mgr.Btns_close_visible_(m.ReadYn("v")); - else if (ctx.Match(k, Cfg__unselected_close_btn_visible)) tab_mgr.Btns_unselected_close_visible_(m.ReadYn("v")); - else if (ctx.Match(k, Cfg__max_chars)) {btns__max_chars = m.ReadInt("v"); Btns_text_recalc();} - else if (ctx.Match(k, Cfg__min_chars)) {btns__min_chars = m.ReadInt("v"); Btns_text_recalc();} - - else if (ctx.Match(k, Cfg__javascript_enabled)) Tabs_javascript_enabled_(m.ReadYnOrY("v")); // NOTE: must be "OrY" else broken cfg.db will break cfg_maint; DATE:2016-12-15 - else if (ctx.Match(k, Cfg__page_load_mode)) Page_load_mode_(m.ReadStr("v")); - else return Gfo_invk_.Rv_unhandled; - return this; - } - private void Page_load_mode_(String v) { - page_load_mode = Gxw_html_load_tid_.Xto_tid(v); - // Gfo_evt_mgr_.Pub_val(this, Evt_load_tid_changed, load_tid); - } - - public static final String - Invk_tabs_select_fwd = "tabs_select_fwd" , Invk_tabs_select_bwd = "tabs_select_bwd" - , Invk_tabs_switch_cur_fwd = "tabs_switch_cur_fwd" , Invk_tabs_switch_cur_bwd = "tabs_switch_cur_bwd" - , Invk_tabs_new_dflt__at_dflt__focus_y = "tabs_new_dflt__at_dflt__focus_y" - , Invk_tabs_new_link__at_dflt__focus_n = "tabs_new_link__at_dflt__focus_n" - , Invk_tabs_new_link__at_dflt__focus_y = "tabs_new_link__at_dflt__focus_y" - , Invk_tabs_close_cur = "tabs_close_cur" - ; - private static final String - Cfg__place_on_top = "xowa.gui.tabs.place_on_top" - , Cfg__height = "xowa.gui.tabs.height" - , Cfg__hide_if_one = "xowa.gui.tabs.hide_if_one" - , Cfg__curved = "xowa.gui.tabs.curved" - , Cfg__close_btn_visible = "xowa.gui.tabs.close_btn_visible" - , Cfg__unselected_close_btn_visible = "xowa.gui.tabs.unselected_close_btn_visible" - , Cfg__max_chars = "xowa.gui.tabs.max_chars" - , Cfg__min_chars = "xowa.gui.tabs.min_chars" - , Cfg__javascript_enabled = "xowa.gui.html_box.javascript_enabled" - , Cfg__page_load_mode = "xowa.gui.html_box.page_load_mode" - ; -} +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2020 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ +package gplx.xowa.guis.views; + +import gplx.Bool_; +import gplx.Err_; +import gplx.GfoMsg; +import gplx.Gfo_evt_itm; +import gplx.Gfo_evt_mgr; +import gplx.Gfo_evt_mgr_; +import gplx.Gfo_invk_; +import gplx.GfsCtx; +import gplx.Int_; +import gplx.List_adp; +import gplx.List_adp_; +import gplx.Ordered_hash; +import gplx.Ordered_hash_; +import gplx.String_; +import gplx.gfui.controls.gxws.Gxw_html_load_tid_; +import gplx.gfui.controls.standards.Gfui_tab_itm; +import gplx.gfui.controls.standards.Gfui_tab_itm_data; +import gplx.gfui.controls.standards.Gfui_tab_mgr; +import gplx.gfui.controls.tabs.TabBox_; +import gplx.gfui.kits.core.Gfui_kit; +import gplx.gfui.kits.swts.Swt_html_utl; +import gplx.xowa.Xoa_ttl; +import gplx.xowa.Xoa_url; +import gplx.xowa.Xoae_page; +import gplx.xowa.Xowe_wiki; +import gplx.xowa.htmls.hrefs.Xoh_href_; +import gplx.xowa.specials.Xow_special_meta_; + +public class Xog_tab_mgr implements Gfo_evt_itm { + private Ordered_hash tab_regy = Ordered_hash_.New(); private int tab_uid = 0; + private boolean btns__hide_if_one; private int btns__height; + public Xog_tab_mgr(Xog_win_itm win) { + this.win = win; + ev_mgr = new Gfo_evt_mgr(this); + } + public Gfo_evt_mgr Evt_mgr() {return ev_mgr;} private Gfo_evt_mgr ev_mgr; + public Xog_win_itm Win() {return win;} private Xog_win_itm win; + public Gfui_tab_mgr Tab_mgr() {return tab_mgr;} private Gfui_tab_mgr tab_mgr; + public int Btns__min_chars() {return btns__min_chars;} private int btns__min_chars; + public int Btns__max_chars() {return btns__max_chars;} private int btns__max_chars; + public boolean Javascript_enabled() {return javascript_enabled;} private boolean javascript_enabled = true; + private byte page_load_mode; + public boolean Page_load_mode_is_url() {return page_load_mode == Gxw_html_load_tid_.Tid_url;} + public void Init_by_kit(Gfui_kit kit) { + tab_mgr = kit.New_tab_mgr("xowa.tab_mgr", win.Win_box()); + active_tab = Xog_tab_itm_.Null; + Gfo_evt_mgr_.Sub_same_many(tab_mgr, this, Gfui_tab_mgr.Evt_tab_selected, Gfui_tab_mgr.Evt_tab_closed, Gfui_tab_mgr.Evt_tab_switched); + win.App().Cfg().Bind_many_app(this, Cfg__page_load_mode + , Cfg__place_on_top, Cfg__height, Cfg__hide_if_one, Cfg__curved, Cfg__close_btn_visible, Cfg__unselected_close_btn_visible, Cfg__max_chars, Cfg__min_chars); + } + public Xog_tab_itm Active_tab() {return active_tab;} private Xog_tab_itm active_tab; + public Xog_tab_itm Active_tab_assert() { + if (active_tab == Xog_tab_itm_.Null) this.Tabs_new_dflt(true); + return active_tab; + } + public boolean Active_tab_is_null() {return active_tab == Xog_tab_itm_.Null;} + private void Btns_text_recalc() { + int len = this.Tabs_len(); + for (int i = 0; i < len; i++) { + Xog_tab_itm tab_itm = this.Tabs_get_at(i); + tab_itm.Tab_name_(); + } + } + public int Tabs_len() {return tab_regy.Count();} + public Xog_tab_itm Tabs_new_init(Xowe_wiki wiki, Xoae_page page) {return this.Tabs_new(true, true, wiki, page);} + public Xog_tab_itm Tabs_get_at(int i) {return (Xog_tab_itm)tab_regy.Get_at(i);} + public Xog_tab_itm Tabs_new_dflt() {return Tabs_new_dflt(false);} + public Xog_tab_itm Tabs_new_dflt(boolean focus) { + boolean active_tab_is_null = this.Active_tab_is_null(); + Xowe_wiki cur_wiki = active_tab_is_null ? win.App().Usere().Wiki() : active_tab.Wiki(); + Xoa_ttl ttl = Xoa_ttl.Parse(cur_wiki, Xow_special_meta_.Itm__default_tab.Ttl_bry()); + Xoa_url url = cur_wiki.Utl__url_parser().Parse_by_urlbar_or_null(ttl.Full_db_as_str()); if (url == null) throw Err_.new_("url", "invalid url", "url", url); + Xog_tab_itm rv = Tabs_new(focus, active_tab_is_null, cur_wiki, Xoae_page.New(cur_wiki, ttl)); + rv.Page_update_ui(); + rv.Show_url_bgn(url); + return rv; + } + private Xog_tab_itm Tabs_new(boolean focus, boolean active_tab_is_null, Xowe_wiki wiki, Xoae_page page) { + String tab_key = "tab_" + Int_.To_str(tab_uid++); int tab_idx = tab_regy.Count(); + Gfui_tab_itm_data tab_data = new Gfui_tab_itm_data(tab_key, tab_idx); + Xog_tab_itm rv = new Xog_tab_itm(this, tab_data, wiki, page); + Gfui_tab_itm tab_box = tab_mgr.Tabs_add(tab_data); + rv.Make_html_box(tab_uid, tab_box, win, tab_mgr); + rv.Html_itm().Js_enabled_(javascript_enabled); + tab_box.Subs_add(rv.Html_itm().Html_box()); + tab_regy.Add(tab_key, rv); + if ( focus + || active_tab_is_null // NOTE: must select 1st tab, else nothing will show in tab box + ) { + tab_mgr.Tabs_select_by_idx(rv.Tab_idx()); + active_tab = rv; + } + Tabs_hide_if_one_chk(false); + return rv; + } + public void Tabs_new_dupe(boolean focus) { + if (this.Active_tab_is_null()) return; + String url = active_tab.Page().Url().To_str(); + Tabs_new_dflt(focus); + win.Page__navigate_by_url_bar(url); + } + public void Tabs_javascript_enabled_(boolean v) { + this.javascript_enabled = v; + int len = tab_regy.Count(); + for (int i = 0; i < len; i++) { + Xog_tab_itm tab = Tabs_get_by_idx_or_warn(i); + tab.Html_itm().Js_enabled_(v); + } + } + private void Tabs_selected(String key) { + Xog_tab_itm tab = Tabs_get_by_key_or_warn(key); if (tab == null) return; + active_tab = tab; + Xoae_page page = tab.Page(); + Xog_tab_itm_read_mgr.Update_selected_tab(win, page.Url(), page.Ttl()); + tab.Html_itm().Tab_selected(page); + } + public void Tabs_close_cur() { + if (this.Active_tab_is_null()) return; + Tabs__pub_close(active_tab); + tab_mgr.Tabs_close_by_idx(active_tab.Tab_idx()); + Xog_tab_itm cur_tab = this.Active_tab(); // get new current tab for line below + if (cur_tab != null) cur_tab.Html_box().Focus(); // NOTE: needed to focus tab box else tab button will be focused; DATE:2014-07-13 + } + public void Tabs_close_others() {this.Tabs_close_to_bgn(); this.Tabs_close_to_end();} + public void Tabs_close_to_bgn() {if (Active_tab_is_null()) return; Tabs_close_rng(0 , active_tab.Tab_idx());} + public void Tabs_close_to_end() {if (Active_tab_is_null()) return; Tabs_close_rng(active_tab.Tab_idx() + 1 , tab_regy.Count());} + public void Tabs_close_rng(int bgn, int end) { + for (int i = bgn; i < end; i++) { + Xog_tab_itm tab = Tabs_get_at(bgn); + if (!Tabs__pub_close(tab)) return; + } + for (int i = bgn; i < end; i++) + tab_mgr.Tabs_close_by_idx(bgn); // NOTE: close at bgn, not at i, b/c each close will remove a tab from collection + } + public boolean Tabs__pub_close_all() {return Tabs__pub_close_rng(0, this.Tabs_len());} + public boolean Tabs__pub_close_rng(int bgn, int end) { + boolean rv = true; + for (int i = bgn; i < end; i++) { + Xog_tab_itm tab = Tabs_get_at(i); + boolean close_allowed = Tabs__pub_close(tab); + if (!close_allowed) rv = false; + } + return rv; + } + public boolean Tabs__pub_close(Xog_tab_itm tab) { + return tab.Page().Tab_data().Close_mgr().When_close(tab, Xoa_url.Null); + } + public void Tabs_close_undo() { + if (closed_undo_list.Count() == 0) return; + String url = (String)List_adp_.Pop(closed_undo_list); + Tabs_new_dflt(true); + win.Page__navigate_by_url_bar(url); + } + private List_adp closed_undo_list = List_adp_.New(); + private void Tabs_closed(String key) { + Xog_tab_itm itm = Tabs_get_by_key_or_warn(key); if (itm == null) return; + itm.Html_box().Html_dispose(); + closed_undo_list.Add(itm.Page().Url().To_str()); + tab_regy.Del(key); + if (tab_regy.Count() == 0) { + active_tab = Xog_tab_itm_.Null; + Xog_tab_itm_read_mgr.Update_selected_tab_blank(win); + } + else + Tabs_recalc_idx(); + Tabs_hide_if_one_chk(false); + } + private Xog_tab_itm Tabs_get_by_key_or_warn(String key) { + Xog_tab_itm rv = (Xog_tab_itm)tab_regy.Get_by(key); if (rv == null) win.App().Usr_dlg().Warn_many("", "", "tab.selected could not find tab; key={0}", key); + return rv; + } + private Xog_tab_itm Tabs_get_by_idx_or_warn(int idx) { + Xog_tab_itm rv = (Xog_tab_itm)tab_regy.Get_at(idx); if (rv == null) win.App().Usr_dlg().Warn_many("", "", "tab.selected could not find tab; idx={0}", idx); + return rv; + } + private void Tabs_recalc_idx() { + int len = tab_regy.Count(); + for (int i = 0; i < len; i++) { + Xog_tab_itm itm = Tabs_get_by_idx_or_warn(i); + itm.Tab_idx_(i); + } + } + public void Tabs_select(boolean fwd) { + if (this.Active_tab_is_null()) return; + int new_idx = TabBox_.Cycle(fwd, active_tab.Tab_idx(), tab_regy.Count()); + tab_mgr.Tabs_select_by_idx(new_idx); + } + public void Tabs_select_by_idx(int v) { + if (v < 0 || v >= tab_regy.Count()) return; + tab_mgr.Tabs_select_by_idx(v); + } + public void Tabs_move(boolean fwd) { + if (this.Active_tab_is_null()) return; + int src_idx = active_tab.Tab_idx(); + int trg_idx = TabBox_.Cycle(fwd, src_idx, tab_regy.Count()); + tab_mgr.Tabs_switch(src_idx, trg_idx); + } + private void Tabs_switched(String src_key, String trg_key) { + Xog_tab_itm src_itm = Tabs_get_by_key_or_warn(src_key); + Xog_tab_itm trg_itm = Tabs_get_by_key_or_warn(trg_key); + src_itm.Switch_mem(trg_itm); + active_tab = trg_itm; // NOTE: src_itm initiated switch, but trg_itm is now active b/c everything in src_itm has now been reparented to trg_itm; DATE:2014-05-12 + } + public void Tabs_new_link(boolean focus, String link) { // handle empty link + if (String_.Len_eq_0(link)) { + if (this.Active_tab_is_null()) return; + link = active_tab.Html_itm().Html_selected_get_active_or_selection(); + // 2020-12-16|ISSUE#:823|Open in new tab creates links like `about:/wiki/PAGE_NAME` or `about:/site/WIKI_NAME/wiki/PAGE_NAME` + link = Swt_html_utl.NormalizeSwtUrl(link); + if (link.startsWith(Xoh_href_.Str__site)) { + link = link.substring(Xoh_href_.Str__site.length()); + } + else if (link.startsWith(Xoh_href_.Str__wiki)) { + link = active_tab.Wiki().Domain_str() + link; + } + link = gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Decode_str(link); // NOTE: must decode else url-encoded special pages don't work; EX:home/wiki/Special:XowaCfg%3Fgrp%3Dxowa.html.css; DATE:2017-01-02 + } + if (String_.Len_eq_0(link)) {win.App().Usr_dlg().Prog_many("", "", "no link or text selected"); return;} + Tabs_new_link(link, focus); + } + public void Tabs_new_link(String link, boolean focus) { + Xowe_wiki wiki = active_tab.Wiki(); + Xog_tab_itm new_tab = Tabs_new(focus, false, wiki, Xoae_page.New(wiki, active_tab.Page().Ttl())); // NOTE: do not use ttl from link, else middle-clicking pages with anchors won't work; DATE:2015-05-03 + Xoa_url url = wiki.Utl__url_parser().Parse_by_urlbar_or_null(link); if (url == null) return; // NOTE: link must be of form domain/wiki/page; DATE:2014-05-27 + new_tab.Show_url_bgn(url); + if (focus) + tab_mgr.Tabs_select_by_idx(new_tab.Tab_idx()); + } + private void Tabs_hide_if_one_chk(boolean force) { + if (btns__hide_if_one || force) {// run code only if enabled or forced + if (tab_regy.Count() == 1) { + int desired_height = btns__hide_if_one ? 0 : btns__height; + if (tab_mgr.Btns_height() != desired_height) + tab_mgr.Btns_height_(desired_height); + } + else { + if (tab_mgr.Btns_height() != btns__height) + tab_mgr.Btns_height_(btns__height); + } + } + } + public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { + if (ctx.Match(k, Invk_tabs_new_dflt__at_dflt__focus_y)) Tabs_new_dflt(Bool_.Y); + else if (ctx.Match(k, Invk_tabs_new_link__at_dflt__focus_n)) Tabs_new_link(Bool_.N, m.ReadStrOr("v", null)); + else if (ctx.Match(k, Invk_tabs_new_link__at_dflt__focus_y)) Tabs_new_link(Bool_.Y, m.ReadStrOr("v", null)); + else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_selected)) Tabs_selected(m.ReadStr("key")); + else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_closed)) Tabs_closed(m.ReadStr("key")); + else if (ctx.Match(k, Gfui_tab_mgr.Evt_tab_switched)) Tabs_switched(m.ReadStr("src"), m.ReadStr("trg")); + else if (ctx.Match(k, Invk_tabs_close_cur)) Tabs_close_cur(); + else if (ctx.Match(k, Invk_tabs_select_bwd)) Tabs_select(Bool_.N); + else if (ctx.Match(k, Invk_tabs_select_fwd)) Tabs_select(Bool_.Y); + else if (ctx.Match(k, Invk_tabs_switch_cur_bwd)) Tabs_move(Bool_.N); + else if (ctx.Match(k, Invk_tabs_switch_cur_fwd)) Tabs_move(Bool_.Y); + + else if (ctx.Match(k, Cfg__place_on_top)) tab_mgr.Btns_place_on_top_(m.ReadYn("v")); + else if (ctx.Match(k, Cfg__height)) {btns__height = m.ReadInt("v"); tab_mgr.Btns_height_(btns__height);} + else if (ctx.Match(k, Cfg__hide_if_one)) {btns__hide_if_one = m.ReadYn("v"); Tabs_hide_if_one_chk(true);} + else if (ctx.Match(k, Cfg__curved)) tab_mgr.Btns_curved_(m.ReadYn("v")); + else if (ctx.Match(k, Cfg__close_btn_visible)) tab_mgr.Btns_close_visible_(m.ReadYn("v")); + else if (ctx.Match(k, Cfg__unselected_close_btn_visible)) tab_mgr.Btns_unselected_close_visible_(m.ReadYn("v")); + else if (ctx.Match(k, Cfg__max_chars)) {btns__max_chars = m.ReadInt("v"); Btns_text_recalc();} + else if (ctx.Match(k, Cfg__min_chars)) {btns__min_chars = m.ReadInt("v"); Btns_text_recalc();} + + else if (ctx.Match(k, Cfg__javascript_enabled)) Tabs_javascript_enabled_(m.ReadYnOrY("v")); // NOTE: must be "OrY" else broken cfg.db will break cfg_maint; DATE:2016-12-15 + else if (ctx.Match(k, Cfg__page_load_mode)) Page_load_mode_(m.ReadStr("v")); + else return Gfo_invk_.Rv_unhandled; + return this; + } + private void Page_load_mode_(String v) { + page_load_mode = Gxw_html_load_tid_.Xto_tid(v); + // Gfo_evt_mgr_.Pub_val(this, Evt_load_tid_changed, load_tid); + } + + public static final String + Invk_tabs_select_fwd = "tabs_select_fwd" , Invk_tabs_select_bwd = "tabs_select_bwd" + , Invk_tabs_switch_cur_fwd = "tabs_switch_cur_fwd" , Invk_tabs_switch_cur_bwd = "tabs_switch_cur_bwd" + , Invk_tabs_new_dflt__at_dflt__focus_y = "tabs_new_dflt__at_dflt__focus_y" + , Invk_tabs_new_link__at_dflt__focus_n = "tabs_new_link__at_dflt__focus_n" + , Invk_tabs_new_link__at_dflt__focus_y = "tabs_new_link__at_dflt__focus_y" + , Invk_tabs_close_cur = "tabs_close_cur" + ; + private static final String + Cfg__place_on_top = "xowa.gui.tabs.place_on_top" + , Cfg__height = "xowa.gui.tabs.height" + , Cfg__hide_if_one = "xowa.gui.tabs.hide_if_one" + , Cfg__curved = "xowa.gui.tabs.curved" + , Cfg__close_btn_visible = "xowa.gui.tabs.close_btn_visible" + , Cfg__unselected_close_btn_visible = "xowa.gui.tabs.unselected_close_btn_visible" + , Cfg__max_chars = "xowa.gui.tabs.max_chars" + , Cfg__min_chars = "xowa.gui.tabs.min_chars" + , Cfg__javascript_enabled = "xowa.gui.html_box.javascript_enabled" + , Cfg__page_load_mode = "xowa.gui.html_box.page_load_mode" + ; +} diff --git a/400_xowa/src/gplx/xowa/guis/views/Xog_win_itm.java b/400_xowa/src/gplx/xowa/guis/views/Xog_win_itm.java index d991b87af..07e8daf50 100644 --- a/400_xowa/src/gplx/xowa/guis/views/Xog_win_itm.java +++ b/400_xowa/src/gplx/xowa/guis/views/Xog_win_itm.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.core.threads.*; import gplx.core.envs.*; import gplx.gfui.*; import gplx.gfui.draws.*; import gplx.gfui.kits.core.*; import gplx.gfui.controls.windows.*; import gplx.gfui.controls.standards.*; @@ -60,8 +60,8 @@ public class Xog_win_itm implements Gfo_invk, Gfo_evt_itm { public Xog_html_itm Active_html_itm() {return tab_mgr.Active_tab().Html_itm();} public Gfui_html Active_html_box() {return tab_mgr.Active_tab().Html_itm().Html_box();} public Gfo_usr_dlg Usr_dlg() {return app.Usr_dlg();} - public Xog_urlfmtr_mgr Url_box_fmtr() {return url_box_fmtr;} private final Xog_urlfmtr_mgr url_box_fmtr = new Xog_urlfmtr_mgr(); - public Xog_win_itm_cfg Cfg() {return cfg;} private final Xog_win_itm_cfg cfg = new Xog_win_itm_cfg(); + public Xog_urlfmtr_mgr Url_box_fmtr() {return url_box_fmtr;} private final Xog_urlfmtr_mgr url_box_fmtr = new Xog_urlfmtr_mgr(); + public Xog_win_itm_cfg Cfg() {return cfg;} private final Xog_win_itm_cfg cfg = new Xog_win_itm_cfg(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_link_click)) Win__link_click(); else if (ctx.Match(k, Invk_link_print)) Xog_win_itm__prog_href_mgr.Print(this); @@ -399,10 +399,10 @@ public class Xog_win_itm implements Gfo_invk, Gfo_evt_itm { } } class Xog_url_box__selection_changed implements Gfo_evt_itm { - private final GfuiComboBox url_box; - private final Xoae_app app; + private final GfuiComboBox url_box; + private final Xoae_app app; public Xog_url_box__selection_changed(Xoae_app app, GfuiComboBox url_box) {this.app = app; this.url_box = url_box; this.ev_mgr = new Gfo_evt_mgr(this);} - public Gfo_evt_mgr Evt_mgr() {return ev_mgr;} private final Gfo_evt_mgr ev_mgr; + public Gfo_evt_mgr Evt_mgr() {return ev_mgr;} private final Gfo_evt_mgr ev_mgr; private void On_selection_changed() { String text = url_box.Text(); text = Xog_win_itm.Remove_redirect_if_exists(text); diff --git a/400_xowa/src/gplx/xowa/guis/views/boots/Xog_error_data.java b/400_xowa/src/gplx/xowa/guis/views/boots/Xog_error_data.java index 81d165a0f..e02048ab2 100644 --- a/400_xowa/src/gplx/xowa/guis/views/boots/Xog_error_data.java +++ b/400_xowa/src/gplx/xowa/guis/views/boots/Xog_error_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views.boots; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*; import gplx.core.envs.*; public class Xog_error_data { @@ -21,9 +21,9 @@ public class Xog_error_data { this.err_details = err_details; this.err_msg = err_msg; } - public String Full_msg() {return full_msg;} private final String full_msg; - public String Err_details() {return err_details;} private final String err_details; - public String Err_msg() {return err_msg;} private final String err_msg; + public String Full_msg() {return full_msg;} private final String full_msg; + public String Err_details() {return err_details;} private final String err_details; + public String Err_msg() {return err_msg;} private final String err_msg; public static Xog_error_data new_(String err_msg, String err_trace) { String err_details = String_.Concat_lines_nl_skip_last ( "OS: " + Op_sys.Cur().Os_name() diff --git a/400_xowa/src/gplx/xowa/guis/views/nightmodes/Xog_nightmode_mgr.java b/400_xowa/src/gplx/xowa/guis/views/nightmodes/Xog_nightmode_mgr.java index 559ffdc51..0a5345061 100644 --- a/400_xowa/src/gplx/xowa/guis/views/nightmodes/Xog_nightmode_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/views/nightmodes/Xog_nightmode_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views.nightmodes; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*; import gplx.gfui.controls.elems.*; import gplx.gfui.draws.*; import gplx.xowa.specials.xowa.default_tab.*; @@ -126,7 +126,7 @@ public class Xog_nightmode_mgr implements Gfo_invk { else return Gfo_invk_.Rv_unhandled; return this; } - public static final String + public static final String Cfg__enabled = "xowa.gui.nightmode.enabled" , Cfg__night_back = "xowa.gui.nightmode.nightcolors.backcolor" , Cfg__night_fore = "xowa.gui.nightmode.nightcolors.forecolor" diff --git a/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr.java b/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr.java index 3daf8faba..6eab82ef3 100644 --- a/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr.java +++ b/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.guis.views.url_box_fmts; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*; public class Xog_urlfmtr_mgr implements Gfo_invk { private Xog_urlfmtr_itm wildcard = new Xog_urlfmtr_itm(Byte_ascii.Star_bry, Bry_.new_a7("~{wiki_domain}/wiki/~{page_title}")); - private final Bry_bfr bfr = Bry_bfr_.New(); - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); public boolean Exists() {return exists;} private boolean exists = false; public void Init_by_app(Xoa_app app) { app.Cfg().Bind_many_app(this, Cfg__url_format); @@ -64,7 +64,7 @@ public class Xog_urlfmtr_mgr implements Gfo_invk { } private static final String Cfg__url_format = "xowa.gui.url_bar.url_format"; } class Xog_urlfmtr_itm { - private final Bry_fmt fmt; + private final Bry_fmt fmt; public Xog_urlfmtr_itm(byte[] wiki_domain, byte[] fmt_str) { this.fmt = Bry_fmt.New(fmt_str, "wiki_domain", "page_title", "page_title_spaces"); } diff --git a/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr_tst.java b/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr_tst.java index 400f6b335..9ed76c09d 100644 --- a/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/guis/views/url_box_fmts/Xog_urlfmtr_mgr_tst.java @@ -40,8 +40,8 @@ public class Xog_urlfmtr_mgr_tst { } } class Xog_urlfmtr_mgr_fxt { - private final Xog_urlfmtr_mgr mgr = new Xog_urlfmtr_mgr(); - private final Xow_url_parser url_parser; + private final Xog_urlfmtr_mgr mgr = new Xog_urlfmtr_mgr(); + private final Xow_url_parser url_parser; public Xog_urlfmtr_mgr_fxt() { // create url parser Xoae_app app = Xoa_app_fxt.Make__app__edit(); diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_html_mgr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_html_mgr.java index 5fb1f3ec2..b69e6d99a 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_html_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_html_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.core.htmls.tidy.*; import gplx.xowa.htmls.js.*; import gplx.xowa.htmls.skins.*; import gplx.xowa.parsers.xndes.*; @@ -21,8 +21,8 @@ public class Xoh_html_mgr implements Gfo_invk { public void Init_by_app(Xoae_app app) { page_mgr.Init_by_app(app); } - public Xoh_page_mgr Page_mgr() {return page_mgr;} private final Xoh_page_mgr page_mgr = new Xoh_page_mgr(); - public Xoh_skin_mgr Skin_mgr() {return skin_mgr;} private final Xoh_skin_mgr skin_mgr = new Xoh_skin_mgr(); + public Xoh_page_mgr Page_mgr() {return page_mgr;} private final Xoh_page_mgr page_mgr = new Xoh_page_mgr(); + public Xoh_skin_mgr Skin_mgr() {return skin_mgr;} private final Xoh_skin_mgr skin_mgr = new Xoh_skin_mgr(); public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) { if (ctx.Match(k, Invk_page)) return page_mgr; else if (ctx.Match(k, Invk_skins)) return skin_mgr; diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_img_mgr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_img_mgr.java index 107635839..0695f7878 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_img_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_img_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*; public class Xoh_img_mgr { - private final List_adp list = List_adp_.New(); + private final List_adp list = List_adp_.New(); private int uid_nxt = -1; public void Clear() { this.uid_nxt = -1; @@ -46,5 +46,5 @@ public class Xoh_img_mgr { } } public static final String Str__html_uid = "xoimg_"; - public static final byte[] Bry__html_uid = Bry_.new_a7(Str__html_uid); + public static final byte[] Bry__html_uid = Bry_.new_a7(Str__html_uid); } diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_page.java b/400_xowa/src/gplx/xowa/htmls/Xoh_page.java index 90667fee9..0ea24469d 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_page.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_page.java @@ -44,11 +44,11 @@ public class Xoh_page implements Xoa_page { public Xow_wiki Wiki() {return wiki;} private Xow_wiki wiki; public Xoa_url Url() {return page_url;} private Xoa_url page_url; public Xoa_ttl Ttl() {return page_ttl;} private Xoa_ttl page_ttl; - public Xopg_db_data Db() {return db;} private final Xopg_db_data db = new Xopg_db_data(); - public Xopg_redirect_mgr Redirect_trail() {return redirect;} private final Xopg_redirect_mgr redirect = new Xopg_redirect_mgr(); - public Xopg_html_data Html_data() {return html;} private final Xopg_html_data html = new Xopg_html_data(); - public Xopg_wtxt_data Wtxt() {return wtxt;} private final Xopg_wtxt_data wtxt = new Xopg_wtxt_data(); - public Xopg_hdump_data Hdump_mgr() {return hdump;} private final Xopg_hdump_data hdump = new Xopg_hdump_data(); + public Xopg_db_data Db() {return db;} private final Xopg_db_data db = new Xopg_db_data(); + public Xopg_redirect_mgr Redirect_trail() {return redirect;} private final Xopg_redirect_mgr redirect = new Xopg_redirect_mgr(); + public Xopg_html_data Html_data() {return html;} private final Xopg_html_data html = new Xopg_html_data(); + public Xopg_wtxt_data Wtxt() {return wtxt;} private final Xopg_wtxt_data wtxt = new Xopg_wtxt_data(); + public Xopg_hdump_data Hdump_mgr() {return hdump;} private final Xopg_hdump_data hdump = new Xopg_hdump_data(); public Xol_lang_itm Lang() {return lang;} private Xol_lang_itm lang; private Guid_adp page_guid; public Guid_adp Page_guid() { @@ -66,13 +66,13 @@ public class Xoh_page implements Xoa_page { public byte[] Display_ttl() {return display_ttl;} private byte[] display_ttl; public byte[] Content_sub() {return content_sub;} private byte[] content_sub; public byte[] Sidebar_div() {return sidebar_div;} private byte[] sidebar_div; - public Xoh_section_mgr Section_mgr() {return section_mgr;} private final Xoh_section_mgr section_mgr = new Xoh_section_mgr(); + public Xoh_section_mgr Section_mgr() {return section_mgr;} private final Xoh_section_mgr section_mgr = new Xoh_section_mgr(); public Xoh_img_mgr Img_mgr() {return img_mgr;} private Xoh_img_mgr img_mgr = new Xoh_img_mgr(); public Xopg_module_mgr Head_mgr() {return head_mgr;} private Xopg_module_mgr head_mgr = new Xopg_module_mgr(); public Hash_adp Props() {return props;} private final Hash_adp props = Hash_adp_.New(); // util - public Xoa_page__commons_mgr Commons_mgr() {return commons_mgr;} private final Xoa_page__commons_mgr commons_mgr = new Xoa_page__commons_mgr(); + public Xoa_page__commons_mgr Commons_mgr() {return commons_mgr;} private final Xoa_page__commons_mgr commons_mgr = new Xoa_page__commons_mgr(); public int Exec_tid() {return exec_tid;} private int exec_tid = Xof_exec_tid.Tid_wiki_page; public byte[] Html_head_xtn() {return html_head_xtn;} public void Html_head_xtn_(byte[] v) {html_head_xtn = v;} private byte[] html_head_xtn = Bry_.Empty; // drd:web_browser public byte[] Url_bry_safe() {return Xoa_page_.Url_bry_safe(page_url, wiki, page_ttl);} diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_page_bfr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_page_bfr.java index adb53cebb..49bd0cc16 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_page_bfr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_page_bfr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.core.wkrs.tocs.*; public class Xoh_page_bfr { private byte toc_mode; - private Bry_bfr head_bfr; private final Bry_bfr body_bfr = Bry_bfr_.New(); + private Bry_bfr head_bfr; private final Bry_bfr body_bfr = Bry_bfr_.New(); public void Init(Bry_bfr head_bfr) { this.toc_mode = Xoh_toc_data.Toc_mode__none; this.head_bfr = head_bfr; diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_page_mgr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_page_mgr.java index b6d8cdf46..7aadf0743 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_page_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_page_mgr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.portal.*; public class Xoh_page_mgr implements Gfo_invk { private boolean font_enabled = false; private String font_name = "Arial"; private byte[] font_css_bry = Bry_.Empty, custom_script = Bry_.Empty; - private final Bry_fmt font_css_fmt = Bry_fmt.Auto("body {font-family: ~{font_name}; font-size: ~{font_size}px;}"); + private final Bry_fmt font_css_fmt = Bry_fmt.Auto("body {font-family: ~{font_name}; font-size: ~{font_size}px;}"); public float Font_size() {return font_size;} private float font_size = Font_size_default; private void Font_css_bry_() { font_css_bry = font_css_fmt.Bld_many_to_bry(Bry_bfr_.New(), font_name, font_size); @@ -31,8 +31,8 @@ public class Xoh_page_mgr implements Gfo_invk { wtr.Write_css_style_itm(custom_script); } - public Bry_fmt Content_code_fmt() {return content_code_fmt;} private final Bry_fmt content_code_fmt = Bry_fmt.Auto("
    ~{page_text}
    "); - public Xoh_subpages_bldr Subpages_bldr() {return subpages_bldr;} private final Xoh_subpages_bldr subpages_bldr = new Xoh_subpages_bldr(); + public Bry_fmt Content_code_fmt() {return content_code_fmt;} private final Bry_fmt content_code_fmt = Bry_fmt.Auto("
    ~{page_text}
    "); + public Xoh_subpages_bldr Subpages_bldr() {return subpages_bldr;} private final Xoh_subpages_bldr subpages_bldr = new Xoh_subpages_bldr(); public void Init_by_app(Xoa_app app) { app.Cfg().Bind_many_app(this, Cfg__font_enabled, Cfg__font_name, Cfg__font_size, Cfg__font_format, Cfg__custom_script, Cfg__content_code_fmt); } diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_mgr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_mgr.java index 57a357e2e..b04605773 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.wikis.pages.*; public class Xoh_page_wtr_mgr implements Gfo_invk { - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255), html_bfr = Bry_bfr_.Reset(Io_mgr.Len_mb); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255), html_bfr = Bry_bfr_.Reset(Io_mgr.Len_mb); private Xoh_page_wtr_wkr edit_wtr, html_wtr, read_wtr; public Xoh_page_wtr_mgr(boolean html_capable) { this.html_capable = html_capable; @@ -86,7 +86,7 @@ public class Xoh_page_wtr_mgr implements Gfo_invk { , "
    " ), "src_full_db"); public static final String Invk_page_read_ = "page_read_", Invk_page_edit_ = "page_edit_", Invk_page_html_ = "page_html_", Invk_xowa_div_edit_rename_ = "xowa_div_edit_rename_"; - private static final String[] Fmtr_keys = new String[] + private static final String[] Fmtr_keys = new String[] { "app_root_dir", "app_version", "app_build_date", "xowa_mode_is_server" , "page_id", "page_ttl_full", "page_name", "page_heading", "page_modified_on_msg" , "html_css_common_path", "html_css_wiki_path", "html_css_night_tag", "xowa_head" diff --git a/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_wkr.java b/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_wkr.java index c0cbac6ba..84344dce4 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_wkr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xoh_page_wtr_wkr.java @@ -46,11 +46,11 @@ import gplx.xowa.wikis.pages.skins.Xopg_xtn_skin_itm_tid; import gplx.xowa.xtns.pfuncs.times.Pft_func_formatdate; import gplx.xowa.xtns.wbases.Wdata_xwiki_link_wtr; public class Xoh_page_wtr_wkr { - private final Object thread_lock_1 = new Object(), thread_lock_2 = new Object(); - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); - private final Xoh_page_wtr_mgr mgr; private final byte page_mode; - private final Wdata_xwiki_link_wtr wdata_lang_wtr = new Wdata_xwiki_link_wtr(); // In other languages - private final gplx.xowa.addons.apps.scripts.Xoscript_mgr scripting_mgr = new gplx.xowa.addons.apps.scripts.Xoscript_mgr(); + private final Object thread_lock_1 = new Object(), thread_lock_2 = new Object(); + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Xoh_page_wtr_mgr mgr; private final byte page_mode; + private final Wdata_xwiki_link_wtr wdata_lang_wtr = new Wdata_xwiki_link_wtr(); // In other languages + private final gplx.xowa.addons.apps.scripts.Xoscript_mgr scripting_mgr = new gplx.xowa.addons.apps.scripts.Xoscript_mgr(); private Xoae_app app; private Xowe_wiki wiki; private Xoae_page page; private byte[] root_dir_bry; public Xoh_page_wtr_wkr(Xoh_page_wtr_mgr mgr, byte page_mode) {this.mgr = mgr; this.page_mode = page_mode;} public Xoh_page_wtr_wkr Ctgs_enabled_(boolean v) {ctgs_enabled = v; return this;} private boolean ctgs_enabled = true; @@ -298,6 +298,6 @@ public class Xoh_page_wtr_wkr { if (data_raw_len > 0) // do not add nl if empty String bfr.Add_byte_nl(); // per MW:EditPage.php: "Ensure there's a newline at the end, otherwise adding lines is awkward." } - private static final byte[] Key_lastmodifiedat = Bry_.new_a7("lastmodifiedat"); + private static final byte[] Key_lastmodifiedat = Bry_.new_a7("lastmodifiedat"); } diff --git a/400_xowa/src/gplx/xowa/htmls/Xow_html_mgr.java b/400_xowa/src/gplx/xowa/htmls/Xow_html_mgr.java index 4765405a8..a540f025a 100644 --- a/400_xowa/src/gplx/xowa/htmls/Xow_html_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/Xow_html_mgr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls; import gplx.*; import gplx.xowa.*; import gplx.gfui.kits.core.*; import gplx.xowa.langs.*; @@ -22,7 +22,7 @@ import gplx.xowa.htmls.portal.*; import gplx.xowa.addons.htmls.tocs.*; import gp import gplx.langs.htmls.encoders.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.*; import gplx.xowa.addons.wikis.ctgs.htmls.pageboxs.singles.*; public class Xow_html_mgr implements Gfo_invk { - private final Gfo_url_encoder fsys_lnx_encoder = Gfo_url_encoder_.New__fsys_lnx().Make(); + private final Gfo_url_encoder fsys_lnx_encoder = Gfo_url_encoder_.New__fsys_lnx().Make(); public Xow_html_mgr(Xowe_wiki wiki) { this.wiki = wiki; html_wtr = new Xoh_html_wtr(wiki, this); @@ -46,9 +46,9 @@ public class Xow_html_mgr implements Gfo_invk { public Xowe_wiki Wiki() {return wiki;} private Xowe_wiki wiki; public Xoh_html_wtr Html_wtr() {return html_wtr;} private Xoh_html_wtr html_wtr; public Xoh_page_wtr_mgr Page_wtr_mgr() {return page_wtr_mgr;} private Xoh_page_wtr_mgr page_wtr_mgr; - public Xow_tidy_mgr Tidy_mgr() {return tidy_mgr;} private final Xow_tidy_mgr tidy_mgr = new Xow_tidy_mgr(); - public Xoh_js_cleaner Js_cleaner() {return js_cleaner;} private final Xoh_js_cleaner js_cleaner; - public Xop_xatr_whitelist_mgr Whitelist_mgr() {return whitelist_mgr;} private final Xop_xatr_whitelist_mgr whitelist_mgr = new Xop_xatr_whitelist_mgr().Ini(); + public Xow_tidy_mgr Tidy_mgr() {return tidy_mgr;} private final Xow_tidy_mgr tidy_mgr = new Xow_tidy_mgr(); + public Xoh_js_cleaner Js_cleaner() {return js_cleaner;} private final Xoh_js_cleaner js_cleaner; + public Xop_xatr_whitelist_mgr Whitelist_mgr() {return whitelist_mgr;} private final Xop_xatr_whitelist_mgr whitelist_mgr = new Xop_xatr_whitelist_mgr().Ini(); public Xow_portal_mgr Portal_mgr() {return portal_mgr;} private Xow_portal_mgr portal_mgr; public Xow_module_mgr Head_mgr() {return module_mgr;} private Xow_module_mgr module_mgr; public boolean Importing_ctgs() {return importing_ctgs;} public void Importing_ctgs_(boolean v) {importing_ctgs = v;} private boolean importing_ctgs; diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_cmd_mgr.java b/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_cmd_mgr.java index aa93a4510..929eb24c9 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_cmd_mgr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.langs.jsons.*; public class Bridge_cmd_mgr { - private final Json_parser parser; - private final Hash_adp_bry cmd_hash = Hash_adp_bry.cs(); + private final Json_parser parser; + private final Hash_adp_bry cmd_hash = Hash_adp_bry.cs(); public Bridge_cmd_mgr(Json_parser parser) {this.parser = parser;} public void Add(Bridge_cmd_itm cmd) {cmd_hash.Add_bry_obj(cmd.Key(), cmd);} public String Exec(GfoMsg m) { @@ -37,7 +37,7 @@ public class Bridge_cmd_mgr { throw Err_.new_exc(e, "bridge.cmds", "exec json failed", "json", jdoc_bry); } } - private static final byte[] Key_cmd = Bry_.new_a7("cmd"), Key_data = Bry_.new_a7("data"); - public static final byte[] Msg__proc = Bry_.new_a7("proc"), Msg__args = Bry_.new_a7("args"); + private static final byte[] Key_cmd = Bry_.new_a7("cmd"), Key_data = Bry_.new_a7("data"); + public static final byte[] Msg__proc = Bry_.new_a7("proc"), Msg__args = Bry_.new_a7("args"); public static String Msg__ok = String_.Empty; } diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_msg_bldr.java b/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_msg_bldr.java index ceb514cc4..ff1d585a6 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_msg_bldr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/Bridge_msg_bldr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.langs.jsons.*; public class Bridge_msg_bldr { - private final Json_wtr wtr = new Json_wtr(); + private final Json_wtr wtr = new Json_wtr(); private boolean rslt_pass; private String rslt_msg; private String notify_text; private String notify_status; - private final Gfo_tree_list data_root = new Gfo_tree_list("data"); + private final Gfo_tree_list data_root = new Gfo_tree_list("data"); public Bridge_msg_bldr() { wtr.Opt_ws_(Bool_.N); this.Clear(); @@ -94,7 +94,7 @@ public class Bridge_msg_bldr { } wtr.Nde_end(); } - private static final byte[] + private static final byte[] Key_rslt = Bry_.new_a7("rslt"), Key_rslt_pass = Bry_.new_a7("pass"), Key_rslt_msg = Bry_.new_a7("msg") , Key_notify = Bry_.new_a7("notify"), Key_notify_text = Bry_.new_a7("text"), Key_notify_status = Bry_.new_a7("status"), Key_notify_hint = Bry_.new_a7("hint") ; diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/Dbui_cmd_mgr.java b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/Dbui_cmd_mgr.java index b6f59f1ba..0e45464ea 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/Dbui_cmd_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/Dbui_cmd_mgr.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges.dbuis; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.bridges.*; import gplx.langs.jsons.*; import gplx.xowa.htmls.bridges.dbuis.tbls.*; public class Dbui_cmd_mgr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Hash_adp_bry hash = Hash_adp_bry.cs(); private boolean init; public void Init_by_bridge(Bridge_cmd_mgr cmd_mgr) { if (init) return; @@ -52,38 +52,38 @@ public class Dbui_cmd_mgr { } return rv; } - public static final Dbui_cmd_mgr Instance = new Dbui_cmd_mgr(); Dbui_cmd_mgr() {} - private static final byte[] + public static final Dbui_cmd_mgr Instance = new Dbui_cmd_mgr(); Dbui_cmd_mgr() {} + private static final byte[] Arg_tbl_key = Bry_.new_a7("tbl_key"), Arg_row_pkey = Bry_.new_a7("row_pkey"), Arg_row_id = Bry_.new_a7("row_id") , Arg_vals = Bry_.new_a7("vals"), Arg_key = Bry_.new_a7("key"), Arg_val = Bry_.new_a7("val") , Arg_pkeys = Bry_.new_a7("pkeys") ; } class Dbui_cmd_row_del implements Bridge_cmd_itm { - private final Dbui_cmd_mgr mgr; + private final Dbui_cmd_mgr mgr; public Dbui_cmd_row_del(String key, Dbui_cmd_mgr mgr) {this.key = Bry_.new_u8(key); this.mgr = mgr;} - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public void Init_by_app(Xoa_app app) {} public String Exec(Json_nde data) {return mgr.Del(data);} } class Dbui_cmd_row_edit implements Bridge_cmd_itm { - private final Dbui_cmd_mgr mgr; + private final Dbui_cmd_mgr mgr; public Dbui_cmd_row_edit(String key, Dbui_cmd_mgr mgr) {this.key = Bry_.new_u8(key); this.mgr = mgr;} - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public void Init_by_app(Xoa_app app) {} public String Exec(Json_nde data) {return mgr.Edit(data);} } class Dbui_cmd_row_save implements Bridge_cmd_itm { - private final Dbui_cmd_mgr mgr; + private final Dbui_cmd_mgr mgr; public Dbui_cmd_row_save(String key, Dbui_cmd_mgr mgr) {this.key = Bry_.new_u8(key); this.mgr = mgr;} - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public void Init_by_app(Xoa_app app) {} public String Exec(Json_nde data) {return mgr.Save(data);} } class Dbui_cmd_row_reorder implements Bridge_cmd_itm { - private final Dbui_cmd_mgr mgr; + private final Dbui_cmd_mgr mgr; public Dbui_cmd_row_reorder(String key, Dbui_cmd_mgr mgr) {this.key = Bry_.new_u8(key); this.mgr = mgr;} - public byte[] Key() {return key;} private final byte[] key; + public byte[] Key() {return key;} private final byte[] key; public void Init_by_app(Xoa_app app) {} public String Exec(Json_nde data) {return mgr.Reorder(data);} } diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_cells_fmtr.java b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_cells_fmtr.java index 3b65e6e1f..37f5825e8 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_cells_fmtr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_cells_fmtr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges.dbuis.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.bridges.*; import gplx.xowa.htmls.bridges.dbuis.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.htmls.bridges.dbuis.tbls.*; public class Dbui_cells_fmtr implements gplx.core.brys.Bfr_arg { - private final Dbui_cell_fmtr cell_fmtr = new Dbui_cell_fmtr(); - private final Dbui_btn_fmtr btn_fmtr = new Dbui_btn_fmtr(); + private final Dbui_cell_fmtr cell_fmtr = new Dbui_cell_fmtr(); + private final Dbui_btn_fmtr btn_fmtr = new Dbui_btn_fmtr(); private Dbui_btn_itm[] btns; private byte[] row_key; private Dbui_row_itm row_itm; public void Ctor(Dbui_val_fmtr val_fmtr, Dbui_btn_itm[] btns) { @@ -31,7 +31,7 @@ public class Dbui_cells_fmtr implements gplx.core.brys.Bfr_arg { public void Bfr_arg__add(Bry_bfr bfr) { fmtr.Bld_bfr_many(bfr, cell_fmtr.Init(row_key, row_itm), btn_fmtr.Init(row_key, btns)); } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , "
    ~{vals}" , "
    ~{btns}" @@ -51,7 +51,7 @@ class Dbui_cell_fmtr implements gplx.core.brys.Bfr_arg { fmtr.Bld_bfr_many(bfr, row_key, i, val_fmtr.Init(cols[i], row_key, val)); } } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , "
    ~{html}
    " ), "row_key", "val_idx", "html"); @@ -69,7 +69,7 @@ class Dbui_btn_fmtr implements gplx.core.brys.Bfr_arg { fmtr.Bld_bfr_many(bfr, row_key, btn.Cmd(), img_dir.GenSubFil(btn.Img()).To_http_file_bry(), btn.Text()); } } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , " " ), "row_key", "btn_cmd", "btn_img", "btn_text"); diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr.java b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr.java index bf72acd2a..7a2f598b4 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr.java @@ -1,28 +1,28 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges.dbuis.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.bridges.*; import gplx.xowa.htmls.bridges.dbuis.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.htmls.bridges.dbuis.tbls.*; public class Dbui_tbl_fmtr { - private final Dbui_head_cell_fmtr head_cell_fmtr = new Dbui_head_cell_fmtr(); - private final Dbui_row_fmtr row_fmtr = new Dbui_row_fmtr(); + private final Dbui_head_cell_fmtr head_cell_fmtr = new Dbui_head_cell_fmtr(); + private final Dbui_row_fmtr row_fmtr = new Dbui_row_fmtr(); public void Write(Bry_bfr bfr, Dbui_tbl_itm tbl, byte[] origin_html, byte[] delete_confirm_msg, Dbui_row_itm[] rows) { tbl_fmtr.Bld_bfr_many(bfr, tbl.Key(), Dbui_tbl_itm_.Calc_width(tbl), origin_html, delete_confirm_msg, head_cell_fmtr.Init(tbl), row_fmtr.Init(tbl, rows)); } - private static final Bry_fmtr tbl_fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr tbl_fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , "
    " , "
    " @@ -42,15 +42,15 @@ class Dbui_head_cell_fmtr implements gplx.core.brys.Bfr_arg { } bfr.Add_str_a7("\n
     
    "); // btns headers } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , "
    ~{display}
    " ), "width", "display"); } class Dbui_row_fmtr implements gplx.core.brys.Bfr_arg { - private final Dbui_cells_fmtr cells_fmtr = new Dbui_cells_fmtr(); - private final Dbui_val_fmtr val_fmtr = Dbui_val_fmtr_.new_view(); - private final Bry_bfr row_key_bfr = Bry_bfr_.New_w_size(255); + private final Dbui_cells_fmtr cells_fmtr = new Dbui_cells_fmtr(); + private final Dbui_val_fmtr val_fmtr = Dbui_val_fmtr_.new_view(); + private final Bry_bfr row_key_bfr = Bry_bfr_.New_w_size(255); private Dbui_tbl_itm tbl; private Dbui_row_itm[] rows; public Dbui_row_fmtr Init(Dbui_tbl_itm tbl, Dbui_row_itm[] rows) {this.tbl = tbl; this.rows = rows; return this;} public void Bfr_arg__add(Bry_bfr bfr) { @@ -64,7 +64,7 @@ class Dbui_row_fmtr implements gplx.core.brys.Bfr_arg { fmtr.Bld_bfr_many(bfr, row_key, row.Pkey(), cells_fmtr.Init(row_key, row)); } } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , "
    ~{cells}" , "
    " diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr_tst.java b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr_tst.java index 9482d95f6..2106a3aac 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr_tst.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_tbl_fmtr_tst.java @@ -17,7 +17,7 @@ package gplx.xowa.htmls.bridges.dbuis.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.bridges.dbuis.tbls.*; import org.junit.*; public class Dbui_tbl_fmtr_tst { - @Before public void init() {fxt.Clear();} private final Dbui_tbl_fmtr_fxt fxt = new Dbui_tbl_fmtr_fxt(); + @Before public void init() {fxt.Clear();} private final Dbui_tbl_fmtr_fxt fxt = new Dbui_tbl_fmtr_fxt(); @Test public void Basic() { // fxt.Test_write // ( fxt.Make_tbl() @@ -26,8 +26,8 @@ public class Dbui_tbl_fmtr_tst { } } class Dbui_tbl_fmtr_fxt { - private final Bry_bfr bfr = Bry_bfr_.New_w_size(255); - private final Dbui_tbl_fmtr tbl_fmtr = new Dbui_tbl_fmtr(); + private final Bry_bfr bfr = Bry_bfr_.New_w_size(255); + private final Dbui_tbl_fmtr tbl_fmtr = new Dbui_tbl_fmtr(); public void Clear() {} public Dbui_tbl_itm Make_tbl() { return null; diff --git a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_val_fmtr.java b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_val_fmtr.java index 682ee86d5..3fae9171b 100644 --- a/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_val_fmtr.java +++ b/400_xowa/src/gplx/xowa/htmls/bridges/dbuis/fmtrs/Dbui_val_fmtr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.bridges.dbuis.fmtrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.bridges.*; import gplx.xowa.htmls.bridges.dbuis.*; import gplx.core.brys.fmtrs.*; import gplx.xowa.htmls.bridges.dbuis.tbls.*; @@ -36,11 +36,11 @@ class Dbui_val_fmtr__edit implements gplx.core.brys.Bfr_arg, Dbui_val_fmtr { default: throw Err_.new_unimplemented(); } } - private static final Bry_fmtr input_fmtr_str = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr input_fmtr_str = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , " " ), "col_key", "width", "value", "row_id"); - private static final Bry_fmtr textarea_fmtr_str = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr textarea_fmtr_str = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "" , " " ), "col_key", "width", "value", "row_id"); diff --git a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr.java b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr.java index d4765ea0f..6df8db60d 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.core.ios.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.wikis.data.*; public class Xow_hdump_mgr { - private final Xoh_page tmp_hpg = new Xoh_page(); private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); - private final Io_stream_zip_mgr zip_mgr = new Io_stream_zip_mgr(); - private final Ordered_hash wkrs = Ordered_hash_.New_bry(); + private final Xoh_page tmp_hpg = new Xoh_page(); private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Io_stream_zip_mgr zip_mgr = new Io_stream_zip_mgr(); + private final Ordered_hash wkrs = Ordered_hash_.New_bry(); public Xow_hdump_mgr(Xow_wiki wiki) { this.save_mgr = new Xow_hdump_mgr__save(wiki, hzip_mgr, zip_mgr, tmp_hpg); this.load_mgr = new Xow_hdump_mgr__load(wiki, hzip_mgr, zip_mgr, tmp_hpg, tmp_bfr); @@ -28,7 +28,7 @@ public class Xow_hdump_mgr { public Xow_hdump_mgr__save Save_mgr() {return save_mgr;} private Xow_hdump_mgr__save save_mgr; public Xow_hdump_mgr__load Load_mgr() {return load_mgr;} private Xow_hdump_mgr__load load_mgr; public Ordered_hash Wkrs() {return wkrs;} - public Xoh_hzip_mgr Hzip_mgr() {return hzip_mgr;} private final Xoh_hzip_mgr hzip_mgr = new Xoh_hzip_mgr(); + public Xoh_hzip_mgr Hzip_mgr() {return hzip_mgr;} private final Xoh_hzip_mgr hzip_mgr = new Xoh_hzip_mgr(); public void Init_by_db(Xow_wiki wiki) { byte dflt_zip_tid = gplx.core.ios.streams.Io_stream_tid_.Tid__raw; boolean dflt_hzip_enable = false; diff --git a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__load.java b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__load.java index 05e7c58e9..f2098eb9b 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__load.java +++ b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__load.java @@ -45,8 +45,8 @@ import gplx.xowa.wikis.pages.skins.Xopg_xtn_skin_itm_stub; import gplx.xowa.xtns.indicators.Indicator_hxtn_page_wkr; public class Xow_hdump_mgr__load implements Gfo_invk { - private final Xow_wiki wiki; private final Xoh_hzip_mgr hzip_mgr; private final Io_stream_zip_mgr zip_mgr; - private final Xoh_page tmp_hpg; private final Bry_bfr tmp_bfr; private final Xowd_page_itm tmp_dbpg = new Xowd_page_itm(); + private final Xow_wiki wiki; private final Xoh_hzip_mgr hzip_mgr; private final Io_stream_zip_mgr zip_mgr; + private final Xoh_page tmp_hpg; private final Bry_bfr tmp_bfr; private final Xowd_page_itm tmp_dbpg = new Xowd_page_itm(); private Xow_override_mgr override_mgr__html, override_mgr__page; public Xow_hdump_mgr__load(Xow_wiki wiki, Xoh_hzip_mgr hzip_mgr, Io_stream_zip_mgr zip_mgr, Xoh_page tmp_hpg, Bry_bfr tmp_bfr) { this.wiki = wiki; this.hzip_mgr = hzip_mgr; this.zip_mgr = zip_mgr; this.tmp_hpg = tmp_hpg; this.tmp_bfr = tmp_bfr; @@ -54,7 +54,7 @@ public class Xow_hdump_mgr__load implements Gfo_invk { } public boolean Read_preferred() {return read_preferred;} private boolean read_preferred = true; public Xow_hdump_mode Html_mode() {return html_mode;} private Xow_hdump_mode html_mode = Xow_hdump_mode.Shown; - public Xoh_make_mgr Make_mgr() {return make_mgr;} private final Xoh_make_mgr make_mgr; + public Xoh_make_mgr Make_mgr() {return make_mgr;} private final Xoh_make_mgr make_mgr; public void Init_by_wiki(Xow_wiki wiki) { gplx.xowa.addons.apps.cfgs.Xocfg_mgr cfg_mgr = wiki.App().Cfg(); Xow_hdump_mode.Cfg__reg_type(cfg_mgr.Type_mgr()); @@ -197,8 +197,8 @@ public class Xow_hdump_mgr__load implements Gfo_invk { } } class Xow_override_mgr { - private final Hash_adp_bry hash = Hash_adp_bry.cs(); - private final Io_url root_dir; + private final Hash_adp_bry hash = Hash_adp_bry.cs(); + private final Io_url root_dir; private boolean init = true; public Xow_override_mgr(Io_url root_dir) {this.root_dir = root_dir;} public void Clear() {hash.Clear();} diff --git a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__save.java b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__save.java index aeb27dc6c..5e963b174 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__save.java +++ b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mgr__save.java @@ -32,8 +32,8 @@ import gplx.xowa.wikis.pages.Xopg_view_mode_; import gplx.xowa.wikis.pages.dbs.Xopg_db_page; public class Xow_hdump_mgr__save { - private final Xow_wiki wiki; private final Xoh_hzip_mgr hzip_mgr; private final Io_stream_zip_mgr zip_mgr; - private final Xoh_page tmp_hpg; private final Xoh_hzip_bfr tmp_bfr = Xoh_hzip_bfr.New_txt(32); private Bool_obj_ref html_db_is_new = Bool_obj_ref.n_(); + private final Xow_wiki wiki; private final Xoh_hzip_mgr hzip_mgr; private final Io_stream_zip_mgr zip_mgr; + private final Xoh_page tmp_hpg; private final Xoh_hzip_bfr tmp_bfr = Xoh_hzip_bfr.New_txt(32); private Bool_obj_ref html_db_is_new = Bool_obj_ref.n_(); private int dflt_zip_tid, dflt_hzip_tid; public Xow_hdump_mgr__save(Xow_wiki wiki, Xoh_hzip_mgr hzip_mgr, Io_stream_zip_mgr zip_mgr, Xoh_page tmp_hpg) { this.wiki = wiki; this.hzip_mgr = hzip_mgr; this.zip_mgr = zip_mgr; this.tmp_hpg = tmp_hpg; diff --git a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mode.java b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mode.java index bcff05f5e..ce14f4367 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mode.java +++ b/400_xowa/src/gplx/xowa/htmls/core/Xow_hdump_mode.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; public class Xow_hdump_mode { - private final int tid; - private final String key; - private final String gui; + private final int tid; + private final String key; + private final String gui; public Xow_hdump_mode(int tid, String key, String gui) { this.tid = tid; this.key = key; this.gui = gui; @@ -26,7 +26,7 @@ public class Xow_hdump_mode { // boolean Tid_is_hdump_save() {return tid == Hdump_save.tid;} public boolean Tid_is_custom() {return tid < Shown.tid;} - public static final Xow_hdump_mode + public static final Xow_hdump_mode Swt_browser = new Xow_hdump_mode(0, "swt_browser" , "SWT Browser") , Hdump_save = new Xow_hdump_mode(1, "hdump_save" , "Saved for HTML DB") , Shown = new Xow_hdump_mode(2, "shown" , "Shown") diff --git a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_hdump_bldr.java b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_hdump_bldr.java index a04aaf881..90336000d 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_hdump_bldr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_hdump_bldr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.brys.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.cmds.*; import gplx.xowa.apps.apis.xowa.bldrs.imports.*; @@ -23,7 +23,7 @@ public class Xob_hdump_bldr implements Gfo_invk { private boolean enabled, hzip_enabled, hzip_diff, hzip_b256; private byte zip_tid = Byte_.Max_value_127; private Xowe_wiki wiki; private Xob_hdump_tbl_retriever html_tbl_retriever; private int prv_row_len = 0; - private final Xoh_page tmp_hpg = new Xoh_page(); private final Bry_bfr tmp_bfr = Bry_bfr_.New(); + private final Xoh_page tmp_hpg = new Xoh_page(); private final Bry_bfr tmp_bfr = Bry_bfr_.New(); private boolean op_sys_is_wnt; private byte[] toc_label = Bry_.Empty; public Xoh_page Tmp_hpg() {return tmp_hpg;} diff --git a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_link_dump_tbl.java b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_link_dump_tbl.java index 0f5f42ee2..57ec10f87 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_link_dump_tbl.java +++ b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_link_dump_tbl.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.dbs.*; class Xob_link_dump_tbl implements Rls_able { - public static final String Tbl_name = "link_dump"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - public static final String + public static final String Tbl_name = "link_dump"; private static final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public static final String Fld_uid = flds.Add_int_pkey_autonum("uid") , Fld_src_page_id = flds.Add_int("src_page_id") , Fld_src_html_uid = flds.Add_int("src_html_uid") @@ -30,7 +30,7 @@ class Xob_link_dump_tbl implements Rls_able { this.conn = conn; conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; + public Db_conn Conn() {return conn;} private final Db_conn conn; public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(Tbl_name, flds));} public void Create_idx_1() { conn.Meta_idx_create diff --git a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_ns_to_db_wkr__html.java b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_ns_to_db_wkr__html.java index 227bab9cb..2c3533830 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_ns_to_db_wkr__html.java +++ b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_ns_to_db_wkr__html.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.htmls.core.dbs.*; public class Xob_ns_to_db_wkr__html implements Xob_ns_to_db_wkr { - private final Xow_db_file page_db; + private final Xow_db_file page_db; public Xob_ns_to_db_wkr__html(Xow_db_file page_db) {this.page_db = page_db;} public byte Db_tid() {return Xow_db_file_.Tid__html_data;} public void Tbl_init(Xow_db_file db) { @@ -32,7 +32,7 @@ public class Xob_ns_to_db_wkr__html implements Xob_ns_to_db_wkr { .Exec_sql_w_msg("hdump.update page.html_db_id", Sql_update_page_html_db_id, db.Id()); db_conn.Rls_conn(); } - private static final String Sql_update_page_html_db_id = String_.Concat_lines_nl_skip_last + private static final String Sql_update_page_html_db_id = String_.Concat_lines_nl_skip_last ( "REPLACE INTO page (page_id, page_namespace, page_title, page_is_redirect, page_touched, page_len, page_random_int, page_text_db_id, page_html_db_id, page_redirect_id, page_score)" , "SELECT p.page_id" , ", p.page_namespace" diff --git a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_redlink_mkr_cmd.java b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_redlink_mkr_cmd.java index f45329323..becceaf75 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_redlink_mkr_cmd.java +++ b/400_xowa/src/gplx/xowa/htmls/core/bldrs/Xob_redlink_mkr_cmd.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.dbs.*; import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*; @@ -68,7 +68,7 @@ public class Xob_redlink_mkr_cmd extends Xob_itm_basic_base implements Xob_cmd { if ((commit_count % commit_interval ) == 0) redlink_tbl.Conn().Txn_sav(); } - private static final String Sql_select_clause = String_.Concat_lines_nl_skip_last + private static final String Sql_select_clause = String_.Concat_lines_nl_skip_last ( "SELECT p.page_html_db_id" , ", p.page_id" , ", ld.src_html_uid" diff --git a/400_xowa/src/gplx/xowa/htmls/core/dbs/Xoh_redlink_tbl.java b/400_xowa/src/gplx/xowa/htmls/core/dbs/Xoh_redlink_tbl.java index 6d92f747a..1a437f210 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/dbs/Xoh_redlink_tbl.java +++ b/400_xowa/src/gplx/xowa/htmls/core/dbs/Xoh_redlink_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.dbs.*; public class Xoh_redlink_tbl implements Rls_able { - private final String tbl_name = "html_redlink"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); - private final String fld_page_id, fld_redlink_uids; - private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete, stmt_update; + private final String tbl_name = "html_redlink"; private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + private final String fld_page_id, fld_redlink_uids; + private final Db_conn conn; private Db_stmt stmt_select, stmt_insert, stmt_delete, stmt_update; public Xoh_redlink_tbl(Db_conn conn) { this.conn = conn; this.fld_page_id = flds.Add_int_pkey("page_id"); diff --git a/400_xowa/src/gplx/xowa/htmls/core/dbs/Xowd_html_tbl.java b/400_xowa/src/gplx/xowa/htmls/core/dbs/Xowd_html_tbl.java index 605817c7e..5c9ad7acf 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/dbs/Xowd_html_tbl.java +++ b/400_xowa/src/gplx/xowa/htmls/core/dbs/Xowd_html_tbl.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.dbs.*; import gplx.core.brys.*; public class Xowd_html_tbl implements Db_tbl { - private final String fld_page_id, fld_head_flag, fld_body_flag, fld_display_ttl, fld_content_sub, fld_sidebar_div, fld_body; + private final String fld_page_id, fld_head_flag, fld_body_flag, fld_display_ttl, fld_content_sub, fld_sidebar_div, fld_body; private Db_stmt stmt_select, stmt_insert, stmt_update; - private final Int_flag_bldr body_flag_bldr = Make_body_flag_bldr(); + private final Int_flag_bldr body_flag_bldr = Make_body_flag_bldr(); public Xowd_html_tbl(Db_conn conn) { this.conn = conn; this.fld_page_id = flds.Add_int_pkey("page_id"); @@ -30,9 +30,9 @@ public class Xowd_html_tbl implements Db_tbl { this.fld_body = flds.Add_bry("body"); conn.Rls_reg(this); } - public Db_conn Conn() {return conn;} private final Db_conn conn; - public String Tbl_name() {return tbl_name;} private final String tbl_name = "html"; - public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); + public Db_conn Conn() {return conn;} private final Db_conn conn; + public String Tbl_name() {return tbl_name;} private final String tbl_name = "html"; + public Dbmeta_fld_list Flds() {return flds;} private final Dbmeta_fld_list flds = new Dbmeta_fld_list(); public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));} public void Insert_bgn() {conn.Txn_bgn("html__insert"); stmt_insert = conn.Stmt_insert(tbl_name, flds);} diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_display_ttl_wtr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_display_ttl_wtr.java index 9b7b7a018..8eaa7e1e1 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_display_ttl_wtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_display_ttl_wtr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.htmls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.btries.*; import gplx.xowa.parsers.htmls.*; @@ -36,10 +36,10 @@ class Xoh_display_ttl_wtr { } return false; } - private static final byte[] + private static final byte[] Atr_key_style = Bry_.new_a7("style") , Msg_style_restricted = Bry_.new_a7(" style='/* attempt to bypass $wgRestrictDisplayTitle */'") ; - private static final Btrie_slim_mgr style_trie = Btrie_slim_mgr.ci_a7() + private static final Btrie_slim_mgr style_trie = Btrie_slim_mgr.ci_a7() .Add_str_byte__many(Byte_.By_int(0), "display", "user-select", "visibility"); // if ( preg_match( '/(display|user-select|visibility)\s*:/i', $decoded['style'] ) ) { } diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java index 66c085028..126fb20d9 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr.java @@ -63,7 +63,7 @@ import gplx.xowa.xtns.Xox_xnde; import gplx.xowa.xtns.cites.Ref_html_wtr; public class Xoh_html_wtr { - private final Xoae_app app; private final Xowe_wiki wiki; private final Xow_html_mgr html_mgr; private final Xop_xatr_whitelist_mgr whitelist_mgr; + private final Xoae_app app; private final Xowe_wiki wiki; private final Xow_html_mgr html_mgr; private final Xop_xatr_whitelist_mgr whitelist_mgr; private Xoae_page page; private int indent_level; private int stack_counter; @@ -73,11 +73,11 @@ public class Xoh_html_wtr { this.lnki_wtr = new Xoh_lnki_wtr(this, wiki, html_mgr, cfg); this.ref_wtr = new Ref_html_wtr(wiki); } - public Xoh_html_wtr_cfg Cfg() {return cfg;} private final Xoh_html_wtr_cfg cfg = new Xoh_html_wtr_cfg(); - public Xoh_lnke_html Wkr__lnke() {return wkr__lnke;} private final Xoh_lnke_html wkr__lnke = new Xoh_lnke_html(); - public Xoh_hdr_html Wkr__hdr() {return wkr__hdr;} private final Xoh_hdr_html wkr__hdr = new Xoh_hdr_html(); - public Xoh_lnki_wtr Lnki_wtr() {return lnki_wtr;} private final Xoh_lnki_wtr lnki_wtr; - public Ref_html_wtr Ref_wtr() {return ref_wtr;} private final Ref_html_wtr ref_wtr; + public Xoh_html_wtr_cfg Cfg() {return cfg;} private final Xoh_html_wtr_cfg cfg = new Xoh_html_wtr_cfg(); + public Xoh_lnke_html Wkr__lnke() {return wkr__lnke;} private final Xoh_lnke_html wkr__lnke = new Xoh_lnke_html(); + public Xoh_hdr_html Wkr__hdr() {return wkr__hdr;} private final Xoh_hdr_html wkr__hdr = new Xoh_hdr_html(); + public Xoh_lnki_wtr Lnki_wtr() {return lnki_wtr;} private final Xoh_lnki_wtr lnki_wtr; + public Ref_html_wtr Ref_wtr() {return ref_wtr;} private final Ref_html_wtr ref_wtr; public void Init_by_wiki(Xowe_wiki wiki) { cfg.Toc__show_(Bool_.Y).Lnki__title_(true).Lnki__visited_y_().Lnki__id_(Bool_.Y); // NOTE: set during Init_by_wiki, b/c all tests assume these are false diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr_tst.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr_tst.java index 8ffe027ba..686fcdbab 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr_tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/Xoh_html_wtr_tst.java @@ -21,7 +21,7 @@ import org.junit.After; import org.junit.Test; public class Xoh_html_wtr_tst { - private final Xop_fxt fxt = new Xop_fxt(); + private final Xop_fxt fxt = new Xop_fxt(); @After public void term() {fxt.Init_para_n_(); fxt.Reset();} @Test public void Hr_basic() {fxt.Test_parse_page_wiki_str("----" , "
    ");} @Test public void Hr_extended() {fxt.Test_parse_page_wiki_str("--------" , "
    ");} diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xoh_tidy_wkr_.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xoh_tidy_wkr_.java index 4000b7f3b..f6395d276 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xoh_tidy_wkr_.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xoh_tidy_wkr_.java @@ -13,14 +13,14 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; -public class Xoh_tidy_wkr_ { - public static final byte Tid_null = 0, Tid_tidy = 1, Tid_jtidy = 2, Tid_vnu = 3; - public static final Xoh_tidy_wkr Wkr_null = new Xoh_tidy_wkr_null(); -} -class Xoh_tidy_wkr_null implements Xoh_tidy_wkr { - public byte Tid() {return Xoh_tidy_wkr_.Tid_null;} - public void Indent_(boolean v) {} - public void Init_by_app(Xoae_app app) {} - public void Exec_tidy(Bry_bfr bfr, byte[] page_url) {} -} +package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; +public class Xoh_tidy_wkr_ { + public static final byte Tid_null = 0, Tid_tidy = 1, Tid_jtidy = 2, Tid_vnu = 3; + public static final Xoh_tidy_wkr Wkr_null = new Xoh_tidy_wkr_null(); +} +class Xoh_tidy_wkr_null implements Xoh_tidy_wkr { + public byte Tid() {return Xoh_tidy_wkr_.Tid_null;} + public void Indent_(boolean v) {} + public void Init_by_app(Xoae_app app) {} + public void Exec_tidy(Bry_bfr bfr, byte[] page_url) {} +} diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr.java index c6a359954..f09fbc1e3 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; import gplx.core.envs.*; import gplx.langs.htmls.*; public class Xow_tidy_mgr implements Gfo_invk, Xow_tidy_mgr_interface { private Xoae_app app; - private final Xoh_tidy_wkr_tidy wkr__tidy = new Xoh_tidy_wkr_tidy(); // NOTE: app-level; not thread-safe; needed b/c of Options and exe/args DATE:2016-07-12 - private final Xoh_tidy_wkr_jtidy wkr__jtidy = new Xoh_tidy_wkr_jtidy(); - private final Xoh_tidy_wkr__vnu wkr__vnu = new Xoh_tidy_wkr__vnu(); + private final Xoh_tidy_wkr_tidy wkr__tidy = new Xoh_tidy_wkr_tidy(); // NOTE: app-level; not thread-safe; needed b/c of Options and exe/args DATE:2016-07-12 + private final Xoh_tidy_wkr_jtidy wkr__jtidy = new Xoh_tidy_wkr_jtidy(); + private final Xoh_tidy_wkr__vnu wkr__vnu = new Xoh_tidy_wkr__vnu(); private Xoh_tidy_wkr wkr = Xoh_tidy_wkr_.Wkr_null; // TEST: set default wkr to null private boolean enabled = true; public void Init_by_wiki(Xowe_wiki wiki) { @@ -62,7 +62,7 @@ public class Xow_tidy_mgr implements Gfo_invk, Xow_tidy_mgr_interface { bfr.Delete_rng_to_end(find); return true; } - private static final byte[] // MW:includes/parser/Tidy.php|getWrapped + private static final byte[] // MW:includes/parser/Tidy.php|getWrapped Wrap_bgn = Bry_.new_a7 ( "" + "" diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_interface_.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_interface_.java index 023116133..6efb27c1f 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_interface_.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_interface_.java @@ -13,10 +13,10 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; -public class Xow_tidy_mgr_interface_ { - public static final Xow_tidy_mgr_interface Noop = new Xow_tidy_mgr_interface__noop(); -} -class Xow_tidy_mgr_interface__noop implements Xow_tidy_mgr_interface { - public void Exec_tidy(Bry_bfr bfr, boolean indent, byte[] page_url) {} -} +package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; +public class Xow_tidy_mgr_interface_ { + public static final Xow_tidy_mgr_interface Noop = new Xow_tidy_mgr_interface__noop(); +} +class Xow_tidy_mgr_interface__noop implements Xow_tidy_mgr_interface { + public void Exec_tidy(Bry_bfr bfr, boolean indent, byte[] page_url) {} +} diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_tst.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_tst.java index 329bc6ba8..a400a2777 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/tidy/Xow_tidy_mgr_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.htmls.core.htmls.tidy; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; import org.junit.*; public class Xow_tidy_mgr_tst { - @Before public void init() {fxt.Clear();} private final Xoh_tidy_mgr_fxt fxt = new Xoh_tidy_mgr_fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_tidy_mgr_fxt fxt = new Xoh_tidy_mgr_fxt(); @Test public void Wrap() { fxt.Test__wrap("a" , "" @@ -70,7 +70,7 @@ public class Xow_tidy_mgr_tst { } } class Xoh_tidy_mgr_fxt { - private final Bry_bfr bfr = Bry_bfr_.Reset(255); + private final Bry_bfr bfr = Bry_bfr_.Reset(255); public void Clear() { bfr.Clear(); } diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_anchor_kv_bldr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_anchor_kv_bldr.java index 72841bccb..087929ab7 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_anchor_kv_bldr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_anchor_kv_bldr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.htmls.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; import gplx.langs.htmls.*; public class Xoh_anchor_kv_bldr { private byte[] base_url; private boolean has_qarg; - private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(16), apos_bfr = Bry_bfr_.New_w_size(16); + private final Bry_bfr tmp_bfr = Bry_bfr_.New_w_size(16), apos_bfr = Bry_bfr_.New_w_size(16); public Xoh_anchor_kv_bldr Init_w_qarg(byte[] base_url) {return Init(Bool_.Y, base_url);} public Xoh_anchor_kv_bldr Init(boolean has_qarg, byte[] base_url) { this.has_qarg = has_qarg; this.base_url = base_url; diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_img_path.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_img_path.java index 32eefa341..2313a049b 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_img_path.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_img_path.java @@ -13,13 +13,13 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.htmls.core.htmls.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; -public class Xoh_img_path { - public static final byte[] - Img_cancel = Bry_.new_a7("app.general/cancel.png") // 32,32 - , Img_go_bwd = Bry_.new_a7("app.general/go_bwd.png") - , Img_go_fwd = Bry_.new_a7("app.general/go_fwd.png") - , Img_search = Bry_.new_a7("app.window/32px/search_exec.png") - , Img_option = Bry_.new_a7("app.menu/tools/options.png") - ; -} +package gplx.xowa.htmls.core.htmls.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; +public class Xoh_img_path { + public static final byte[] + Img_cancel = Bry_.new_a7("app.general/cancel.png") // 32,32 + , Img_go_bwd = Bry_.new_a7("app.general/go_bwd.png") + , Img_go_fwd = Bry_.new_a7("app.general/go_fwd.png") + , Img_search = Bry_.new_a7("app.window/32px/search_exec.png") + , Img_option = Bry_.new_a7("app.menu/tools/options.png") + ; +} diff --git a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_lnki_bldr.java b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_lnki_bldr.java index 59949c350..780d27353 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_lnki_bldr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/htmls/utls/Xoh_lnki_bldr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.htmls.utls; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.htmls.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.hrefs.*; public class Xoh_lnki_bldr { - private final Xoa_app app; private final Xoh_href_wtr href_wtr; private final byte[] img_root_dir; - private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); + private final Xoa_app app; private final Xoh_href_wtr href_wtr; private final byte[] img_root_dir; + private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255); private byte[] href, title, id, caption; private byte[] img_rel_path; private int img_w, img_h; private boolean img_pos_is_left; public Xoh_lnki_bldr(Xoa_app app, Xoh_href_wtr href_wtr) { diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_dict_.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_dict_.java index 7704bb56a..b4d980e01 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_dict_.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_dict_.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.primitives.*; import gplx.core.btries.*; public class Xoh_hzip_dict_ { - public static final byte Escape = Byte_.By_int(27); // SERIALIZED: 27=escape byte - public static final byte[] Escape_bry = Bry_.New_by_ints(27); // SERIALIZED + public static final byte Escape = Byte_.By_int(27); // SERIALIZED: 27=escape byte + public static final byte[] Escape_bry = Bry_.New_by_ints(27); // SERIALIZED public static final int Tid__timeline = -10 , Tid__gallery = -11 @@ -36,7 +36,7 @@ public class Xoh_hzip_dict_ { , Tid__media = 12 , Tid__form = 13 ; - public static final String + public static final String Key__timeline = "timeline" , Key__gallery = "gallery" , Key__escape = "escape" diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int__tst.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int__tst.java index 66db30ec7..f0b2cfc4d 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int__tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import org.junit.*; import gplx.core.encoders.*; public class Xoh_hzip_int__tst { - private final Xoh_hzip_int__fxt fxt = new Xoh_hzip_int__fxt(); + private final Xoh_hzip_int__fxt fxt = new Xoh_hzip_int__fxt(); @Test public void Reqd__1() { fxt.Test__encode(1, 0, "!"); fxt.Test__encode(1, 84, "u"); @@ -35,8 +35,8 @@ public class Xoh_hzip_int__tst { } } class Xoh_hzip_int__fxt { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final gplx.core.primitives.Int_obj_ref count_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final gplx.core.primitives.Int_obj_ref count_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); public void Test__encode(int reqd, int val, String expd) { Gfo_hzip_int_.Encode(reqd, bfr, val); byte[] actl = bfr.To_bry_and_clear(); diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int_tst.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int_tst.java index 7c02a06a6..41e209641 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int_tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_int_tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import org.junit.*; public class Xoh_hzip_int_tst { - private final Xoh_hzip_int_fxt fxt = new Xoh_hzip_int_fxt(); + private final Xoh_hzip_int_fxt fxt = new Xoh_hzip_int_fxt(); @Test public void B256__reqd__1() { fxt.Init__b256(); fxt.Test__b256(1, 0 , 0); @@ -63,9 +63,9 @@ public class Xoh_hzip_int_tst { } } class Xoh_hzip_int_fxt { - private final Bry_bfr bfr = Bry_bfr_.New(); - private final gplx.core.primitives.Int_obj_ref count_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); - private final Xoh_hzip_int hzint = new Xoh_hzip_int(); + private final Bry_bfr bfr = Bry_bfr_.New(); + private final gplx.core.primitives.Int_obj_ref count_ref = gplx.core.primitives.Int_obj_ref.New_neg1(); + private final Xoh_hzip_int hzint = new Xoh_hzip_int(); public void Init__b256() {hzint.Mode_is_b256_(Bool_.Y);} public void Init__b085() {hzint.Mode_is_b256_(Bool_.N);} public void Test__b256(int reqd, int val, int... expd_ints) { diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_mgr.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_mgr.java index f1d04c76d..57d8f81a4 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_hzip_mgr.java @@ -1,32 +1,32 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.btries.*; import gplx.core.threads.poolables.*; import gplx.langs.htmls.docs.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.htmls.core.wkrs.tocs.*; public class Xoh_hzip_mgr implements Xoh_hzip_wkr { - private final Xoh_hdoc_wkr hdoc_wkr = new Xoh_hdoc_wkr__hzip(); - private final Xoh_hdoc_parser hdoc_parser; - private final Bry_rdr rdr = new Bry_rdr().Dflt_dlm_(Xoh_hzip_dict_.Escape); - private final Xoh_page_bfr bfr_mgr = new Xoh_page_bfr(); + private final Xoh_hdoc_wkr hdoc_wkr = new Xoh_hdoc_wkr__hzip(); + private final Xoh_hdoc_parser hdoc_parser; + private final Bry_rdr rdr = new Bry_rdr().Dflt_dlm_(Xoh_hzip_dict_.Escape); + private final Xoh_page_bfr bfr_mgr = new Xoh_page_bfr(); public Xoh_hzip_mgr() {this.hdoc_parser = new Xoh_hdoc_parser(hdoc_wkr);} public int Tid() {return Xoh_hzip_dict_.Tid__lnke;} public String Key() {return "root";} public byte[] Hook() {return hook;} private byte[] hook; - public Xoh_hdoc_ctx Hctx() {return hctx;} private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); + public Xoh_hdoc_ctx Hctx() {return hctx;} private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); public void Init_by_app(Xoa_app app) {hctx.Init_by_app(app);} public byte[] Encode_as_bry(Xoh_hzip_bfr bfr, Xow_wiki wiki, Xoh_page hpg, byte[] src) {Encode(bfr, wiki, hpg, src); return bfr.To_bry_and_clear();} public Gfo_poolable_itm Encode1(Xoh_hzip_bfr bfr, Xoh_hdoc_wkr hdoc_wkr, Xoh_hdoc_ctx hctx, Xoh_page hpg, boolean wkr_is_root, byte[] src, Object data_obj) {throw Err_.new_unimplemented();} diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__data.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__data.java index d4da422b1..96c5bfbb2 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__data.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.btries.*; import gplx.core.threads.poolables.*; import gplx.xowa.htmls.core.wkrs.escapes.*; @@ -20,7 +20,7 @@ import gplx.xowa.htmls.core.wkrs.hdrs.*; import gplx.xowa.htmls.core.wkrs.lnkes. import gplx.xowa.htmls.core.wkrs.imgs.*; import gplx.xowa.htmls.core.wkrs.thms.*; import gplx.xowa.htmls.core.wkrs.tocs.*; import gplx.xowa.htmls.core.wkrs.addons.timelines.*; import gplx.xowa.htmls.core.wkrs.addons.gallerys.*; import gplx.xowa.htmls.core.wkrs.addons.medias.*; public class Xoh_pool_mgr__data { - private final Gfo_poolable_mgr pool__hdr, pool__lnke, pool__img, pool__img_bare, pool__toc, pool__timeline, pool__gallery, pool__media; + private final Gfo_poolable_mgr pool__hdr, pool__lnke, pool__img, pool__img_bare, pool__toc, pool__timeline, pool__gallery, pool__media; public Xoh_pool_mgr__data() { pool__hdr = New_pool(new Xoh_hdr_data()); pool__lnke = New_pool(new Xoh_lnke_data()); diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__hzip.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__hzip.java index 1fc15909f..4b47d4819 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__hzip.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__hzip.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.btries.*; import gplx.core.threads.poolables.*; import gplx.xowa.htmls.core.wkrs.escapes.*; @@ -20,7 +20,7 @@ import gplx.xowa.htmls.core.wkrs.hdrs.*; import gplx.xowa.htmls.core.wkrs.lnkes. import gplx.xowa.htmls.core.wkrs.imgs.*; import gplx.xowa.htmls.core.wkrs.thms.*; import gplx.xowa.htmls.core.wkrs.glys.*; import gplx.xowa.htmls.core.wkrs.tocs.*; import gplx.xowa.htmls.core.wkrs.addons.timelines.*; import gplx.xowa.htmls.core.wkrs.addons.gallerys.*; import gplx.xowa.htmls.core.wkrs.addons.medias.*; public class Xoh_pool_mgr__hzip { - private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); + private final Btrie_slim_mgr trie = Btrie_slim_mgr.cs(); private Gfo_poolable_mgr mkr__escape, mkr__xnde, mkr__lnke, mkr__lnki, mkr__hdr, mkr__img, mkr__thm, mkr__gly, mkr__img_bare, mkr__gallery, mkr__timeline, mkr__toc, mkr__media; public Xoh_escape_hzip Mw__escape() {return (Xoh_escape_hzip) mkr__escape.Get_fast();} public Xoh_xnde_hzip Mw__xnde() {return (Xoh_xnde_hzip) mkr__xnde.Get_fast();} @@ -70,5 +70,5 @@ public class Xoh_pool_mgr__hzip { , Hook__html = 2 , Hook__mw = 27 ; - public static final byte[] Hooks_ary = new byte[] {Hook__core, Hook__html, Hook__mw}; + public static final byte[] Hooks_ary = new byte[] {Hook__core, Hook__html, Hook__mw}; } diff --git a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__wtr.java b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__wtr.java index 069fc9c59..4769cca10 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__wtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/hzips/Xoh_pool_mgr__wtr.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.hzips; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.core.brys.*; import gplx.core.threads.poolables.*; import gplx.xowa.htmls.core.wkrs.escapes.*; @@ -20,7 +20,7 @@ import gplx.xowa.htmls.core.wkrs.hdrs.*; import gplx.xowa.htmls.core.wkrs.lnkes. import gplx.xowa.htmls.core.wkrs.imgs.*; import gplx.xowa.htmls.core.wkrs.thms.*; import gplx.xowa.htmls.core.wkrs.tocs.*; import gplx.xowa.htmls.core.wkrs.addons.timelines.*; import gplx.xowa.htmls.core.wkrs.addons.gallerys.*; public class Xoh_pool_mgr__wtr { - private final Gfo_poolable_mgr pool__hdr, pool__lnke, pool__img, pool__img_bare, pool__toc, pool__timeline, pool__gallery; + private final Gfo_poolable_mgr pool__hdr, pool__lnke, pool__img, pool__img_bare, pool__toc, pool__timeline, pool__gallery; public Xoh_pool_mgr__wtr() { pool__hdr = New_pool(new Xoh_hdr_wtr()); pool__lnke = New_pool(new Xoh_lnke_wtr()); diff --git a/400_xowa/src/gplx/xowa/htmls/core/makes/Xoh_make_mgr.java b/400_xowa/src/gplx/xowa/htmls/core/makes/Xoh_make_mgr.java index d1cf09e82..e4c99c81b 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/makes/Xoh_make_mgr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/makes/Xoh_make_mgr.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.makes; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; public class Xoh_make_mgr { - private final Xoh_hzip_bfr bfr = Xoh_hzip_bfr.New_txt(255); - private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); - private final Xoh_hdoc_parser make_parser; + private final Xoh_hzip_bfr bfr = Xoh_hzip_bfr.New_txt(255); + private final Xoh_hdoc_ctx hctx = new Xoh_hdoc_ctx(); + private final Xoh_hdoc_parser make_parser; Xoh_make_mgr(Xoh_hdoc_wkr hdoc_wkr) { this.make_parser = new Xoh_hdoc_parser(hdoc_wkr); } diff --git a/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_make_fxt.java b/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_make_fxt.java index 2a1dbe54f..b92054062 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_make_fxt.java +++ b/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_make_fxt.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.makes.tests; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.makes.*; import gplx.core.tests.*; import gplx.xowa.files.*; import gplx.xowa.files.caches.*; import gplx.xowa.parsers.lnkis.*; import gplx.xowa.htmls.sections.*; import gplx.xowa.htmls.core.wkrs.lnkis.*; public class Xoh_make_fxt { - private final Xowe_wiki wiki; - private final Xoh_make_mgr make_mgr; - private final Gfo_test_list_base expd_redlinks = new Gfo_test_list_base(); + private final Xowe_wiki wiki; + private final Xoh_make_mgr make_mgr; + private final Gfo_test_list_base expd_redlinks = new Gfo_test_list_base(); private Xoh_page actl; public Xoh_make_fxt() { // set member reference @@ -38,8 +38,8 @@ public class Xoh_make_fxt { page_chkr.Clear(); expd_redlinks.Clear(); } - public Xoh_page_chkr Page_chkr() {return page_chkr;} private final Xoh_page_chkr page_chkr = new Xoh_page_chkr(); - public Xop_fxt Parser_fxt() {return parser_fxt;} private final Xop_fxt parser_fxt = new Xop_fxt(); + public Xoh_page_chkr Page_chkr() {return page_chkr;} private final Xoh_page_chkr page_chkr = new Xoh_page_chkr(); + public Xop_fxt Parser_fxt() {return parser_fxt;} private final Xop_fxt parser_fxt = new Xop_fxt(); public Xou_cache_finder_mem Init__usr_cache(Xof_fsdb_itm... ary) { Xou_cache_finder_mem rv = Xou_cache_finder_.New_mem(); parser_fxt.Wiki().Html__hdump_mgr().Load_mgr().Make_mgr().Hctx().Test__cache__mgr_(rv); diff --git a/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_page_chkr.java b/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_page_chkr.java index 7f18dd2ce..7f60d169b 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_page_chkr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/makes/tests/Xoh_page_chkr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.makes.tests; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.makes.*; import gplx.xowa.htmls.sections.*; import gplx.xowa.files.*; public class Xoh_page_chkr { - private final Xoh_section_mgr expd_section_mgr = new Xoh_section_mgr(); - private final Xoh_img_mgr expd_img_mgr = new Xoh_img_mgr(); - private final Bry_bfr bfr = Bry_bfr_.New(); + private final Xoh_section_mgr expd_section_mgr = new Xoh_section_mgr(); + private final Xoh_img_mgr expd_img_mgr = new Xoh_img_mgr(); + private final Bry_bfr bfr = Bry_bfr_.New(); public void Clear() { expd_img_mgr.Clear(); } diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_ctx.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_ctx.java index 5607bf1bc..ac0f6df86 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_ctx.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_ctx.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.apps.urls.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.htmls.core.wkrs.xndes.tags.*; import gplx.xowa.htmls.core.wkrs.xndes.dicts.*; @@ -35,14 +35,14 @@ public class Xoh_hdoc_ctx { public boolean Xwiki_mgr__missing(byte[] domain){return app.Xwiki_mgr__missing(domain);} public Xou_cache_finder Cache_mgr() {return cache_mgr;} private Xou_cache_finder cache_mgr = Xou_cache_finder_.Noop; public byte[] Cache__wiki_abrv(boolean repo_is_commons) {return repo_is_commons ? abrv__commons : abrv__wiki;} - public Xof_url_bldr File__url_bldr() {return file__url_bldr;} private final Xof_url_bldr file__url_bldr = Xof_url_bldr.new_v2(); + public Xof_url_bldr File__url_bldr() {return file__url_bldr;} private final Xof_url_bldr file__url_bldr = Xof_url_bldr.new_v2(); public Xoa_page Page() {return page;} private Xoa_page page; public byte[] Page__url() {return page__url;} private byte[] page__url; - public Xoh_pool_mgr__hzip Pool_mgr__hzip() {return pool_mgr__hzip;} private final Xoh_pool_mgr__hzip pool_mgr__hzip = new Xoh_pool_mgr__hzip(); - public Xoh_pool_mgr__data Pool_mgr__data() {return pool_mgr__data;} private final Xoh_pool_mgr__data pool_mgr__data = new Xoh_pool_mgr__data(); - public Xoh_pool_mgr__wtr Pool_mgr__wtr() {return pool_mgr__wtr;} private final Xoh_pool_mgr__wtr pool_mgr__wtr = new Xoh_pool_mgr__wtr(); - public Xohz_tag_regy Hzip__xnde__regy() {return hzip__xnde__regy;} private final Xohz_tag_regy hzip__xnde__regy = Xohz_tag_regy_.New_dflt(); - public Xoh_xnde_dict_reg Hzip__xnde__dict() {return hzip__xnde__dict;} private final Xoh_xnde_dict_reg hzip__xnde__dict = new Xoh_xnde_dict_reg(); + public Xoh_pool_mgr__hzip Pool_mgr__hzip() {return pool_mgr__hzip;} private final Xoh_pool_mgr__hzip pool_mgr__hzip = new Xoh_pool_mgr__hzip(); + public Xoh_pool_mgr__data Pool_mgr__data() {return pool_mgr__data;} private final Xoh_pool_mgr__data pool_mgr__data = new Xoh_pool_mgr__data(); + public Xoh_pool_mgr__wtr Pool_mgr__wtr() {return pool_mgr__wtr;} private final Xoh_pool_mgr__wtr pool_mgr__wtr = new Xoh_pool_mgr__wtr(); + public Xohz_tag_regy Hzip__xnde__regy() {return hzip__xnde__regy;} private final Xohz_tag_regy hzip__xnde__regy = Xohz_tag_regy_.New_dflt(); + public Xoh_xnde_dict_reg Hzip__xnde__dict() {return hzip__xnde__dict;} private final Xoh_xnde_dict_reg hzip__xnde__dict = new Xoh_xnde_dict_reg(); public int Uid__gly__nxt() {return ++uid__gly;} private int uid__gly; public boolean Mode_is_diff() {return mode_is_diff;} private boolean mode_is_diff; public void Mode_is_diff_(boolean v) {mode_is_diff = v;} public void Init_by_app(Xoa_app app) { @@ -91,5 +91,5 @@ public class Xoh_hdoc_ctx { public void Test__cache__mgr_(Xou_cache_finder v) {this.cache_mgr = v;} public static final int Invalid = -1; - private static final byte[] Fsys__res__drd = Bry_.new_a7("file:///android_asset/xowa/"); + private static final byte[] Fsys__res__drd = Bry_.new_a7("file:///android_asset/xowa/"); } diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_parser.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_parser.java index b6c4b78f1..209149a49 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_parser.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_parser.java @@ -1,26 +1,26 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.langs.htmls.docs.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.htmls.core.makes.*; import gplx.xowa.htmls.core.wkrs.tags.*; import gplx.xowa.htmls.core.wkrs.txts.*; import gplx.xowa.htmls.core.wkrs.escapes.*; import gplx.xowa.htmls.core.hzips.*; public class Xoh_hdoc_parser { - private final Xoh_hdoc_wkr hdoc_wkr; - private final Gfh_doc_parser hdoc_parser; - private final Xoh_tag_parser tag_parser; + private final Xoh_hdoc_wkr hdoc_wkr; + private final Gfh_doc_parser hdoc_parser; + private final Xoh_tag_parser tag_parser; public Xoh_hdoc_parser(Xoh_hdoc_wkr hdoc_wkr) { this.hdoc_wkr = hdoc_wkr; this.tag_parser = new Xoh_tag_parser(hdoc_wkr); diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_wkr__make.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_wkr__make.java index ea8426800..35e4cee50 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_wkr__make.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/Xoh_hdoc_wkr__make.java @@ -1,27 +1,27 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.langs.htmls.docs.*; import gplx.langs.htmls.encoders.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.htmls.core.wkrs.hdrs.*; import gplx.xowa.htmls.core.wkrs.imgs.*; import gplx.xowa.htmls.core.wkrs.lnkis.*; import gplx.xowa.htmls.core.wkrs.lnkis.anchs.*; import gplx.xowa.htmls.core.wkrs.tocs.*; import gplx.xowa.wikis.ttls.*; public class Xoh_hdoc_wkr__make implements Xoh_hdoc_wkr { private Bry_bfr bfr; private Xoh_page hpg; private Xoh_hdoc_ctx hctx; private byte[] src; - private final Xoh_hdr_wtr wkr__hdr = new Xoh_hdr_wtr(); - private final Xoh_img_wtr wkr__img = new Xoh_img_wtr(); - private final Xoh_page_bfr page_bfr = new Xoh_page_bfr(); + private final Xoh_hdr_wtr wkr__hdr = new Xoh_hdr_wtr(); + private final Xoh_img_wtr wkr__img = new Xoh_img_wtr(); + private final Xoh_page_bfr page_bfr = new Xoh_page_bfr(); private boolean toc_enabled; private int html_uid; public Bry_bfr Bfr() {return bfr;} @@ -133,5 +133,5 @@ public class Xoh_hdoc_wkr__make implements Xoh_hdoc_wkr { return html_uid; } } - private static final byte[] Bry__a__bgn = Bry_.new_a7("" diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_data.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_data.java index 6e33a30a2..475287e63 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_data.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.addons.medias; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*; import gplx.core.threads.poolables.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; import gplx.langs.htmls.styles.*; @@ -27,7 +27,7 @@ public class Xoh_media_data implements Xoh_data_itm, Gfh_style_wkr { public int Aud_width() {return aud_width;} private int aud_width; public int Lnki_ttl_bgn() {return lnki_ttl_bgn;} private int lnki_ttl_bgn; public int Lnki_ttl_end() {return lnki_ttl_end;} private int lnki_ttl_end; - public Xoh_img_data Img_data() {return img_data;} private final Xoh_img_data img_data = new Xoh_img_data(); + public Xoh_img_data Img_data() {return img_data;} private final Xoh_img_data img_data = new Xoh_img_data(); public void Clear() { this.src_bgn = this.src_end = this.lnki_ttl_bgn = this.lnki_ttl_end = aud_width = -1; this.rng_valid = true; @@ -116,8 +116,8 @@ public class Xoh_media_data implements Xoh_data_itm, Gfh_style_wkr { tag_rdr.Err_wkr().Warn(msg, args); return false; } - public static final byte[] Hook_bry = Bry_.new_a7(" class=\"media mw-media"); - private static final byte[] Style__max_width = Bry_.new_a7("max-width"); + public static final byte[] Hook_bry = Bry_.new_a7(" class=\"media mw-media"); + private static final byte[] Style__max_width = Bry_.new_a7("max-width"); public void Pool__rls () {pool_mgr.Rls_fast(pool_idx);} private Gfo_poolable_mgr pool_mgr; private int pool_idx; public Gfo_poolable_itm Pool__make (Gfo_poolable_mgr mgr, int idx, Object[] args) {Xoh_media_data rv = new Xoh_media_data(); rv.pool_mgr = mgr; rv.pool_idx = idx; return rv;} diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip.java index eb77310ff..01d015ac4 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip.java @@ -1,24 +1,24 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.addons.medias; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*; import gplx.core.brys.*; import gplx.core.encoders.*; import gplx.core.threads.poolables.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.htmls.core.wkrs.imgs.*; public class Xoh_media_hzip implements Xoh_hzip_wkr, Gfo_poolable_itm { - private final Xoh_img_hzip img_hzip = new Xoh_img_hzip(); - private final Xoh_media_wtr wtr = new Xoh_media_wtr(); + private final Xoh_img_hzip img_hzip = new Xoh_img_hzip(); + private final Xoh_media_wtr wtr = new Xoh_media_wtr(); public int Tid() {return Xoh_hzip_dict_.Tid__media;} public String Key() {return Xoh_hzip_dict_.Key__media;} public byte[] Hook() {return hook;} private byte[] hook; @@ -74,7 +74,7 @@ public class Xoh_media_hzip implements Xoh_hzip_wkr, Gfo_poolable_itm { public void Pool__rls () {pool_mgr.Rls_fast(pool_idx);} private Gfo_poolable_mgr pool_mgr; private int pool_idx; public Gfo_poolable_itm Pool__make (Gfo_poolable_mgr mgr, int idx, Object[] args) {Xoh_media_hzip rv = new Xoh_media_hzip(); rv.pool_mgr = mgr; rv.pool_idx = idx; rv.hook = (byte[])args[0]; return rv;} - private final Int_flag_bldr flag_bldr = new Int_flag_bldr().Pow_ary_bld_(1, 1); + private final Int_flag_bldr flag_bldr = new Int_flag_bldr().Pow_ary_bld_(1, 1); private static final int // SERIALIZED Flag__is_audio = 0 , Flag__noicon = 1 diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip_tst.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip_tst.java index 8edf7449d..61486faa4 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip_tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_hzip_tst.java @@ -17,7 +17,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt // import org.junit.*; using gplx.core.tests; // using gplx.langs.htmls; using gplx.xowa.htmls.core.makes.tests; // public class Xoh_media_hzip_tst { -// private final Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_(); +// private final Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_(); // @Test public void Video__full__ogv__width_y() { // EX: [[File:A.ogv|320px|bcd|alt=efg]]; DATE:2016-08-05 // fxt.Test__bicode // NOTE: caption not rendered; may need to reconsider; // ( "*!!aA.ogv~)$bA.ogv~efg~", String_.Concat_lines_nl_skip_last diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_wtr.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_wtr.java index ef70a19f1..7e5d3d66b 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_wtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/medias/Xoh_media_wtr.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.addons.medias; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*; import gplx.core.brys.*; import gplx.core.primitives.*; import gplx.core.brys.fmtrs.*; import gplx.core.threads.poolables.*; import gplx.core.brys.args.*; import gplx.xowa.files.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.core.wkrs.imgs.*; import gplx.xowa.htmls.core.wkrs.bfr_args.*; import gplx.xowa.htmls.sections.*; import gplx.xowa.htmls.core.hzips.*; public class Xoh_media_wtr { - private final Bfr_arg__bry lnki_ttl = Bfr_arg__bry.New_empty(); + private final Bfr_arg__bry lnki_ttl = Bfr_arg__bry.New_empty(); public void Write(Bry_bfr bfr, Xoh_page hpg, Xoh_hdoc_ctx hctx, byte[] src, Xoh_data_itm data_itm, Xoh_img_wtr img_wtr) { // make fsdb_itm hpg.Img_mgr().Make_aud(); @@ -48,8 +48,8 @@ public class Xoh_media_wtr { } } - private final Bfr_arg__bry_fmt fmt__noicon = new Bfr_arg__bry_fmt(Bry_fmt.Auto_nl_apos("\n
    ")); - private final Bry_fmt + private final Bfr_arg__bry_fmt fmt__noicon = new Bfr_arg__bry_fmt(Bry_fmt.Auto_nl_apos("\n
    ")); + private final Bry_fmt fmt__audio = Bry_fmt.Auto_nl_apos ( "
    " , "
    ~{noicon}" diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/pgbnrs/Xoh_pgbnr_data.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/pgbnrs/Xoh_pgbnr_data.java index 2bb74b49d..b284fc02f 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/pgbnrs/Xoh_pgbnr_data.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/pgbnrs/Xoh_pgbnr_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.addons.pgbnrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*; import gplx.core.threads.poolables.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; @@ -38,7 +38,7 @@ public class Xoh_pgbnr_data implements Xoh_data_itm {// NOTE: some galleries fai this.src_end = pgbnr_lhs.Src_end(); return true; } -// public static final byte[] Hook_bry = Bry_.new_a7(" class=\"pgbnr mw-pgbnr"); +// public static final byte[] Hook_bry = Bry_.new_a7(" class=\"pgbnr mw-pgbnr"); public void Pool__rls () {pool_mgr.Rls_fast(pool_idx);} private Gfo_poolable_mgr pool_mgr; private int pool_idx; public Gfo_poolable_itm Pool__make (Gfo_poolable_mgr mgr, int idx, Object[] args) {Xoh_pgbnr_data rv = new Xoh_pgbnr_data(); rv.pool_mgr = mgr; rv.pool_idx = idx; return rv;} diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_data.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_data.java index 36d281251..5a1227799 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_data.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_data.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.addons.timelines; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*; import gplx.core.threads.poolables.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; @@ -34,7 +34,7 @@ public class Xoh_timeline_data implements Xoh_data_itm { this.src_bgn = src_bgn; this.src_end = src_end; } - public static final byte[] Hook_bry = Bry_.new_a7("
    ");
    +	public static final byte[] Hook_bry = Bry_.new_a7("
    ");
     
     	public void				Pool__rls	() {pool_mgr.Rls_fast(pool_idx);} private Gfo_poolable_mgr pool_mgr; private int pool_idx;
     	public Gfo_poolable_itm	Pool__make	(Gfo_poolable_mgr mgr, int idx, Object[] args) {Xoh_timeline_data rv = new Xoh_timeline_data(); rv.pool_mgr = mgr; rv.pool_idx = idx; return rv;}
    diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_hzip_tst.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_hzip_tst.java
    index f89ff8ef2..a252180d8 100644
    --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_hzip_tst.java
    +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/addons/timelines/Xoh_timeline_hzip_tst.java
    @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
     package gplx.xowa.htmls.core.wkrs.addons.timelines; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.addons.*;
     import org.junit.*; import gplx.core.tests.*; import gplx.xowa.htmls.core.makes.tests.*;
     public class Xoh_timeline_hzip_tst {
    -	private final    Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_();
    +	private final Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_();
     	@Test  public void Basic() {				// EX: code
     		fxt.Test__decode__raw("
    abc
    ", "
    abc
    "); Gftest.Eq__bool_y(fxt.Page().Xtn__timeline_exists()); diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_arg.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_arg.java index 8d50cb071..84a80cf42 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_arg.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_arg.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.bfr_args; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.brys.*; public class Bfr_arg__hatr_arg implements Bfr_arg_clearable { - private final byte[] atr_bgn; + private final byte[] atr_bgn; private Bfr_arg_clearable val_as_arg; public Bfr_arg__hatr_arg(byte[] key) {this.atr_bgn = Bfr_arg__hatr_.Bld_atr_bgn(key);} public Bfr_arg__hatr_arg Set_by_arg(Bfr_arg_clearable v) {val_as_arg = v; return this;} @@ -34,5 +34,5 @@ class Bfr_arg__html_atr__empty implements Bfr_arg_clearable { public void Bfr_arg__clear() {} public boolean Bfr_arg__missing() {return false;} public void Bfr_arg__add(Bry_bfr bfr) {} - public static final Bfr_arg__html_atr__empty Instance = new Bfr_arg__html_atr__empty(); Bfr_arg__html_atr__empty() {} + public static final Bfr_arg__html_atr__empty Instance = new Bfr_arg__html_atr__empty(); Bfr_arg__html_atr__empty() {} } diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_fmtr.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_fmtr.java index f20b0c58a..5b18d35a9 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_fmtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_fmtr.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.bfr_args; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.brys.*; import gplx.core.brys.fmtrs.*; public class Bfr_arg__hatr_fmtr implements Bfr_arg { - private final byte[] atr_bgn; - private final Bry_fmtr fmtr = Bry_fmtr.new_(); + private final byte[] atr_bgn; + private final Bry_fmtr fmtr = Bry_fmtr.new_(); private Object[] args; public Bfr_arg__hatr_fmtr(byte[] key, String fmt, String... keys) { this.atr_bgn = Bfr_arg__hatr_.Bld_atr_bgn(key); diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_id.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_id.java index 931383f18..4d0f39ecc 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_id.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/bfr_args/Bfr_arg__hatr_id.java @@ -1,23 +1,23 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.bfr_args; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.brys.*; public class Bfr_arg__hatr_id implements Bfr_arg_clearable { - private final byte[] atr_bgn; - private final byte[] bry; private int num; + private final byte[] atr_bgn; + private final byte[] bry; private int num; public Bfr_arg__hatr_id(byte[] atr_key, byte[] bry) {this.bry = bry; this.atr_bgn = Bfr_arg__hatr_.Bld_atr_bgn(atr_key);} public Bfr_arg__hatr_id Set(int num) {this.num = num; return this;} public byte[] Get_id_val() {return Bry_.Add(bry, Int_.To_bry(num));} diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__style.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__style.java index f56e83bfc..af32063e6 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__style.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__style.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.bfr_args.*; class Bfr_arg__hatr__style implements gplx.core.brys.Bfr_arg { - private final byte[] atr_bgn; + private final byte[] atr_bgn; private int max_w, w; private byte[] xtra_cls; public Bfr_arg__hatr__style(byte[] key) { @@ -46,7 +46,7 @@ class Bfr_arg__hatr__style implements gplx.core.brys.Bfr_arg { } bfr.Add_byte_quote(); } - private static final byte[] + private static final byte[] Style__frag_1 = Bry_.new_a7("max-width:") , Style__frag_2 = Bry_.new_a7("_width:") , Style__frag_3 = Bry_.new_a7("px;") diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__xogly.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__xogly.java index e230390ec..1906e19c1 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__xogly.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Bfr_arg__hatr__xogly.java @@ -1,22 +1,22 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.xowa.htmls.core.wkrs.bfr_args.*; class Bfr_arg__hatr__xogly implements gplx.core.brys.Bfr_arg_clearable { - private final byte[] atr_bgn; + private final byte[] atr_bgn; private int xnde_w, xnde_h, xnde_per_row; public Bfr_arg__hatr__xogly() { this.atr_bgn = Bfr_arg__hatr_.Bld_atr_bgn(gplx.xowa.xtns.gallery.Gallery_mgr_wtr.Bry__data_xogly); diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_data.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_data.java index 85d65e051..d88670880 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_data.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_data.java @@ -1,25 +1,25 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.brys.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; import gplx.langs.htmls.styles.*; import gplx.langs.htmls.clses.*; import gplx.xowa.htmls.core.hzips.*; import gplx.xowa.xtns.gallery.*; public class Xoh_gly_grp_data implements Gfh_class_parser_wkr, Gfh_style_wkr { // FUTURE:add gallerycaption - private final List_adp itms_list = List_adp_.New(); + private final List_adp itms_list = List_adp_.New(); public int Src_bgn() {return src_bgn;} private int src_bgn; public int Src_end() {return src_end;} private int src_end; public int Gly_tid() {return gly_tid;} private int gly_tid; @@ -162,12 +162,12 @@ public class Xoh_gly_grp_data implements Gfh_class_parser_wkr, Gfh_style_wkr { / } return true; } - public static final byte[] Atr__cls__gallery = Bry_.new_a7("gallery"); - private static final byte[] Atr__cls__mw_gallery = Bry_.new_a7("mw-gallery-"), Atr__cls__gallerybox = Bry_.new_a7("gallerybox") + public static final byte[] Atr__cls__gallery = Bry_.new_a7("gallery"); + private static final byte[] Atr__cls__mw_gallery = Bry_.new_a7("mw-gallery-"), Atr__cls__gallerybox = Bry_.new_a7("gallerybox") , Style__max_width = Bry_.new_a7("max-width"), Style___width = Bry_.new_a7("_width") ; - public static final byte[] Atr__cls__gallerycaption = Bry_.new_a7("gallerycaption"); - private static final Hash_adp_bry atrs_ignored = Make_atrs_ignored(); + public static final byte[] Atr__cls__gallerycaption = Bry_.new_a7("gallerycaption"); + private static final Hash_adp_bry atrs_ignored = Make_atrs_ignored(); private static Hash_adp_bry Make_atrs_ignored() { Hash_adp_bry rv = Hash_adp_bry.ci_a7(); rv.Add_as_key_and_val(Gfh_atr_.Bry__class); diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_wtr.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_wtr.java index bdfd1ebe5..1b0494981 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_wtr.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_grp_wtr.java @@ -1,29 +1,29 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.brys.*; import gplx.core.brys.fmtrs.*; import gplx.langs.htmls.*; import gplx.xowa.htmls.core.wkrs.bfr_args.*; class Xoh_gly_grp_wtr implements Bfr_arg { - private final Bfr_arg_clearable[] arg_ary; - private final Bfr_arg__hatr_id ul_id = Bfr_arg__hatr_id.New_id("xogly_ul_"); - private final Bfr_arg__hatr__style ul_style = new Bfr_arg__hatr__style(Gfh_atr_.Bry__style); - private final Bfr_arg__hatr__xogly ul_xogly = new Bfr_arg__hatr__xogly(); - private final Bfr_arg__elem__capt li_capt = new Bfr_arg__elem__capt(); + private final Bfr_arg_clearable[] arg_ary; + private final Bfr_arg__hatr_id ul_id = Bfr_arg__hatr_id.New_id("xogly_ul_"); + private final Bfr_arg__hatr__style ul_style = new Bfr_arg__hatr__style(Gfh_atr_.Bry__style); + private final Bfr_arg__hatr__xogly ul_xogly = new Bfr_arg__hatr__xogly(); + private final Bfr_arg__elem__capt li_capt = new Bfr_arg__elem__capt(); private byte[] ul_cls, xtra_cls, xtra_atr_bry, ul_nl; - private final Xoh_gly_itm_list_wtr itm_list_wtr = new Xoh_gly_itm_list_wtr(); + private final Xoh_gly_itm_list_wtr itm_list_wtr = new Xoh_gly_itm_list_wtr(); public Xoh_gly_grp_wtr() { arg_ary = new Bfr_arg_clearable[] {ul_id, ul_xogly, li_capt}; } @@ -53,7 +53,7 @@ class Xoh_gly_grp_wtr implements Bfr_arg { public void Bfr_arg__add(Bry_bfr bfr) { fmtr.Bld_bfr_many(bfr, ul_id, ul_xogly, ul_cls, xtra_cls, ul_style, xtra_atr_bry, li_capt, itm_list_wtr, ul_nl); } - private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last + private static final Bry_fmtr fmtr = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last ( "~{capt}~{itms}~{ul_nl}" ), "id", "xogly", "cls", "xtra_cls", "style", "xtra_atr", "capt", "itms", "ul_nl"); } diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_html__dump__tst.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_html__dump__tst.java index 4b5f313b2..6ef8458fd 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_html__dump__tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_html__dump__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import org.junit.*; import gplx.xowa.htmls.core.makes.tests.*; public class Xoh_gly_html__dump__tst { - @Before public void init() {fxt.Clear();} private final Xoh_make_fxt fxt = new Xoh_make_fxt(); + @Before public void init() {fxt.Clear();} private final Xoh_make_fxt fxt = new Xoh_make_fxt(); @Test public void Basic() { fxt.Test__html(String_.Concat_lines_nl_skip_last ( "" diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip.java index 90cc4db78..da9fb39f2 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip.java @@ -1,18 +1,18 @@ -/* -XOWA: the XOWA Offline Wiki Application -Copyright (C) 2012-2017 gnosygnu@gmail.com - -XOWA is licensed under the terms of the General Public License (GPL) Version 3, -or alternatively under the terms of the Apache License Version 2.0. - -You may use XOWA according to either of these licenses as is most appropriate -for your project on a case-by-case basis. - -The terms of each license can be found in the source code repository: - -GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt -Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt -*/ +/* +XOWA: the XOWA Offline Wiki Application +Copyright (C) 2012-2017 gnosygnu@gmail.com + +XOWA is licensed under the terms of the General Public License (GPL) Version 3, +or alternatively under the terms of the Apache License Version 2.0. + +You may use XOWA according to either of these licenses as is most appropriate +for your project on a case-by-case basis. + +The terms of each license can be found in the source code repository: + +GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt +Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt +*/ package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.threads.poolables.*; import gplx.core.encoders.*; import gplx.langs.htmls.*; import gplx.langs.htmls.docs.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.htmls.core.hzips.*; @@ -21,7 +21,7 @@ import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.xtns.gallery.*; public class Xoh_gly_hzip implements Xoh_hzip_wkr, Gfo_poolable_itm { - private final Xoh_gly_grp_wtr grp_wtr = new Xoh_gly_grp_wtr(); + private final Xoh_gly_grp_wtr grp_wtr = new Xoh_gly_grp_wtr(); public int Tid() {return Xoh_hzip_dict_.Tid__gly;} public String Key() {return Xoh_hzip_dict_.Key__gly;} public byte[] Hook() {return hook;} private byte[] hook; @@ -119,7 +119,7 @@ public class Xoh_gly_hzip implements Xoh_hzip_wkr, Gfo_poolable_itm { } public void Pool__rls () {pool_mgr.Rls_fast(pool_idx);} private Gfo_poolable_mgr pool_mgr; private int pool_idx; public Gfo_poolable_itm Pool__make (Gfo_poolable_mgr mgr, int idx, Object[] args) {Xoh_gly_hzip rv = new Xoh_gly_hzip(); rv.pool_mgr = mgr; rv.pool_idx = idx; rv.hook = (byte[])args[0]; return rv;} - private final Int_flag_bldr flag_bldr = new Int_flag_bldr().Pow_ary_bld_(1, 1, 1, 1, 1, 1, 1, 1, 3); + private final Int_flag_bldr flag_bldr = new Int_flag_bldr().Pow_ary_bld_(1, 1, 1, 1, 1, 1, 1, 1, 3); private static final int // SERIALIZED Flag__xnde__w = 0 , Flag__xnde__h = 1 diff --git a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip__basic__tst.java b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip__basic__tst.java index d606429b6..f34ca4ad9 100644 --- a/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip__basic__tst.java +++ b/400_xowa/src/gplx/xowa/htmls/core/wkrs/glys/Xoh_gly_hzip__basic__tst.java @@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt package gplx.xowa.htmls.core.wkrs.glys; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.*; import gplx.xowa.htmls.core.wkrs.*; import org.junit.*; import gplx.xowa.htmls.core.hzips.*; public class Xoh_gly_hzip__basic__tst { - private final Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_(); + private final Xoh_hzip_fxt fxt = new Xoh_hzip_fxt().Init_mode_diff_y_(); @Test public void Basic() { fxt.Test__bicode("~'!{,L#{\"g{\"b0!A1~!1A.png~9\"D\"D{\"g{\"b0!B1~!1B.png~9\"D\"Dabc", String_.Concat_lines_nl_skip_last ( "