package SHARK2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class map2xml extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "SHARK2.keymon.com.mx.map2xml");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", SHARK2.keymon.com.mx.map2xml.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public com.jamesmurty.utils.XMLBuilder _builder = null;
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _class_globals(SHARK2.keymon.com.mx.map2xml __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="map2xml";
RDebugUtils.currentLine=79757312;
 //BA.debugLineNum = 79757312;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=79757313;
 //BA.debugLineNum = 79757313;BA.debugLine="Private builder As XMLBuilder";
_builder = new com.jamesmurty.utils.XMLBuilder();
RDebugUtils.currentLine=79757314;
 //BA.debugLineNum = 79757314;BA.debugLine="End Sub";
return "";
}
public String  _handleelement(SHARK2.keymon.com.mx.map2xml __ref,String _key,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="map2xml";
if (Debug.shouldDelegate(ba, "handleelement", true))
	 {return ((String) Debug.delegate(ba, "handleelement", new Object[] {_key,_value}));}
RDebugUtils.currentLine=80019456;
 //BA.debugLineNum = 80019456;BA.debugLine="Private Sub HandleElement (key As String, value As";
RDebugUtils.currentLine=80019457;
 //BA.debugLineNum = 80019457;BA.debugLine="If value Is Map Then";
if (_value instanceof java.util.Map) { 
RDebugUtils.currentLine=80019458;
 //BA.debugLineNum = 80019458;BA.debugLine="If key <> \"\" Then builder = builder.element(key)";
if ((_key).equals("") == false) { 
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .element(_key);};
RDebugUtils.currentLine=80019459;
 //BA.debugLineNum = 80019459;BA.debugLine="HandleMapElement(value)";
__ref._handlemapelement /*String*/ (null,(anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_value)));
RDebugUtils.currentLine=80019460;
 //BA.debugLineNum = 80019460;BA.debugLine="If key <> \"\" Then builder = builder.up";
if ((_key).equals("") == false) { 
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .up();};
 }else 
{RDebugUtils.currentLine=80019461;
 //BA.debugLineNum = 80019461;BA.debugLine="Else if value Is List Then";
if (_value instanceof java.util.List) { 
RDebugUtils.currentLine=80019462;
 //BA.debugLineNum = 80019462;BA.debugLine="HandleListElement (key, value)";
__ref._handlelistelement /*String*/ (null,_key,(anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_value)));
 }else {
RDebugUtils.currentLine=80019464;
 //BA.debugLineNum = 80019464;BA.debugLine="builder = builder.element(key)";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .element(_key);
RDebugUtils.currentLine=80019465;
 //BA.debugLineNum = 80019465;BA.debugLine="builder = builder.text(value)";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .text(BA.ObjectToString(_value));
RDebugUtils.currentLine=80019466;
 //BA.debugLineNum = 80019466;BA.debugLine="builder = builder.up";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .up();
 }}
;
RDebugUtils.currentLine=80019468;
 //BA.debugLineNum = 80019468;BA.debugLine="End Sub";
return "";
}
public String  _handlemapelement(SHARK2.keymon.com.mx.map2xml __ref,anywheresoftware.b4a.objects.collections.Map _m) throws Exception{
__ref = this;
RDebugUtils.currentModule="map2xml";
if (Debug.shouldDelegate(ba, "handlemapelement", true))
	 {return ((String) Debug.delegate(ba, "handlemapelement", new Object[] {_m}));}
anywheresoftware.b4a.objects.collections.Map _attributes = null;
String _attr = "";
String _k = "";
Object _value = null;
RDebugUtils.currentLine=79953920;
 //BA.debugLineNum = 79953920;BA.debugLine="Private Sub HandleMapElement (m As Map)";
RDebugUtils.currentLine=79953921;
 //BA.debugLineNum = 79953921;BA.debugLine="Dim attributes As Map = m.Get(\"Attributes\")";
_attributes = new anywheresoftware.b4a.objects.collections.Map();
_attributes = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_m.Get((Object)("Attributes"))));
RDebugUtils.currentLine=79953922;
 //BA.debugLineNum = 79953922;BA.debugLine="If attributes.IsInitialized Then";
if (_attributes.IsInitialized()) { 
RDebugUtils.currentLine=79953923;
 //BA.debugLineNum = 79953923;BA.debugLine="For Each attr As String In attributes.Keys";
{
final anywheresoftware.b4a.BA.IterableList group3 = _attributes.Keys();
final int groupLen3 = group3.getSize()
;int index3 = 0;
;
for (; index3 < groupLen3;index3++){
_attr = BA.ObjectToString(group3.Get(index3));
RDebugUtils.currentLine=79953924;
 //BA.debugLineNum = 79953924;BA.debugLine="builder.attribute(attr, attributes.Get(attr))";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .attribute(_attr,BA.ObjectToString(_attributes.Get((Object)(_attr))));
 }
};
RDebugUtils.currentLine=79953926;
 //BA.debugLineNum = 79953926;BA.debugLine="If m.ContainsKey(\"Text\") Then builder.text(m.Get";
if (_m.ContainsKey((Object)("Text"))) { 
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .text(BA.ObjectToString(_m.Get((Object)("Text"))));};
RDebugUtils.currentLine=79953927;
 //BA.debugLineNum = 79953927;BA.debugLine="m.Remove(\"Attributes\")";
_m.Remove((Object)("Attributes"));
RDebugUtils.currentLine=79953928;
 //BA.debugLineNum = 79953928;BA.debugLine="m.Remove(\"Text\")";
_m.Remove((Object)("Text"));
 };
