public ArrayList GetCases(Case c) { ArrayList cases = null; if (_env == null) { throw new ContextException("environment variable is not set"); } ICBRContext ctx = CBRContextManager.GetCBRContext(_env); if (ctx == null) { throw new ContextException("not set the context"); } int type = ctx.GetCaseBaseInputType(); if (type == CaseBaseInputType.TYPE_DB || type == CaseBaseInputType.TYPE_FILE ) { ICaseBaseInput input = (ICaseBaseInput)ctx.GetCaseBaseInput(); if (input == null) { throw new ContextException("not set the database input"); } cases = input.GetCases(c); } else { throw new ContextException("not support case base type"); } return(cases); }
public void SetCaseBaseInput(ICaseBaseInput input) { _caseBaseInput = input; }