You can follow the tag example, just change taxonomy to your taxonomy (Or use the var, i assume $taxonomy is being populated).
The object you get back from get_taxonomy() does not contain any terms, it contains data on the taxonomy, not the terms that exist for that taxonomy, so take this line from your tags code.
$terms = get_terms( $taxonomy, $args );
If taxonomy in that case was something other than tags, you get the terms for that taxonomy instead.
So for example, if i were to call..
$terms = get_taxonomy( 'post_tag' );
I'd not get any actual tags back, just data about the taxonomy(post_tag in this case)..
post_tag is a taxonomy
tags available are terms of that taxonomy
I think perhaps you just have a little confusion in what a taxonomy is and what a term is, though your tag code looks fine, your taxonomy code should follow the same procedure, and only need a few minor changes, namingly to the taxonomy(which obviously will be something other than post_tag)..
if( is_taxonomy( $taxonomy ) )
..should be fine for the condition..
Print/Dump the query vars so you can see what you're working with..
?><pre><?php print_r( $wp_query->query_vars) ?></pre><?php