protected QueryEngine getTestQueryEngine() throws RippleException { if (null == queryEngine) { StackEvaluator eval = new LazyEvaluatingIterator.WrappingEvaluator(); //StackEvaluator eval = new LazyStackEvaluator(); queryEngine = new QueryEngine(getTestModel(), eval, System.out, System.err); } return queryEngine; }
public RippleScriptEngine(final ScriptEngineFactory factory) throws RippleException { this.factory = factory; results = new Collector<>(); URIMap uriMap = new URIMap(); SailConfiguration sailConfig = new SailConfiguration(uriMap); // TODO: shutDown on failure model = new SesameModel(sailConfig.getSail()); StackEvaluator eval = new LazyStackEvaluator(); QueryEngine queryEngine = new QueryEngine(model, eval, System.out, System.err); queryPipe = new QueryPipe(queryEngine, results); }
public RippleSession() throws RippleException { this.undoRedoStack = new UndoRedoStack<>(UNDO_REDO_DEPTH); undoRedoStack.done(new Collector<>()); sail = new MemoryStore(); try { sail.initialize(); } catch (SailException e) { throw new RippleException(e); } Model model = new SesameModel(sail); evaluator = new LazyStackEvaluator(); QueryEngine queryEngine = new QueryEngine(model, evaluator, System.out, System.err); connection = queryEngine.getConnection(); }
private static void demo(final InputStream in, final PrintStream out, final PrintStream err) throws RippleException { // Create a Sesame triple store. URIMap uriMap = new URIMap(); SailConfiguration sailConfig = new SailConfiguration(uriMap); Sail sail = sailConfig.getSail(); // Attach a Ripple model to the repository. Model model = new SesameModel(sail); // Attach a query engine to the model. StackEvaluator evaluator = new LazyStackEvaluator(); QueryEngine qe = new QueryEngine(model, evaluator, out, err); // Attach an interpreter to the query engine and let it query from // standard input. RippleCommandLine r = new RippleCommandLine(qe, in); r.run(); // Shut down. model.shutDown(); }
private static void demo(final InputStream in, final PrintStream out, final PrintStream err) throws RippleException { // Create a Sesame triple store. URIMap uriMap = new URIMap(); SailConfiguration sailConfig = new SailConfiguration(uriMap); Sail sail = sailConfig.getSail(); // Attach a Ripple model to the repository. Model model = new SesameModel(sail); // Attach a query engine to the model. StackEvaluator evaluator = new LazyStackEvaluator(); QueryEngine qe = new QueryEngine(model, evaluator, out, err); // Attach an interpreter to the query engine and let it query from // standard input. RippleCommandLine r = new RippleCommandLine(qe, in); r.run(); // Shut down. model.shutDown(); }
Model model = getTestModel(); ModelConnection mc = model.createConnection(); QueryEngine qe = new QueryEngine(model, null, System.out, System.err); ByteArrayOutputStream bos = new ByteArrayOutputStream(); RipplePrintStream ps = new RipplePrintStream(new PrintStream(bos), qe.getLexicon());
QueryEngine qe = new QueryEngine(model, eval, System.out, errStream); Collector<RippleList> expected = new Collector<>(); Collector<RippleList> results = new Collector<>();
Model model = getTestModel(); StackEvaluator eval = new LazyStackEvaluator(); QueryEngine qe = new QueryEngine(model, eval, System.out, System.err); Collector<RippleList> expected = new Collector<>(); Collector<RippleList> results = new Collector<>();