private N createRoot ( N root , List < E > objects ) { // insert data for ( E entry : objects ) { if ( entry instanceof LeafEntry ) { root . addLeafEntry ( entry ) ; } else { root . addDirectoryEntry ( entry ) ; } } // set root mbr ( ( SpatialDirectoryEntry ) getRootEntry ( ) ) . setMBR ( root . computeMBR ( ) ) ; // write to file writeNode ( root ) ; if ( getLogger ( ) . isDebuggingFiner ( ) ) { StringBuilder msg = new StringBuilder ( ) ; msg . append ( "pageNo " ) . append ( root . getPageID ( ) ) ; getLogger ( ) . debugFiner ( msg . toString ( ) ) ; } return root ; }
Returns a root node for bulk load . If the objects are data objects a leaf node will be returned if the objects are nodes a directory node will be returned .