@ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , isolation = Isolation . READ_COMMITTED ) public boolean importCorpus ( String path , String aliasName , boolean overwrite , boolean waitForOtherTasks ) { // check schema version first checkDatabaseSchemaVersion ( ) ; if ( ! lockRepositoryMetadataTable ( waitForOtherTasks ) ) { log . error ( "Another import is currently running" ) ; return false ; } // explicitly unset any timeout getJdbcTemplate ( ) . update ( "SET statement_timeout TO 0" ) ; ANNISFormatVersion annisFormatVersion = getANNISFormatVersion ( path ) ; if ( annisFormatVersion == ANNISFormatVersion . V3_3 ) { return importVersion4 ( path , aliasName , overwrite , annisFormatVersion ) ; } else if ( annisFormatVersion == ANNISFormatVersion . V3_1 || annisFormatVersion == ANNISFormatVersion . V3_2 ) { return importVersion3 ( path , aliasName , overwrite , annisFormatVersion ) ; } log . error ( "Unknown ANNIS import format version" ) ; return false ; }
Reads ANNIS files from several directories .