/** * Return a new inference graph which is a clone of the current graph together with an additional * set of data premises. The default implementation loses ALL partial deductions so far. Some * subclasses may be able to a more efficient job. */ public InfGraph cloneWithPremises(Graph premises) { // System.out.println("bonk"); MultiUnion union = new MultiUnion(); Graph raw = getRawGraph(); union.addGraph(raw); union.setBaseGraph(raw); union.addGraph(premises); Graph schema = getSchemaGraph(); if (schema != null) { if (schema instanceof BaseInfGraph) { BaseInfGraph ischema = (BaseInfGraph) schema; Graph sschema = ischema.getSchemaGraph(); if (sschema != null) union.addGraph(sschema); Graph rschema = ischema.getRawGraph(); if (rschema != null) union.addGraph(rschema); } } return getReasoner().bind(union); }