code: public Set<GraphObject> run()
  	{
  		// result set of neighborhood query
  		Set<GraphObject> queryResult = new HashSet<GraphObject>();
  
  		// if upstream is selected
  		if (direction == Direction.UPSTREAM || direction == Direction.BOTHSTREAM)
  		{
  			// run BFS in upstream direction
  			BFS bfsBackward = new BFS(sourceNodes, null, Direction.UPSTREAM, this.limit);
  
  			/*
  	  Maps to hold forward and backward BFS results
  	 */
  			Map<GraphObject, Integer> mapBackward = bfsBackward.run();
  
  			// add result of BFS to result Set
  			queryResult.addAll(mapBackward.keySet());
  		}
  
  		// if downstream is selected
  		if (direction == Direction.DOWNSTREAM || direction == Direction.BOTHSTREAM)
  		{
  			// run BFS in downstream direction
  			BFS bfsForward = new BFS(sourceNodes, null, Direction.DOWNSTREAM, this.limit);
  
  			Map<GraphObject, Integer> mapForward = bfsForward.run();
  
  			// add result of BFS to result Set
  			queryResult.addAll(mapForward.keySet());
  		}
  		
  		// return the result of query
  		return queryResult;
  	}
docs: Executes the query.
  @return Neighborhood