use of org.pentaho.dictionary.DictionaryConst.LINK_OUTPUTS in project pentaho-metaverse by pentaho.
the class AnnotationDrivenStepMetaAnalyzer method getOutputRowMetaInterfaces.
/**
* Adds any linked resource nodes to the output row meta.
* Applicable to something like a Message field being sent to an external queue.
*/
@Override
protected Map<String, RowMetaInterface> getOutputRowMetaInterfaces(BaseStepMeta meta) {
Map<String, RowMetaInterface> rowMetas = super.getOutputRowMetaInterfaces(meta);
AnnotatedClassFields nodeTree = new AnnotatedClassFields(meta);
RowMeta resourceRowMeta = new RowMeta();
new AnnotatedClassFields(meta).links().filter(field -> nodeTree.node(field.annotation.nodeName()).get().annotation.link().equals(LINK_OUTPUTS)).forEach(field -> resourceRowMeta.addValueMeta(new ValueMetaNone(field.name)));
if (resourceRowMeta.size() > 0) {
rowMetas.put(RESOURCE, resourceRowMeta);
}
return rowMetas;
}
Aggregations