@JsonIgnore public boolean isValid() { return getWorkspaceId() != null && getSourceLocation() != null && getGraphComposition() != null && getGraphComposition().valid(); }
@JsonIgnore public boolean isValid() { return getWorkspaceId() != null && getSourceLocation() != null && getGraphComposition() != null && getGraphComposition().valid(); }
final Location location = recipe.getSourceLocation(); try
throws CartoDataException, CartoRequestException logger.info( "Initial source location: '{}'", recipe.getSourceLocation() ); final URI sourceUri = sourceManager.createSourceURI( recipe.getSourceLocation().getUri() ); recipe.getSourceLocation(), sourceManager.getFormatHint() );
final Location location = recipe.getSourceLocation(); try
throws CartoDataException, CartoRequestException logger.info( "Initial source location: '{}'", recipe.getSourceLocation() ); final URI sourceUri = sourceManager.createSourceURI( recipe.getSourceLocation().getUri() ); recipe.getSourceLocation(), sourceManager.getFormatHint() );
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 ); } }