public static String getRoleName ( String containerName ) { if ( ! isRole ( containerName ) && ! isQualifiedRole ( containerName ) ) throw new VOMSError ( "No role specified in \"" + containerName + "\" voms syntax." ) ; Matcher m = fqanPattern . matcher ( containerName ) ; if ( m . matches ( ) ) { String roleGroup = m . group ( 4 ) ; return roleGroup . substring ( roleGroup . indexOf ( ' ' ) + 1 , roleGroup . length ( ) ) ; } return null ; }
This method extracts the role name information from the FQAN passed as argument .