}
public void mapDO(DataMap datamap, Object idataObj)throws RulesException {
if(loaded==false){
String err = init(datamap);
if(err!=null)throw new RulesException("Undefined","DataObjectMap",err);
}
Class params[] = {};
Object paramsObj[] = {};
try {
boolean needToClose = OpenEntityTag(datamap, idataObj);
for(String getter : tagMap.keySet()){
String tag = tagMap.get(getter);
Method getV = dataObj.getMethod(getter, params);
Object v = getV.invoke(idataObj, paramsObj);
datamap.printdata(tag, v);
}
if(needToClose){
datamap.closetag();
}
} catch (SecurityException e) {
throw new RulesException("invalidAccess","DataObjectMap",e.toString());
} catch (IllegalArgumentException e) {
throw new RulesException("invalidAccess","DataObjectMap",e.toString());
} catch (NoSuchMethodException e) {
throw new RulesException("undefined","DataObjectMap",e.toString());
} catch (IllegalAccessException e) {
throw new RulesException("invalidAccess","DataObjectMap",e.toString());
} catch (InvocationTargetException e) {
throw new RulesException("unknown","DataObjectMap",e.toString());
}
}