+ if ( ( tax.getLineage() != null ) && !tax.getLineage().isEmpty() ) {
+ addLineage( top, tax.getLineage(), category );
+ }
+ }
+
+ private static void addUri( final DefaultMutableTreeNode top, final Uri uri, final String name ) {
+ DefaultMutableTreeNode category;
+ category = new DefaultMutableTreeNode( name );
+ top.add( category );
+ addSubelement( category, "Description", uri.getDescription() );
+ addSubelement( category, "Type", uri.getType() );
+ addSubelement( category, "URI", uri.getValue().toString() );
+ }
+
+ private static void addUris( final DefaultMutableTreeNode top,
+ final List<Uri> uris,
+ final DefaultMutableTreeNode category ) {
+ if ( ( uris != null ) && ( uris.size() > 0 ) ) {
+ category.add( new DefaultMutableTreeNode( "URIs" ) );
+ final DefaultMutableTreeNode last = top.getLastLeaf();
+ int i = 0;
+ for( final Uri uri : uris ) {
+ if ( uri != null ) {
+ addUri( last, uri, "URI " + ( i++ ) );
+ }
+ }
+ }