Beispiel #1
0
 public void removeAll() {
   BaseInfGraph g = (BaseInfGraph) graph;
   g.getRawGraph().getBulkUpdateHandler().removeAll();
   g.discardState();
   g.rebind();
   //            g.getEventManager().notifyEvent( g, GraphEvents.removeAll );
 }
Beispiel #2
0
 public void remove(Node s, Node p, Node o) {
   BaseInfGraph g = (BaseInfGraph) graph;
   g.getRawGraph().getBulkUpdateHandler().remove(s, p, o);
   g.discardState();
   g.rebind();
   //            manager.notifyEvent( graph, GraphEvents.remove( s, p, o ) );
 }
Beispiel #3
0
 /**
  * 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);
 }