⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 servercommunicationhandlerimpl.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 JAVA
字号:
/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
 * Created on Jun 6, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package eti.bi.alphaminer.core.handler;

import eti.bi.alphaminer.vo.BICase;
import eti.bi.alphaminer.vo.CaseInfoList;
import eti.bi.alphaminer.vo.Node;
import eti.bi.alphaminer.vo.Result;
import eti.bi.alphaminer.vo.SearchCriteria;
import eti.bi.alphaminer.vo.SearchedCaseInfoList;
import eti.bi.exception.BaseException;

//import hk.hku.eti.bi.service.BCB;
//import hk.hku.eti.bi.service.BCBService;
//import hk.hku.eti.bi.service.BCBServiceLocator;
//import hk.hku.eti.bi.service.BCR;
//import hk.hku.eti.bi.service.BCRService;
//import hk.hku.eti.bi.service.BCRServiceLocator;

/**
 * @author twang
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ServerCommunicationHandlerImpl implements ICommunicationHandler {

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#changePassword(java.lang.String, java.lang.String, java.lang.String)
	 */
	public boolean changePassword(String a_Username, String a_HashedOldPassword, String a_HashedNewPassword) {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#connect()
	 */
	public void connect() {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#disconnect()
	 */
	public void disconnect() {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#executeNode(eti.bi.alphaminer.vo.Node)
	 */
	public Result executeNode(Node a_Node) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#getCase(java.lang.String)
	 */
	public BICase getCase(String a_CaseID) throws BaseException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#getCaseInfoList()
	 */
	public CaseInfoList getCaseInfoList() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#isConnected()
	 */
	public boolean isConnected() {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#login(java.lang.String, java.lang.String)
	 */
	public String login(String a_Username, String a_HashedPassword) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#removeCase(java.lang.String)
	 */
	public boolean removeCase(String a_CaseID) {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#searchCase(eti.bi.alphaminer.vo.SearchCriteria, double)
	 */
	public SearchedCaseInfoList searchCase(SearchCriteria a_SearchCriteria, double a_Threshold) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#setCaseStatus(java.lang.String, java.lang.String)
	 */
	public void setCaseStatus(String a_CaseID, String a_Status) {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.core.handler.ICommunicationHandler#storeCase(eti.bi.alphaminer.vo.BICase)
	 */
	public String storeCase(BICase a_Case) {
		// TODO Auto-generated method stub
		return null;
	}
 
	/**
	 * URL of the KBBI server
	 */
//	private String m_ServerURL;
//
//	/**
//	 * Constructs a CommunicationHandler
//	 */
//	protected ServerCommunicationHandlerImpl() {
//	}
//
//	/**
//	 * Change password of an existing user account.
//	 * @param a_Username user name of the account
//	 * @param a_HashedOldPassword hashed old password of the account
//	 * @param a_HashedNewPassword hashed new password of the account
//	 * @return true if password is changed successfully; false otherwise
//	 */
//	public boolean changePassword(
//		String a_Username,
//		String a_HashedOldPassword,
//		String a_HashedNewPassword) {
//		return false;
//	}
//
//	/**
//	 * Connect to the KBBI server.
//	 */
//	public void connect() {
//	}
//
//	/**
//	 * Discounnt from the KBBI server
//	 */
//	public void disconnect() {
//	}
//
//	/**
//	 * Executes a node contained in a case.
//	 * @param a_Node node to be executed
//	 * @return a Result of the execution results
//	 */
//	public Result executeNode(Node a_Node) {		
//		return null;				
//	}
//
//	/**
//	 * Retrive a case from the KBBI server.
//	 * @param a_CaseID ID of the case to be retrieved
//	 * @return a Case
//	 */
//	public BICase getCase(String a_CaseID) throws BaseException {
//		Object[] obj = { a_CaseID };
//		try {
//			BCRService aBCRService = new BCRServiceLocator();
//			BCR aBCR = aBCRService.getBCR();
//			BICase aCase = aBCR.getCase(a_CaseID);
//			return aCase;
//		} catch (java.rmi.RemoteException e) {
//			Throwable throwable = e.getCause();
//			if (throwable instanceof BaseException) {
//				BaseException be = (BaseException) throwable;
//				System.out.println(be.getMessage());
//				throw new AppException(be, obj);
//			} else {
//					e.printStackTrace();
//				throw new SysException(e, obj);
//			}
//			//		return null;
//		} catch (ServiceException e) {
//			throw new AppException(e, obj);
//		} catch (Exception e) {
//			throw new SysException(e, obj);
//		}
//
//	}
//
//	/**
//	 * Gets a list of case information of all cases stored in the DBBI server
//	 * @return a CaseInfoList
//	 */
//	public CaseInfoList getCaseInfoList() {
//		try {
//			BCRService aBCRService = new BCRServiceLocator();
//			BCR aBCR = aBCRService.getBCR();
//			CaseInfoList list = aBCR.getCaseInfoList();
//			return list;
//		} catch (Exception e) {
//			e.printStackTrace();
//			return null;
//		}
//	} 
//	
//	/**
//	 * Checks current connection status to the KBBI server.
//	 * @return true if it is currently connecting to the server; false otherwise
//	 */
//	public boolean isConnected() {
//		return false;
//	}
//
//	public String login(String a_Username, String a_HashedPassword) {
//		return "";
//	}
//
//	/**
//	 * Removes a case from the KBBI server.
//	 * @param a_CaseID ID of the case to be removed
//	 * @return true if the case is removed successfully; false otherwise
//	 */
//	public boolean removeCase(String a_CaseID) {
//		try {
//			BCBService aBCBService = new BCBServiceLocator();
//			BCB aBCB = aBCBService.getBCB();
//			aBCB.removeCase(a_CaseID);
//			return true;
//		} catch (Exception e) {
//			e.printStackTrace();
//			return false;
//		}
//	}
//
//	/**
//	 * Search cases that match the specific searching criteria in the KBBI server.
//	 * @param a_SearchCriteria a SearchCriteria object stores the searching
//	 * criteria
//	 * @param a_Threshold a threshold used to identify valid searched cases
//	 * @return a list of searched case information
//	 */
//	public SearchedCaseInfoList searchCase(
//		SearchCriteria a_SearchCriteria,
//		double a_Threshold) {
//		try {
//			BCRService aBCRService = new BCRServiceLocator();
//			BCR aBCR = aBCRService.getBCR();
//			SearchedCaseInfoList list =
//				aBCR.searchCase(a_SearchCriteria, a_Threshold);
//			return list;
//		} catch (Exception e) {
//			e.printStackTrace();
//			return null;
//		}
//	}
//
//	/**
//	 * Sets status of a Case.
//	 * @param a_CaseID ID of the case to be set.
//	 * @param a_Status status of the case.
//	 */
//	public void setCaseStatus(String a_CaseID, String a_Status) {
//		try {
//			BCBService aBCBService = new BCBServiceLocator();
//			hk.hku.eti.bi.service.BCB aBCB = aBCBService.getBCB();
//			aBCB.setCaseStatus(a_CaseID, a_Status);
//		} catch (Exception e) {
//			e.printStackTrace();
//			return;
//		}
//	}
//
//	/**
//	 * Stores a case into the KBBI server.
//	 * @param a_Case case to be stored
//	 * @return ID of the case
//	 */
//	public String storeCase(BICase a_Case) {
//		try {
//System.out.println("Case is: " + a_Case.getStatus());			
//			BCBService aBCBService = new BCBServiceLocator();
//			hk.hku.eti.bi.service.BCB aBCB = aBCBService.getBCB();
//			return aBCB.storeCase(a_Case);
//		} catch (Exception e) {
//			e.printStackTrace();
//			return null;
//		}
//	} 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -