public static GraphContainer.Callback clearCriteria() { return (graphContainer, graphProvider) -> graphContainer.clearCriteria(); }
public static GraphContainer.Callback clearCriteria() { return (graphContainer, graphProvider) -> graphContainer.clearCriteria(); }
@Override public void onFocusSearchResult(SearchResult searchResult, OperationContext operationContext) { final GraphContainer graphContainer = operationContext.getGraphContainer(); final DefaultVertexRef vertexRef = new DefaultVertexRef(searchResult.getNamespace(), searchResult.getId(), searchResult.getLabel()); if (graphContainer.getTopologyServiceClient().getVertex(vertexRef) == null) { // The vertex to add to focus is not in the current layer // Find the GraphProvider it belongs to Optional<GraphProvider> first = graphContainer.getTopologyServiceClient().getGraphProviders().stream() .filter(eachProvider -> eachProvider.getNamespace().equals(searchResult.getNamespace())) .findFirst(); // If there is a graph provider (which should) select it if (first.isPresent() && first.get().getVertex(vertexRef) != null) { graphContainer.selectTopologyProvider(first.get()); graphContainer.clearCriteria(); } } super.onFocusSearchResult(searchResult, operationContext); }
@Override public void onFocusSearchResult(SearchResult searchResult, OperationContext operationContext) { final GraphContainer graphContainer = operationContext.getGraphContainer(); final DefaultVertexRef vertexRef = new DefaultVertexRef(searchResult.getNamespace(), searchResult.getId(), searchResult.getLabel()); if (graphContainer.getTopologyServiceClient().getVertex(vertexRef) == null) { // The vertex to add to focus is not in the current layer // Find the GraphProvider it belongs to Optional<GraphProvider> first = graphContainer.getTopologyServiceClient().getGraphProviders().stream() .filter(eachProvider -> eachProvider.getNamespace().equals(searchResult.getNamespace())) .findFirst(); // If there is a graph provider (which should) select it if (first.isPresent() && first.get().getVertex(vertexRef) != null) { graphContainer.selectTopologyProvider(first.get()); graphContainer.clearCriteria(); } } super.onFocusSearchResult(searchResult, operationContext); }
m_graphContainer.clearCriteria(); refs.forEach(vertexRef -> m_graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(vertexRef))); m_graphContainer.setSemanticZoomLevel(1);
m_graphContainer.clearCriteria(); refs.forEach(vertexRef -> m_graphContainer.addCriteria(new VertexHopGraphProvider.DefaultVertexHopCriteria(vertexRef))); m_graphContainer.setSemanticZoomLevel(1);
public void apply(GraphContainer graphContainer, Collection<HistoryOperation> operations, ServiceLocator serviceLocator) { LOG.debug("Applying " + toString()); graphContainer.clearCriteria();
public void apply(GraphContainer graphContainer, Collection<HistoryOperation> operations, ServiceLocator serviceLocator) { LOG.debug("Applying " + toString()); graphContainer.clearCriteria();