|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.franz.ag.SPARQLQuery
This class collects the parameters and results of a SPARQL query.
This document is not intended to be a SPARQL tutorial or reference. Please refer to other documents for the definition of SPARQL syntax and semantics and for the precise behavior of the SPARQL engine.
Constructor Summary | |
SPARQLQuery()
Create a new empty SPARQL query with default arguments. |
Method Summary | |
boolean |
ask()
Run a SPARQL query that returns a boolean result. |
boolean |
ask(AllegroGraph ag)
|
boolean |
ask(AllegroGraph ag,
java.lang.String query)
|
boolean |
ask(java.lang.String query)
|
Cursor |
construct()
Run a SPARQL query that retrieves a set of statements. |
Cursor |
construct(AllegroGraph ag)
|
Cursor |
construct(AllegroGraph ag,
java.lang.String query)
|
Cursor |
construct(java.lang.String query)
|
long |
count()
Run a SPARQL query that retrieves a set of variable bindings. |
long |
count(AllegroGraph ag)
|
long |
count(AllegroGraph ag,
java.lang.String query)
|
long |
count(java.lang.String query)
|
Cursor |
describe()
Run a SPARQL query that retrieves a set of statements. |
Cursor |
describe(AllegroGraph ag)
|
Cursor |
describe(AllegroGraph ag,
java.lang.String query)
|
Cursor |
describe(java.lang.String query)
|
boolean |
getBooleanResult()
Query the result of a query that has a boolean result. |
java.lang.String |
getDefaultBase()
Query the default base value of the query. |
java.lang.String |
getDefaultDatasetBehavior()
Query the default dataset behavior for this SPARQL query. |
java.lang.String[] |
getDefaultPrefixes()
Query the default-prefixes option. |
int |
getExtended()
Query the extended option. |
java.lang.String[] |
getFrom()
Query the from option. |
java.lang.String[] |
getFromNamed()
Query the from-named option. |
long |
getLimit()
Query the limit option. |
java.lang.String |
getLoadFunction()
Query the name of the load-function. |
int |
getMemoized()
Query the memoize option. |
java.lang.String |
getMemoTable()
Query the name of the memo table. |
long |
getOffset()
Query the offset option. |
java.lang.String |
getQuery()
Get the query string. |
java.lang.String |
getRDFFormat()
Query the RDFFormat option. |
ValueObject[] |
getResultArray()
Query the results of a SPARQL query that returns a one-dimensional array of results. |
ValueObject[][] |
getResultArrays()
Query the results of a SPARQL query that returns an array of result arrays. |
long |
getResultCount()
Query the count value of a query that returns a numeric result. |
Cursor |
getResultCursor()
Query the result of a SPARQL query that returns a collection of triples. |
java.lang.String[] |
getResultNames()
Query the names and order of the variables in a SELECT query result. |
java.lang.String |
getResultsFormat()
Query the resultsFormat option. |
java.lang.String |
getResultString()
Query the result of a SPARQL query that returns a string result. |
AllegroGraph |
getTripleStore()
Query the triple store agaist which this SPARQL query has or will run. |
java.lang.String |
getVars()
Query the vars option. |
java.lang.Object[] |
getWithVariables()
Query the with-variables option. |
boolean |
isIncludeInferred()
Query the includeInferred option. |
java.lang.String |
run()
Run a SPARQL query that returns a serialized string result. |
java.lang.String |
run(AllegroGraph ag)
|
java.lang.String |
run(AllegroGraph ag,
java.lang.String query)
|
java.lang.String |
run(java.lang.String query)
|
ValueObject[][] |
select()
Run a SPARQL query that retrieves a set of variable bindings. |
ValueObject[][] |
select(AllegroGraph ag)
Run a SPARQL query that retrieves a set of variable bindings. |
ValueObject[][] |
select(AllegroGraph ag,
java.lang.String query)
|
ValueObject[][] |
select(java.lang.String query)
Run a SPARQL query that retrieves a set of variable bindings. |
ValueObject[] |
selectSingle()
Run a SPARQL query that retrieves all the bindings of a single variable. |
ValueObject[] |
selectSingle(AllegroGraph ag)
|
ValueObject[] |
selectSingle(AllegroGraph ag,
java.lang.String query)
|
ValueObject[] |
selectSingle(java.lang.String query)
|
void |
setDefaultBase(java.lang.String base)
Set the default-base option for this SPARQL query. |
void |
setDefaultDatasetBehaviorAll()
Set the default-data-set-behavior option to "all". |
void |
setDefaultDatasetBehaviorDefault()
Set the default-data-set-behavior option to "default". |
void |
setDefaultPrefixes(java.lang.String[] prefixes)
Set the default-prefixes option. |
void |
setExtended(boolean extended)
Set the extended option. |
void |
setFrom(java.lang.String[] uriLabels)
Set the from option, |
void |
setFromNamed(java.lang.String[] uriLabels)
Set the from-named option, |
void |
setIncludeInferred(boolean includeInferred)
Modify the includeInferred option. |
void |
setLimit(int limit)
Set the limit option. |
void |
setLoadFunction(java.lang.String name)
Set the name of a load-function option. |
void |
setMemoized(boolean memoized)
Set the memoize option. |
void |
setMemoTable(java.lang.String name)
Set the name of a memo table. |
void |
setOffset(int offset)
Set the offset option. |
void |
setQuery(java.lang.String newQuery)
Set the query astring. |
void |
setRDFFormat(java.lang.String format)
Set the RDFFormat option. |
void |
setResultsFormat(java.lang.String resultsFormat)
Set the resultsFormat option. |
void |
setTripleStore(AllegroGraph ag)
Specify the triple store agaist which this SPARQL query will run. |
void |
setVars(java.lang.String vars)
Set the vars option. |
void |
setWithVariables(AllegroGraph ag,
java.lang.Object[] withVariables)
Set the with-variables option for the SPARQL query. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SPARQLQuery()
Method Detail |
public java.lang.String getQuery()
public void setQuery(java.lang.String newQuery)
newQuery
- a string containing a complete well-formed SPARQL query.public boolean getBooleanResult()
java.lang.IllegalStateException
- if a boolean result is not available.public long getResultCount()
java.lang.IllegalStateException
- if the count is not available.public java.lang.String[] getResultNames()
java.lang.IllegalStateException
- if the names are not available.public boolean isIncludeInferred()
public void setIncludeInferred(boolean includeInferred)
includeInferred
- the desired value.public long getLimit()
public void setLimit(int limit)
limit
- the limit to set. A zero or negative value is ignored.public long getOffset()
public void setOffset(int offset)
offset
- the offset to set. A zero or negative value is ignored.public java.lang.String getRDFFormat()
public void setRDFFormat(java.lang.String format)
format
- the RDFFormat to setpublic java.lang.String getResultsFormat()
public void setResultsFormat(java.lang.String resultsFormat)
resultsFormat
- the resultsFormat to setpublic java.lang.String getVars()
public void setVars(java.lang.String vars)
vars
- null or a string containing variable names separated by spacespublic int getExtended()
public void setExtended(boolean extended)
extended
- the extended to setpublic int getMemoized()
public void setMemoized(boolean memoized)
memoized
- the memoized to setpublic void setMemoTable(java.lang.String name)
name
- public java.lang.String getMemoTable()
public void setLoadFunction(java.lang.String name)
name
- public java.lang.String getLoadFunction()
public void setDefaultPrefixes(java.lang.String[] prefixes)
prefixes
- an array of alternating prefix and URI strings.public java.lang.String[] getDefaultPrefixes()
public void setDefaultBase(java.lang.String base)
base
- a string containing the default base URI.public java.lang.String getDefaultBase()
public void setFromNamed(java.lang.String[] uriLabels)
uriLabels
- an array of URI stringspublic java.lang.String[] getFromNamed()
public void setFrom(java.lang.String[] uriLabels)
uriLabels
- an array of URI stringspublic java.lang.String[] getFrom()
public void setDefaultDatasetBehaviorAll()
public void setDefaultDatasetBehaviorDefault()
public java.lang.String getDefaultDatasetBehavior()
public java.lang.Object[] getWithVariables()
public void setWithVariables(AllegroGraph ag, java.lang.Object[] withVariables) throws AllegroGraphException
ag
- the AllegroGraph instance where the variable values are resolved.withVariables
- an array of alternating variable names and values.
The variable names must be strings.
The variable values may be any valid triple part specifier as in addStatement.
AllegroGraphException
public ValueObject[] getResultArray()
java.lang.IllegalStateException
- if the array is not available.public ValueObject[][] getResultArrays()
public Cursor getResultCursor()
public java.lang.String getResultString()
public void setTripleStore(AllegroGraph ag)
ag
- public AllegroGraph getTripleStore()
public ValueObject[][] select() throws AllegroGraphException
AllegroGraphException
public ValueObject[][] select(AllegroGraph ag) throws AllegroGraphException
ag
- the AllogroGraph instance against which the query will run.
AllegroGraphException
public ValueObject[][] select(java.lang.String query) throws AllegroGraphException
query
- the omplet and well-formed SPARQL SELECT query string.
AllegroGraphException
public ValueObject[][] select(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public ValueObject[] selectSingle() throws AllegroGraphException
AllegroGraphException
public ValueObject[] selectSingle(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public ValueObject[] selectSingle(java.lang.String query) throws AllegroGraphException
AllegroGraphException
public ValueObject[] selectSingle(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public long count() throws AllegroGraphException
AllegroGraphException
public long count(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public long count(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public long count(java.lang.String query) throws AllegroGraphException
AllegroGraphException
public boolean ask() throws AllegroGraphException
AllegroGraphException
public boolean ask(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public boolean ask(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public boolean ask(java.lang.String query) throws AllegroGraphException
AllegroGraphException
public Cursor describe() throws AllegroGraphException
AllegroGraphException
public Cursor describe(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public Cursor describe(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public Cursor describe(java.lang.String query) throws AllegroGraphException
AllegroGraphException
public Cursor construct() throws AllegroGraphException
AllegroGraphException
public Cursor construct(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public Cursor construct(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public Cursor construct(java.lang.String query) throws AllegroGraphException
AllegroGraphException
public java.lang.String run() throws AllegroGraphException
AllegroGraphException
- if a problem was encountered during the search.
java.lang.IllegalArgumentException
- if this instance is not properly initialized.public java.lang.String run(AllegroGraph ag) throws AllegroGraphException
AllegroGraphException
public java.lang.String run(AllegroGraph ag, java.lang.String query) throws AllegroGraphException
AllegroGraphException
public java.lang.String run(java.lang.String query) throws AllegroGraphException
AllegroGraphException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |