public void assignRole ( XEvent event , String role ) { if ( role != null && role . trim ( ) . length ( ) > 0 ) { XAttributeLiteral attr = ( XAttributeLiteral ) ATTR_ROLE . clone ( ) ; attr . setValue ( role . trim ( ) ) ; event . getAttributes ( ) . put ( KEY_ROLE , attr ) ; } }
Assigns the role attribute value for a given event .