public String getColumnValue ( SIFInteraction inter ) { switch ( type ) { case MEDIATOR : return concat ( inter . getMediatorIDs ( ) ) ; case PATHWAY : return concat ( inter . getPathwayNames ( ) ) ; case PATHWAY_URI : return concat ( inter . getPathwayUris ( ) ) ; case PUBMED : return concat ( inter . getPublicationIDs ( true ) ) ; case PMC : return concat ( inter . getPublicationIDs ( false ) ) ; case RESOURCE : return concat ( inter . getDataSources ( ) ) ; case SOURCE_LOC : return concat ( inter . getCellularLocationsOfSource ( ) ) ; case TARGET_LOC : return concat ( inter . getCellularLocationsOfTarget ( ) ) ; case COMMENTS : return concat ( inter . getMediatorComments ( ) ) ; case CUSTOM : { Set < String > set = new HashSet < String > ( ) ; for ( PathAccessor acc : accessors ) { for ( Object o : acc . getValueFromBeans ( inter . mediators ) ) { set . add ( o . toString ( ) ) ; } } List < String > list = new ArrayList < String > ( set ) ; Collections . sort ( list ) ; return concat ( list ) ; } default : throw new RuntimeException ( "Unhandled type: " + type + ". This shouldn't be happening." ) ; } }
Get the string to write in the output file .