/** * {@inheritDoc} */ @Override public ResultBinding duplicate() { return new ResultBindingImpl(this._bindings); }
/** * {@inheritDoc} */ @Override public ResultBinding duplicate() { return new ResultBindingImpl(this._bindings); }
/** * {@inheritDoc} */ @Override public ResultBinding duplicate() { return new ResultBindingImpl(this._bindings); }
/** * {@inheritDoc} */ @Override public ResultBinding next() { if (!more) return null; final ResultBinding next = new ResultBindingImpl(); for (int i = 0; i < indices.length; i++) next.setValue(vars.get(i), varB.get(i).get(indices[i])); more = incIndex(0); return next; }
/** * {@inheritDoc} */ @Override public ResultBinding next() { if (!more) return null; final ResultBinding next = new ResultBindingImpl(); for (int i = 0; i < indices.length; i++) next.setValue(vars.get(i), varB.get(i).get(indices[i])); more = incIndex(0); return next; }
/** * {@inheritDoc} */ @Override public ResultBinding next() { if (!more) return null; final ResultBinding next = new ResultBindingImpl(); for (int i = 0; i < indices.length; i++) next.setValue(vars.get(i), varB.get(i).get(indices[i])); more = incIndex(0); return next; }
@Override public ResultBinding next() { if (!hasNext()) throw new NoSuchElementException(); final ResultBinding result = new ResultBindingImpl(); for (final ResultBinding binding : bindings) result.setValues(binding); findNext(); return result; }
@Override public ResultBinding next() { if (!hasNext()) throw new NoSuchElementException(); final ResultBinding result = new ResultBindingImpl(); for (final ResultBinding binding : bindings) result.setValues(binding); findNext(); return result; }
@Override public ResultBinding next() { if (!hasNext()) throw new NoSuchElementException(); final ResultBinding result = new ResultBindingImpl(); for (final ResultBinding binding : bindings) result.setValues(binding); findNext(); return result; }
/** * {@inheritDoc} */ @Override public QueryResult exec(final Query query) { _logger.fine(() -> "Executing query " + query); final Timer timer = new Timer("CombinedQueryEngine"); timer.start(); prepare(query); branches = 0; exec(new ResultBindingImpl()); timer.stop(); _logger.fine(() -> "#B=" + branches + ", time=" + timer.getLast() + " ms."); return _result; }
/** * {@inheritDoc} */ @Override public QueryResult exec(final Query query) { _logger.fine(() -> "Executing query " + query); final Timer timer = new Timer("CombinedQueryEngine"); timer.start(); prepare(query); branches = 0; exec(new ResultBindingImpl()); timer.stop(); _logger.fine(() -> "#B=" + branches + ", time=" + timer.getLast() + " ms."); return _result; }
/** * {@inheritDoc} */ @Override public QueryResult exec(final Query query) { _logger.fine(() -> "Executing query " + query); final Timer timer = new Timer("CombinedQueryEngine"); timer.start(); prepare(query); branches = 0; exec(new ResultBindingImpl()); timer.stop(); _logger.fine(() -> "#B=" + branches + ", time=" + timer.getLast() + " ms."); return _result; }
private ResultBinding convertBinding(final Binding binding) { final ResultBinding pelletBinding = new ResultBindingImpl(); final GraphLoader loader = _pellet.getLoader(); for (final Iterator<?> vars = binding.vars(); vars.hasNext();) { final Var var = (Var) vars.next(); final Node value = binding.get(var); if (value != null) { final ATermAppl pelletVar = ATermUtils.makeVar(var.getVarName()); final ATermAppl pelletValue = loader.node2term(value); pelletBinding.setValue(pelletVar, pelletValue); } } return pelletBinding; }
results.add(new ResultBindingImpl()); return results;
results.add(new ResultBindingImpl()); return results;
private ResultBinding convertBinding(final Binding binding) { final ResultBinding pelletBinding = new ResultBindingImpl(); final GraphLoader loader = _pellet.getLoader(); for (final Iterator<?> vars = binding.vars(); vars.hasNext();) { final Var var = (Var) vars.next(); final Node value = binding.get(var); if (value != null) { final ATermAppl pelletVar = ATermUtils.makeVar(var.getVarName()); final ATermAppl pelletValue = loader.node2term(value); pelletBinding.setValue(pelletVar, pelletValue); } } return pelletBinding; }
@Override public QueryResult execABoxQuery(final Query q) { _results = new QueryResultImpl(q); _kb = q.getKB(); final long satCount = _kb.getABox().getStats()._satisfiabilityCount; final long consCount = _kb.getABox().getStats()._consistencyCount; exec(q, new ResultBindingImpl(), true); if (_logger.isLoggable(Level.FINE)) { _logger.fine("Total satisfiability operations: " + (_kb.getABox().getStats()._satisfiabilityCount - satCount)); _logger.fine("Total consistency operations: " + (_kb.getABox().getStats()._consistencyCount - consCount)); _logger.fine("Results of ABox query : " + _results); } return _results; } }
private ResultBinding convertBinding(final Binding binding) { final ResultBinding pelletBinding = new ResultBindingImpl(); final GraphLoader loader = _pellet.getLoader(); for (final Iterator<?> vars = binding.vars(); vars.hasNext();) { final Var var = (Var) vars.next(); final Node value = binding.get(var); if (value != null) { final ATermAppl pelletVar = ATermUtils.makeVar(var.getVarName()); final ATermAppl pelletValue = loader.node2term(value); pelletBinding.setValue(pelletVar, pelletValue); } } return pelletBinding; }
@Override public QueryResult execABoxQuery(final Query q) { _results = new QueryResultImpl(q); _kb = q.getKB(); final long satCount = _kb.getABox().getStats()._satisfiabilityCount; final long consCount = _kb.getABox().getStats()._consistencyCount; exec(q, new ResultBindingImpl(), true); if (_logger.isLoggable(Level.FINE)) { _logger.fine("Total satisfiability operations: " + (_kb.getABox().getStats()._satisfiabilityCount - satCount)); _logger.fine("Total consistency operations: " + (_kb.getABox().getStats()._consistencyCount - consCount)); _logger.fine("Results of ABox query : " + _results); } return _results; } }
@Override public QueryResult execABoxQuery(final Query q) { _results = new QueryResultImpl(q); _kb = q.getKB(); final long satCount = _kb.getABox().getStats()._satisfiabilityCount; final long consCount = _kb.getABox().getStats()._consistencyCount; exec(q, new ResultBindingImpl(), true); if (_logger.isLoggable(Level.FINE)) { _logger.fine("Total satisfiability operations: " + (_kb.getABox().getStats()._satisfiabilityCount - satCount)); _logger.fine("Total consistency operations: " + (_kb.getABox().getStats()._consistencyCount - consCount)); _logger.fine("Results of ABox query : " + _results); } return _results; } }