Search in sources :

Example 1 with RichRecord

use of org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord in project tdq-studio-se by Talend.

the class BlockAndMatchManager method run.

public void run() throws BusinessException {
    while (this.resultIterator.hasNext()) {
        RichRecord record = (RichRecord) this.resultIterator.next();
        if (record == null) {
            continue;
        }
        // get the block key of this record(which block this record belongs)
        String blockKey = getBlockKey(record);
        OneBlockMatching matchInOneBlock = this.blockMatchMap.get(blockKey);
        if (matchInOneBlock == null) {
            // create a new matching for this new block to do the matching
            matchInOneBlock = createBlockKeyManager(blockKey);
        }
        // do group in the same block
        matchInOneBlock.run(record);
    }
    // end all
    endAll();
}
Also used : RichRecord(org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord)

Example 2 with RichRecord

use of org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord in project tdq-studio-se by Talend.

the class FileDelimitedReader method createRichRecord.

/**
 * DOC yyin Comment method "createRichRecord".
 *
 * @param analysedValues
 * @return
 */
private Record createRichRecord(String[] analysedValues) {
    ArrayList<Attribute> attributes = new ArrayList<Attribute>();
    for (int i = 0; i < analysedValues.length; i++) {
        Attribute attribute = new Attribute(analysedColumnName[i], i);
        String value = String.valueOf(analysedValues[i]);
        attribute.setValue(value);
        attributes.add(attribute);
    }
    return new RichRecord(attributes, String.valueOf(index++), 0, StringUtils.EMPTY);
}
Also used : RichRecord(org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord) Attribute(org.talend.dataquality.matchmerge.Attribute) ArrayList(java.util.ArrayList)

Example 3 with RichRecord

use of org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord in project tdq-studio-se by Talend.

the class FileCSVReader method createRichRecord.

/**
 * DOC yyin Comment method "createRichRecord".
 *
 * @param analysedValues
 * @return
 */
private Record createRichRecord(String[] analysedValues) {
    ArrayList<Attribute> attributes = new ArrayList<Attribute>();
    for (int i = 0; i < analysedValues.length; i++) {
        Attribute attribute = new Attribute(analysedColumnName[i], i);
        String value = String.valueOf(analysedValues[i]);
        attribute.setValue(value);
        attributes.add(attribute);
    }
    return new RichRecord(attributes, String.valueOf(index++), 0, StringUtils.EMPTY);
}
Also used : RichRecord(org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord) Attribute(org.talend.dataquality.matchmerge.Attribute) ArrayList(java.util.ArrayList)

Aggregations

RichRecord (org.talend.dataquality.record.linkage.grouping.swoosh.RichRecord)3 ArrayList (java.util.ArrayList)2 Attribute (org.talend.dataquality.matchmerge.Attribute)2