for( ServiceRecordBean srb : records ) {
if( this.getSelectedServiceTypes().contains( srb.getType() ) ) {
if( srb.getInputs(true) != null ) {
for( URI fmt : srb.getInputs(true) ) {
if( sbn.get(fmt) == null ) {
sbn.put(fmt, new ServiceRecordsByFormatBean( fr.getFormatForUri(fmt) ) );
}
sbn.get(fmt).addAsInputService(srb);
}
}
if( srb.getOutputs() != null ) {
for( URI fmt : srb.getOutputs() ) {
if( sbn.get(fmt) == null ) {
sbn.put(fmt, new ServiceRecordsByFormatBean( fr.getFormatForUri(fmt) ) );
}
sbn.get(fmt).addAsOutputService(srb);
}
}
}