* @param name
* @param itype
* @throws Exception
*/
private void addType( REntity entity, RName name, int itype) throws Exception {
RType type = types.get(name);
if(type==null){
type = new RType(name,itype,entity);
types.put(name,type);
}else{
if(type.getType()!=itype){
String entitylist = entity.getName().stringValue();
for(int i=0; i<type.getEntities().size(); i++){
entitylist += " "+type.getEntities().get(i).getName().stringValue();
}
throw new Exception("Conflicting types for attribute "+name+" on "+entitylist);
}
type.addEntityAttribute(entity);
}
}