@Override public ExtendedIterator<Triple> find( TripleMatch m ) { return find(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()); }
/** Answer an ExtendedIterator over all the triples in this graph that match the triple-pattern <code>m</code>. Delegated to the store. */ @Override public ExtendedIterator<Triple> graphBaseFind( TripleMatch m ) { return store.find( m.asTriple() ); }
@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) ; }
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { return new TripleMatchIterator(m.asTriple(), db.iterator()) ; }
/** * 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())) ; }
@Override public ExtendedIterator<Triple> graphBaseFind( TripleMatch m ) { Iterator<Triple> iter = triples.iterator() ; return SimpleEventManager.notifyingRemove( this, iter ) .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) ); }
@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 protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { Iterator<Triple> iter = triples.iterator() ; return SimpleEventManager.notifyingRemove( this, iter ) .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) ); }
@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( final TripleMatch m ) { ExtendedIterator<Triple> iter =null; if (iteratorDeleteAllowed) { iter = SimpleEventManager.notifyingRemove( this, triples.iterator() ); } else { iter = WrappedIterator.createNoRemove( triples.iterator() ); } return iter .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) ); }
/** * 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()); }
@Override public ExtendedIterator<Triple> find(TripleMatch arg0) { //log.info("find(TripleMatch) " + arg0); Triple t = arg0.asTriple(); return find(t.getSubject(), t.getPredicate(), t.getObject()); }
IRI predicate = null; RDFTerm object = null; if (m.getMatchSubject() != null) { if (m.getMatchSubject().isLiteral()) { return Collections.EMPTY_SET.iterator(); subject = jena2TriaUtil.convertNonLiteral(m.getMatchSubject()); if (subject == null) { return Collections.EMPTY_SET.iterator(); if (m.getMatchObject() != null) { object = jena2TriaUtil.convertJenaNode2Resource(m.getMatchObject()); if (object == null) { return Collections.EMPTY_SET.iterator(); if (m.getMatchPredicate() != null) { if (!m.getMatchPredicate().isURI()) { return Collections.EMPTY_SET.iterator(); predicate = jena2TriaUtil.convertJenaUri2UriRef(m.getMatchPredicate());
@Override public ExtendedIterator<Triple> find(TripleMatch arg0) { //log.info("find(TripleMatch) " + arg0); Triple t = arg0.asTriple(); return find(t.getSubject(), t.getPredicate(), t.getObject()); }
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 ; }
public ExtendedIterator<Triple> find( TripleMatch tm ) Triple t = tm.asTriple(); Node pm = t.getPredicate(); Node om = t.getObject();
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) Node s = m.getMatchSubject() ; Var sVar = null ; if ( s == null ) Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null ) Node o = m.getMatchObject() ; Var oVar = null ; if ( o == null )
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) Node s = m.getMatchSubject() ; Var sVar = null ; if ( s == null ) Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null ) Node o = m.getMatchObject() ; Var oVar = null ; if ( o == null )
Node subNode = m.getMatchSubject(); Node preNode = m.getMatchPredicate(); Node objNode = m.getMatchObject(); boolean exception = false; boolean directAccess = !((subNode == null || subNode.equals(Node.ANY)) && !(objNode == null || objNode.equals(Node.ANY)));
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) Node s = m.getMatchSubject() ; Var sVar = null ; if ( s == null ) Node p = m.getMatchPredicate() ; Var pVar = null ; if ( p == null ) Node o = m.getMatchObject() ; Var oVar = null ; if ( o == null )