RDebugUtils.currentLine=79953930;
 //BA.debugLineNum = 79953930;BA.debugLine="For Each k As String In m.Keys";
{
final anywheresoftware.b4a.BA.IterableList group10 = _m.Keys();
final int groupLen10 = group10.getSize()
;int index10 = 0;
;
for (; index10 < groupLen10;index10++){
_k = BA.ObjectToString(group10.Get(index10));
RDebugUtils.currentLine=79953931;
 //BA.debugLineNum = 79953931;BA.debugLine="Dim value As Object = m.Get(k)";
_value = _m.Get((Object)(_k));
RDebugUtils.currentLine=79953932;
 //BA.debugLineNum = 79953932;BA.debugLine="HandleElement(k, value)";
__ref._handleelement /*String*/ (null,_k,_value);
 }
};
RDebugUtils.currentLine=79953934;
 //BA.debugLineNum = 79953934;BA.debugLine="End Sub";
return "";
}
public String  _handlelistelement(SHARK2.keymon.com.mx.map2xml __ref,String _key,anywheresoftware.b4a.objects.collections.List _lst) throws Exception{
__ref = this;
RDebugUtils.currentModule="map2xml";
if (Debug.shouldDelegate(ba, "handlelistelement", true))
	 {return ((String) Debug.delegate(ba, "handlelistelement", new Object[] {_key,_lst}));}
Object _value = null;
RDebugUtils.currentLine=80084992;
 //BA.debugLineNum = 80084992;BA.debugLine="Private Sub HandleListElement (key As String, lst";
RDebugUtils.currentLine=80084993;
 //BA.debugLineNum = 80084993;BA.debugLine="For Each value As Object In lst";
{
final anywheresoftware.b4a.BA.IterableList group1 = _lst;
final int groupLen1 = group1.getSize()
;int index1 = 0;
;
for (; index1 < groupLen1;index1++){
_value = group1.Get(index1);
RDebugUtils.currentLine=80084994;
 //BA.debugLineNum = 80084994;BA.debugLine="HandleElement(key, value)";
__ref._handleelement /*String*/ (null,_key,_value);
 }
};
RDebugUtils.currentLine=80084996;
 //BA.debugLineNum = 80084996;BA.debugLine="End Sub";
return "";
}
public String  _initialize(SHARK2.keymon.com.mx.map2xml __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="map2xml";
if (Debug.shouldDelegate(ba, "initialize", true))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=79822848;
 //BA.debugLineNum = 79822848;BA.debugLine="Public Sub Initialize";
RDebugUtils.currentLine=79822850;
 //BA.debugLineNum = 79822850;BA.debugLine="End Sub";
return "";
}
public String  _maptoxml(SHARK2.keymon.com.mx.map2xml __ref,anywheresoftware.b4a.objects.collections.Map _m) throws Exception{
__ref = this;
RDebugUtils.currentModule="map2xml";
if (Debug.shouldDelegate(ba, "maptoxml", true))
	 {return ((String) Debug.delegate(ba, "maptoxml", new Object[] {_m}));}
String _k = "";
anywheresoftware.b4a.objects.collections.Map _props = null;
RDebugUtils.currentLine=79888384;
 //BA.debugLineNum = 79888384;BA.debugLine="Public Sub MapToXml (m As Map) As String";
RDebugUtils.currentLine=79888385;
 //BA.debugLineNum = 79888385;BA.debugLine="For Each k As String In m.Keys";
{
final anywheresoftware.b4a.BA.IterableList group1 = _m.Keys();
final int groupLen1 = group1.getSize()
;int index1 = 0;
;
for (; index1 < groupLen1;index1++){
_k = BA.ObjectToString(group1.Get(index1));
RDebugUtils.currentLine=79888386;
 //BA.debugLineNum = 79888386;BA.debugLine="builder = builder.create(k)";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .create(_k);
RDebugUtils.currentLine=79888387;
 //BA.debugLineNum = 79888387;BA.debugLine="HandleElement(\"\", m.Get(k))";
__ref._handleelement /*String*/ (null,"",_m.Get((Object)(_k)));
RDebugUtils.currentLine=79888388;
 //BA.debugLineNum = 79888388;BA.debugLine="Exit";
if (true) break;
 }
};
RDebugUtils.currentLine=79888390;
 //BA.debugLineNum = 79888390;BA.debugLine="builder = builder.up";
__ref._builder /*com.jamesmurty.utils.XMLBuilder*/  = __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .up();
RDebugUtils.currentLine=79888392;
 //BA.debugLineNum = 79888392;BA.debugLine="Dim props As Map";
_props = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=79888393;
 //BA.debugLineNum = 79888393;BA.debugLine="props.Initialize";
_props.Initialize();
RDebugUtils.currentLine=79888394;
 //BA.debugLineNum = 79888394;BA.debugLine="props.Put(\"{http://xml.apache.org/xslt}indent-amo";
_props.Put((Object)("{http://xml.apache.org/xslt}indent-amount"),(Object)("4"));
RDebugUtils.currentLine=79888395;
 //BA.debugLineNum = 79888395;BA.debugLine="props.Put(\"indent\", \"yes\")";
_props.Put((Object)("indent"),(Object)("yes"));
RDebugUtils.currentLine=79888396;
 //BA.debugLineNum = 79888396;BA.debugLine="Return builder.asString2(props)";
if (true) return __ref._builder /*com.jamesmurty.utils.XMLBuilder*/ .asString2((java.util.Map)(_props.getObject()));
RDebugUtils.currentLine=79888400;
 //BA.debugLineNum = 79888400;BA.debugLine="End Sub";
return "";
}
}