private Element addRoot ( Document document , Map < ReportBuilderImpl . ReportKey , Object > reportsData ) { Element rootElement = document . createElement ( "project" ) ; if ( reportsData . containsKey ( ReportKey . PROJECT_NAME ) ) { rootElement . setAttribute ( "name" , ( String ) reportsData . get ( ReportKey . PROJECT_NAME ) ) ; } document . appendChild ( rootElement ) ; return rootElement ; }
Adds root element .