config.setLocations( locations ); config.setStoreRelationships( true ); config.setEnabledPatchers( patcherSupport.getAvailablePatchers() );
private void resolveDiscoveryConfig( final AbstractGraphRequest recipe ) throws CartoRequestException { if ( recipe.getDiscoveryConfig() == null ) { final Location sourceLocation = recipe.getSourceLocation(); if ( sourceLocation == null ) { throw new CartoRequestException( "Source Location appears not to have been set on RepositoryContentRequest: {}. Cannot create DiscoveryConfig.", this ); } final String uri = sourceLocation.getUri(); DiscoveryConfig ddc; try { ddc = new DiscoveryConfig( uri ); } catch ( final URISyntaxException e ) { throw new CartoRequestException( "Invalid Source Location URI: {}. Cannot create DiscoveryConfig.", uri ); } ddc.setEnabled( recipe.isResolve() ); ddc.setEnabledPatchers( recipe.getPatcherIds() ); ddc.setTimeoutMillis( 1000 * recipe.getTimeoutSecs() ); resolveDiscoveryLocations( ddc, recipe ); recipe.setDiscoveryConfig( ddc ); } }
private void resolveDiscoveryConfig( final AbstractGraphRequest recipe ) throws CartoRequestException { if ( recipe.getDiscoveryConfig() == null ) { final Location sourceLocation = recipe.getSourceLocation(); if ( sourceLocation == null ) { throw new CartoRequestException( "Source Location appears not to have been set on RepositoryContentRequest: {}. Cannot create DiscoveryConfig.", this ); } final String uri = sourceLocation.getUri(); DiscoveryConfig ddc; try { ddc = new DiscoveryConfig( uri ); } catch ( final URISyntaxException e ) { throw new CartoRequestException( "Invalid Source Location URI: {}. Cannot create DiscoveryConfig.", uri ); } ddc.setEnabled( recipe.isResolve() ); ddc.setEnabledPatchers( recipe.getPatcherIds() ); ddc.setTimeoutMillis( 1000 * recipe.getTimeoutSecs() ); resolveDiscoveryLocations( ddc, recipe ); recipe.setDiscoveryConfig( ddc ); } }