1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Source: Restore broken commit

This commit is contained in:
gnosygnu
2017-02-06 22:14:55 -05:00
parent 938beac9f9
commit 3bfeb94b43
4380 changed files with 328018 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.stores.*; import gplx.core.gfo_ndes.*;
public class GfmlDataNde {
public GfmlDoc Doc() {return gdoc;} GfmlDoc gdoc;
public DataRdr XtoRdr() {
GfmlDataRdr rv = new GfmlDataRdr();
rv.SetNode(gdoc.RootNde());
return rv;
}
public DataWtr XtoWtr() {
GfmlDataWtr2 rv = new GfmlDataWtr2();
rv.Doc_set(gdoc);
return rv;
}
public static GfmlDataNde new_any_eol_(String raw) {return new_(String_.Replace(raw, String_.CrLf, String_.Lf));}
public static GfmlDataNde new_(String raw) {
GfmlDataNde rv = new GfmlDataNde();
GfmlBldr bldr = GfmlBldr_.default_();
bldr.Doc().RootLxr().SubLxr_Add
( GfmlDocLxrs.AtrSpr_lxr()
, GfmlDocLxrs.NdeDot_lxr()
, GfmlDocLxrs.NdeHdrBgn_lxr()
, GfmlDocLxrs.NdeHdrEnd_lxr()
);
rv.gdoc = bldr.XtoGfmlDoc(raw);
return rv;
}
public static GfoMsg XtoMsg(String raw) {
GfmlDoc gdoc = GfmlDataNde.new_any_eol_(raw).Doc();
return XtoMsg(gdoc.RootNde());
}
public static GfoMsg XtoMsgNoRoot(String raw) {
GfmlDoc gdoc = GfmlDataNde.new_any_eol_(raw).Doc();
GfoMsg msg = XtoMsg(gdoc.RootNde());
return (GfoMsg)msg.Subs_getAt(0);
}
static GfoMsg XtoMsg(GfmlNde gnde) {
String msgKey = String_.Coalesce(gnde.Key(), gnde.Hnd());
GfoMsg msg = GfoMsg_.new_parse_(msgKey);
for (int i = 0; i < gnde.SubKeys().Count(); i++) {
GfmlItm subItm = (GfmlItm)gnde.SubKeys().Get_at(i);
if (subItm.ObjType() == GfmlObj_.Type_atr) {
GfmlAtr subAtr = (GfmlAtr)subItm;
String subAtrKey = String_.Len_eq_0(subAtr.Key()) ? "" : subAtr.Key(); // NOTE: needs to be "" or else will fail in GfoConsole; key will be evaluated against NullKey in GfsCtx
msg.Add(subAtrKey, subAtr.DatTkn().Val());
}
else {
GfmlNde subNde = (GfmlNde)subItm;
GfoMsg subMsg = XtoMsg(subNde);
msg.Subs_add(subMsg);
}
}
for (int i = 0; i < gnde.SubHnds().Count(); i++) {
GfmlItm subItm = (GfmlItm)gnde.SubHnds().Get_at(i);
GfmlNde subNde = (GfmlNde)subItm;
GfoMsg subMsg = XtoMsg(subNde);
msg.Subs_add(subMsg);
}
return msg;
}
}
class GfmlDataWtr2 extends DataWtr_base implements DataWtr {
@Override public void WriteData(String name, Object val) {
GfmlTkn nameTkn = GfmlTkn_.raw_(name);
GfmlTkn valTkn = GfmlTkn_.raw_(To_str(val));
GfmlAtr atr = GfmlAtr.new_(nameTkn, valTkn, GfmlType_.String);
GfmlNde nde = gdoc.RootNde().SubHnds().Get_at(0);
nde.SubKeys().Add(atr);
}
public void InitWtr(String key, Object val) {}
public void WriteTableBgn(String name, GfoFldList fields) {}
@Override public void WriteNodeBgn(String nodeName) {}
public void WriteLeafBgn(String leafName) {}
@Override public void WriteNodeEnd() {}
public void WriteLeafEnd() {}
public void Clear() {}
public String To_str() {return "";}
String To_str(Object obj) {
if (obj == null) return "''";
String s = obj.toString();
return String_.Concat("'", String_.Replace(s, "'", "''"), "'");
}
@Override public SrlMgr SrlMgr_new(Object o) {return new GfmlDataWtr2();}
public void Doc_set(GfmlDoc v) {gdoc = v;} GfmlDoc gdoc;
}

View File

@@ -0,0 +1,48 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.stores.*;
public class GfmlDataRdr extends GfmlDataRdr_base {
public static DataRdr raw_root_(String raw) {
GfmlDoc gdoc = GfmlDoc_.parse_any_eol_(raw);
GfmlDataRdr rv = new GfmlDataRdr();
rv.Parse_set(true);
rv.SetNode(gdoc.RootNde().SubHnds().Get_at(0));
return rv;
}
public static DataRdr raw_list_(String raw) {
GfmlDoc gdoc = GfmlDoc_.parse_any_eol_(raw);
GfmlDataRdr rv = new GfmlDataRdr();
rv.SetNode(gdoc.RootNde());
return rv;
}
public static GfmlDataRdr nde_(GfmlNde nde) {
GfmlDataRdr rv = new GfmlDataRdr();
rv.SetNode(nde);
return rv;
}
public static DataRdr wtr_(DataWtr wtr) {return raw_root_(wtr.To_str());}
@Override public SrlMgr SrlMgr_new(Object o) {return new GfmlDataRdr();}
@gplx.Internal protected GfmlDataRdr() {
this.Parse_set(true);
}
}
class GfmlDataRdrNde extends GfmlDataRdr_base {
public GfmlDataRdrNde(GfmlNde current) {SetNode(current);}
@Override public SrlMgr SrlMgr_new(Object o) {return new GfmlDataRdrNde(null);}
}

View File

@@ -0,0 +1,60 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.stores.*; /*DataRdr_base*/
public abstract class GfmlDataRdr_base extends DataRdr_base implements DataRdr {
@Override public String NameOfNode() {return curNde.Hnd();}
@Override public int FieldCount() {return curNde.SubKeys().Count();}
@Override public String KeyAt(int idx) {return curNde.SubKeys().Get_at(idx).KeyTkn().Val();}
@Override public Object ReadAt(int idx) {return GfmlAtr.as_(curNde.SubKeys().Get_at(idx)).DatTkn().Val();}
@Override public Object Read(String name) {return curNde.SubKeys().FetchDataOrNull(name);}
public boolean MoveNextPeer() {
pos += 1;
if (list == null || pos >= list.Count()) return false; // TODO_9: makeCurNde null; invalidate FieldAt, etc?
curNde = list.Get_at(pos);
return true;
}
@Override public DataRdr Subs() {
GfmlDataRdrNde rv = new GfmlDataRdrNde(curNde); rv.Parse_set(this.Parse());
if (curNde != null) rv.list = curNde.SubHnds();
return rv;
}
@Override public DataRdr Subs_byName_moveFirst(String name) {
DataRdr subRdr = Subs_byName(name);
return subRdr.MoveNextPeer() ? subRdr : DataRdr_.Null;
}
public DataRdr Subs_byName(String name) {
GfmlDataRdrNde rv = new GfmlDataRdrNde(curNde);
rv.list = GfmlItmHnds.new_();
if (curNde == null) return rv;
for (int i = 0; i < curNde.SubHnds().Count(); i++) {
GfmlNde sub = (GfmlNde)curNde.SubHnds().Get_at(i);
String typeName = sub.Type().NdeName();
if ( sub.Type().IsTypeAny()) // isAnyType b/c match may not be exact; ex: type can be defined as item:key name; but actlNde may be item:key name size;
//|| sub.Type().IsTypeNull())
typeName = sub.Hnd();
if (String_.Eq(typeName, name))
rv.list.Add(sub);
}
return rv;
}
public void Rls() {}
public String To_str() {return curNde.To_str();}
@gplx.Internal protected void SetNode(GfmlNde curNde) {this.curNde = curNde; this.list = curNde.SubHnds();}
GfmlNde curNde; GfmlItmHnds list; int pos = -1;
}

View File

