📄 bimldao.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.
*/
package eti.bi.alphaminer.core.dao;
import java.util.Collection;
import eti.bi.alphaminer.core.dao.BICaseInfo;
import eti.bi.alphaminer.core.dao.BIMLException;
import eti.bi.alphaminer.core.dao.DAO;
import eti.bi.alphaminer.vo.BICase;
import eti.bi.alphaminer.vo.CaseInfoList;
import eti.bi.alphaminer.vo.SearchCriteria;
import eti.bi.alphaminer.vo.SearchedCaseInfoList;
import eti.bi.exception.BaseException;
/**
*
* A DAO interface for accessing the BIML repository. Different implementation of
* BIML repository should implement this interface.
*
* @since 1.0
* @version $Revision$ $Date$
* @author $Author$
*/
public interface BIMLDAO extends DAO{
/**
* Gets all BIML in the repository. Status of both "activate"
* should also be retrieved.
*
* @return Collection A Collection that stores the list of parsed BIMLs in the
* class of Document
*
* This method can be later deleted because it is replaced by listAllBIML
*/
//public Collection getAllBIML();
/**
* Gets all BIML in the repository. Status of both "activate"
* should also be retrieved. The difference of this method with getALLBIML is
* it return a list of file names instead of parsed Document.
*
* @return Collection A Collection that stores the list of BIML names in String
*/
public Collection listAllBIML();
/**
* Gets all Case Info. in the repository.
*
* @return CaseInfoList An object that stores the list of case information
*/
public CaseInfoList getCaseInfoList();
/**
* Searches Cases in the repository and returns Case Info.
*
* @return SearchCaseInfoList An object that stores the list of case information and searching criteria
*/
public SearchedCaseInfoList searchCase(SearchCriteria a_SearchCriteria, double a_Threshold);
/**
* Retrieve the BIML by the specified ID. The retrieved BIML is stored as
* a instance of class BICase.
*
* @param aBimlId The ID of the BIML to be retrieved.
* @return Case The BICase that stores the information of the case retrieved.
*/
public BICase getCaseById(String aBimlId) throws BaseException;
/**
* Retrieve the BIML by the specified file name.
*
* @param aBimlName The file name of the BIML to be retrieved.
* @return String The BIML content in String
* @throws BIMLException If any exception in retrieving the BIML.
*/
public String getBIMLStringByName(String aBimlName) throws BIMLException;
/**
* Retrieve the BIML by the specified ID.
*
* @param aBimlId The ID of the BIML to be retrieved.
* @param aType The type of the BIMl to be retrieved. ie. CML/DML/MML/PML
* @return String The BIML content in String
* @throws BIMLException If any exception in retrieving the BIML.
*
*/
public String getBIMLStringById(String aBimlId, String aType) throws BIMLException;
/**
* Retrieve the transformed BIML by the specified file name.
*
* @param aBimlName The file name of the BIML to be retrieved.
* @param aBIMLStyleSheet The file name of the style sheet that is used to
* transform the BIML file.
* @return String The BIML content in String
* @throws BIMLException If any exception in retrieving the BIML.
*/
public String getBIMLStringByName(String aBimlName, String aBIMLStyleSheet) throws BIMLException;
/**
* Retrieve the transformed BIML by the specified ID.
*
* @param aBimlId The ID of the BIML to be retrieved.
* @param aType The type of the BIML to be retrieved. ie. CML/DML/MML/PML
* @param aBIMLStyleSheet The file name of the style sheet that is used to
* transform the BIML file.
* @return String The BIML content in String
* @throws BIMLException If any exception in retrieving the BIML.
*/
public String getBIMLStringById(String aBimlId, String aType, String aBIMLStyleSheet) throws BIMLException;
/**
* Retrieve the BIML by the specified file name. The retrieved BIML is stored as
* a instance of class BICase.
*
* @param aBimlName The file name of the BIML to be retrieved.
* @return BICase The BICase that stores the information of the case retrieved.
* @throws BIMLException If any exception in retrieving the BIML.
*/
public BICase getCaseByName(String aBimlName) throws BaseException;
public BICaseInfo getBICaseByName(String aBimlName) throws Exception;
/**
* Retrieve the BIML by the specified ID. The retrieved BIML is stored as
* a instance of class BICase.
*
* @param aBimlId The ID of the BIML to be retrieved.
* @param aType The type of the BIML to be retrieved. ie. CML/DML/MML/PML
* @return BICase The BICase that stores the information of the case retrieved.
* @throws BIMLException If any exception in retrieving the BIML.
*/
public BICaseInfo getBICaseById(String aBimlId, String aType) throws Exception;
public String getBICasePathByName(String aBimlName) throws BIMLException;
public String getBICasePathById(String aBimlId, String aType) throws BIMLException;
public String saveCase(BICase aCase)throws BaseException;
public boolean removeCase(String aCaseID)throws BaseException;
public void setCaseStatus(String aCaseID, String aStatus) throws BaseException;
/**
* Saves the input BIML content to the BIML repository.
*
* @param aFormFile An object that stores the content of the uploaded BIML file..
* @param aBIMLType The type of the input BIML. ie. CML/DML/MML/PML
* @param aBIMLId The ID of the BIML. If it is null, then a new ID should
* be generated
* @param aStatus The status of the BIML, either "activate"
* @return String The resulted ID of the BIML saved.
* @throws BIMLException If any exception in saving the BIML.
*/
// public String saveBIMLFile(FormFile aFormFile, String aBIMLType, String aBIMLId, Integer aStatus) throws BIMLException;
/**
* Saves the input BIML content to the BIML repository.
*
* @param aBIMLString A String that stores the content of the input BIML file..
* @param aBIMLType The type of the input BIML. ie. CML/DML/MML/PML
* @param aBIMLId The ID of the BIML. If it is null, then a new ID should
* be generated
* @param aStatus The status of the BIML, either "activate"
* @return String The resulted ID of the BIML saved.
* @throws BIMLException If any exception in saving the BIML.
*/
public String saveBIMLFile(String aBIMLString, String aBIMLType, String aBIMLId, Integer aStatus) throws BIMLException;
/**
* Searches for similar cases as the input case from the BIML repository.
*
* @param aSearchBIMLForm The ActionForm that stores the parameters of the input
* case for searching a similar case.
* @return Collection A collection of the matched cases in the class of BICase.
* @throws BIMLException if any exception in searching the BIML.
*/
//public Collection searchBIML(SearchBIMLForm aSearchBIMLForm) throws BIMLException;
/**
* Modifies the status of the BIML.
*
* @param aBimlId The ID of the BIML.
* @param aNewStatus The new status of the BIML.
* @throws BIMLException if any exception in modifying the BIML status.
*/
public void modifyBIMLStatus(String aBimlId, Integer aNewStatus) throws BIMLException;
/**
* Creates a new case from a similar case with the specified BIML ID.
* @param aBimlId The ID of the similar case's BIML
* @return BICase The BICase object that stores the details of the newly created BIML.
* @throws BIMLException if any exception in creating the BIML from a similar case.
*/
public BICaseInfo createBICaseById(String aBimlId) throws BIMLException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -