|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.repository.local.LocalService
A Sesame service for local repositories.
| Constructor Summary | |
LocalService()
Creates a new LocalService that does not administer any repositories yet. |
|
LocalService(SystemConfig systemConfig)
Creates a new LocalService for all repositories defined in the supplied SystemConfig object. |
|
| Method Summary | |
void |
addRepository(RepositoryConfig repConfig)
Defines a new repository. |
LocalRepository |
createRepository(RepositoryConfig repConfig)
Adds a new repository definition to this LocalService and creates a SesameRepository object for it. |
LocalRepository |
createRepository(String repositoryId,
boolean inferencing)
Adds a new repository with the supplied ID to this LocalService and creates a LocalRepository object for it. |
File |
createTmpFile(String prefix,
String suffix)
Creates a new file with the supplied prefix and suffix in the configured tmp directory. |
SesameRepository |
getRepository(String repositoryId)
Gets a SesameRepository object for the specified repository ID. |
RepositoryList |
getRepositoryList()
Gets a list of all repositories that are accessible by the currently logged in user. |
SystemConfig |
getSystemConfig()
Gets the system configuration that is used by this service. |
File |
getTmpDir()
|
boolean |
hasReadAccess(String repository)
Checks whether the user that has logged in has read access on the specified repository. |
boolean |
hasWriteAccess(String repository)
Checks whether the user that has logged in has write access on the specified repository. |
void |
login(String user,
String password)
Log in to a Sesame service. |
void |
logout()
Log out from a Sesame service. |
void |
removeRepository(String repositoryId)
Removes a repository definition. |
void |
setSystemConfig(SystemConfig newConfig)
Sets or updates the system configuration that is used by this service. |
void |
shutDown()
Shuts down all repositories that are configured for this service. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LocalService()
public LocalService(SystemConfig systemConfig)
systemConfig - A SystemConfig object containing repository
definitions.| Method Detail |
public void setSystemConfig(SystemConfig newConfig)
public SystemConfig getSystemConfig()
public void login(String user,
String password)
throws AccessDeniedException
login in interface SesameServiceAccessDeniedException - If the attempt to log in failed.
IOException - If an I/O error occurred.
IllegalArgumentException - If the supplied username is
not a legal username.public void logout()
SesameService
logout in interface SesameServicepublic RepositoryList getRepositoryList()
SesameService
getRepositoryList in interface SesameService
public SesameRepository getRepository(String repositoryId)
throws UnknownRepositoryException,
ConfigurationException
SesameService
getRepository in interface SesameServicerepositoryId - A repository ID.
ConfigurationException - If the requested repository
was not configured properly.
UnknownRepositoryException - If the specified
repository ID is unknown.
public void addRepository(RepositoryConfig repConfig)
throws ConfigurationException
repConfig - The new repository's configuration.
ConfigurationException - If a repository with an
identical ID is already defined.public void removeRepository(String repositoryId)
repositoryId - The ID of the repository to remove.
public LocalRepository createRepository(RepositoryConfig repConfig)
throws ConfigurationException
repConfig - A repository configuration.
ConfigurationException - If the supplied configuration
cannot be added for some reason.
public LocalRepository createRepository(String repositoryId,
boolean inferencing)
throws ConfigurationException
repositoryId - the ID for this repository.inferencing - indicates if the repository should be an inferencing repository.
ConfigurationException - If a repository with the supplied ID
cannot be added for some reason, e.g. if the ID was already in use.public void shutDown()
public boolean hasReadAccess(String repository)
throws UnknownRepositoryException
repository - A repository ID.
UnknownRepositoryException
public boolean hasWriteAccess(String repository)
throws UnknownRepositoryException
repository - A repository ID.
UnknownRepositoryException
public File getTmpDir()
throws IOException
IOException
public File createTmpFile(String prefix,
String suffix)
throws IOException
prefix - The prefix string to be used in generating the file's
name; must be at least three characters long.suffix - The suffix string to be used in generating the file's
name; may be null, in which case the suffix ".tmp" will be used
IOException - If an I/O error occured during the creation of the
tmp file.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||