|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.kb.sparql.SparqlQuery
public class SparqlQuery
Represents one SPARQL query. It includes support for stopping the SPARQL query (which may be necessary if a timeout is reached) and is designed to be able to run a query in a separate thread.
| Constructor Summary | |
|---|---|
SparqlQuery(String sparqlQueryString,
SparqlEndpoint sparqlEndpoint)
Standard constructor. |
|
| Method Summary | |
|---|---|
static com.hp.hpl.jena.query.ResultSetRewindable |
convertJSONtoResultSet(String json)
Converts from JSON to internal Jena format. |
static String |
convertJSONtoXML(String json)
Converts from JSON to xml format. |
static String |
convertResultSetToJSON(com.hp.hpl.jena.query.ResultSetRewindable resultSet)
Converts Jena result set to JSON. |
static String |
convertResultSetToXMLString(com.hp.hpl.jena.query.ResultSetRewindable resultSet)
Converts Jena result set to XML. |
String |
getJson()
Return the result in JSON format. |
SparqlEndpoint |
getSparqlEndpoint()
|
String |
getSparqlQueryString()
Gets the String representation of the SPARQL query. |
String |
getXMLString()
Converts the result set to an XML string. |
boolean |
isRunning()
|
com.hp.hpl.jena.query.ResultSetRewindable |
send()
Sends a SPARQL query using the Jena library. |
boolean |
sendAsk()
|
void |
stop()
Stops the execution of the query. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SparqlQuery(String sparqlQueryString,
SparqlEndpoint sparqlEndpoint)
sparqlQueryString - A SPARQL query stringsparqlEndpoint - An Endpoint object| Method Detail |
|---|
public com.hp.hpl.jena.query.ResultSetRewindable send()
public boolean sendAsk()
public void stop()
public String getSparqlQueryString()
public SparqlEndpoint getSparqlEndpoint()
public boolean isRunning()
public String getJson()
public String getXMLString()
public static String convertResultSetToXMLString(com.hp.hpl.jena.query.ResultSetRewindable resultSet)
resultSet - The result set to transform, must be rewindable to prevent
errors.
public static String convertResultSetToJSON(com.hp.hpl.jena.query.ResultSetRewindable resultSet)
resultSet - The result set to transform, must be rewindable to prevent
errors.
public static com.hp.hpl.jena.query.ResultSetRewindable convertJSONtoResultSet(String json)
json - A JSON representation if a SPARQL query result.
public static String convertJSONtoXML(String json)
json - A JSON representation if a SPARQL query result.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||