Пример #1
0
 @Override
 public Object visiteManif(final NodeManif parent, final Object data) {
   final ObjManifestation manif = new ObjManifestation(parent._name);
   manif.setDate(createDate(parent._date));
   manif.setDescription(parent._description);
   for (int i = 0; i < parent.getNumChild(); i++) {
     parent.getChild(i).accept(this, manif);
   }
   return manif;
 }
Пример #2
0
 @Override
 public Object visiteCategories(final NodeCategories parent, final Object data) {
   if (data instanceof ObjManifestation) {
     final ObjManifestation manif = (ObjManifestation) data;
     for (int i = 0; i < parent.getNumChild(); i++) {
       final ObjCategorie cat = (ObjCategorie) parent.getChild(i).accept(this, data);
       manif.addCategorie(cat);
     }
   }
   if (data instanceof ObjStep) {
     final ObjStep step = (ObjStep) data;
     for (int i = 0; i < parent.getNumChild(); i++) {
       final ObjCategorie cat = (ObjCategorie) parent.getChild(i).accept(this, data);
       step.addFiltreCategory(cat);
     }
   }
   return null;
 }