class GuidedDTDRLPersistence {

    void doMetadata(List<BaseColumn> allColumns,
                    List<MetadataCol52> metadataCols,
                    List<DTCellValue52> row,
                    RuleModel rm) {

        // setup temp list
        List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

        for (int j = 0; j < metadataCols.size(); j++) {
            MetadataCol52 meta = metadataCols.get(j);
            int index = allColumns.indexOf(meta);
            final DTCellValue52 dcv = row.get(index);
            String cell = GuidedDTDRLUtilities.convertDTCellValueToString(dcv);

            if (validateMetadataCell(cell)) {
                metadataList.add(new RuleMetadata(meta.getMetadata(),
                                                  cell));
            }
        }
        if (metadataList.size() > 0) {
            rm.metadataList = metadataList.toArray(new RuleMetadata[metadataList.size()]);
        }
    }

}