@@ -0,0 +1,99 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.lists.*; /*StackAdp*/ import gplx.core.gfo_ndes.*; import gplx.core.stores.*;
public class GfmlDataWtr extends DataWtr_base implements DataWtr {
public void InitWtr(String key, Object val) {
if (!String_.Eq(key, GfmlDataWtrOpts.Key_const)) return;
GfmlDataWtrOpts layout = GfmlDataWtrOpts.cast(val);
keyedSpr = layout.KeyedSpr();
indentNodes = layout.IndentNodes();
ignoreNullNames = layout.IgnoreNullNames();
}
@Override public void WriteData(String name, Object val) {
if (nde.SubKeys().Count() != 0) AddTkn_nullVal(keyedSpr); // add keyedSprTkn if not first
GfmlTkn keyTkn = AddTkn_raw(name);
AddTkn_raw("=");
GfmlTkn valTkn = AddTkn_raw(To_str(val));
GfmlAtr atr = GfmlAtr.new_(keyTkn, valTkn, GfmlType_.String);
nde.SubObjs_Add(atr);
}
public void WriteLeafBgn(String leafName) {this.WriteNodeBgn(leafName);}
@Override public void WriteNodeBgn(String nodeName) {
stack.Push(nde);
if (stack.Count() != 1 // not root
&& nde.SubHnds().Count() == 0) { // first subNde
AddTkn_nullVal("{");
if (indentNodes) AddTkn_nullVal(String_.CrLf);
}
if (indentNodes) AddTkn_nullVal(String_.Repeat("\t", stack.Count() - 1));
GfmlTkn nameTkn = null;
if (ignoreNullNames && String_.Eq(nodeName, ""))
nameTkn = GfmlTkn_.Null;
else {
nameTkn = AddTkn_raw(String_.Eq(nodeName, "") ? "%" : nodeName);
AddTkn_nullVal(":");
}
nde = GfmlNde.named_(nameTkn, GfmlType_.new_any_());
}
public void WriteLeafEnd() {this.WriteNodeEnd();}
@Override public void WriteNodeEnd() {
if (nde.SubHnds().Count() == 0)
AddTkn_nullVal(";");
else {
if (indentNodes) AddTkn_nullVal(String_.Repeat("\t", stack.Count() - 1));
AddTkn_nullVal("}");
}
if (indentNodes) AddTkn_nullVal(String_.CrLf);
GfmlNde finishedNde = nde;
nde = GfmlNde.as_(stack.Pop());
nde.SubObjs_Add(finishedNde);
}
public void WriteComment(String comment) {
AddTkn_nullVal("/*");
AddTkn_raw(comment);
AddTkn_nullVal("*/");
}
public void Clear() {nde.SubObjs_Clear();}
public void WriteTableBgn(String name, GfoFldList fields) {}
public void CloseBranchHdr(boolean isInline) {}
public String To_str() {
while (stack.Count() > 0) { // auto-close all nodes
WriteNodeEnd();
}
return GfmlDocWtr_.xtoStr_(gdoc.RootNde());
}
String To_str(Object obj) {
if (obj == null) return "''";
String s = Object_.Xto_str_strict_or_empty(obj);
return String_.Concat("'", String_.Replace(s, "'", "''"), "'");
}
GfmlTkn AddTkn_raw(String raw) {return AddTkn(raw, raw);}
GfmlTkn AddTkn_nullVal(String raw) {return AddTkn(raw, GfmlTkn_.NullVal);}
GfmlTkn AddTkn(String raw, String val) {
GfmlTkn tkn = GfmlTkn_.new_(raw, val);
nde.SubObjs_Add(tkn);
return tkn;
}
@Override public SrlMgr SrlMgr_new(Object o) {return new GfmlDataWtr();}
StackAdp stack = StackAdp_.new_();
GfmlDoc gdoc = GfmlDoc.new_(); GfmlNde nde;
String keyedSpr = GfmlDataWtrOpts.Instance.KeyedSpr(); boolean indentNodes, ignoreNullNames;
public static GfmlDataWtr new_() {return new GfmlDataWtr();}
GfmlDataWtr() {this.nde = this.gdoc.RootNde();}
}

View File

