public String getAName ( BioPAXElement ele ) { String name = null ; if ( ele instanceof Named ) { Named n = ( Named ) ele ; if ( n . getDisplayName ( ) != null && n . getDisplayName ( ) . length ( ) > 0 ) name = n . getDisplayName ( ) ; else if ( n . getStandardName ( ) != null && n . getStandardName ( ) . length ( ) > 0 ) name = n . getStandardName ( ) ; else if ( ! n . getName ( ) . isEmpty ( ) && n . getName ( ) . iterator ( ) . next ( ) . length ( ) > 0 ) name = n . getName ( ) . iterator ( ) . next ( ) ; } if ( name == null ) name = ele . getUri ( ) ; return name + " (" + ele . getModelInterface ( ) . getName ( ) . substring ( ele . getModelInterface ( ) . getName ( ) . lastIndexOf ( "." ) + 1 ) + ")" ; }
Finds a name for the variable .