|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TriplestoreReader
An interface to an RDF store that provides query and dump access.
Method Summary | |
---|---|
void |
close()
Close the reader, releasing any resources. |
int |
countTriples(java.lang.String queryLang,
java.lang.String tupleQuery,
int limit,
boolean distinct)
Get the number of triples that would be returned via findTriples. |
int |
countTriples(java.lang.String queryLang,
java.lang.String tupleQuery,
java.lang.String tripleTemplate,
int limit,
boolean distinct)
Get the number of triples that would be returned via findTriples. |
int |
countTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit)
Get the number of triples that would be returned via findTriples. |
int |
countTuples(java.lang.String queryLang,
java.lang.String tupleQuery,
int limit,
boolean distinct)
Get the number of tuples that would be returned via findTuples. |
TripleIterator |
findTriples(java.lang.String queryLang,
java.lang.String tupleQuery,
int limit,
boolean distinct)
Perform a triple query on the store in a specific language. |
TripleIterator |
findTriples(java.lang.String queryLang,
java.lang.String tupleQuery,
java.lang.String tripleTemplate,
int limit,
boolean distinct)
Perform a tuple query on the store and return an iterator over the triples generated by applying the given triple template to the tuples. |
TripleIterator |
findTriples(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object,
int limit)
Perform a triple query on the store given a triple pattern where null
means "any". |
TupleIterator |
findTuples(java.lang.String queryLang,
java.lang.String tupleQuery,
int limit,
boolean distinct)
Perform a tuple query on the store and return an iterator over the tuples. |
java.util.Map |
getAliasMap()
Get the default alias map for queries. |
java.lang.String[] |
listTripleLanguages()
List the supported query languages that return triples. |
java.lang.String[] |
listTupleLanguages()
List the supported query languages that return tuples. |
void |
setAliasMap(java.util.Map aliasToPrefix)
Set the default alias map for queries. |
Method Detail |
---|
void setAliasMap(java.util.Map aliasToPrefix) throws TrippiException
TrippiException
java.util.Map getAliasMap() throws TrippiException
TrippiException
TupleIterator findTuples(java.lang.String queryLang, java.lang.String tupleQuery, int limit, boolean distinct) throws TrippiException
queryLang
- the query languagetupleQuery
- the text of the query
TrippiException
int countTuples(java.lang.String queryLang, java.lang.String tupleQuery, int limit, boolean distinct) throws TrippiException
TrippiException
TripleIterator findTriples(java.lang.String queryLang, java.lang.String tupleQuery, int limit, boolean distinct) throws TrippiException
Implementations must support the "spo" query language, where a query consists of a single triple pattern with any number of components unspecified, as indicated by an asterisk.
The following example calls demonstrate the syntax of the "spo" query language.
// Match with three fixed values findTriples("spo", "<urn:uri1> <urn:uri2> <urn:uri3>"); findTriples("spo", "<urn:uri1> <urn:uri2> 'Hello'"); findTriples("spo", "<urn:uri1> <urn:uri2> 'Hola'@es"); findTriples("spo", "<urn:uri1> <urn:uri2> '10'^^xsd:int"); // Match with one fixed value findTriples("spo", "<urn:uri1> * *"); findTriples("spo", "* <urn:uri2> *"); findTriples("spo", "* * <urn:uri3>"); // Match with two fixed values findTriples("spo", "* <urn:uri2> <urn:uri3>"); findTriples("spo", "<urn:uri1> * <urn:uri3>"); findTriples("spo", "<urn:uri1> <urn:uri2> *"); // Match everything findTriples("spo", "* * *");
queryLang
- the query languagetupleQuery
- the text of the query
TrippiException
int countTriples(java.lang.String queryLang, java.lang.String tupleQuery, int limit, boolean distinct) throws TrippiException
TrippiException
TripleIterator findTriples(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object, int limit) throws TrippiException
null
means "any".
TrippiException
int countTriples(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object, int limit) throws TrippiException
TrippiException
TripleIterator findTriples(java.lang.String queryLang, java.lang.String tupleQuery, java.lang.String tripleTemplate, int limit, boolean distinct) throws TrippiException
A triple template is a series of triple patterns used to generate
a graph from a group of tuples. See the TriplePattern
documentation for more detail.
queryLang
- the query languagetupleQuery
- the text of the querytripleTemplate
- the template used to construct the triples
TrippiException
TriplePattern
int countTriples(java.lang.String queryLang, java.lang.String tupleQuery, java.lang.String tripleTemplate, int limit, boolean distinct) throws TrippiException
TrippiException
java.lang.String[] listTupleLanguages()
java.lang.String[] listTripleLanguages()
void close() throws TrippiException
TrippiException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |