+ private static void addLineage( final DefaultMutableTreeNode top,
+ final List<String> lineage,
+ final DefaultMutableTreeNode category ) {
+ if ( ( lineage != null ) && ( lineage.size() > 0 ) ) {
+ final StringBuilder sb = new StringBuilder();
+ for( final String lin : lineage ) {
+ if ( !ForesterUtil.isEmpty( lin ) ) {
+ sb.append( lin );
+ sb.append( " > " );
+ }
+ }
+ String str = null;
+ if ( sb.length() > 1 ) {
+ str = sb.substring( 0, sb.length() - 3 );
+ }
+ if ( !ForesterUtil.isEmpty( str ) ) {
+ addSubelement( category, "Lineage", str );
+ }
+ }
+ }
+