code: private void reiterateToMapRefEntity(
        Repository<Entity> attributeRepo, IntermediateParseResults intermediateResults) {
      int rowIndex = 1;
      for (Entity attributeEntity : attributeRepo) {
        final String entityTypeId = attributeEntity.getString(EMX_ATTRIBUTES_ENTITY);
        final String attributeName = attributeEntity.getString(EMX_ATTRIBUTES_NAME);
        final String refEntityName = (String) attributeEntity.get(EMX_ATTRIBUTES_REF_ENTITY);
        final String mappedByAttrName = (String) attributeEntity.get(EMX_ATTRIBUTES_MAPPED_BY);
        EntityType entityType = intermediateResults.getEntityType(entityTypeId);
        Attribute attribute = entityType.getAttribute(attributeName);
  
        if (attribute.getDataType().equals(FILE)) {
          // If attribute is of type file, set refEntity to file meta and continue to the next
          // attribute
          attribute.setRefEntity(dataService.getEntityType(FILE_META));
          continue;
        }
  
        rowIndex++;
        if (refEntityName != null) {
          processAttrRefEntityName(
              intermediateResults, rowIndex, refEntityName, mappedByAttrName, attribute);
        }
      }
    }
docs: re-iterate to map the mrefs/xref refEntity (or give error if not found)
  
  @param attributeRepo the attributes {@link Repository}
  @param intermediateResults {@link ParsedMetaData} to add the ref entities to