예제 #1
0
  public static SearchServer getInstance() {
    if (MySearchServer == null) {
      MySearchServer = new SearchServer(false);
      MySearchHandler = SearchHandler.getInstance(MySearchServer);
    }

    return (MySearchServer);
  }
예제 #2
0
  /** Receive a completed assignment. */
  public void returnAssignment(Assignment MyAssignment) {
    /*	if(MyAssignment instanceof SearchAssignment){
    	RESULT=false;
    	SearchAssignment SA=(SearchAssignment)MyAssignment;
    	MySearchHandler.requestSearch(SA);
    }else*/

    if (MyAssignment instanceof IndexPageAssignment) {
      IndexPageAssignment IPA = (IndexPageAssignment) MyAssignment;
      MySearchHandler.indexPage(IPA.getTitle(), IPA.getAddress(), IPA.getContent());
    }
  }
예제 #3
0
 /** Do search. */
 public SearchResultAssignment requestSearch(Assignment MyAssignment) {
   return (MySearchHandler.requestSearch((SearchAssignment) MyAssignment));
 }