org.appdapter.core.remote.sparql
Class SparqlEndpointClient
java.lang.Object
org.appdapter.core.log.BasicDebugger
org.appdapter.core.remote.sparql.SparqlEndpointClient
- All Implemented Interfaces:
- Loggable
public class SparqlEndpointClient
- extends BasicDebugger
| Methods inherited from class org.appdapter.core.log.BasicDebugger |
checkDebugImportance, forceLog4jConfig, getLogger, getLoggerForClass, isLoggerUsable, logDebug, logError, logError, logInfo, logInfo, logInfoEvent, logWarning, logWarning, logWithException, setDebugImportanceThreshold, setLogger, useLoggerForClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SparqlEndpointClient
public SparqlEndpointClient(String endpointString)
buildSparqlPrefixHeader
public String buildSparqlPrefixHeader(String repoServiceURL)
getContextIDs
public List<com.hp.hpl.jena.rdf.model.Resource> getContextIDs()
getConnection
public SparqlEndpointClient getConnection()
executeUpdate
public void executeUpdate(String updateString)
execQuery
public com.hp.hpl.jena.query.ResultSet execQuery(String queryText,
boolean debugFlag)
execRemoteSparqlSelect
public com.hp.hpl.jena.query.ResultSet execRemoteSparqlSelect(String svcUrl,
String queryText)
- SPARQL query runs through the sparqlService facility of Jena/ARQ, which handles
the HTTP client duties (using its own class named HttpQuery
http://grepcode.com/file/repo1.maven.org/maven2/com.hp.hpl.jena/arq/2.8.7/com/hp/hpl/jena/sparql/engine/http/HttpQuery.java
and returns us a regular jena.query.ResultSet, which we can iterate rowwise, dump as XML, etc.
TODO: Need to review the proper "close" semantics for these result sets.
- Parameters:
queryText - svcUrl -
execRemoteSparqlUpdate
public void execRemoteSparqlUpdate(String svcUrl,
String updateText,
boolean debugFlag)
- SPARQL-Update POST runs through the Apache Commons HttpClient library.
- Parameters:
updateText - svcUrl -
Copyright © 2010-2014. All Rights Reserved.