public static String buildReportTable ( final List < TopicErrorData > topicErrorDatas , final String tableTitle , final boolean showEditorLink , final ZanataDetails zanataDetails ) { final List < String > tableHeaders = CollectionUtilities . toArrayList ( new String [ ] { "Topic Link" , "Topic Title" , "Topic Tags" } ) ; // Put the details into different tables final List < List < String > > rows = new ArrayList < List < String > > ( ) ; for ( final TopicErrorData topicErrorData : topicErrorDatas ) { final BaseTopicWrapper < ? > topic = topicErrorData . getTopic ( ) ; final List < String > topicTitles ; if ( topic instanceof TranslatedTopicWrapper ) { final TranslatedTopicWrapper translatedTopic = ( TranslatedTopicWrapper ) topic ; if ( ! EntityUtilities . isDummyTopic ( translatedTopic ) && translatedTopic . getTopic ( ) != null ) { topicTitles = CollectionUtilities . toArrayList ( DocBookUtilities . wrapInListItem ( DocBookUtilities . wrapInPara ( "[" + translatedTopic . getTopic ( ) . getLocale ( ) . getValue ( ) + "] " + translatedTopic . getTopic ( ) . getTitle ( ) ) ) , DocBookUtilities . wrapInListItem ( DocBookUtilities . wrapInPara ( "[" + translatedTopic . getLocale ( ) . getValue ( ) + "] " + translatedTopic . getTitle ( ) ) ) ) ; } else { topicTitles = CollectionUtilities . toArrayList ( DocBookUtilities . wrapInListItem ( DocBookUtilities . wrapInPara ( topic . getTitle ( ) ) ) ) ; } } else { topicTitles = CollectionUtilities . toArrayList ( DocBookUtilities . wrapInListItem ( DocBookUtilities . wrapInPara ( topic . getTitle ( ) ) ) ) ; } final String topicULink = createTopicTableLinks ( topic , showEditorLink , zanataDetails ) ; final String topicTitle = DocBookUtilities . wrapListItems ( topicTitles ) ; final String topicTags = buildItemizedTopicTagList ( topic ) ; rows . add ( CollectionUtilities . toArrayList ( new String [ ] { topicULink , topicTitle , topicTags } ) ) ; } return rows . size ( ) > 0 ? DocBookUtilities . wrapInTable ( tableTitle , tableHeaders , rows ) : "" ; }
Builds a Table to be used within a report . The table contains a link to the topic in Skynet the topic Title and the list of tags for the topic .