/** * Executes a query in the specified microtheory, swhowing variables to substitute. Returns the * Cyc terms present in the Cyc KB that match the query applying inference. * * @param query String that contains the Cyc formula (i.e. the query). * @param var the unbounds variables in the query for which bindings are sought. * @param mt the microtheory in which the query is asked. * @return a list of bindings for the query (<code>null</code> null if doesn't exist). * @throw java.net.UnknownHostException if Cyc server host not found on the network. * @throw java.io.IOException if a data communication error occurs. * @throw org.opencyc.api.CycApiException if the api request results in a Cyc server error. */ @SuppressWarnings("deprecation") protected CycList askQuery(String query, CycVariable var, CycConstant mt) throws IOException, UnknownHostException, CycApiException { query = cyclify(query); CycList l = new CycList(); l = myAccess.askWithVariable(myAccess.makeCycList(query), var, mt); // , Integer.MAX_VALUE); return l; }