com.tinkerpop.blueprints.oupls.sail
Class IndexingMatcher

java.lang.Object
  extended by com.tinkerpop.blueprints.oupls.sail.Matcher
      extended by com.tinkerpop.blueprints.oupls.sail.IndexingMatcher

public class IndexingMatcher
extends Matcher

A matcher which uses Blueprints indexing functionality to both index and retrieve statements. Indexing matchers can be created for any triple pattern.

Author:
Joshua Shinavier (http://fortytwo.net)

Field Summary
 
Fields inherited from class com.tinkerpop.blueprints.oupls.sail.Matcher
c, o, p, s
 
Constructor Summary
IndexingMatcher(boolean s, boolean p, boolean o, boolean c, com.tinkerpop.blueprints.oupls.sail.GraphSail.DataStore store)
          Create a new indexing matcher based on the given triple pattern.
 
Method Summary
 void indexStatement(Edge statement, org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object, String context)
          Index a statement using this Matcher's triple pattern.
 Iterable<Edge> match(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object, org.openrdf.model.Resource context)
          Retrieve matching statements based on this matcher's triple pattern as well as the provided values.
 
Methods inherited from class com.tinkerpop.blueprints.oupls.sail.Matcher
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexingMatcher

public IndexingMatcher(boolean s,
                       boolean p,
                       boolean o,
                       boolean c,
                       com.tinkerpop.blueprints.oupls.sail.GraphSail.DataStore store)
Create a new indexing matcher based on the given triple pattern.

Parameters:
s - whether the subject is specified
p - whether the predicate is specified
o - whether the object is specified
c - whether the context is specified
store - the Blueprints data store
Method Detail

match

public Iterable<Edge> match(org.openrdf.model.Resource subject,
                            org.openrdf.model.URI predicate,
                            org.openrdf.model.Value object,
                            org.openrdf.model.Resource context)
Description copied from class: Matcher
Retrieve matching statements based on this matcher's triple pattern as well as the provided values. If a component such as subject or object is specified in the pattern, a non-null value must be provided to this method. Non-null values for unspecified components may be provided, but they will not be used.

Specified by:
match in class Matcher
Parameters:
subject - the subject value of matching statements
predicate - the predicate value of matching statements
object - the object of matching statements
context - the context of matching statements
Returns:
an iterator over all matching statements

indexStatement

public void indexStatement(Edge statement,
                           org.openrdf.model.Resource subject,
                           org.openrdf.model.URI predicate,
                           org.openrdf.model.Value object,
                           String context)
Index a statement using this Matcher's triple pattern. The subject, predicate, object and context values are provided for efficiency only, and should agree with the corresponding values associated with the graph structure of the edge.

Parameters:
statement - the edge to index as an RDF statement
subject - the subject of the statement
predicate - the predicate of the statement
object - the object of the statement
context - the context of the statement


Copyright © 2010-2012 David Wu. All Rights Reserved.