private boolean loadDefaultModels() {

        Map<URI, Future<Boolean>> concurrentTasks = new HashMap<URI, Future<Boolean>>();
        for (URI modelUri : baseModels) {
            if (modelUri != null && modelUri.isAbsolute() && !this.containsGraph(modelUri)) {
                concurrentTasks.put(modelUri, this.asyncFetchModel(modelUri, Syntax.N3.getName()));
            }
        }

        boolean result = true;
        for (URI modelUri : concurrentTasks.keySet()) {
            Future<Boolean> f = concurrentTasks.get(modelUri);
            try {
                boolean fetched = f.get();
                result = result && fetched;

                if (!fetched) {
                    log.error("Cannot load default model - {} - The software may not behave correctly. ", modelUri);
                }
            } catch (Exception e) {
                // Mark as invalid
                log.error("There was an error while trying to fetch a remote model - {}", modelUri, e);
                result = false;
            }
        }

        return result;
    }
private boolean loadDefaultModels ( ) { Map < URI , Future < Boolean > > concurrentTasks = new HashMap < URI , Future < Boolean > > ( ) ; for ( URI modelUri : baseModels ) { if ( modelUri != null && modelUri . isAbsolute ( ) && ! this . containsGraph ( modelUri ) ) { concurrentTasks . put ( modelUri , this . asyncFetchModel ( modelUri , Syntax . N3 . getName ( ) ) ) ; } } boolean result = true ; for ( URI modelUri : concurrentTasks . keySet ( ) ) { Future < Boolean > f = concurrentTasks . get ( modelUri ) ; try { boolean fetched = f . get ( ) ; result = result && fetched ; if ( ! fetched ) { log . error ( "Cannot load default model - {} - The software may not behave correctly. " , modelUri ) ; } } catch ( Exception e ) { log . error ( "There was an error while trying to fetch a remote model - {}" , modelUri , e ) ; result = false ; } } return result ; }
Loads the default models for this Graph Store and verifies they were correctly retrieved
NOTE: For now models with local mappings cannot be TTL for Jena does not guess the format properly in that case.
We need to specify the format while loading in this case.

This method pre-checks the presence of the model already in loadedModels

This method pre-checks the presence of the model already in loadedModels

@return True if they were all added correctly. False otherwise.