public void resolvePresets( final GraphDescription graph ) { if ( graph == null ) { return; } if ( graph.filter() == null ) { final ProjectRelationshipFilter filter = presets.getPresetFilter( graph.getPreset(), graph.getDefaultPreset(), graph.getPresetParams() ); graph.setFilter( filter ); } }
public synchronized Set<ProjectVersionRef> getResultingProjects() { if ( projects == null ) { projects = targets( result ); if ( !graphs.isEmpty() ) { projects.addAll( graphs.get( 0 ) .getRoots() ); if ( operation == null || operation != GraphCalculationType.SUBTRACT ) { for ( int i = 1; i < graphs.size(); i++ ) { projects.addAll( graphs.get( i ) .getRoots() ); } } } } return projects; }
public GraphDescription build() { if ( preset != null ) { return new GraphDescription( preset, null, presetParams, roots ); } else { return new GraphDescription( filter, null, roots ); } }
public void resolveMutator( final GraphDescription graph ) { if ( graph == null ) { return; } if ( graph.getMutatorInstance() == null ) { final GraphMutator mutator = mutators.getGraphMutator( graph.getMutator() ); graph.setMutatorInstance( mutator ); } }
final ViewParams params = new ViewParams.Builder( recipe.getWorkspaceId(), desc.rootsArray() ) .withFilter( desc.filter() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build(); final AggregationOptions aggOptions = createAggregationOptions( recipe, desc.filter() ); final DiscoveryConfig discoveryConfig = recipe.getDiscoveryConfig(); for ( final ProjectVersionRef root : desc.getRoots() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build();
public void resolveAndExtractSingleGraph( final ProjectRelationshipFilter filter, final SingleGraphRequest recipe, final GraphFunction extractor ) throws CartoDataException, CartoRequestException { if ( filter != null && filter != AnyFilter.INSTANCE ) { for ( final GraphDescription desc : recipe.getGraphComposition() ) { desc.setFilter( new AndFilter( filter, desc.filter() ) ); } } final Map<GraphDescription, RelationshipGraph> graphMap = resolveToGraphMap( recipe ); try { final GraphDescription original = recipe.getGraph(); final RelationshipGraph graph = graphMap.get( original ); extractor.extract( graph ); } finally { graphMap.values().forEach( IOUtils::closeQuietly ); } }
final ViewParams params = new ViewParams.Builder( recipe.getWorkspaceId(), desc.rootsArray() ) .withFilter( desc.filter() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build();
Map<String, Object> presetParams = getPresetParams(); Map<String, Object> otherPresetParams = other.getPresetParams(); if ( presetParams == null )
public void normalize() { for ( final Iterator<GraphDescription> it = graphs.iterator(); it.hasNext(); ) { final GraphDescription graph = it.next(); if ( graph == null ) { it.remove(); continue; } graph.normalize(); } }
final ProjectRelationshipFilter filter = desc.filter();
final ViewParams params = new ViewParams.Builder( recipe.getWorkspaceId(), desc.rootsArray() ) .withFilter( desc.filter() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build(); final AggregationOptions aggOptions = createAggregationOptions( recipe, desc.filter() ); final DiscoveryConfig discoveryConfig = recipe.getDiscoveryConfig(); for ( final ProjectVersionRef root : desc.getRoots() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build();
public void resolveAndExtractSingleGraph( final ProjectRelationshipFilter filter, final SingleGraphRequest recipe, final GraphFunction extractor ) throws CartoDataException, CartoRequestException { if ( filter != null && filter != AnyFilter.INSTANCE ) { for ( final GraphDescription desc : recipe.getGraphComposition() ) { desc.setFilter( new AndFilter( filter, desc.filter() ) ); } } final Map<GraphDescription, RelationshipGraph> graphMap = resolveToGraphMap( recipe ); try { final GraphDescription original = recipe.getGraph(); final RelationshipGraph graph = graphMap.get( original ); extractor.extract( graph ); } finally { graphMap.values().forEach( IOUtils::closeQuietly ); } }
public void resolveMutator( final GraphDescription graph ) { if ( graph == null ) { return; } if ( graph.getMutatorInstance() == null ) { final GraphMutator mutator = mutators.getGraphMutator( graph.getMutator() ); graph.setMutatorInstance( mutator ); } }
final ViewParams params = new ViewParams.Builder( recipe.getWorkspaceId(), desc.rootsArray() ) .withFilter( desc.filter() ) .withMutator( desc.getMutatorInstance() ) .withSelections( recipe.getVersionSelections() ) .build();
Map<String, Object> presetParams = getPresetParams(); Map<String, Object> otherPresetParams = other.getPresetParams(); if ( presetParams == null )
public void normalize() { for ( final Iterator<GraphDescription> it = graphs.iterator(); it.hasNext(); ) { final GraphDescription graph = it.next(); if ( graph == null ) { it.remove(); continue; } graph.normalize(); } }
final ProjectRelationshipFilter filter = desc.filter();
public void resolvePresets( final GraphDescription graph ) { if ( graph == null ) { return; } if ( graph.filter() == null ) { final ProjectRelationshipFilter filter = presets.getPresetFilter( graph.getPreset(), graph.getDefaultPreset(), graph.getPresetParams() ); graph.setFilter( filter ); } }
public synchronized Set<ProjectVersionRef> getResultingProjects() { if ( projects == null ) { projects = targets( result ); if ( !graphs.isEmpty() ) { projects.addAll( graphs.get( 0 ) .getRoots() ); if ( operation == null || operation != GraphCalculationType.SUBTRACT ) { for ( int i = 1; i < graphs.size(); i++ ) { projects.addAll( graphs.get( i ) .getRoots() ); } } } } return projects; }