use of org.dmg.pmml.DATATYPE in project knime-core by knime.
the class PMMLStringConversionTranslator method createDerivedFields.
private DerivedField[] createDerivedFields() {
DATATYPE.Enum dataType = PMMLDataDictionaryTranslator.getPMMLDataType(m_parseType);
OPTYPE.Enum optype = PMMLDataDictionaryTranslator.getOptype(m_parseType);
int num = m_includeCols.size();
DerivedField[] derivedFields = new DerivedField[num];
for (int i = 0; i < num; i++) {
DerivedField df = DerivedField.Factory.newInstance();
String name = m_includeCols.get(i);
df.setDisplayName(name);
/* The field name must be retrieved before creating a new derived
* name for this derived field as the map only contains the
* current mapping. */
String fieldName = m_mapper.getDerivedFieldName(name);
df.setName(m_mapper.createDerivedFieldName(name));
df.setDataType(dataType);
df.setOptype(optype);
FieldRef fieldRef = df.addNewFieldRef();
fieldRef.setField(fieldName);
derivedFields[i] = df;
}
return derivedFields;
}
use of org.dmg.pmml.DATATYPE in project knime-core by knime.
the class PMMLStringConversionTranslator method createDerivedFields.
private DerivedField[] createDerivedFields() {
DATATYPE.Enum dataType = PMMLDataDictionaryTranslator.getPMMLDataType(m_parseType);
OPTYPE.Enum optype = PMMLDataDictionaryTranslator.getOptype(m_parseType);
int num = m_includeCols.size();
DerivedField[] derivedFields = new DerivedField[num];
for (int i = 0; i < num; i++) {
DerivedField df = DerivedField.Factory.newInstance();
String name = m_includeCols.get(i);
df.setDisplayName(name);
/* The field name must be retrieved before creating a new derived
* name for this derived field as the map only contains the
* current mapping. */
String fieldName = m_mapper.getDerivedFieldName(name);
df.setName(m_mapper.createDerivedFieldName(name));
df.setDataType(dataType);
df.setOptype(optype);
FieldRef fieldRef = df.addNewFieldRef();
fieldRef.setField(fieldName);
derivedFields[i] = df;
}
return derivedFields;
}
Aggregations