@SuppressWarnings("unchecked")
 public ICase<FragmentActivity> getCase() {
   if (kase == null) {
     kase = (ICase<FragmentActivity>) App.get().findChildCase(getCaseName());
   }
   Logger.check(kase != null, getCaseName() + " has not been created!");
   return kase;
 }
 protected void log(String msg) {
   Logger.info(
       "*"
           + (getCase() == null ? getClass().getName() : getCase().getFullName())
           + "("
           + Integer.toHexString(this.hashCode())
           + ") : "
           + msg);
 }
 public XmlDataService() {
   try {
     int i;
     IDataNode node =
         XmlHelper.parse(
             XmlHelper.createParser(App.get().getAssets().open("PreloadData.xml"), "UTF-8"));
     IDataView<IDataNode> cs = new DataNodeView(node, "Categories/Category");
     for (i = 0; i < cs.getItemCount(); i++) {
       Category c = new Category();
       c.copyPropertiesFrom(cs.getItem(i));
       categories.addItem(c);
     }
     IDataView<IDataNode> ps = new DataNodeView(node, "Products/Product");
     for (i = 0; i < ps.getItemCount(); i++) {
       Product p = new Product();
       p.copyPropertiesFrom(ps.getItem(i));
       products.addItem(p);
     }
   } catch (IOException e) {
     Logger.error(e.getMessage());
   }
 }
 @Override
 public void onCreate() {
   super.onCreate();
   Logger.debug("SampleApplication.onCreate");
 }