|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.sparql.DefaultSparqlConnection
Default implementation of a SparqlConnection
.
Constructor Summary | |
DefaultSparqlConnection(Graph graph,
URI securityDomain)
Creates a new SPARQL connection. |
Method Summary | |
void |
close()
Closes the connection to the graph. |
Answer |
executeQuery(String query)
Executes a query that returns results. |
protected void |
finalize()
Attempt to close the underlying session in case the client did not. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultSparqlConnection(Graph graph, URI securityDomain)
graph
- The graph to query.securityDomain
- The security domain of the graph.Method Detail |
public Answer executeQuery(String query) throws InvalidQuerySyntaxException, JrdfConnectionException
executeQuery
in interface JrdfConnection
query
- The query to execute.
null
.
InvalidQuerySyntaxException
- If the syntax of the query is incorrect.
JrdfConnectionException
- If an error occurs while executing the query.public void close()
Calling this method will close the underlying Graph
, making it unusable for future use.
close
in interface JrdfConnection
protected void finalize() throws Throwable
Clients should not rely on this method being called, it is only here as a last minute check to see if any cleanup can be performed. This method is not guarenteed to be executed by the JVM.
Throwable
- An unknown error occurs, possibly in object finalisation.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |