Set<Format> formats = this.getMigrationInputFormats( endpoint, out );
// Now build the full output:
Set<FormatBean> fmts = new HashSet<FormatBean>();
for( Format f : this.getMigrationInputFormats(null, null) ) {
FormatBean formatBean = new FormatBean(f);
// Make this modify if selected:
if( formatBean.equals( this.getSelectedInputFormat() ) ) formatBean.setSelected(true);
// Modify if enabled:
if( ( this.getSelectedInputFormat() != null && ! this.getSelectedInputFormat().equals(formatBean) )
|| ! formats.contains( f ) ) formatBean.setEnabled(false);
fmts.add( formatBean );
}
ArrayList<FormatBean> list = new ArrayList<FormatBean>(fmts);
Collections.sort(list);