@@ -0,0 +1,27 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
public class GfmlDataWtrOpts {
public static final String Key_const = "GfmlDataWtrOpts";
public String KeyedSpr() {return keyedSeparator;} public GfmlDataWtrOpts KeyedSeparator_(String val) {keyedSeparator = val; return this;} private String keyedSeparator = " ";
public boolean IndentNodes() {return indentNodes;} public GfmlDataWtrOpts IndentNodesOn_() {indentNodes = true; return this;} private boolean indentNodes;
public boolean IgnoreNullNames() {return ignoreNullNames;} public GfmlDataWtrOpts IgnoreNullNamesOn_() {ignoreNullNames = true; return this;} private boolean ignoreNullNames;
public static final GfmlDataWtrOpts Instance = new GfmlDataWtrOpts();
public static GfmlDataWtrOpts new_() {return new GfmlDataWtrOpts();} GfmlDataWtrOpts() {}
public static GfmlDataWtrOpts cast(Object obj) {try {return (GfmlDataWtrOpts)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlDataWtrOpts.class, obj);}}
}

View File

@@ -0,0 +1,23 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.gfo_regys.*;
public class GfoMsgParser_gfml implements GfoMsgParser {
public GfoMsg ParseToMsg(String s) {return GfmlDataNde.XtoMsg(s);}
public static final GfoMsgParser_gfml Instance = new GfoMsgParser_gfml(); GfoMsgParser_gfml() {}
}

View File

@@ -0,0 +1,42 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
public class SqlConsts {
public static final String
Op_eq = "="
, Op_eqn = "!="
, Op_eqn2 = "<>"
, Op_lt = "<"
, Op_mt = ">"
, Op_lte = "<="
, Op_mte = ">="
, Op_like = "LIKE"
, Op_iomatch = "IOMATCH"
, Op_between = "BETWEEN"
, Op_between_and = "AND"
, Op_in = "IN"
, Op_in_bgn = "("
, Op_in_end = ")"
, Op_in_dlm = ","
, Kwd_or = "OR"
, Kwd_and = "AND"
, Kwd_not = "NOT"
, Grp_bgn = "("
, Grp_end = ")"
;
}

View File

