/** * Create the graph used to hold the deductions. Can be overridden by subclasses that need special * purpose graph implementations here. Assumes the graph underlying fdeductions and associated * SafeGraph wrapper can be reused if present thus enabling preservation of listeners. */ protected Graph createDeductionsGraph() { if (fdeductions != null) { Graph dg = fdeductions.getGraph(); if (dg != null) { // Reuse the old graph in order to preserve any listeners safeDeductions.clear(); return dg; } } Graph dg = Factory.createGraphMem(); safeDeductions = new SafeGraph(dg); return dg; }
/** * Create the graph used to hold the deductions. Can be overridden by subclasses that need special * purpose graph implementations here. Assumes the graph underlying fdeductions and associated * SafeGraph wrapper can be reused if present thus enabling preservation of listeners. */ protected Graph createDeductionsGraph() { if (fdeductions != null) { Graph dg = fdeductions.getGraph(); if (dg != null) { // Reuse the old graph in order to preserve any listeners safeDeductions.getBulkUpdateHandler().removeAll(); return dg; } } Graph dg = Factory.createGraphMem(style); safeDeductions = new SafeGraph(dg); return dg; }
public static Graph readGraph(String uri, int limit) { Graph g = Factory.createGraphMem(); readUtil(g, uri, limit); return g; }
public static Model readModel(String uri, int limit) { Graph g = Factory.createGraphMem(); readUtil(g, uri, limit); return ModelFactory.createModelForGraph(g); }
/** Create a graph - always the Jena default graph type */ public static Graph createJenaDefaultGraph() { return Factory.createDefaultGraph(); }
/** * Create a graph that is a Jena memory graph * * @see #createDefaultGraph */ public static Graph createGraphMem() { return Factory.createGraphMem(); }