public String computefqn ( ) { List < DapNode > path = getPath ( ) ; // excludes root/wrt StringBuilder fqn = new StringBuilder ( ) ; DapNode parent = path . get ( 0 ) ; for ( int i = 1 ; i < path . size ( ) ; i ++ ) { // start at 1 to skip root DapNode current = path . get ( i ) ; // Depending on what parent is, use different delimiters switch ( parent . getSort ( ) ) { case DATASET : case GROUP : case ENUMERATION : fqn . append ( ' ' ) ; fqn . append ( Escape . backslashEscape ( current . getShortName ( ) , "/." ) ) ; break ; // These use '.' case STRUCTURE : case SEQUENCE : case ENUMCONST : case VARIABLE : fqn . append ( ' ' ) ; fqn . append ( current . getEscapedShortName ( ) ) ; break ; default : // Others should never happen throw new IllegalArgumentException ( "Illegal FQN parent" ) ; } parent = current ; } return fqn . toString ( ) ; }
Compute the FQN of this node