@@ -0,0 +1,144 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.gfml; import gplx.*;
import gplx.core.strings.*; import gplx.core.criterias.*;
public class SqlDoc {
public static GfmlDoc XtoDoc(String raw) {
GfmlBldr bldr = GfmlBldr_.new_();
bldr.Doc().RootLxr_set(RootLxr_());
return bldr.XtoGfmlDoc(raw);
}
static GfmlLxr RootLxr_() {
GfmlTkn txtTkn = GfmlTkn_.cmd_("tkn:text", SqlCmd_root.Instance);
GfmlLxr rv = GfmlLxr_.general_("lxr:root", txtTkn);
whitespace_(rv);
operator_(rv
, SqlConsts.Op_eq
, SqlConsts.Op_eqn
, SqlConsts.Op_eqn2
, SqlConsts.Op_lt
, SqlConsts.Op_mt
, SqlConsts.Op_lte
, SqlConsts.Op_mte
, SqlConsts.Op_in_bgn
, SqlConsts.Op_in_end
, SqlConsts.Op_in_dlm
);
quote_(rv, "'");
quote_(rv, "\"");
return rv;
}
static GfmlLxr whitespace_(GfmlLxr lxr) {
GfmlTkn tkn = GfmlTkn_.cmd_("key:gfml.whitespace_0", GfmlBldrCmd_.Null);
GfmlLxr rv = GfmlLxr_.range_("lxr:gfml.whitespace_0", String_.Ary(" ", String_.Tab, String_.CrLf, String_.Lf), tkn, false);
lxr.SubLxr_Add(rv);
return rv;
}
static GfmlLxr quote_(GfmlLxr lxr, String quote) {
GfmlLxr rv = GfmlLxr_frame.new_("gfml.quote_0", SqlFrame_quote.Instance, quote, quote, SqlCmd_quote_str.Instance, SqlCmd_quote_end.Instance);
GfmlLxr escape = lxr_escape_("gfml.quote_0_escape", quote + quote, quote);
rv.SubLxr_Add(escape);
lxr.SubLxr_Add(rv);
return rv;
}
static GfmlLxr lxr_escape_(String key, String raw, String escape) {return GfmlLxr_.symbol_(key, raw, escape, GfmlBldrCmd_pendingTkns_add.Instance);}
static void operator_(GfmlLxr lxr, String... opAry) {
for (String op : opAry) {
GfmlLxr opLxr = GfmlLxr_.symbol_("sql:" + op, op, op, SqlCmd_operator.new_(op));
lxr.SubLxr_Add(opLxr);
}
}
}
class SqlCmd_quote_str implements GfmlBldrCmd {
public String Key() {return "sql:root";}
public void Exec(GfmlBldr bldr, GfmlTkn tkn) {
bldr.CurFrame().WaitingTkns().Add(GfmlTkn_.raw_(tkn.Raw()));
}
public static final SqlCmd_quote_str Instance = new SqlCmd_quote_str(); SqlCmd_quote_str() {}
}
class SqlCmd_quote_end implements GfmlBldrCmd {
public String Key() {return "sql:root";}
public void Exec(GfmlBldr bldr, GfmlTkn tkn) {
String_bldr sb = String_bldr_.new_();
GfmlObjList list = bldr.CurFrame().WaitingTkns();
for (int i = 0; i < list.Count(); i++) {
GfmlTkn pnd = (GfmlTkn)list.Get_at(i);
sb.Add(pnd.Val());
}
//Int_.To_str(bldr.CurNdeFrame().Nde().SubTkns().length)
GfmlAtr atr = GfmlAtr.new_(GfmlTkn_.raw_("word"), GfmlTkn_.raw_(sb.To_str()), GfmlType_.String);
bldr.CurNdeFrame().CurNde().SubObjs_Add(atr);
bldr.Frames_end();
}
public static final SqlCmd_quote_end Instance = new SqlCmd_quote_end(); SqlCmd_quote_end() {}
}
class SqlCmd_root implements GfmlBldrCmd {
public String Key() {return "sql:root";}
public void Exec(GfmlBldr bldr, GfmlTkn tkn) {
GfmlSqlUtl.Atr_add(bldr, "word", tkn);
}
public static final SqlCmd_root Instance = new SqlCmd_root(); SqlCmd_root() {}
}
class SqlFrame_quote extends GfmlFrame_base {
@Override public int FrameType() {return GfmlFrame_.Type_data;}
@Override public void Build_end(GfmlBldr bldr, GfmlFrame ownerFrame) {
}
@Override protected GfmlFrame_base MakeNew_hook() {return new SqlFrame_quote();}
public static final SqlFrame_quote Instance = new SqlFrame_quote(); SqlFrame_quote() {}
}
class SqlCmd_operator implements GfmlBldrCmd {
public String Key() {return "sql:operator";}
public void Exec(GfmlBldr bldr, GfmlTkn tkn) {
GfmlSqlUtl.Atr_add(bldr, "op", tkn);
}
String op;
public static SqlCmd_operator new_(String op) {
SqlCmd_operator rv = new SqlCmd_operator();
rv.op = op;
return rv;
} SqlCmd_operator() {}
}
class GfmlSqlUtl {
public static void Nde_bgn(GfmlBldr bldr, String name) {
bldr.CurNdeFrame().NdeBody_bgn(GfmlTkn_.Null);
bldr.CurNde().Hnd_set(name);
}
public static void Nde_end(GfmlBldr bldr) {
bldr.Frames_end();
}
public static void Atr_add(GfmlBldr bldr, String raw, GfmlTkn tkn) {
GfmlAtr atr = GfmlAtr.new_(GfmlTkn_.raw_(raw), tkn, GfmlType_.String);
bldr.CurNde().SubObjs_Add(atr);
}
}
class GfmlNdeWrapper {
public GfmlNde Nde() {return nde;} GfmlNde nde;
public GfmlNdeWrapper Name_(String v) {nde.Hnd_set(v); return this;}
public GfmlNdeWrapper Atrs_add_(String name, String val) {
GfmlAtr atr = GfmlAtr.new_(GfmlTkn_.raw_(name), GfmlTkn_.raw_(val), GfmlType_.String);
nde.SubObjs_Add(atr);
return this;
}
public static GfmlNdeWrapper new_() {
GfmlNdeWrapper rv = new GfmlNdeWrapper();
rv.nde = GfmlNde.new_(GfmlTkn_.Null, GfmlType_.Null, false);
return rv;
}
}