org.appdapter.core.remote.sparql
Class SparqlEndpointClient

java.lang.Object
  extended by org.appdapter.core.log.BasicDebugger
      extended by org.appdapter.core.remote.sparql.SparqlEndpointClient
All Implemented Interfaces:
Loggable

public class SparqlEndpointClient
extends BasicDebugger


Field Summary
 
Fields inherited from class org.appdapter.core.log.BasicDebugger
myLogger
 
Fields inherited from interface org.appdapter.core.log.Loggable
IMPO_HI, IMPO_HIHI, IMPO_LO, IMPO_LOLO, IMPO_MAX, IMPO_MIN, IMPO_NORM
 
Constructor Summary
SparqlEndpointClient(String endpointString)
           
 
Method Summary
 String buildSparqlPrefixHeader(String repoServiceURL)
           
 com.hp.hpl.jena.query.ResultSet execQuery(String queryText, boolean debugFlag)
           
 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.
 void execRemoteSparqlUpdate(String svcUrl, String updateText, boolean debugFlag)
          SPARQL-Update POST runs through the Apache Commons HttpClient library.
 void executeUpdate(String updateString)
           
 SparqlEndpointClient getConnection()
           
 List<com.hp.hpl.jena.rdf.model.Resource> getContextIDs()
           
 
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
 

Constructor Detail

SparqlEndpointClient

public SparqlEndpointClient(String endpointString)
Method Detail

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.