public static void selectNodesWithString(final ZyGraph graph,final String searchString){
  Preconditions.checkNotNull(graph,"IE02117: Graph argument can not be null");
  Preconditions.checkNotNull(searchString,"IE02118: Search string argument can not be null");
  final GraphSearcher searcher=new GraphSearcher();
  searcher.search(GraphHelpers.getNodes(graph),new ArrayList<NaviEdge>(),searchString);
  final List<SearchResult> results=searcher.getResults();
  final List<NaviNode> resultNodes=new ArrayList<NaviNode>();
  for (  final SearchResult searchResult : results) {
    resultNodes.add((NaviNode)searchResult.getObject());
  }
  graph.selectNodes(resultNodes,true);
  searcher.dispose();
}

public static void selectNodesWithString ( final ZyGraph graph , final String searchString ) { Preconditions . checkNotNull ( graph , "IE02117: Graph argument can not be null" ) ; Preconditions . checkNotNull ( searchString , "IE02118: Search string argument can not be null" ) ; final GraphSearcher searcher = new GraphSearcher ( ) ; searcher . search ( GraphHelpers . getNodes ( graph ) , new ArrayList < NaviEdge > ( ) , searchString ) ; final List < SearchResult > results = searcher . getResults ( ) ; final List < NaviNode > resultNodes = new ArrayList < NaviNode > ( ) ; for ( final SearchResult searchResult : results ) { resultNodes . add ( ( NaviNode ) searchResult . getObject ( ) ) ; } graph . selectNodes ( resultNodes , true ) ; searcher . dispose ( ) ; }
selects all nodes of a graph that contain a given search string .
