String name = tag; // We assume the tag might create an entity
EntityInfo info = (EntityInfo) this.map.requests.get(name);
AttributeInfo aInfo = (AttributeInfo) this.map.setattributes.get(tag);
IREntity topOfEntityStack = state.entityfetch(0);
// If I get info, then create an entity.
// Get the code from this tag.
// If a fixed entity name is specified,
// or the tag name, use it. Otherwise use the multiple name
if(info!=null){
Object objCode = attribs == null ? null : attribs.get(info.id);
String code = objCode==null?"":objCode.toString();
String eName = info.name;
if (eName == null || eName.length() <= 0)
{
eName = (String) attribs.get("name");
}
IREntity e = findEntity(eName, code, info); // Look up the entity I should create.
if(e!=null){ // I hope to goodness I can find it!
attribs.put("create entity","true");
if(code.length()!=0) {
e.put(null, IREntity.mappingKey,RString.newRString(code));
}else{
e.put(null, IREntity.mappingKey,RString.newRString("v"+ (++codeCnt)));
}
state.entitypush(e);
if(state.testState(DTState.TRACE)){
state.traceTagBegin("createEntity", "name",info.name,"id",code+"");