}
} else if (type == IRObject.iEntity) {
if(entity!=null){
value = entity;
}else{
throw new RulesException("MappingError","LoadDatamapData","Entity Tags have to create some Entity Reference");
}
} else if (type == IRObject.iString) {
value = RString.newRString(body.toString());
} else if (type == IRObject.iXmlValue){
if(xmltag != null){
value = new RXmlValue(state,xmltag);
}else{
throw new RulesException("MappingError","LoadDatamapData","Somehow we are missing the XML Tag for the attribute: "+a);
}
} else {
throw new RulesException("MappingError","LoadDatamapData","Unsupported type encountered: "+RSession.typeInt2Str(type));
}
// conversion in the Rules Engine to do the proper thing.
state.def(a,value,false);
state.traceInfo("message"," /"+a+" \""+body+"\" def");
}