public class SesameManager extends Object
In order to create repositories the following protocol of calling methods must be observed:
| Constructor and Description |
|---|
SesameManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRepository()
Clear the current repository and remove all data from it.
|
void |
closeRepository()
Close the currently opened repository.
|
void |
connectToLocalLocation(String dirname,
boolean mustexist)
Connect to a local repository location at the given directory.
|
void |
connectToLocalLocation(URL dirname,
boolean mustexist) |
void |
connectToLocation(String repositoryLocation)
Connect to a managed repository location.
|
void |
connectToLocation(URL repositoryLocation) |
void |
connectToRemoteLocation(String url)
Connect to a remote managed repository location.
|
void |
connectToRepository(String repositoryLocation,
String repositoryName)
Connect to a managed repository located at the given location
and connect to the repository with the given name.
|
void |
connectToRepository(URL repositoryLocation,
String repositoryName) |
org.openrdf.model.Value |
convertLiteralOrONodeID2SesameValue(gate.creole.ontology.LiteralOrONodeID val) |
gate.creole.ontology.Literal |
convertSesameLiteral2Literal(org.openrdf.model.Literal sesameLiteral)
Convert a Sesame literal to a GATE literal
|
org.openrdf.query.BooleanQuery |
createAskQuery(String query) |
gate.creole.ontology.OntologyTupleQuery |
createQuery(String query)
Create a query object for the current repository.
|
void |
createRepository(String config)
Create a new managed repository at the current remote or local location
using the configuration information passed on as a string.
|
void |
createUnmanagedRepository(File repositoryDirFile,
String configstring)
Create an unmanaged repository with files stored in the directory
given from the configuration passed as a string.
|
org.openrdf.query.Update |
createUpdate(String query) |
void |
deleteRepository(String name)
Delete the managed repository with that name.
|
void |
disconnect()
Disconnect from a local or remote repository manager.
|
Set<String> |
getRepositories() |
org.openrdf.repository.RepositoryConnection |
getRepositoryConnection()
Obtain the repository connection object.
|
void |
importIntoRepository(File from,
String baseURI,
String format)
Load data into the current repository from a file.
|
void |
importIntoRepository(InputStream from,
String baseURI,
String format)
Load data into the current repository from a stream.
|
void |
importIntoRepository(Reader from,
String baseURI,
String format)
Load data into the current repository from a reader
|
Locale |
lang2locale(String lang) |
void |
openRepository(String name)
Open a repository with the given name at the remote or local location
previously connected to.
|
static String |
substituteConfigTemplate(String configtemplate,
Map<String,String> variables)
Substitute variables in a configuration template string.
|
gate.creole.ontology.DataType |
toGateDataType(org.openrdf.model.URI uri) |
gate.creole.ontology.LiteralOrONodeID |
toGateLiteralOrONodeID(org.openrdf.model.Value v) |
gate.creole.ontology.ONodeID |
toGateONodeID(org.openrdf.model.Resource resource) |
gate.creole.ontology.OURI |
toGateOURI(org.openrdf.model.URI uri) |
org.openrdf.model.Literal |
toSesameLiteral(gate.creole.ontology.Literal literal)
Convert an Ontology plugin Literal represenation into a Sesame Literal
|
org.openrdf.model.Resource |
toSesameResource(gate.creole.ontology.ONodeID node)
Convert an ontology plugin ONodeID to a Sesame Resource.
|
org.openrdf.model.URI |
toSesameURI(gate.creole.ontology.OURI node)
Convert an ontology plugin OURI to a Sesame URI
|
org.openrdf.model.Value |
toSesameValue(gate.creole.ontology.ONodeID id) |
public void connectToRepository(String repositoryLocation, String repositoryName)
repositoryLocation - repositoryName - public void connectToLocation(String repositoryLocation)
repositoryLocation - public void connectToLocation(URL repositoryLocation)
public void connectToRemoteLocation(String url)
url - public void connectToLocalLocation(String dirname, boolean mustexist)
dirname - mustexist - public void connectToLocalLocation(URL dirname, boolean mustexist)
public void disconnect()
public void openRepository(String name)
name - public void closeRepository()
public void createRepository(String config)
config - public void createUnmanagedRepository(File repositoryDirFile, String configstring)
configstring - java.sesame_lang.Exceptionpublic static String substituteConfigTemplate(String configtemplate, Map<String,String> variables)
configtemplate - variables - public void deleteRepository(String name)
name - public void clearRepository()
public void importIntoRepository(File from, String baseURI, String format)
from - baseURI - format - public void importIntoRepository(InputStream from, String baseURI, String format)
from - baseURI - format - public void importIntoRepository(Reader from, String baseURI, String format)
from - baseURI - format - public gate.creole.ontology.OntologyTupleQuery createQuery(String query)
query - public org.openrdf.query.BooleanQuery createAskQuery(String query)
public org.openrdf.query.Update createUpdate(String query)
public org.openrdf.repository.RepositoryConnection getRepositoryConnection()
public gate.creole.ontology.Literal convertSesameLiteral2Literal(org.openrdf.model.Literal sesameLiteral)
sesameLiteral - public org.openrdf.model.Value convertLiteralOrONodeID2SesameValue(gate.creole.ontology.LiteralOrONodeID val)
public org.openrdf.model.Value toSesameValue(gate.creole.ontology.ONodeID id)
public gate.creole.ontology.DataType toGateDataType(org.openrdf.model.URI uri)
public gate.creole.ontology.ONodeID toGateONodeID(org.openrdf.model.Resource resource)
public gate.creole.ontology.OURI toGateOURI(org.openrdf.model.URI uri)
public gate.creole.ontology.LiteralOrONodeID toGateLiteralOrONodeID(org.openrdf.model.Value v)
public org.openrdf.model.Resource toSesameResource(gate.creole.ontology.ONodeID node)
node - public org.openrdf.model.URI toSesameURI(gate.creole.ontology.OURI node)
node - public org.openrdf.model.Literal toSesameLiteral(gate.creole.ontology.Literal literal)
literal -