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();
}
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);
}
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);
}
Aggregations