mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Refactor: Remove whitespace after final
and remove @gplx.Virtual
This commit is contained in:
parent
b0082fd231
commit
231e10bc19
@ -1,30 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Bool_ {//RF:2017-10-08
|
public class Bool_ {//RF:2017-10-08
|
||||||
public static final String Cls_val_name = "bool";
|
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 boolean N = false , Y = true;
|
||||||
public static final byte N_byte = 0 , Y_byte = 1 , __byte = 127;
|
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 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 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 boolean By_int(int v) {return v == Y_int;}
|
||||||
public static int To_int(boolean v) {return v ? Y_int : N_int;}
|
public static int To_int(boolean v) {return v ? Y_int : N_int;}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.encoders.*;
|
import gplx.core.primitives.*; import gplx.core.brys.*; import gplx.core.encoders.*;
|
||||||
import gplx.langs.htmls.entitys.*;
|
import gplx.langs.htmls.entitys.*;
|
||||||
@ -558,7 +558,7 @@ public class Bry_bfr {
|
|||||||
this.Del_by(count);
|
this.Del_by(count);
|
||||||
return this;
|
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() {
|
private static boolean[] Trim_end_ws_new() {
|
||||||
boolean[] rv = new boolean[256];
|
boolean[] rv = new boolean[256];
|
||||||
rv[32] = true;
|
rv[32] = true;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.brys.*;
|
import gplx.core.brys.*;
|
||||||
public class Bry_bfr_ {
|
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 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 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;
|
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 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) {
|
public static void Assert_at_end(Bry_bfr bfr, byte assert_byte) {
|
||||||
|
@ -235,7 +235,7 @@ public class Bry_bfr_tst {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class ByteAryBfr_fxt {
|
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 Bry_bfr Bfr() {return bfr;}
|
||||||
public void Clear() {
|
public void Clear() {
|
||||||
bfr.ClearAndReset();
|
bfr.ClearAndReset();
|
||||||
|
@ -15,7 +15,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
|||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Bry_find_ {
|
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) {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) {return Find_fwd(src, lkp, cur, src.length);}
|
||||||
public static int Find_fwd(byte[] src, byte lkp, int cur, int end) {
|
public static int Find_fwd(byte[] src, byte lkp, int cur, int end) {
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.brys.*; import gplx.core.brys.fmts.*;
|
import gplx.core.brys.*; import gplx.core.brys.fmts.*;
|
||||||
public class Bry_fmt {
|
public class Bry_fmt {
|
||||||
private final Object thread_lock = new Object();
|
private final Object thread_lock = new Object();
|
||||||
private byte[] src;
|
private byte[] src;
|
||||||
private Bry_fmt_itm[] itms; private int itms_len;
|
private Bry_fmt_itm[] itms; private int itms_len;
|
||||||
private Bfr_fmt_arg[] args = Bfr_fmt_arg.Ary_empty;
|
private Bfr_fmt_arg[] args = Bfr_fmt_arg.Ary_empty;
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.brys.*;
|
import gplx.core.brys.*;
|
||||||
public class Bry_split_ {
|
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) {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, 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) {
|
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;
|
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 {
|
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) {
|
public int Split(byte[] src, int itm_bgn, int itm_end) {
|
||||||
synchronized (list) {
|
synchronized (list) {
|
||||||
byte[] bry = itm_end == itm_bgn ? Bry_.Empty : Bry_.Mid(src, itm_bgn, itm_end);
|
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);
|
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() {}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
|||||||
package gplx;
|
package gplx;
|
||||||
import org.junit.*; import gplx.core.tests.*;
|
import org.junit.*; import gplx.core.tests.*;
|
||||||
public class Bry_split__tst {
|
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() {
|
@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"); // no trim
|
||||||
fxt.Test_split("a|" , Byte_ascii.Pipe, Bool_.N, "a");
|
fxt.Test_split("a|" , Byte_ascii.Pipe, Bool_.N, "a");
|
||||||
@ -56,7 +56,7 @@ public class Bry_split__tst {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class Bry_split__fxt {
|
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) {
|
public void Test_split(String raw_str, byte dlm, boolean trim, String... expd) {
|
||||||
byte[] src = Bry_.new_a7(raw_str);
|
byte[] src = Bry_.new_a7(raw_str);
|
||||||
Bry_split_.Split(src, 0, src.length, dlm, trim, wkr);
|
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 {
|
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) {
|
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);
|
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;
|
if (Bry_.Eq(bry, Bry_.new_a7("extend"))) return Bry_split_.Rv__extend;
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Byte_ {//RF:2017-10-08
|
public class Byte_ {//RF:2017-10-08
|
||||||
public static final String Cls_val_name = "byte";
|
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
|
public static final byte
|
||||||
Zero = 0
|
Zero = 0
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Byte_ascii {
|
public class Byte_ascii {
|
||||||
public static final byte
|
public static final byte
|
||||||
@ -95,8 +95,8 @@ public class Byte_ascii {
|
|||||||
? (byte)(b + 32)
|
? (byte)(b + 32)
|
||||||
: b;
|
: b;
|
||||||
}
|
}
|
||||||
public static final byte[] Space_len2 = new byte[] {Space, Space}, Space_len4 = new byte[] {Space, Space, Space, Space};
|
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[]
|
||||||
Tab_bry = new byte[] {Byte_ascii.Tab}
|
Tab_bry = new byte[] {Byte_ascii.Tab}
|
||||||
, Nl_bry = new byte[] {Byte_ascii.Nl}
|
, Nl_bry = new byte[] {Byte_ascii.Nl}
|
||||||
, Space_bry = new byte[] {Byte_ascii.Space}
|
, Space_bry = new byte[] {Byte_ascii.Space}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Char_ {
|
public class Char_ {
|
||||||
public static final String Cls_val_name = "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 final char Null = '\0', NewLine = '\n';
|
||||||
public static boolean IsCaseLower(char c) {return Character.isLowerCase(c);}
|
public static boolean IsCaseLower(char c) {return Character.isLowerCase(c);}
|
||||||
public static boolean IsLetterOrDigit(char c) {return Character.isLetterOrDigit(c);}
|
public static boolean IsLetterOrDigit(char c) {return Character.isLetterOrDigit(c);}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
@ -29,7 +29,7 @@ public class DateAdp implements CompareAble, Gfo_invk {
|
|||||||
return this.Add_day(days);
|
return this.Add_day(days);
|
||||||
}
|
}
|
||||||
else return Gfo_invk_.Rv_unhandled;
|
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) {
|
public int Segment(int segmentIdx) {
|
||||||
switch (segmentIdx) {
|
switch (segmentIdx) {
|
||||||
case DateAdp_.SegIdx_year: return this.Year();
|
case DateAdp_.SegIdx_year: return this.Year();
|
||||||
|
@ -25,13 +25,13 @@ import java.util.Locale;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
public class DateAdp_ implements Gfo_invk {
|
public class DateAdp_ implements Gfo_invk {
|
||||||
public static final String Cls_ref_name = "Date";
|
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) {
|
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||||
if (ctx.Match(k, Invk_Now)) return Datetime_now.Get();
|
if (ctx.Match(k, Invk_Now)) return Datetime_now.Get();
|
||||||
else return Gfo_invk_.Rv_unhandled;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
} public static final String Invk_Now = "Now";
|
} 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 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 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 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 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) {
|
public static DateAdp seg_(int[] ary) {
|
||||||
@ -64,7 +64,7 @@ public class DateAdp_ implements Gfo_invk {
|
|||||||
} static DateAdp_parser date_parser = DateAdp_parser.new_();
|
} static DateAdp_parser date_parser = DateAdp_parser.new_();
|
||||||
public static DateAdp dateTime_(GregorianCalendar v) {return new DateAdp(v);}
|
public static DateAdp dateTime_(GregorianCalendar v) {return new DateAdp(v);}
|
||||||
public static DateAdp dateTime_obj_(Object v) {return new DateAdp((GregorianCalendar)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(DateAdp date) {return DaysInMonth(date.Month(), date.Year());}
|
||||||
public static int DaysInMonth(int month, int year) {
|
public static int DaysInMonth(int month, int year) {
|
||||||
|
@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
|||||||
package gplx;
|
package gplx;
|
||||||
import org.junit.*; import gplx.core.tests.*;
|
import org.junit.*; import gplx.core.tests.*;
|
||||||
public class DateAdp__tst {
|
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() {
|
@Test public void Parse_gplx() {
|
||||||
fxt.Test__parse_gplx("99991231_235959.999" , "99991231_235959.999");
|
fxt.Test__parse_gplx("99991231_235959.999" , "99991231_235959.999");
|
||||||
fxt.Test__parse_gplx("20090430_213200.123" , "20090430_213200.123");
|
fxt.Test__parse_gplx("20090430_213200.123" , "20090430_213200.123");
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
public class Datetime_now {
|
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 DateAdp manual;
|
||||||
private static boolean autoincrement = true;
|
private static boolean autoincrement = true;
|
||||||
public static void Manual_y_() {
|
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
|
public static DateAdp Get_force() { // ignore manual and force get of real time
|
||||||
return new DateAdp(new GregorianCalendar());
|
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;
|
// private static DateAdp manual_time;
|
||||||
// static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled;
|
// 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;}
|
// static void Now_enabled_y_() {now_enabled = Bool_.Y; manual_time = manual_time_dflt;}
|
||||||
|
@ -25,13 +25,13 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class Decimal_adp_ {
|
public class Decimal_adp_ {
|
||||||
public static final String Cls_val_name = "decimal";
|
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 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 Zero = new Decimal_adp(0);
|
||||||
public static final Decimal_adp One = new Decimal_adp(1);
|
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 Neg1 = new Decimal_adp(-1);
|
||||||
public static final Decimal_adp Const_e = Decimal_adp_.double_(Math_.E);
|
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 Const_pi = Decimal_adp_.double_(Math_.Pi);
|
||||||
public static Decimal_adp base1000_(long v) {return divide_(v, 1000);}
|
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_1000_(long num, int frc) {return divide_((num * (1000)) + frc, 1000);}
|
||||||
public static Decimal_adp parts_(long num, int frc) {
|
public static Decimal_adp parts_(long num, int frc) {
|
||||||
|
@ -17,13 +17,13 @@ package gplx;
|
|||||||
|
|
||||||
public class Double_ {
|
public class Double_ {
|
||||||
public static final String Cls_val_name = "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
|
public static final double
|
||||||
MinValue = Double.MIN_VALUE
|
MinValue = Double.MIN_VALUE
|
||||||
, NaN = Double.NaN
|
, NaN = Double.NaN
|
||||||
, Inf_pos = Double.POSITIVE_INFINITY
|
, Inf_pos = Double.POSITIVE_INFINITY
|
||||||
;
|
;
|
||||||
public static final byte[]
|
public static final byte[]
|
||||||
NaN_bry = Bry_.new_a7("NaN")
|
NaN_bry = Bry_.new_a7("NaN")
|
||||||
, Inf_pos_bry = Bry_.new_a7("INF")
|
, Inf_pos_bry = Bry_.new_a7("INF")
|
||||||
;
|
;
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.errs.*;
|
import gplx.core.errs.*;
|
||||||
public class Err extends RuntimeException {
|
public class Err extends RuntimeException {
|
||||||
private final boolean is_gplx;
|
private final boolean is_gplx;
|
||||||
private final String trace;
|
private final String trace;
|
||||||
private Err_msg[] msgs_ary = new Err_msg[8]; private int msgs_len = 8, msgs_idx = 0;
|
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) {
|
public Err(boolean is_gplx, String trace, String type, String msg, Object... args) {
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Err_ {
|
public class Err_ {
|
||||||
private static String Type__gplx = "gplx", Trace_null = null;
|
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_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 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";
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*; import gplx.core.strings.*; import gplx.core.brys.*; import gplx.core.interfaces.*;
|
import gplx.core.primitives.*; import gplx.core.strings.*; import gplx.core.brys.*; import gplx.core.interfaces.*;
|
||||||
public class GfoMsg_ {
|
public class GfoMsg_ {
|
||||||
public static GfoMsg as_(Object obj) {return obj instanceof GfoMsg ? (GfoMsg)obj : null;}
|
public static GfoMsg as_(Object obj) {return obj instanceof GfoMsg ? (GfoMsg)obj : null;}
|
||||||
public static final GfoMsg Null = new GfoMsg_base().ctor_("<<NULL MSG>>", false);
|
public static final GfoMsg Null = new GfoMsg_base().ctor_("<<NULL MSG>>", false);
|
||||||
public static GfoMsg new_parse_(String key) {return new GfoMsg_base().ctor_(key, true);}
|
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 new_cast_(String key) {return new GfoMsg_base().ctor_(key, false);}
|
||||||
public static GfoMsg srl_(GfoMsg owner, String key) {
|
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 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 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();}
|
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 (args == null) return Nil; // WORKAROUND.gfui: args null for DataBndr_whenEvt_execCmd
|
||||||
if (!String_.Eq(k, "")) {
|
if (!String_.Eq(k, "")) {
|
||||||
for (int i = 0; i < args.Count(); i++) {
|
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;
|
public GfoMsg_base ctor_(String key, boolean parse) {this.key = key; this.parse = parse; return this;} private boolean parse;
|
||||||
@gplx.Internal protected GfoMsg_base(){}
|
@gplx.Internal protected GfoMsg_base(){}
|
||||||
static final String_obj_val Nil = String_obj_val.new_("<<NOT FOUND>>");
|
static final String_obj_val Nil = String_obj_val.new_("<<NOT FOUND>>");
|
||||||
}
|
}
|
||||||
interface XtoStrWkr {
|
interface XtoStrWkr {
|
||||||
String To_str(Object o);
|
String To_str(Object o);
|
||||||
|
@ -44,6 +44,6 @@ public class GfoMsg_tst {
|
|||||||
if (ctx.Deny()) return this;
|
if (ctx.Deny()) return this;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
} public static final String Invk_Cmd0 = "Cmd0";
|
} public static final String Invk_Cmd0 = "Cmd0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class GfoTemplateFactory implements Gfo_invk {
|
public class GfoTemplateFactory implements Gfo_invk {
|
||||||
public void Reg(String key, GfoTemplate template) {hash.Add(key, template);}
|
public void Reg(String key, GfoTemplate template) {hash.Add(key, template);}
|
||||||
public Object Make(String key) {
|
public Object Make(String key) {
|
||||||
GfoTemplate template = (GfoTemplate)hash.Get_by(key);
|
GfoTemplate template = (GfoTemplate)hash.Get_by(key);
|
||||||
return template.NewCopy(template);
|
return template.NewCopy(template);
|
||||||
}
|
}
|
||||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||||
ctx.Match(k, k);
|
ctx.Match(k, k);
|
||||||
Object o = hash.Get_by(k);
|
Object o = hash.Get_by(k);
|
||||||
return o == null ? Gfo_invk_.Rv_unhandled : o;
|
return o == null ? Gfo_invk_.Rv_unhandled : o;
|
||||||
}
|
}
|
||||||
public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {}
|
public static final GfoTemplateFactory Instance = new GfoTemplateFactory(); GfoTemplateFactory() {}
|
||||||
Hash_adp hash = Hash_adp_.New();
|
Hash_adp hash = Hash_adp_.New();
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
|||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.lists.*;
|
import gplx.core.lists.*;
|
||||||
public class Gfo_evt_mgr {
|
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;}
|
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) {
|
@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);
|
GfoEvLnk lnk = new GfoEvLnk(pub, pubEvt, sub, subPrc);
|
||||||
|
@ -17,8 +17,8 @@ package gplx;
|
|||||||
import gplx.core.primitives.*;
|
import gplx.core.primitives.*;
|
||||||
public class Gfo_invk_ {
|
public class Gfo_invk_ {
|
||||||
public static final String Mutator_suffix = "_";
|
public static final String Mutator_suffix = "_";
|
||||||
public static final Gfo_invk Noop = new Gfo_invk__noop();
|
public static final Gfo_invk Noop = new Gfo_invk__noop();
|
||||||
public static final String_obj_val
|
public static final String_obj_val
|
||||||
Rv_unhandled = String_obj_val.new_("Unhandled")
|
Rv_unhandled = String_obj_val.new_("Unhandled")
|
||||||
, Rv_handled = String_obj_val.new_("Handled")
|
, Rv_handled = String_obj_val.new_("Handled")
|
||||||
, Rv_host = String_obj_val.new_("Host")
|
, Rv_host = String_obj_val.new_("Host")
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Gfo_invk_cmd {
|
public class Gfo_invk_cmd {
|
||||||
private final Gfo_invk itm; private final String cmd; private final GfoMsg msg;
|
private final Gfo_invk itm; private final String cmd; private final GfoMsg msg;
|
||||||
public Gfo_invk_cmd(Gfo_invk itm, String cmd, GfoMsg msg) {
|
public Gfo_invk_cmd(Gfo_invk itm, String cmd, GfoMsg msg) {
|
||||||
this.itm = itm; this.cmd = cmd; this.msg = msg;
|
this.itm = itm; this.cmd = cmd; this.msg = msg;
|
||||||
}
|
}
|
||||||
public Object Exec() {return itm.Invk(GfsCtx.Instance, 0, cmd, 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 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 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_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) {
|
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));
|
return new Gfo_invk_cmd(itm, cmd, (val == null) ? GfoMsg_.Null : GfoMsg_.new_parse_(cmd).Add("v", val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*;
|
import gplx.core.primitives.*;
|
||||||
public class Gfo_invk_cmd_mgr {
|
public class Gfo_invk_cmd_mgr {
|
||||||
@ -49,7 +49,7 @@ public class Gfo_invk_cmd_mgr {
|
|||||||
}
|
}
|
||||||
return Unhandled;
|
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();
|
List_adp list = List_adp_.New();
|
||||||
public static Gfo_invk_cmd_mgr new_() {return new Gfo_invk_cmd_mgr();} Gfo_invk_cmd_mgr() {}
|
public static Gfo_invk_cmd_mgr new_() {return new Gfo_invk_cmd_mgr();} Gfo_invk_cmd_mgr() {}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Gfo_usr_dlg_ {
|
public class Gfo_usr_dlg_ {
|
||||||
private static Gfo_usr_dlg_base test__list, test__show;
|
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 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() {
|
public static Gfo_usr_dlg__gui Test__list__init() {
|
||||||
if (test__list == null)
|
if (test__list == null)
|
||||||
test__list = new Gfo_usr_dlg_base(Gfo_usr_dlg__log_.Noop, Gfo_usr_dlg__gui_.Test);
|
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 Log_direct(String msg) {return "";}
|
||||||
public String Plog_many(String grp_key, String msg_key, String fmt, Object... args) {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 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() {}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.consoles.*; import gplx.core.lists.rings.*;
|
import gplx.core.consoles.*; import gplx.core.lists.rings.*;
|
||||||
public class Gfo_usr_dlg__gui_ {
|
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 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 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 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 Mem = new Gfo_usr_dlg__gui_mem_string();
|
||||||
public static String Mem_file() {return ((Gfo_usr_dlg__gui_mem_string)Mem).file;}
|
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 {
|
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) {}
|
public void Write_stop(String text) {}
|
||||||
}
|
}
|
||||||
class Gfo_usr_dlg__gui_console implements Gfo_usr_dlg__gui {
|
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 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_prog(String text) {console.Write_tmp(text);}
|
||||||
public void Write_note(String text) {console.Write_str_w_nl(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);}
|
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 {
|
class Gfo_usr_dlg__gui_mem_string implements Gfo_usr_dlg__gui {
|
||||||
public String file = "";
|
public String file = "";
|
||||||
public void Clear() {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_prog(String text) {file += text + "\n";}
|
||||||
public void Write_note(String text) {file += text + "\n";}
|
public void Write_note(String text) {file += text + "\n";}
|
||||||
public void Write_warn(String text) {file += text + "\n";}
|
public void Write_warn(String text) {file += text + "\n";}
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.lists.rings.*;
|
import gplx.core.lists.rings.*;
|
||||||
public class Gfo_usr_dlg__gui_mock implements Gfo_usr_dlg__gui {
|
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 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 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 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 Clear() {msgs.Clear(); warns.Clear();}
|
||||||
public void Write_prog(String text) {msgs.Add(text);}
|
public void Write_prog(String text) {msgs.Add(text);}
|
||||||
public void Write_note(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_warn(String text) {warns.Add(text);}
|
||||||
public void Write_stop(String text) {msgs.Add(text);}
|
public void Write_stop(String text) {msgs.Add(text);}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.brys.fmtrs.*;
|
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 {
|
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 int archive_dirs_max = 8;
|
||||||
private Io_url log_dir, err_fil;
|
private Io_url log_dir, err_fil;
|
||||||
private final Ordered_hash queued_list = Ordered_hash_.New();
|
private final Ordered_hash queued_list = Ordered_hash_.New();
|
||||||
private final Bry_fmtr fmtr = Bry_fmtr.New__tmp();
|
private final Bry_fmtr fmtr = Bry_fmtr.New__tmp();
|
||||||
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
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 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 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;
|
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;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
return this;
|
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 {
|
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) {
|
public Usr_log_fil(Io_url url) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.brys.fmtrs.*;
|
import gplx.core.brys.fmtrs.*;
|
||||||
public class Gfo_usr_dlg_base implements Gfo_usr_dlg {
|
public class Gfo_usr_dlg_base implements Gfo_usr_dlg {
|
||||||
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
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_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_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__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;
|
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;
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Guid_adp_ {
|
public class Guid_adp_ {
|
||||||
public static final String Cls_ref_name = "Guid";
|
public static final String Cls_ref_name = "Guid";
|
||||||
public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000");
|
public static final Guid_adp Empty = Parse("00000000-0000-0000-0000-000000000000");
|
||||||
public static String New_str() {return New().To_str();}
|
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 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 Guid_adp Parse(String s) {return new Guid_adp(java.util.UUID.fromString(s));}
|
||||||
}
|
}
|
@ -1,26 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*;
|
import gplx.core.primitives.*;
|
||||||
public class Hash_adp_ {
|
public class Hash_adp_ {
|
||||||
public static Hash_adp New() {return new Hash_adp_obj();}
|
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_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 int Count() {return 0;}
|
||||||
public boolean Has(Object key) {return false;}
|
public boolean Has(Object key) {return false;}
|
||||||
public Object Get_by(Object key) {return null;}
|
public Object Get_by(Object key) {return null;}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*;
|
import gplx.core.primitives.*;
|
||||||
import gplx.core.intls.*;
|
import gplx.core.intls.*;
|
||||||
public class Hash_adp_bry extends gplx.core.lists.Hash_adp_base implements Hash_adp {
|
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) {
|
Hash_adp_bry(Hash_adp_bry_itm_base proto) {
|
||||||
this.proto = proto;
|
this.proto = proto;
|
||||||
this.key_ref = proto.New();
|
this.key_ref = proto.New();
|
||||||
@ -106,7 +106,7 @@ class Hash_adp_bry_itm_cs extends Hash_adp_bry_itm_base {
|
|||||||
}
|
}
|
||||||
return true;
|
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 {
|
class Hash_adp_bry_itm_ci_a7 extends Hash_adp_bry_itm_base {
|
||||||
private byte[] src; int src_bgn, src_end;
|
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;
|
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 {
|
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;}
|
Hash_adp_bry_itm_ci_u8(Gfo_case_mgr case_mgr) {this.case_mgr = case_mgr;}
|
||||||
private byte[] src; int src_bgn, src_end;
|
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);}
|
@Override public Hash_adp_bry_itm_base New() {return new Hash_adp_bry_itm_ci_u8(case_mgr);}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.langs.gfs.*;
|
import gplx.core.strings.*; import gplx.langs.gfs.*;
|
||||||
public class Int_ {
|
public class Int_ {
|
||||||
// -------- BASELIB_COPY --------
|
// -------- BASELIB_COPY --------
|
||||||
public static final String Cls_val_name = "int";
|
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
|
public static final int
|
||||||
Min_value = Integer.MIN_VALUE
|
Min_value = Integer.MIN_VALUE
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.primitives.*;
|
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.*;
|
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 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 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 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 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);}
|
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);
|
byte[] bry = LoadFilBry_reuse(url, Bry_.Empty, len);
|
||||||
bfr.Bfr_init(bry, len.Val());
|
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) {
|
public byte[] LoadFilBry_reuse(Io_url url, byte[] ary, Int_obj_ref ary_len) {
|
||||||
if (loader != null) {
|
if (loader != null) {
|
||||||
byte[] rv = loader.Load_fil_as_bry(url);
|
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 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 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 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 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_mb_long = Len_mb;
|
||||||
public static final long Len_null = -1;
|
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;
|
public static final int Read_only__basic__file = 1, Read_only__basic__file_and_dirs = 2, Read_only__perms__file = 3;
|
||||||
}
|
}
|
||||||
class Io_mgr_ {
|
class Io_mgr_ {
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.ios.*; /*IoUrlInfo*/ import gplx.core.envs.*; import gplx.langs.htmls.*; import gplx.core.interfaces.*;
|
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 class Io_url implements CompareAble, ParseAble, Gfo_invk { //_20101005 URL:doc/Io_url.txt
|
||||||
public IoUrlInfo Info() {return info;} IoUrlInfo info;
|
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 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 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 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 Url_encoder_interface Http_file_str_encoder = Url_encoder_interface_same.Instance;
|
||||||
public static final String Http_file_str = "file:///";
|
public static final String Http_file_str = "file:///";
|
||||||
public static final int Http_file_len = String_.Len(Http_file_str);
|
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 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 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 OwnerDir() {return Io_url_.new_inf_(info.OwnerDir(raw), info);}
|
||||||
public Io_url OwnerRoot() {return Io_url_.new_inf_(info.OwnerRoot(raw), info);}
|
public Io_url OwnerRoot() {return Io_url_.new_inf_(info.OwnerRoot(raw), info);}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.ios.*; /*IoUrlInfo_*/ import gplx.core.stores.*; import gplx.core.envs.*;
|
import gplx.core.ios.*; /*IoUrlInfo_*/ import gplx.core.stores.*; import gplx.core.envs.*;
|
||||||
public class Io_url_ {
|
public class Io_url_ {
|
||||||
public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil);
|
public static final Io_url Empty = new Io_url("", IoUrlInfo_.Nil);
|
||||||
public static final Io_url NullPtr = null;
|
public static final Io_url NullPtr = null;
|
||||||
public static final Io_url Parser = new Io_url("", IoUrlInfo_.Nil);
|
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 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 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() {
|
public static Io_url Usr() {
|
||||||
|
@ -16,7 +16,7 @@ Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
|||||||
package gplx;
|
package gplx;
|
||||||
import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*;
|
import org.junit.*; import gplx.core.tests.*; import gplx.core.envs.*;
|
||||||
public class Io_url__tst {
|
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__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 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);}
|
@Test public void Null() {fxt.Test__New__http_or_null(Bool_.N, "C:/a.txt", null);}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*;
|
import gplx.core.strings.*;
|
||||||
public class Keyval_ {
|
public class Keyval_ {
|
||||||
public static final Keyval[] Ary_empty = new Keyval[0];
|
public static final Keyval[] Ary_empty = new Keyval[0];
|
||||||
public static Keyval[] Ary(Keyval... ary) {return ary;}
|
public static Keyval[] Ary(Keyval... ary) {return ary;}
|
||||||
public static Keyval[] Ary_cast_(Object o) {
|
public static Keyval[] Ary_cast_(Object o) {
|
||||||
try {return (Keyval[])o;}
|
try {return (Keyval[])o;}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Keyval_hash {
|
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 Count() {return hash.Count();}
|
||||||
public int Len() {return hash.Count();}
|
public int Len() {return hash.Count();}
|
||||||
public Keyval_hash Clear() {hash.Clear(); return this;}
|
public Keyval_hash Clear() {hash.Clear(); return this;}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Keyval_list {
|
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 void Clear() {list.Clear();}
|
||||||
public Keyval Get_at(int i) {return (Keyval)list.Get_at(i);}
|
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;}
|
public Keyval_list Add(String key, Object val) {list.Add(Keyval_.new_(key, val)); return this;}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.lists.*;
|
import gplx.core.lists.*;
|
||||||
public class List_adp_ {
|
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() {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_w_size(int v) {return new List_adp_obj(v);}
|
||||||
public static List_adp New_by_many(Object... ary) {
|
public static List_adp New_by_many(Object... ary) {
|
||||||
@ -49,5 +49,5 @@ public class List_adp_ {
|
|||||||
list.Del_at(last_idx);
|
list.Del_at(last_idx);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
public static final int Not_found = -1, Base1 = 1;
|
public static final int Not_found = -1, Base1 = 1;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.lists.*;
|
import gplx.core.strings.*; import gplx.core.lists.*;
|
||||||
public abstract class List_adp_base implements List_adp, Gfo_invk {
|
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;
|
if (Object_.Eq(list[i], o)) return i;
|
||||||
return List_adp_.Not_found;
|
return List_adp_.Not_found;
|
||||||
}
|
}
|
||||||
@gplx.Virtual public void Clear() {
|
public void Clear() {
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
list[i] = null;
|
list[i] = null;
|
||||||
count = 0;
|
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);
|
Collapse(index);
|
||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ public abstract class List_adp_base implements List_adp, Gfo_invk {
|
|||||||
list[rhs] = temp;
|
list[rhs] = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@gplx.Virtual public void Shuffle() {// REF: Fisher-Yates shuffle
|
public void Shuffle() {// REF: Fisher-Yates shuffle
|
||||||
RandomAdp random = RandomAdp_.new_();
|
RandomAdp random = RandomAdp_.new_();
|
||||||
for (int i = count; i > 1; i--) {
|
for (int i = count; i > 1; i--) {
|
||||||
int rndIdx = random.Next(i);
|
int rndIdx = random.Next(i);
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Long_ {
|
public class Long_ {
|
||||||
public static final String Cls_val_name = "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 final int Log10Ary_len = 21;
|
||||||
public static long[] Log10Ary = new long[]
|
public static long[] Log10Ary = new long[]
|
||||||
{ 1, 10, 100, 1000, 10000
|
{ 1, 10, 100, 1000, 10000
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Object_ {
|
public class Object_ {
|
||||||
public static final String Cls_val_name = "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(Object... ary) {return ary;}
|
||||||
public static Object[] Ary_add(Object[] lhs, Object[] rhs) {
|
public static Object[] Ary_add(Object[] lhs, Object[] rhs) {
|
||||||
int lhs_len = lhs.length, rhs_len = rhs.length;
|
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 if (Type_.Eq(c, Double_.Cls_ref_type)) return Double_.To_str_loose(Double_.cast(v));
|
||||||
else return v.toString();
|
else return v.toString();
|
||||||
}
|
}
|
||||||
public static final Object Null = null;
|
public static final Object Null = null;
|
||||||
public static final byte[] Bry__null = Bry_.new_a7("null");
|
public static final byte[] Bry__null = Bry_.new_a7("null");
|
||||||
}
|
}
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.envs.*;
|
import gplx.core.strings.*; import gplx.core.envs.*;
|
||||||
import gplx.core.lists.*; /*EnumerAble,ComparerAble*/
|
import gplx.core.lists.*; /*EnumerAble,ComparerAble*/
|
||||||
public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gfo_invk {
|
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) {
|
@Override protected void Add_base(Object key, Object val) {
|
||||||
super.Add_base(key, val);
|
super.Add_base(key, val);
|
||||||
ordered.Add(val);
|
ordered.Add(val);
|
||||||
@ -43,7 +43,7 @@ public class Ordered_hash_base extends Hash_adp_base implements Ordered_hash, Gf
|
|||||||
this.Clear();
|
this.Clear();
|
||||||
return rv;
|
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);}
|
public void Sort_by(ComparerAble comparer) {if (locked) Lock_fail(); ordered.Sort_by(comparer);}
|
||||||
@Override public java.util.Iterator iterator() {return ordered.iterator();}
|
@Override public java.util.Iterator iterator() {return ordered.iterator();}
|
||||||
public void Add_at(int i, Object key, Object val) {
|
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;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
return this;
|
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();}
|
@Override public int Count() {return ordered.Count();}
|
||||||
public Ordered_hash_base() {}
|
public Ordered_hash_base() {}
|
||||||
}
|
}
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
public class RandomAdp_ implements Gfo_invk {
|
public class RandomAdp_ implements Gfo_invk {
|
||||||
public static RandomAdp new_() {
|
public static RandomAdp new_() {
|
||||||
Random random = new Random(System.currentTimeMillis());
|
Random random = new Random(System.currentTimeMillis());
|
||||||
return new RandomAdp(random);
|
return new RandomAdp(random);
|
||||||
}
|
}
|
||||||
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, Invk_Next)) return RandomAdp_.new_().Next(m.ReadInt("max"));
|
if (ctx.Match(k, Invk_Next)) return RandomAdp_.new_().Next(m.ReadInt("max"));
|
||||||
else return Gfo_invk_.Rv_unhandled;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
} static final String Invk_Next = "Next";
|
} static final String Invk_Next = "Next";
|
||||||
public static final RandomAdp_ Gfs = new RandomAdp_();
|
public static final RandomAdp_ Gfs = new RandomAdp_();
|
||||||
}
|
}
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
public class Short_ {
|
public class Short_ {
|
||||||
public static final String Cls_val_name = "short";
|
public static final String Cls_val_name = "short";
|
||||||
public static final Class<?> Cls_ref_type = Short.class;
|
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 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;}
|
public static short By_int(int v) {return (short)v;}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ import gplx.core.strings.String_bldr;
|
|||||||
import gplx.core.strings.String_bldr_;
|
import gplx.core.strings.String_bldr_;
|
||||||
public class String_ {
|
public class String_ {
|
||||||
// -------- BASELIB_COPY --------
|
// -------- 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 String Cls_val_name = "str" + "ing";
|
||||||
public static final int Find_none = -1, Pos_neg1 = -1;
|
public static final int Find_none = -1, Pos_neg1 = -1;
|
||||||
public static final String Empty = "", Null_mark = "<<NULL>>", Tab = "\t", Lf = "\n", CrLf = "\r\n", Nl = "\n";
|
public static final String Empty = "", Null_mark = "<<NULL>>", Tab = "\t", Lf = "\n", CrLf = "\r\n", Nl = "\n";
|
||||||
@ -415,7 +415,7 @@ public class String_ {
|
|||||||
sb.Add(s).Add(";");
|
sb.Add(s).Add(";");
|
||||||
return sb.To_str();
|
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) {return Split(raw, dlm, false);}
|
||||||
public static String[] Split(String raw, char dlm, boolean addEmptyIfDlmIsLast) {
|
public static String[] Split(String raw, char dlm, boolean addEmptyIfDlmIsLast) {
|
||||||
List_adp list = List_adp_.New(); String_bldr sb = String_bldr_.new_();
|
List_adp list = List_adp_.New(); String_bldr sb = String_bldr_.new_();
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.tests.*;
|
import gplx.core.strings.*; import gplx.core.consoles.*; import gplx.core.tests.*;
|
||||||
public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
|
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) {
|
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));
|
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_();
|
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 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(byte[] s, int b, int e) {Write(Bry_.Mid(s, b, e));}
|
||||||
public static void Write() {Write("tmp");}
|
public static void Write() {Write("tmp");}
|
||||||
@ -156,7 +156,7 @@ class TfdsEqListItmStr_cls_default implements TfdsEqListItmStr {
|
|||||||
public String To_str(Object cur, Object actl) {
|
public String To_str(Object cur, Object actl) {
|
||||||
return Object_.Xto_str_strict_or_null_mark(cur);
|
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 {
|
class TfdsEqAryItm {
|
||||||
public int Idx() {return idx;} public TfdsEqAryItm Idx_(int v) {idx = v; return this;} int idx;
|
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 TfdsMsgBldr new_() {return new TfdsMsgBldr();} TfdsMsgBldr() {}
|
||||||
public static final String EmptyStr = "";
|
public static final String EmptyStr = "";
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*;
|
import gplx.core.strings.*;
|
||||||
import gplx.core.lists.*;
|
import gplx.core.lists.*;
|
||||||
@ -93,5 +93,5 @@ class TfdsTstrItm {
|
|||||||
return compareResult == 1 ? "==" : "!=";
|
return compareResult == 1 ? "==" : "!=";
|
||||||
}
|
}
|
||||||
public static TfdsTstrItm new_() {return new TfdsTstrItm();} TfdsTstrItm() {}
|
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;
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.strings.*; import gplx.core.envs.*;
|
import gplx.core.strings.*; import gplx.core.envs.*;
|
||||||
public class Time_span_ {
|
public class Time_span_ {
|
||||||
public static final Time_span Zero = new Time_span(0);
|
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 Null = new Time_span(-1);
|
||||||
public static Time_span fracs_(long val) {return new Time_span(val);}
|
public static Time_span fracs_(long val) {return new Time_span(val);}
|
||||||
public static Time_span seconds_(double seconds) {
|
public static Time_span seconds_(double seconds) {
|
||||||
long fracs = (long)(seconds * Divisors[Idx_Sec]);
|
long fracs = (long)(seconds * Divisors[Idx_Sec]);
|
||||||
@ -138,18 +138,18 @@ public class Time_span_ {
|
|||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
public static final String Fmt_PadZeros = "00:00:00.000"; // u,h00:m00:s00.f000
|
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_Short = "short"; // u,h##:m#0:s00;
|
||||||
public static final String Fmt_Default = "0.000"; // v,#.000
|
public static final String Fmt_Default = "0.000"; // v,#.000
|
||||||
public static final String Fmt_NoFractionals = "0"; // v,#
|
public static final String Fmt_NoFractionals = "0"; // v,#
|
||||||
@gplx.Internal protected static final int[] Divisors = {
|
@gplx.Internal protected static final int[] Divisors = {
|
||||||
1, //1 fracs
|
1, //1 fracs
|
||||||
1000, //1,000 fracs in a second
|
1000, //1,000 fracs in a second
|
||||||
60000, //60,000 fracs in a minute (60 seconds * 1,000)
|
60000, //60,000 fracs in a minute (60 seconds * 1,000)
|
||||||
3600000, //3,600,000 fracs in an hour (60 minutes * 60,000)
|
3600000, //3,600,000 fracs in an hour (60 minutes * 60,000)
|
||||||
};
|
};
|
||||||
public static final String MajorDelimiter = ":";
|
public static final String MajorDelimiter = ":";
|
||||||
public static final int
|
public static final int
|
||||||
Idx_Frac = 0
|
Idx_Frac = 0
|
||||||
, Idx_Sec = 1
|
, Idx_Sec = 1
|
||||||
, Idx_Min = 2
|
, Idx_Min = 2
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx;
|
package gplx;
|
||||||
import gplx.core.stores.*;
|
import gplx.core.stores.*;
|
||||||
public class Yn {
|
public class Yn {
|
||||||
public static final String Y = "y", N = "n";
|
public static final String Y = "y", N = "n";
|
||||||
public static boolean parse_by_char_or(String v, boolean or) {
|
public static boolean parse_by_char_or(String v, boolean or) {
|
||||||
if (String_.Eq(v, Y)) return true;
|
if (String_.Eq(v, Y)) return true;
|
||||||
else if (String_.Eq(v, N)) return false;
|
else if (String_.Eq(v, N)) return false;
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
||||||
public class Bry_bfr_mkr {
|
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_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_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_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_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() {
|
public void Clear() {
|
||||||
for (byte i = Tid_b128; i <= Tid_m001; i++)
|
for (byte i = Tid_b128; i <= Tid_m001; i++)
|
||||||
mkr(i).Clear();
|
mkr(i).Clear();
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
||||||
public class Bry_bfr_mkr_mgr {
|
public class Bry_bfr_mkr_mgr {
|
||||||
private final Object thread_lock = new Object();
|
private final Object thread_lock = new Object();
|
||||||
private final byte mgr_id; private final int reset;
|
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 Bry_bfr[] used = Bry_bfr_.Ary_empty; private int used_len = 0, used_max = 0;
|
||||||
private int[] free; private int free_len;
|
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
|
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
|
||||||
|
@ -24,8 +24,8 @@ import gplx.String_;
|
|||||||
import gplx.core.btries.Btrie_rv;
|
import gplx.core.btries.Btrie_rv;
|
||||||
import gplx.core.btries.Btrie_slim_mgr;
|
import gplx.core.btries.Btrie_slim_mgr;
|
||||||
public class Bry_rdr {
|
public class Bry_rdr {
|
||||||
private final gplx.core.primitives.Int_obj_ref pos_ref = gplx.core.primitives.Int_obj_ref.New_neg1();
|
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 Btrie_rv trv = new Btrie_rv();
|
||||||
public byte[] Src() {return src;} protected byte[] src;
|
public byte[] Src() {return src;} protected byte[] src;
|
||||||
public int Src_end() {return src_end;} protected int src_end;
|
public int Src_end() {return src_end;} protected int src_end;
|
||||||
public int Pos() {return pos;} protected int pos;
|
public int Pos() {return pos;} protected int pos;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
package gplx.core.brys; import gplx.*; import gplx.core.*;
|
||||||
public class Bry_rdr_old {
|
public class Bry_rdr_old {
|
||||||
private byte[] scope = Bry_.Empty;
|
private byte[] scope = Bry_.Empty;
|
||||||
@ -104,7 +104,7 @@ public class Bry_rdr_old {
|
|||||||
byte[] double_bry = Read_bry_to(to_char);
|
byte[] double_bry = Read_bry_to(to_char);
|
||||||
return Double_.parse(String_.new_a7(double_bry)); // double will never have utf8
|
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) {
|
while (pos < src_len) {
|
||||||
switch (src[pos]) {
|
switch (src[pos]) {
|
||||||
case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space:
|
case Byte_ascii.Tab: case Byte_ascii.Nl: case Byte_ascii.Cr: case Byte_ascii.Space:
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.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.*;
|
package gplx.core.brys.args; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
import gplx.core.brys.*;
|
import gplx.core.brys.*;
|
||||||
public class Bfr_arg__bry_fmt implements Bfr_arg {
|
public class Bfr_arg__bry_fmt implements Bfr_arg {
|
||||||
private final Bry_fmt fmt;
|
private final Bry_fmt fmt;
|
||||||
private Object[] arg_ary;
|
private Object[] arg_ary;
|
||||||
public Bfr_arg__bry_fmt(Bry_fmt fmt, Object... arg_ary) {
|
public Bfr_arg__bry_fmt(Bry_fmt fmt, Object... arg_ary) {
|
||||||
this.fmt = fmt;
|
this.fmt = fmt;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.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.*;
|
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.*;
|
import gplx.core.brys.*; import gplx.core.primitives.*; import gplx.core.strings.*;
|
||||||
public class Bry_fmtr {
|
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;
|
public boolean Fmt_args_exist() {return fmt_args_exist;} private boolean fmt_args_exist;
|
||||||
boolean dirty = true;
|
boolean dirty = true;
|
||||||
int baseInt = 0;
|
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 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 Bry_fmtr Null = new Bry_fmtr().Fmt_("");
|
||||||
public static Bry_fmtr New__tmp() {return new Bry_fmtr().Fmt_("").Keys_();}
|
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_(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;
|
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;
|
||||||
|
@ -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.*;
|
package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
public class Bry_fmtr_tst {
|
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 Text() {fxt.Clear().Fmt("a").Test("a");}
|
||||||
@Test public void Idx__1() {fxt.Clear().Fmt("~{0}").Args("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");}
|
@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 {
|
class Bry_fmtr_fxt {
|
||||||
private final Bry_fmtr fmtr = Bry_fmtr.new_();
|
private final Bry_fmtr fmtr = Bry_fmtr.new_();
|
||||||
private final Bry_bfr bfr = Bry_bfr_.New();
|
private final Bry_bfr bfr = Bry_bfr_.New();
|
||||||
private Object[] args;
|
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 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;}
|
public Bry_fmtr_fxt Fmt (String fmt) {fmtr.Fmt_(fmt); return this;}
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.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.*;
|
package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
import gplx.core.brys.*;
|
import gplx.core.brys.*;
|
||||||
public class Bry_fmtr_vals implements Bfr_arg {
|
public class Bry_fmtr_vals implements Bfr_arg {
|
||||||
private final Bry_fmtr fmtr; private Object[] vals;
|
private final Bry_fmtr fmtr; private Object[] vals;
|
||||||
Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;}
|
Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;}
|
||||||
public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;}
|
public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;}
|
||||||
public void Bfr_arg__add(Bry_bfr bfr) {
|
public void Bfr_arg__add(Bry_bfr bfr) {
|
||||||
fmtr.Bld_bfr_ary(bfr, vals);
|
fmtr.Bld_bfr_ary(bfr, vals);
|
||||||
}
|
}
|
||||||
public static Bry_fmtr_vals new_fmt(String fmt, String... keys) {
|
public static Bry_fmtr_vals new_fmt(String fmt, String... keys) {
|
||||||
Bry_fmtr fmtr = Bry_fmtr.new_(fmt, keys);
|
Bry_fmtr fmtr = Bry_fmtr.new_(fmt, keys);
|
||||||
return new Bry_fmtr_vals(fmtr);
|
return new Bry_fmtr_vals(fmtr);
|
||||||
}
|
}
|
||||||
public static Bry_fmtr_vals new_(Bry_fmtr fmtr) {return new Bry_fmtr_vals(fmtr);}
|
public static Bry_fmtr_vals new_(Bry_fmtr fmtr) {return new Bry_fmtr_vals(fmtr);}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.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.*;
|
package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
public class Bry_fmt_parser_ {
|
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) {
|
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
|
pos = rhs_pos; // NOTE: auto-increment done at top of loop
|
||||||
}
|
}
|
||||||
return (byte[][])list.To_ary(byte[].class);
|
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("~{");
|
||||||
}
|
}
|
||||||
|
@ -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.*;
|
package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
public class Bry_fmt_tst {
|
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 Text() {fxt.Clear().Fmt("a").Test("a");}
|
||||||
@Test public void Key__basic() {fxt.Clear().Fmt("~{key}").Vals("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");}
|
@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 {
|
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_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_bfr bfr = Bry_bfr_.New();
|
||||||
private Object[] vals;
|
private Object[] vals;
|
||||||
public Bry_fmt_fxt Clear() {vals = Object_.Ary_empty; return this;}
|
public Bry_fmt_fxt Clear() {vals = Object_.Ary_empty; return this;}
|
||||||
public Bry_fmt_fxt Fmt(String s) {fmt.Fmt_(s); return this;}
|
public Bry_fmt_fxt Fmt(String s) {fmt.Fmt_(s); return this;}
|
||||||
|
@ -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.*;
|
package gplx.core.brys.fmts; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
public class Bry_keys_parser_tst {
|
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 None() {fxt.Test("a");}
|
||||||
@Test public void One() {fxt.Test("~{a}" , "a");}
|
@Test public void One() {fxt.Test("~{a}" , "a");}
|
||||||
@Test public void Many() {fxt.Test("~{a}b~{c}d~{e}" , "a", "c", "e");}
|
@Test public void Many() {fxt.Test("~{a}b~{c}d~{e}" , "a", "c", "e");}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.btries; import gplx.*; import gplx.core.*;
|
package gplx.core.btries; import gplx.*; import gplx.core.*;
|
||||||
public class Btrie_slim_itm {
|
public class Btrie_slim_itm {
|
||||||
private Btrie_slim_itm[] ary = Btrie_slim_itm.Ary_empty;
|
private Btrie_slim_itm[] ary = Btrie_slim_itm.Ary_empty;
|
||||||
@ -95,7 +95,7 @@ public class Btrie_slim_itm {
|
|||||||
}
|
}
|
||||||
if (found) --ary_len;
|
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
|
class ByteHashItm_sorter {// quicksort
|
||||||
Btrie_slim_itm[] ary; int ary_len;
|
Btrie_slim_itm[] ary; int ary_len;
|
||||||
@ -126,5 +126,5 @@ class ByteHashItm_sorter {// quicksort
|
|||||||
if (lo < j) Sort_recurse(lo, j);
|
if (lo < j) Sort_recurse(lo, j);
|
||||||
if (i < hi) Sort_recurse(i, hi);
|
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() {}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ public class Btrie_slim_mgr_tst {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class Btrie_slim_mgr_fxt {
|
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) {
|
public Btrie_slim_mgr_fxt Init__add(String key, String val) {
|
||||||
trie.Add_str_str(key, val);
|
trie.Add_str_str(key, val);
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.caches; import gplx.*; import gplx.core.*;
|
package gplx.core.caches; import gplx.*; import gplx.core.*;
|
||||||
public class Lru_cache {
|
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 Lru_node head, tail;
|
||||||
private long cur, min, max, evicts;
|
private long cur, min, max, evicts;
|
||||||
public Lru_cache(boolean auto_reg, String key, long min, long max) {
|
public Lru_cache(boolean auto_reg, String key, long min, long max) {
|
||||||
@ -24,7 +24,7 @@ public class Lru_cache {
|
|||||||
this.max = max;
|
this.max = max;
|
||||||
if (auto_reg) Lru_cache_root.Instance.Add(this);
|
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 Evicts() {return evicts;}
|
||||||
public long Cur() {return cur;}
|
public long Cur() {return cur;}
|
||||||
public void Min_max_(long min, long max) {
|
public void Min_max_(long min, long max) {
|
||||||
@ -132,9 +132,9 @@ public class Lru_cache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class Lru_node {
|
class Lru_node {
|
||||||
private final Object key;
|
private final Object key;
|
||||||
private Object val;
|
private Object val;
|
||||||
private final long size;
|
private final long size;
|
||||||
private Lru_node prv;
|
private Lru_node prv;
|
||||||
private Lru_node nxt;
|
private Lru_node nxt;
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.caches; import gplx.*; import gplx.core.*;
|
package gplx.core.caches; import gplx.*; import gplx.core.*;
|
||||||
public class Lru_cache_root {
|
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 Lru_cache Get_by_key(String key) {return (Lru_cache)hash.Get_by(key);}
|
||||||
public void Add(Lru_cache grp) {
|
public void Add(Lru_cache grp) {
|
||||||
hash.Add(grp.Key(), grp);
|
hash.Add(grp.Key(), grp);
|
||||||
@ -46,5 +46,5 @@ public class Lru_cache_root {
|
|||||||
}
|
}
|
||||||
return bfr.To_str_and_clear();
|
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();
|
||||||
}
|
}
|
||||||
|
@ -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.*;
|
package gplx.core.caches; import gplx.*; import gplx.core.*;
|
||||||
import org.junit.*; import gplx.core.tests.*;
|
import org.junit.*; import gplx.core.tests.*;
|
||||||
public class Lru_cache_tst {
|
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() {
|
@Test public void Get_one() {
|
||||||
fxt.Exec__set("a", 5);
|
fxt.Exec__set("a", 5);
|
||||||
fxt.Test__get_y("a");
|
fxt.Test__get_y("a");
|
||||||
@ -73,7 +73,7 @@ public class Lru_cache_tst {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
class Lru_cache_fxt {
|
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) {
|
public void Exec__set(String key, long size) {
|
||||||
cache.Set(key, key, size);
|
cache.Set(key, key, size);
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.consoles; import gplx.*; import gplx.core.*;
|
package gplx.core.consoles; import gplx.*; import gplx.core.*;
|
||||||
public class Console_adp__mem implements Console_adp {
|
public class Console_adp__mem implements Console_adp {
|
||||||
private final List_adp written = List_adp_.New();
|
private final List_adp written = List_adp_.New();
|
||||||
private final Hash_adp ignored = Hash_adp_.New();
|
private final Hash_adp ignored = Hash_adp_.New();
|
||||||
public boolean Enabled() {return true;}
|
public boolean Enabled() {return true;}
|
||||||
public boolean Canceled_chk() {return false;}
|
public boolean Canceled_chk() {return false;}
|
||||||
public int Chars_per_line_max() {return 80;} public void Chars_per_line_max_(int v) {}
|
public int Chars_per_line_max() {return 80;} public void Chars_per_line_max_(int v) {}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.consoles; import gplx.*; import gplx.core.*;
|
package gplx.core.consoles; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.envs.*;
|
import gplx.core.envs.*;
|
||||||
public class Console_adp__sys implements Console_adp {
|
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");}
|
catch (java.io.UnsupportedEncodingException e) {throw Err_.new_wo_type("unsupported exception");}
|
||||||
ps.println(s);
|
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();
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.texts.*; /*RegxPatn_cls_like*/
|
import gplx.core.texts.*; /*RegxPatn_cls_like*/
|
||||||
public class Criteria_ {
|
public class Criteria_ {
|
||||||
public static final Criteria All = new Criteria_const(true);
|
public static final Criteria All = new Criteria_const(true);
|
||||||
public static final Criteria None = new Criteria_const(false);
|
public static final Criteria None = new Criteria_const(false);
|
||||||
public static Criteria Not(Criteria arg) {return new Criteria_not(arg);}
|
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(Criteria lhs, Criteria rhs) {return new Criteria_and(lhs, rhs);}
|
||||||
public static Criteria And_many(Criteria... ary) {
|
public static Criteria And_many(Criteria... ary) {
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
public class Criteria_between implements Criteria {
|
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 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 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 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 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();}
|
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
public class Criteria_eq implements Criteria {
|
public class Criteria_eq implements Criteria {
|
||||||
@gplx.Internal protected Criteria_eq(boolean neg, Object val) {this.neg = neg; this.val = val;}
|
@gplx.Internal protected Criteria_eq(boolean neg, Object val) {this.neg = neg; this.val = val;}
|
||||||
public byte Tid() {return Criteria_.Tid_eq;}
|
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 Object Val() {return val;} private Object val;
|
||||||
public void Val_as_obj_(Object v) {this.val = v;}
|
public void Val_as_obj_(Object v) {this.val = v;}
|
||||||
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}
|
public void Val_from_args(Hash_adp args) {throw Err_.new_unimplemented();}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
public class Criteria_fld implements Criteria {
|
public class Criteria_fld implements Criteria {
|
||||||
Criteria_fld(String pre, String key, Criteria crt) {this.pre = pre; this.key = key; this.crt = crt;}
|
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 byte Tid() {return Criteria_.Tid_wrapper;}
|
||||||
public String Pre() {return pre;} private final String pre;
|
public String Pre() {return pre;} private final String pre;
|
||||||
public String Key() {return key;} private final String key;
|
public String Key() {return key;} private final String key;
|
||||||
public Criteria Crt() {return crt;} private final Criteria crt;
|
public Criteria Crt() {return crt;} private final Criteria crt;
|
||||||
public String Pre_w_key() {return pre == Pre_null ? key : String_.Concat(pre, ".", key);}
|
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_as_obj_(Object v) {throw Err_.new_unimplemented();}
|
||||||
public void Val_from_args(Hash_adp args) {
|
public void Val_from_args(Hash_adp args) {
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
public class Criteria_in implements Criteria {
|
public class Criteria_in implements Criteria {
|
||||||
public Criteria_in(boolean neg, Object[] ary) {this.neg = neg; Ary_(ary);}
|
public Criteria_in(boolean neg, Object[] ary) {this.neg = neg; Ary_(ary);}
|
||||||
public byte Tid() {return Criteria_.Tid_in;}
|
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 Object[] Ary() {return ary;} private Object[] ary;
|
||||||
public int Ary_len() {return ary_len;} private int ary_len;
|
public int Ary_len() {return ary_len;} private int ary_len;
|
||||||
public Class<?> Itm_type() {return itm_type;} private Class<?> itm_type;
|
public Class<?> Itm_type() {return itm_type;} private Class<?> itm_type;
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
package gplx.core.criterias; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.texts.*;
|
import gplx.core.texts.*;
|
||||||
public class Criteria_ioMatch implements Criteria { // EX: url IOMATCH '*.xml|*.txt'
|
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 Criteria_ioMatch(boolean match, RegxPatn_cls_ioMatch pattern) {this.match = match; this.pattern = pattern;}
|
||||||
public byte Tid() {return Criteria_.Tid_iomatch;}
|
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_from_args(Hash_adp args) {throw Err_.new_unimplemented();}
|
||||||
public void Val_as_obj_(Object v) {this.pattern = (RegxPatn_cls_ioMatch)v;}
|
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;
|
public RegxPatn_cls_ioMatch Pattern() {return pattern;} private RegxPatn_cls_ioMatch pattern;
|
||||||
|
@ -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.*;
|
package gplx.core.encoders; import gplx.*; import gplx.core.*;
|
||||||
import org.junit.*; import gplx.core.tests.*;
|
import org.junit.*; import gplx.core.tests.*;
|
||||||
public class Hex_utl__tst {
|
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() {
|
@Test public void To_int() {
|
||||||
fxt.Test__to_int("0" , 0);
|
fxt.Test__to_int("0" , 0);
|
||||||
fxt.Test__to_int("F" , 15);
|
fxt.Test__to_int("F" , 15);
|
||||||
@ -73,7 +73,7 @@ class Hex_utl__fxt {
|
|||||||
String actl = Hex_utl_.To_str(val, pad);
|
String actl = Hex_utl_.To_str(val, pad);
|
||||||
Tfds.Eq(expd, actl);
|
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) {
|
public void Test__write_bfr(boolean lcase, int val, String expd) {
|
||||||
Hex_utl_.Write_bfr(bfr, lcase, val);
|
Hex_utl_.Write_bfr(bfr, lcase, val);
|
||||||
Gftest.Eq__str(expd, bfr.To_str_and_clear());
|
Gftest.Eq__str(expd, bfr.To_str_and_clear());
|
||||||
|
@ -51,6 +51,6 @@ public class Env_ {
|
|||||||
return appUrl;
|
return appUrl;
|
||||||
} static Io_url appUrl = Io_url_.Empty;
|
} 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";}
|
public static String NewLine_lang() {return mode_testing ? "\n" : "\n";}
|
||||||
}
|
}
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.envs; import gplx.*; import gplx.core.*;
|
package gplx.core.envs; import gplx.*; import gplx.core.*;
|
||||||
public class Op_sys {
|
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) {
|
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;
|
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 Tid() {return tid;} private final byte tid;
|
||||||
public byte Sub_tid() {return sub_tid;} private final byte sub_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 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 Bitness_str() {return (bitness == Bitness_32 ? "32" : "64");}
|
||||||
public String Nl_str() {return nl_str;} private final String nl_str;
|
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 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 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 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 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_wnt() {return tid == Tid_wnt;}
|
||||||
public boolean Tid_is_lnx() {return tid == Tid_lnx;}
|
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 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 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 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 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 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 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 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 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 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) {
|
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;
|
return cur_op_sys.Tid_is_wnt() ? String_.Replace(v, Wnt.fsys_dir_spr_str, Lnx.fsys_dir_spr_str) : v;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.envs; import gplx.*; import gplx.core.*;
|
package gplx.core.envs; import gplx.*; import gplx.core.*;
|
||||||
import gplx.Bool_;
|
import gplx.Bool_;
|
||||||
import gplx.Bry_;
|
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_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 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 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();
|
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_add(Gfo_invk_cmd cmd) {whenEndList.Add(cmd); return this;}
|
||||||
public Process_adp WhenEnd_del(Gfo_invk_cmd cmd) {whenEndList.Del(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;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
return this;
|
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;
|
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) {
|
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);
|
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();
|
process.Process_run_and_end();
|
||||||
return;
|
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;}
|
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) {
|
public static int run_wait_arg_(Io_url url, String arg) {
|
||||||
Process_adp process = new Process_adp();
|
Process_adp process = new Process_adp();
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.errs; import gplx.*; import gplx.core.*;
|
package gplx.core.errs; import gplx.*; import gplx.core.*;
|
||||||
public class Err_msg {
|
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) {
|
public Err_msg(String type, String msg, Object[] args) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.msg = msg;
|
this.msg = msg;
|
||||||
this.args = args;
|
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) {
|
public void Args_add(Object[] add) {
|
||||||
this.args = (Object[])Array_.Resize_add(args, add);
|
this.args = (Object[])Array_.Resize_add(args, add);
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.strings.*; import gplx.core.type_xtns.*;
|
import gplx.core.strings.*; import gplx.core.type_xtns.*;
|
||||||
public class GfoFldList_ {
|
public class GfoFldList_ {
|
||||||
public static final GfoFldList Null = new GfoFldList_null();
|
public static final GfoFldList Null = new GfoFldList_null();
|
||||||
public static GfoFldList new_() {return new GfoFldList_base();}
|
public static GfoFldList new_() {return new GfoFldList_base();}
|
||||||
public static GfoFldList str_(String... names) {
|
public static GfoFldList str_(String... names) {
|
||||||
GfoFldList rv = new GfoFldList_base();
|
GfoFldList rv = new GfoFldList_base();
|
||||||
@ -25,7 +25,7 @@ public class GfoFldList_ {
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class GfoFldList_base implements GfoFldList {
|
class GfoFldList_base implements GfoFldList {
|
||||||
public int Count() {return hash.Count();}
|
public int Count() {return hash.Count();}
|
||||||
public boolean Has(String key) {return hash.Has(key);}
|
public boolean Has(String key) {return hash.Has(key);}
|
||||||
public int Idx_of(String 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
|
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 int Count() {return 0;}
|
||||||
public boolean Has(String key) {return false;}
|
public boolean Has(String key) {return false;}
|
||||||
public int Idx_of(String key) {return List_adp_.Not_found;}
|
public int Idx_of(String key) {return List_adp_.Not_found;}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.lists.*; /*ComparerAble*/
|
import gplx.core.lists.*; /*ComparerAble*/
|
||||||
public class GfoNdeList_ {
|
public class GfoNdeList_ {
|
||||||
public static final GfoNdeList Null = new GfoNdeList_null();
|
public static final GfoNdeList Null = new GfoNdeList_null();
|
||||||
public static GfoNdeList new_() {return new GfoNdeList_base();}
|
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 int Count() {return list.Count();}
|
||||||
public GfoNde FetchAt_asGfoNde(int i) {return (GfoNde)list.Get_at(i);}
|
public GfoNde FetchAt_asGfoNde(int i) {return (GfoNde)list.Get_at(i);}
|
||||||
public void Add(GfoNde rcd) {list.Add(rcd);}
|
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);}
|
public void Sort_by(ComparerAble comparer) {list.Sort_by(comparer);}
|
||||||
List_adp list = List_adp_.New();
|
List_adp list = List_adp_.New();
|
||||||
}
|
}
|
||||||
class GfoNdeList_null implements GfoNdeList {
|
class GfoNdeList_null implements GfoNdeList {
|
||||||
public int Count() {return 0;}
|
public int Count() {return 0;}
|
||||||
public GfoNde FetchAt_asGfoNde(int index) {return null;}
|
public GfoNde FetchAt_asGfoNde(int index) {return null;}
|
||||||
public void Add(GfoNde rcd) {}
|
public void Add(GfoNde rcd) {}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
package gplx.core.gfo_ndes; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.type_xtns.*; import gplx.core.stores.*;
|
import gplx.core.type_xtns.*; import gplx.core.stores.*;
|
||||||
public class GfoNde_ {
|
public class GfoNde_ {
|
||||||
public static final GfoNde[] Ary_empty = new GfoNde[0];
|
public static final GfoNde[] Ary_empty = new GfoNde[0];
|
||||||
public static GfoNde[] ary_(GfoNde... ary) {return ary;}
|
public static GfoNde[] ary_(GfoNde... ary) {return ary;}
|
||||||
public static GfoNde as_(Object obj) {return obj instanceof GfoNde ? (GfoNde)obj : null;}
|
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);}
|
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();}
|
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;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.gfo_regys; import gplx.*; import gplx.core.*;
|
package gplx.core.gfo_regys; import gplx.*; import gplx.core.*;
|
||||||
import gplx.langs.gfs.*; import gplx.core.type_xtns.*; import gplx.core.interfaces.*;
|
import gplx.langs.gfs.*; import gplx.core.type_xtns.*; import gplx.core.interfaces.*;
|
||||||
public class GfoRegy implements Gfo_invk {
|
public class GfoRegy implements Gfo_invk {
|
||||||
@ -82,12 +82,12 @@ public class GfoRegy implements Gfo_invk {
|
|||||||
}
|
}
|
||||||
else return Gfo_invk_.Rv_unhandled;
|
else return Gfo_invk_.Rv_unhandled;
|
||||||
return this;
|
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) {
|
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.Add_if_dupe_use_nth(key, new GfoRegyItm(key, val, valType, url));
|
||||||
}
|
}
|
||||||
Hash_adp hash = Hash_adp_.New();
|
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 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 GfoRegy Instance = new GfoRegy(); GfoRegy() {}
|
||||||
@gplx.Internal protected static GfoRegy new_() {return new GfoRegy();}
|
@gplx.Internal protected static GfoRegy new_() {return new GfoRegy();}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.intls; import gplx.*; import gplx.core.*;
|
package gplx.core.intls; import gplx.*; import gplx.core.*;
|
||||||
public class Utf8_ {
|
public class Utf8_ {
|
||||||
public static int Len_of_bry(byte[] ary) {
|
public static int Len_of_bry(byte[] ary) {
|
||||||
@ -136,7 +136,7 @@ public class Utf8_ {
|
|||||||
private static boolean Codepoint_valid(int v) {
|
private static boolean Codepoint_valid(int v) {
|
||||||
return Character.isDefined(v);
|
return Character.isDefined(v);
|
||||||
}
|
}
|
||||||
public static final int
|
public static final int
|
||||||
Codepoint_max = 0x10FFFF //see http://unicode.org/glossary/
|
Codepoint_max = 0x10FFFF //see http://unicode.org/glossary/
|
||||||
, Codepoint_surrogate_bgn = 0xD800
|
, Codepoint_surrogate_bgn = 0xD800
|
||||||
, Codepoint_surrogate_end = 0xDFFF
|
, Codepoint_surrogate_end = 0xDFFF
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
public class IoEnginePool {
|
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) {
|
public void Add_if_dupe_use_nth(IoEngine engine) {
|
||||||
hash.Del(engine.Key());
|
hash.Del(engine.Key());
|
||||||
hash.Add(engine.Key(), engine);
|
hash.Add(engine.Key(), engine);
|
||||||
@ -24,7 +24,7 @@ public class IoEnginePool {
|
|||||||
IoEngine rv = (IoEngine)hash.Get_by(key);
|
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
|
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() {
|
IoEnginePool() {
|
||||||
this.Add_if_dupe_use_nth(IoEngine_.Sys);
|
this.Add_if_dupe_use_nth(IoEngine_.Sys);
|
||||||
this.Add_if_dupe_use_nth(IoEngine_.Mem);
|
this.Add_if_dupe_use_nth(IoEngine_.Mem);
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.ios.streams.*; import gplx.core.ios.atrs.*;
|
import gplx.core.ios.streams.*; import gplx.core.ios.atrs.*;
|
||||||
import gplx.core.consoles.*; import gplx.core.criterias.*; import gplx.core.caches.*;
|
import gplx.core.consoles.*; import gplx.core.criterias.*; import gplx.core.caches.*;
|
||||||
@ -120,7 +120,7 @@ public class IoEngineUtl {
|
|||||||
if (trgStream != null) trgStream.Rls();
|
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) {
|
public static boolean Query_read_only(IoEngine engine, Io_url url, int read_only_type) {
|
||||||
switch (read_only_type) {
|
switch (read_only_type) {
|
||||||
case Io_mgr.Read_only__basic__file:
|
case Io_mgr.Read_only__basic__file:
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
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) {
|
void MarkFileWritable(File fil, Io_url url, boolean readOnlyFails, String op) {
|
||||||
if (Fil_ReadOnly(fil)) {
|
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());
|
throw Err_.new_(IoEngineArgs.Instance.Err_ReadonlyFileNotWritable, "writable operation attempted on readOnly file", "op", op, "url", url.Xto_api());
|
||||||
else
|
else
|
||||||
Fil_Writable(fil);
|
Fil_Writable(fil);
|
||||||
@ -599,7 +599,7 @@ class IoEngineArgs {
|
|||||||
public String Err_ReadonlyFileNotWritable = "gplx.core.ios.ReadonlyFileNotWritable";
|
public String Err_ReadonlyFileNotWritable = "gplx.core.ios.ReadonlyFileNotWritable";
|
||||||
public String Err_FileNotFound = "gplx.core.ios.FileNotFound";
|
public String Err_FileNotFound = "gplx.core.ios.FileNotFound";
|
||||||
public String Err_IoException = "gplx.core.ios.IoException";
|
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 {
|
class IoEngine_system_xtn {
|
||||||
// PATCH.DROID:VerifyError if file.setExecutable is referenced directly in IoEngine_system. However, if placed in separate class
|
// PATCH.DROID:VerifyError if file.setExecutable is referenced directly in IoEngine_system. However, if placed in separate class
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.brys.fmtrs.*;
|
import gplx.core.brys.fmtrs.*;
|
||||||
import gplx.core.ios.streams.*;
|
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 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 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 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_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;
|
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 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 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 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 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 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;
|
public boolean Exec_meta_only() {return exec_meta_only;} private boolean exec_meta_only;
|
||||||
|
@ -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
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
public class IoEngine_xrg_fil_affects1_base {
|
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 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 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 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 boolean ReadOnlyFails() {return readOnlyFails;} public void ReadOnlyFails_set(boolean v) {readOnlyFails = v;} private boolean readOnlyFails = true;
|
||||||
@gplx.Virtual public void Exec() {}
|
public void Exec() {}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.strings.*;
|
import gplx.core.strings.*;
|
||||||
public class IoEngine_xrg_recycleFil extends IoEngine_xrg_fil_affects1_base {
|
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 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 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 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;
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.type_xtns.*;
|
import gplx.core.type_xtns.*;
|
||||||
public class IoItmClassXtn extends ClassXtn_base implements ClassXtn {
|
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;}
|
@Override public Class<?> UnderClass() {return int.class;}
|
||||||
public Object DefaultValue() {return IoItmDir.Type_Dir;}
|
public Object DefaultValue() {return IoItmDir.Type_Dir;}
|
||||||
public boolean Eq(Object lhs, Object rhs) {return ((IoItm_base)lhs).compareTo(rhs) == CompareAble_.Same;}
|
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);
|
else throw Err_.new_unhandled(raw);
|
||||||
}
|
}
|
||||||
@Override public Object XtoDb(Object obj) {return Int_.Cast(obj);}
|
@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() {}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.criterias.*;
|
import gplx.core.criterias.*;
|
||||||
public class IoItmDir extends IoItm_base {
|
public class IoItmDir extends IoItm_base {
|
||||||
public boolean Exists() {return exists;} public void Exists_set(boolean v) {exists = v;} private boolean exists = true;
|
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;
|
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);}
|
@gplx.New public IoItmDir XtnProps_set(String key, Object val) {return (IoItmDir)super.XtnProps_set(key, val);}
|
||||||
public IoItmList SubDirs() {return subDirs;} IoItmList subDirs;
|
public IoItmList SubDirs() {return subDirs;} IoItmList subDirs;
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
public class IoItmDir_ {
|
public class IoItmDir_ {
|
||||||
public static IoItmDir as_(Object obj) {return obj instanceof IoItmDir ? (IoItmDir)obj : null;}
|
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 top_(Io_url url) {return scan_(url);}
|
||||||
public static IoItmDir scan_(Io_url url) {
|
public static IoItmDir scan_(Io_url url) {
|
||||||
IoItmDir rv = new IoItmDir(url.Info().CaseSensitive());
|
IoItmDir rv = new IoItmDir(url.Info().CaseSensitive());
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.langs.gfs.*;
|
import gplx.langs.gfs.*;
|
||||||
public class IoItmFil extends IoItm_base {
|
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 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 DateAdp ModifiedTime() {return modifiedTime;}
|
||||||
public IoItmFil ModifiedTime_(DateAdp val) {modifiedTime = val; return this;} DateAdp modifiedTime;
|
public IoItmFil ModifiedTime_(DateAdp val) {modifiedTime = val; return this;} DateAdp modifiedTime;
|
||||||
public IoItmFil ModifiedTime_(String val) {return ModifiedTime_(DateAdp_.parse_gplx(val));}
|
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 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;}
|
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);}
|
@gplx.New public IoItmFil XtnProps_set(String key, Object val) {return (IoItmFil)super.XtnProps_set(key, val);}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
|
|
||||||
You may use XOWA according to either of these licenses as is most appropriate
|
You may use XOWA according to either of these licenses as is most appropriate
|
||||||
for your project on a case-by-case basis.
|
for your project on a case-by-case basis.
|
||||||
|
|
||||||
The terms of each license can be found in the source code repository:
|
The terms of each license can be found in the source code repository:
|
||||||
|
|
||||||
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
|
||||||
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
|
||||||
*/
|
*/
|
||||||
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
package gplx.core.ios; import gplx.*; import gplx.core.*;
|
||||||
import gplx.core.ios.streams.*; /*IoStream_mem*/ import gplx.core.texts.*; /*Encoding_*/
|
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;}
|
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);
|
rv.stream = IoStream_mem.rdr_txt_(filPath, text);
|
||||||
return rv;
|
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
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user