|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Getter
Interface for retrieving statements from a Stardog database.
Usage:
// find a specific statement
c.get().subject(s).predicate(p).object(o).statement();
// get all statements w/ a specific subject
c.get().subject(s).iterator();
// get all statements w/ a specific predicate as a graph
c.get().predicate(p).graph();
| Method Summary | ||
|---|---|---|
Getter |
context(Resource theContext)
Set the context to get from the database |
|
Graph |
graph()
Execute the getter and return the results as a graph. |
|
Iteration<Statement,StardogException> |
iterator()
Return the results of the get operation as an iterator of the statements. |
|
|
iterator(Function<Statement,O> theFunctor)
Execute the Getter and apply the result to the statements returned by the getter. |
|
Iteration<Statement,StardogException> |
iterator(Resource theSubj,
URI thePredicate,
Value theObj,
Resource theContext)
Shortcut function for using iterator(). |
|
Getter |
object(Value theObj)
Set the object to get from the database |
|
Getter |
predicate(URI theURI)
Set the predicate to get from the database. |
|
void |
reset()
Reset the state of this Getter |
|
Statement |
statement()
Execute the get operation and return a single result. |
|
Getter |
subject(Resource theRes)
Set the subject to get from the database |
|
| Method Detail |
|---|
Getter subject(Resource theRes)
throws StardogException
theRes - the subject
StardogException - if the subject is invalid
Getter predicate(URI theURI)
throws StardogException
theURI - the predicate
StardogException - if the predicate is invalid
Getter object(Value theObj)
throws StardogException
theObj - the object
StardogException - if the object is invalid
Getter context(Resource theContext)
throws StardogException
theContext - the context
StardogException - if the subject is invalid
Iteration<Statement,StardogException> iterator(Resource theSubj,
URI thePredicate,
Value theObj,
Resource theContext)
throws StardogException
iterator(). Instead of having to set the subject, predicate, and/or object separately and then call iterator, you can
execute
theSubj - the subject to get, or null for anythePredicate - the predicate to get, or null for anytheObj - the object to get, or null for anytheContext - the context to get, or null for any
StardogException - if there is an error while retrieving the statements
Statement statement()
throws StardogException
StardogException - if there is an error while retrieving the statements
Iteration<Statement,StardogException> iterator()
throws StardogException
StardogException - if there is an error while retrieving the statements
Graph graph()
throws StardogException
iterator(org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value, org.openrdf.model.Resource) is a better choice because the results can be streamed from the database.
StardogException - if there was an error while retrieving the statements for the graph from the database
<O> Iteration<O,StardogException> iterator(Function<Statement,O> theFunctor)
throws StardogException
O - the result of the functiontheFunctor - the function to transform the statements
StardogException - if there is an error while retrieving the statements from the database
void reset()
throws StardogException
StardogException - if there is an error while resetting the state of the getter, such as the connectino is no longer open
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||