de.fuberlin.wiwiss.marbles.dataproviders
Class SPARQLProviderBase

java.lang.Object
  extended by de.fuberlin.wiwiss.marbles.dataproviders.SPARQLProviderBase
All Implemented Interfaces:
DataProvider
Direct Known Subclasses:
RevyuProvider

public abstract class SPARQLProviderBase
extends java.lang.Object
implements DataProvider

Abstract class to connect SPARQL data providers

Author:
Christian Becker

Constructor Summary
SPARQLProviderBase()
           
 
Method Summary
protected abstract  java.lang.String getEndpoint()
           
protected abstract  java.lang.String getQuery(org.openrdf.model.Resource resource)
          Generates a SPARQL query to retrieve appropriate data from the data source for the requested resource
 org.apache.commons.httpclient.URI getQueryURL(org.openrdf.model.Resource resource)
          Retrieves the URL to query the remote data provider about a given resource
 java.util.List<org.apache.commons.httpclient.URI> getURLsFromData(CacheController cacheController, org.openrdf.repository.RepositoryConnection conn, org.openrdf.model.Resource resource)
          Not implemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPARQLProviderBase

public SPARQLProviderBase()
Method Detail

getEndpoint

protected abstract java.lang.String getEndpoint()
Returns:
The service's SPARQL endpoint URL

getQuery

protected abstract java.lang.String getQuery(org.openrdf.model.Resource resource)
Generates a SPARQL query to retrieve appropriate data from the data source for the requested resource

Parameters:
resource - The resource for which information is requested
Returns:
SPARQL query text

getQueryURL

public org.apache.commons.httpclient.URI getQueryURL(org.openrdf.model.Resource resource)
Description copied from interface: DataProvider
Retrieves the URL to query the remote data provider about a given resource

Specified by:
getQueryURL in interface DataProvider
Parameters:
resource - The resource for which information is requested
Returns:
The URL to query

getURLsFromData

public java.util.List<org.apache.commons.httpclient.URI> getURLsFromData(CacheController cacheController,
                                                                         org.openrdf.repository.RepositoryConnection conn,
                                                                         org.openrdf.model.Resource resource)
Not implemented

Specified by:
getURLsFromData in interface DataProvider
Parameters:
cacheController - The CacheController used to resolve redirects
conn - A connection to a repository with the returned RDF result
resource - The resource for which information is requested
Returns:
A list of URLs or null if this functionality is not implemented