* @param precursor プリカーサー
	 * @param queryName クエリー化合物名
	 * @param queryKey クエリーレコードキー
	 */
	private void searchDb(String[] ps, String precursor, String queryName, String queryKey) {
		initSearchParameterSetting();
		
		queryPlot.clear();
		compPlot.clear();
		resultPlot.clear();
		queryPlot.setPeaks(null, 0);
		compPlot.setPeaks(null, 1);
		resultPlot.setPeaks(null, 0);
		DefaultTableModel dataModel = (DefaultTableModel)resultSorter.getTableModel();
		dataModel.setRowCount(0);
		hitLabel.setText("");

		if (queryTabPane.getSelectedIndex() == TAB_ORDER_DB) {
			queryPlot.setSpectrumInfo(queryName, queryKey, precursor, PeakPanel.SP_TYPE_QUERY, false);	
		} else if (queryTabPane.getSelectedIndex() == TAB_ORDER_FILE) {
			queryPlot.setSpectrumInfo(queryName, queryKey, precursor, PeakPanel.SP_TYPE_QUERY, true);
		}
		
		// クエリ側スペクトルのピークがない場合
		if (ps.length == 0 || (ps.length == 1 && ps[0].split("\t")[0].equals("0") && ps[0].split("\t")[1].equals("0"))) {
			queryPlot.setNoPeak(true);
			StringBuilder sb = new StringBuilder();
			sb.append(" 0 Hit.    (");
			sb.append((PRECURSOR < 1) ? "" : "Precursor : " + PRECURSOR + ", ");
			sb.append("Tolerance : ");
			sb.append(" ");
			sb.append((tolUnit1.isSelected()) ? tolUnit1.getText() : tolUnit2.getText());
			sb.append(", Cutoff threshold : " + CUTOFF_THRESHOLD + ")");
			hitLabel.setText(sb.toString());
			
//			hitLabel.setText(" 0 Hit.    ("
//					+ ((PRECURSOR < 1) ? "" : "Precursor : " + PRECURSOR + ", ")
//					+ "Tolerance : "
//					+ TOLERANCE
//					+ " "
//					+ ((tolUnit1.isSelected()) ? tolUnit1.getText() : tolUnit2.getText()) + ", Cutoff threshold : "
//					+ CUTOFF_THRESHOLD + ")");
			
			// マウスカーソルをデフォルトカーソルに
			this.setCursor(Cursor.getDefaultCursor());
			return;
		}

		// POSTデータを作成
		final SearchQueryParam param = new SearchQueryParam(); 	// StringBuffer post = new StringBuffer();
		if (isRecInteg) {
			param.setInteg(true); 								//	post.append( "INTEG=true&" );
		} else if (isRecActu) {
			param.setInteg(false); 								//	post.append( "INTEG=false&" );
		}
		if (PRECURSOR > 0) {
			param.setPrecursor(PRECURSOR); 						//	post.append( "PRE=" + PRECURSOR + "&");
		}
		param.setCutoff(CUTOFF_THRESHOLD); 						//	post.append( "CUTOFF=" + CUTOFF_THRESHOLD + "&" );
		param.setTolerance(TOLERANCE); 							//	post.append( "TOLERANCE=" + TOLERANCE + "&" );
		if (tolUnit2.isSelected()) {
			param.setTolUnit(ToleranceUnit.PPM.getLabel()); 	//	post.append( "TOLUNIT=ppm&" );
		} else {
			param.setTolUnit(ToleranceUnit.UNIT.getLabel()); 	//	post.append( "TOLUNIT=unit&" );
		}
		StringBuffer sbInstance = new StringBuffer();			//	post.append( "INST=" );
		boolean isAllInstanceSelected = true;
		for (Entry<String, Boolean> entry : isInstCheck.entrySet()) {
			if (entry.getValue()) {
				if (sbInstance.length() > 0) {
					sbInstance.append(",");
				}
				sbInstance.append(entry.getKey());
			} else {
				isAllInstanceSelected = false;
			}
		}
		
//		for (Iterator i=isInstCheck.keySet().iterator(); i.hasNext();) {
//			String key = (String)i.next();
//			
//			if ( (isInstCheck.get(key)) ) {
//				if (sbInstance.length() > 0) {
//					sbInstance.append( "," );
//				}
//				sbInstance.append( key );
//			} else {
//				isInstAll = false;
//			}
//		}
		
		if (isAllInstanceSelected) {
			if (sbInstance.length() > 0) {
				sbInstance.append(",");
			}
			sbInstance.append("ALL");
		}
		param.setInstType(sbInstance.toString()); 				// post.append( instTmp.toString() + "&" );
		
		StringBuffer sbMs = new StringBuffer();					// post.append( "MS=" );
		boolean isAllMsSelected = true;
		for (Entry<String, Boolean> entry : isMsCheck.entrySet()) {
			if (entry.getValue()) {
				if (sbMs.length() > 0) {
					sbMs.append(",");
				}
				sbMs.append(entry.getKey());
			} else {
				isAllMsSelected = false;
			}
		}
		
//		for (Iterator i=isMsCheck.keySet().iterator(); i.hasNext(); ) {
//			String key = (String)i.next();
//			
//			if ( (isMsCheck.get(key)) ) {
//				if (msTmp.length() > 0) {
//					msTmp.append( "," );
//				}
//				msTmp.append( key );
//			} else {
//				isMsAll = false;
//			}
//		}
		
		if (isAllMsSelected) {
			if (sbMs.length() > 0) {
				sbMs.append( "," );
			}
			sbMs.append( "ALL" );
		}
		param.setMsType(sbMs.toString()); 							// post.append( msTmp.toString() + "&" );
		
		if (isIonRadio.get(IonMode.POSITIVE.getKey())) {		// if (isIonRadio.get("Posi")) {
			param.setIon(1); 										// post.append( "ION=1&" );
		} else if (isIonRadio.get(IonMode.NEGATIVE.getKey())) {	// } else if (isIonRadio.get("Nega")) {
			param.setIon(-1); 										// post.append( "ION=-1&" );
		} else {
			param.setIon(0); 										// post.append( "ION=0&");
		}
		
		StringBuffer sbPeakValue = new StringBuffer();				// post.append( "VAL=" );
		for (int i = 0; i < ps.length; i++) {
			sbPeakValue.append(ps[i].replace("\t", ",") + "@");
		}
		param.setPeak(sbPeakValue.toString());

		// 画面操作を無効する
		setOperationEnbled(false);

		// 検索中ダイアログ表示する
		dlg.showDialog();

//		this.param = post.toString();
		this.ps = ps;
		SwingWorker worker = new SwingWorker() {
			private ArrayList<String> result = null;

			public Object construct() {
				// サーブレット呼び出し-マルチスレッドでCGIを起動
				SearchLogic searchLogic = new SearchLogic();
				result = searchLogic.getSearchResult(param);
				return null;
//				String cgiType = MassBankCommon.CGI_TBL[MassBankCommon.CGI_TBL_NUM_TYPE][MassBankCommon.CGI_TBL_TYPE_SEARCH];
//				result = mbcommon.execMultiDispatcher(baseUrl, cgiType, SearchPage.this.param);
//				return null;
			}

			public void finished() {
				// 画面操作無効を解除する
				setOperationEnbled(true);

				// 検索中ダイアログを非表示にする
				dlg.hideDialog();

				int total = 0;
				if (result != null && result.size() > 0) {
					total = result.size();

					List<GuiResultTableRow> guiResultTableRows = new ArrayList<GuiResultTableRow>();
					// 検索結果をDBTableにセット
					for (int i = 0; i < total; i++) {
						String line = (String) result.get(i);
						String[] item = line.replace("\n", StringUtils.EMPTY).split("\t");
						String recordId = item[0];
						String recordTitle = item[1];
						// Score, Hit
						String strScore = StringUtils.EMPTY;
						String strHit = StringUtils.EMPTY;
						String hitScore = item[2];
						int pos = hitScore.indexOf(".");
						if (pos > 0) {
							strScore = "0" + hitScore.substring(pos);
							strHit = hitScore.substring(0, pos);
						} else {
							strScore = "0";
							strHit = hitScore;
						}
						Double score = Double.parseDouble(strScore);
						Integer hit = Integer.parseInt(strHit);

						// Ion
						int iIon = Integer.parseInt(item[3]);
						String strIonMode = StringUtils.EMPTY;
						if (iIon > 0) {
							strIonMode = "P";
						} else if (iIon < 0) {
							strIonMode = "N";
						} else {
							strIonMode = "-";
						}

						// SiteName
                        String contributor = SiteUtil.getSiteNameByRecordId(recordId);
						GuiResultTableRow guiResultTableRow = new GuiResultTableRow((i + 1), recordId, recordTitle, contributor, score, hit, strIonMode);
						guiResultTableRows.add(guiResultTableRow);
					}
					
					fillGuiResultTableData(guiResultTableRows);
				}

				PeakData peak = new PeakData(SearchPage.this.ps);
				queryPlot.setPeaks(peak, 0);
				compPlot.setPeaks(peak, 0);
				resultTabPane.setSelectedIndex(0);
				setAllPlotAreaRange(queryPlot);
				SearchPage.this.setCursor(Cursor.getDefaultCursor());
				
				StringBuilder sbHitLabel = new StringBuilder();
				sbHitLabel.append(" ");
				sbHitLabel.append(total);
				sbHitLabel.append(" Hit.    (");
				sbHitLabel.append((PRECURSOR < 1) ? "" : "Precursor : " + PRECURSOR + ", ");
				sbHitLabel.append("Tolerance : ");
				sbHitLabel.append(TOLERANCE);
				sbHitLabel.append(" ");
				sbHitLabel.append((tolUnit1.isSelected()) ? tolUnit1.getText() : tolUnit2.getText());
				sbHitLabel.append(", Cutoff threshold : ");
				sbHitLabel.append(CUTOFF_THRESHOLD);
				sbHitLabel.append(")");
				hitLabel.setText(sbHitLabel.toString());
				hitLabel.setToolTipText(sbHitLabel.toString());
				
//				hitLabel.setText(" "
//						+ total
//						+ " Hit.    ("
//						+ ((PRECURSOR < 1) ? "" : "Precursor : " + PRECURSOR + ", ")
//						+ "Tolerance : "
//						+ TOLERANCE
//						+ " "
//						+ ((tolUnit1.isSelected()) ? tolUnit1.getText()
//								: tolUnit2.getText()) + ", Cutoff threshold : "
//						+ CUTOFF_THRESHOLD + ")");
				
//				hitLabel.setToolTipText(" "
//						+ total
//						+ " Hit.    ("
//						+ ((PRECURSOR < 1) ? "" : "Precursor : " + PRECURSOR + ", ")
//						+ "Tolerance : "
//						+ TOLERANCE
//						+ " "
//						+ ((tolUnit1.isSelected()) ? tolUnit1.getText()
//								: tolUnit2.getText()) + ", Cutoff threshold : "
//						+ CUTOFF_THRESHOLD + ")");
			}
		}