*/
public static DataFormat getDataFormat(RouteContext routeContext, DataFormatDefinition type, String ref) {
if (type == null) {
ObjectHelper.notNull(ref, "ref or dataFormat");
DataFormat dataFormat = lookup(routeContext, ref, DataFormat.class);
if (dataFormat == null) {
// lookup type and create the data format from it
type = lookup(routeContext, ref, DataFormatDefinition.class);
if (type == null) {
type = routeContext.getDataFormat(ref);