public void renameEntity(String entityName, String newEntityName) {
   NamedNodeTemplate template = nodeTemplates.remove(entityName);
   if (template != null) {
     template.rename(newEntityName);
     nodeTemplates.put(newEntityName, template);
   }
   NamedNodeType nodeType = nodeTypes.remove(entityName);
   if (nodeType != null) {
     nodeType.rename(newEntityName);
     nodeTypes.put(newEntityName, nodeType);
   }
   NamedStruct struct = structTypes.remove(entityName);
   if (struct != null) {
     struct.rename(newEntityName);
     structTypes.put(newEntityName, struct);
   }
 }
  public TypeManager(ToscaEnvironment toscaEnvironment) {
    this.toscaEnvironment = toscaEnvironment;
    INamedEntity[] basicTypes = {
      TypeString.instance(),
      TypeBoolean.instance(),
      TypeFloat.instance(),
      TypeInteger.instance(),
      TypeRange.instance(),
      TypeScalarUnit.instance()
    };

    for (INamedEntity basicType : basicTypes) {
      this.basicTypes.put(basicType.name(), (IType) basicType);
    }

    this.nodeTypes.put("tosca.nodes.Root", NodeRoot.instance());
    NamedStruct emptyStruct =
        new NamedStruct("emptyStruct", new TypeStruct(null, "", Collections.emptyMap()));
    emptyStruct.hidden = true;
    this.structTypes.put("emptyStruct", emptyStruct);
  }