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

    return (MySearchServer);
  }
Esempio n. 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());
    }
  }
Esempio n. 3
0
 /** Do search. */
 public SearchResultAssignment requestSearch(Assignment MyAssignment) {
   return (MySearchHandler.requestSearch((SearchAssignment) MyAssignment));
 }