public Attribute renameGlobalAttribute ( String oldName , String newName ) { if ( ! defineMode ) throw new UnsupportedOperationException ( "not in define mode" ) ; Attribute att = findGlobalAttribute ( oldName ) ; if ( null == att ) return null ; rootGroup . remove ( att ) ; att = new Attribute ( newName , att . getValues ( ) ) ; rootGroup . addAttribute ( att ) ; return att ; }
Rename a global Attribute . Must be in define mode .