Adds an external reference to a entity specified by the entity identifier
        @param entity_id: the entity identifier
        @type entity_id: string
        @param ext_ref: the external reference
        @type ext_ref: L{CexternalReference}

def add_external_reference_to_entity(self,entity_id,ext_ref):
        """
        Adds an external reference to a entity specified by the entity identifier
        @param entity_id: the entity identifier
        @type entity_id: string
        @param ext_ref: the external reference
        @type ext_ref: L{CexternalReference}
        """
        node_entity = self.map_entity_id_to_node.get(entity_id)
        if node_entity is not None:
            entity = Centity(node_entity,self.type)
            entity.add_external_reference(ext_ref)
        else:
            print>>sys.stderr,'Trying to add a reference to the entity',entity_id,'but can not be found in this file'