org.dllearner.kb.sparql
Class ExtractionDBCache
java.lang.Object
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
ExtractionDBCache
public ExtractionDBCache(String cacheDir)
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
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann