com.tinkerpop.blueprints.oupls.sail
Class Matcher
java.lang.Object
com.tinkerpop.blueprints.oupls.sail.Matcher
- Direct Known Subclasses:
- GraphBasedMatcher, IndexingMatcher, TrivialMatcher
public abstract class Matcher
- extends Object
An object which retrieves statements from the triple store based on a given triple pattern.
For example, an "soc" matcher expects the subject, object, and context components to be specified; it will then retrieve
all matching statements (where the unspecified component of the pattern -- the predicate -- may vary).
In an "o" matcher, only the object is specified, and subject, predicate and context may vary, etc.
- Author:
- Joshua Shinavier (http://fortytwo.net)
|
Field Summary |
protected boolean |
c
|
protected boolean |
o
|
protected boolean |
p
|
protected boolean |
s
|
|
Constructor Summary |
Matcher(boolean s,
boolean p,
boolean o,
boolean c)
Create a new matcher based on the given triple pattern. |
|
Method Summary |
abstract 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. |
String |
toString()
|
s
protected final boolean s
p
protected final boolean p
o
protected final boolean o
c
protected final boolean c
Matcher
public Matcher(boolean s,
boolean p,
boolean o,
boolean c)
- Create a new matcher based on the given triple pattern.
- Parameters:
s - whether the subject is specifiedp - whether the predicate is specifiedo - whether the object is specifiedc - whether the context is specified
match
public abstract 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.
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.
- Parameters:
subject - the subject value of matching statementspredicate - the predicate value of matching statementsobject - the object of matching statementscontext - the context of matching statements
- Returns:
- an iterator over all matching statements
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010-2012 David Wu. All Rights Reserved.