@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { List<Triple> results = new ArrayList<Triple>() ; Iterator<Quad> iter = findNG(graphName, m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) ; for ( ; iter.hasNext() ; ) results.add(iter.next().asTriple()) ; return WrappedIterator.create(results.iterator()) ; } }
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { List<Triple> results = new ArrayList<Triple>() ; for ( Triple t : triples ) if ( t.matches(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) ) results.add(t) ; return WrappedIterator.create(results.iterator()) ; } }
@Override public ExtendedIterator<Triple> find( TripleMatch m ) { return find(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()); }
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { if ( m == null ) m = Triple.ANY ; Node s = m.getMatchSubject() ; Node p = m.getMatchPredicate() ; Node o = m.getMatchObject() ; return graphBaseFind(s, p, o) ; }
/** * Returns an iterator over Triples. * * <p>This code used to have the .filterKeep component uncommented. We * think this is because of earlier history, before .matches on a literal node * was implemented as sameValueAs rather than equals. If it turns out that * the filter is needed, it can be commented back in, AND a corresponding * filter added to find(Node x 3) -- and test cases, of course. */ @Override public ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { return graphBaseFind(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) // .filterKeep(new TripleMatchFilter(m.asTriple())) ; }
if (m.getMatchPredicate() != null) { if (!m.getMatchPredicate().isURI()) { return Collections.EMPTY_SET.iterator(); predicate = jena2TriaUtil.convertJenaUri2UriRef(m.getMatchPredicate());
/** * Constructor - builds a pattern from a standard triple match. * Node that any filter part of the triple match will not be * represented within the pattern and will need to be checked * for separately. */ public TriplePattern(TripleMatch match) { this.subject = normalize(match.getMatchSubject()); this.predicate = normalize(match.getMatchPredicate()); this.object = normalize(match.getMatchObject()); }
Node preNode = m.getMatchPredicate(); Node objNode = m.getMatchObject(); boolean exception = false;
Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null )
Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null )
private QueryIterator nodesReifTriple(Node node, TripleMatch triple) { Binding b = BindingRoot.create() ; if ( node == Node.ANY ) node = null ; if ( node != null || triple != null ) { b = new BindingMap(b) ; if ( node != null ) bind(b, reifNodeVar, node) ; if ( triple != null ) { bind(b, varS, triple.getMatchSubject()) ; bind(b, varP, triple.getMatchPredicate()) ; bind(b, varO, triple.getMatchObject()) ; } } Plan plan = factory.create(op, ds, b, null) ; QueryIterator qIter = plan.iterator() ; return qIter ; }
Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null )
Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null )