/** Answer a memory-based Graph with the Standard reification style. */ public static Graph createDefaultGraph() { return Factory.createGraphMem( ); }
/** Create a graph that is a Jena memory graph * @see #createDefaultGraph */ public static Graph createGraphMem() { return Factory.createGraphMem() ; }
/** Create a graph that is a Jena memory graph * @see #createDefaultGraph */ public static Graph createGraphMem() { return Factory.createGraphMem() ; }
public Delta(Graph base) { super(Factory.createGraphMem(), Factory.createGraphMem()) ; this.base = base ; }
public Graph create() { return Factory.createGraphMem(); }
/** Answer a new memory-based model with the given reification style @deprecated Hidden partial reifications not supported -- only style "Standard" */ @Deprecated public static Model createDefaultModel( ReificationStyle style ) { return new ModelCom( Factory.createGraphMem( ) ); }
/** Answer a new graph which is the reachable subgraph from <code>node</code> in <code>graph</code> with the terminating condition given by the TripleBoundary passed to the constructor. */ public Graph extract( Node node, Graph graph ) { return extractInto( Factory.createGraphMem(), node, graph ); }
/** Answer a fresh Model with the default specification. */ public static Model createDefaultModel() { return new ModelCom( Factory.createGraphMem( ) ); }
/** * Constructor. * @param graph the inference graph which owns this context. */ public BFRuleContext(ForwardRuleInfGraphI graph) { this.graph = graph; env = new BindingStack(); stack = new ArrayList<Triple>(); pending = new ArrayList<Triple>(); pendingCache = Factory.createGraphMem(); }
/** Create a graph and record it with the given name in the local map. */ @Override public Graph createGraph( String name, boolean strict ) { GraphMemBase already = (GraphMemBase) graphs.get( name ); if (already == null) { Graph result = Factory.createGraphMem( ); graphs.put( name, result ); return result; } else if (strict) throw new AlreadyExistsException( name ); else return already.openAgain(); }
/** * 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; }
public JenaBasedELClassifier() { m_Names = new NameStore(); m_Variables = new VariableStore(); m_Rules = CollectionUtils.makeSet(); m_Facts = Factory.createGraphMem( ReificationStyle.Standard ); TOP = m_Names.get(ATermUtils.TOP); BOTTOM = m_Names.get(ATermUtils.BOTTOM); makeRuleAxioms(); }
/** * 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 (this.isPrepared()) return; fdeductions = new FGraph( Factory.createGraphMem() ); extractAxioms(); dataFind = fdata; if (fdeductions != null) { dataFind = FinderUtil.cascade(dataFind, fdeductions); } if (fschema != null) { dataFind = FinderUtil.cascade(dataFind, fschema); } this.setPreparedState(true); }
private static Model readModel(String uri) { Graph g = Factory.createGraphMem(); // Use the mapped uri as the syntax hint. String syntax = null; { String altURI = FileManager.get().mapURI(uri); if (altURI != null) syntax = FileUtils.guessLang(uri); } // Temporary model wrapper Model m = ModelFactory.createModelForGraph(g); RDFReader r = m.getReader(syntax); InputStream in = FileManager.get().open(uri); if (in == null) // Not found. throw new NotFoundException("Not found: " + uri); r.read(m, in, uri); return m; }
Graph inserts = Factory.createGraphMem(); for (Iterator<RulePreprocessHook> i = preprocessorHooks.iterator(); i.hasNext(); ) { RulePreprocessHook hook = i.next();