public static String getTopicTitleWithConditions ( final ITopicNode specTopic , final BaseTopicWrapper < ? > topic ) { final String condition = specTopic . getConditionStatement ( true ) ; if ( condition != null && topic . getTitle ( ) != null && topic . getTitle ( ) . contains ( "condition" ) ) { try { final Document doc = XMLUtilities . convertStringToDocument ( "<title>" + topic . getTitle ( ) + "</title>" ) ; // Process the condition on the title DocBookUtilities . processConditions ( condition , doc ) ; // Return the processed title return XMLUtilities . convertNodeToString ( doc , false ) ; } catch ( Exception e ) { log . debug ( e . getMessage ( ) ) ; } return topic . getTitle ( ) ; } else { return topic . getTitle ( ) ; } }
Gets a Topics title with conditional statements applied