org.dllearner.kb.sparql
Class ExtractionDBCache

java.lang.Object
  extended by org.dllearner.kb.sparql.ExtractionDBCache

public class ExtractionDBCache
extends Object

The class is used to cache information about resources to a database. Provides the connection to an H2 database in a light weight, configuration free manner. Note: Currently, either select ot construct has to be used (not both).

Author:
Jens Lehmann

Constructor Summary
ExtractionDBCache(String cacheDir)
           
 
Method Summary
 void closeConnection()
           
 com.hp.hpl.jena.rdf.model.Model executeConstructQuery(SparqlEndpoint endpoint, String query)
           
 com.hp.hpl.jena.rdf.model.Model executeConstructQuery(SparqlEndpoint endpoint, String query, int maxExecutionTimeInSeconds)
           
 String executeSelectQuery(SparqlEndpoint endpoint, String query)
           
 String executeSelectQuery(SparqlEndpoint endpoint, String query, int maxExecutionTimeInSeconds)
           
static void main(String[] args)
           
 void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds)
           
static String toNTriple(com.hp.hpl.jena.rdf.model.Model m)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractionDBCache

public ExtractionDBCache(String cacheDir)
Method Detail

executeConstructQuery

public com.hp.hpl.jena.rdf.model.Model executeConstructQuery(SparqlEndpoint endpoint,
                                                             String query)
                                                      throws SQLException,
                                                             UnsupportedEncodingException
Throws:
SQLException
UnsupportedEncodingException

executeConstructQuery

public com.hp.hpl.jena.rdf.model.Model executeConstructQuery(SparqlEndpoint endpoint,
                                                             String query,
                                                             int maxExecutionTimeInSeconds)
                                                      throws SQLException,
                                                             UnsupportedEncodingException
Throws:
SQLException
UnsupportedEncodingException

executeSelectQuery

public String executeSelectQuery(SparqlEndpoint endpoint,
                                 String query)

executeSelectQuery

public String executeSelectQuery(SparqlEndpoint endpoint,
                                 String query,
                                 int maxExecutionTimeInSeconds)

closeConnection

public void closeConnection()
                     throws SQLException
Throws:
SQLException

toNTriple

public static String toNTriple(com.hp.hpl.jena.rdf.model.Model m)

setMaxExecutionTimeInSeconds

public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds)

main

public static void main(String[] args)
                 throws ClassNotFoundException,
                        SQLException,
                        NoSuchAlgorithmException,
                        UnsupportedEncodingException
Throws:
ClassNotFoundException
SQLException
NoSuchAlgorithmException
UnsupportedEncodingException


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann