/** * Perform any initial processing and caching. This call is optional. Most engines either have * negligable set up work or will perform an implicit "prepare" if necessary. The call is provided * for those occasions where substantial preparation work is possible (e.g. running a forward * chaining rule system) and where an application might wish greater control over when this * prepration is done. */ @Override public synchronized void prepare() { if (isPrepared) return; isPrepared = true; // initilize the deductions graph fdeductions = new FGraph(createDeductionsGraph()); boolean rulesLoaded = false; if (schemaGraph != null) { rulesLoaded = preloadDeductions(schemaGraph); } if (rulesLoaded) { engine.fastInit(fdata); } else { engine.init(true, fdata); } }