info.aduna.infosource.remote
Class RemoteRepository

java.lang.Object
  extended by info.aduna.infosource.remote.RemoteRepository
All Implemented Interfaces:
InfoSource, org.openrdf.repository.Repository

public class RemoteRepository
extends Object
implements InfoSource

A RemoteRepository represents Repository residing on an Aduna AutoFocus Server. It wraps a HTTPRepository and offers functionality for maintaining a server URL, repository ID and user credentials and for transforming the URLs obtained from the server.

This class may become partially or completely obsolete in the future, depending on how configuration of a HTTPRepository will take place in the future.


Constructor Summary
RemoteRepository()
           
 
Method Summary
 void addDefaultTransformers()
          Add default transformers.
 void addTransformer(int index, URITransformer transformer)
          Adds a URITransformer at the specified index in the list.
 void addTransformer(URITransformer transformer)
          Adds a URITransformer to the end of the list of URITransformers.
 org.openrdf.repository.RepositoryConnection getConnection()
           
 File getDataDir()
           
 String getPassword()
          Returns the password of this InfoSource.
 String getRepositoryID()
          Returns the repository ID of the Repository connected to.
 String getServerURL()
          Returns the server of this InfoSource.
 List<URITransformer> getURITransformers()
          Returns the list of URITransformers.
 String getUsername()
          Returns the username of this InfoSource.
 org.openrdf.model.ValueFactory getValueFactory()
           
 void initialize()
           
 boolean isWritable()
           
 org.openrdf.model.URI prepareAccess(org.openrdf.model.URI uri)
          Returns a URI (typically representing a file of web page) that can be used to view the contents of the specified URI.
 void removeTransformer(URITransformer transformer)
          Removes the first occurrence of the specified URITransformer from the list of URITransformers.
 void setDataDir(File dataDir)
           
 void setPassword(String password)
          Sets the password of this InfoSource.
 void setRepositoryID(String id)
          Sets the repository ID of this InfoSource.
 void setServerURL(String serverURL)
          Sets the server URL used by this InfoSource.
 void setURITransformers(List<URITransformer> transformers)
          Sets the list of URITransformers.
 void setUsername(String username)
          Sets the username of this InfoSource.
 void shutDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRepository

public RemoteRepository()
Method Detail

setDataDir

public void setDataDir(File dataDir)
Specified by:
setDataDir in interface org.openrdf.repository.Repository

getDataDir

public File getDataDir()
Specified by:
getDataDir in interface org.openrdf.repository.Repository

initialize

public void initialize()
                throws org.openrdf.repository.RepositoryException
Specified by:
initialize in interface org.openrdf.repository.Repository
Throws:
org.openrdf.repository.RepositoryException

setServerURL

public void setServerURL(String serverURL)
Sets the server URL used by this InfoSource. Specify 'null' to unset this property.


getServerURL

public String getServerURL()
Returns the server of this InfoSource. Returns 'null' when no server url has been set yet.


setUsername

public void setUsername(String username)
Sets the username of this InfoSource. Specify 'null' to unset this property.


getUsername

public String getUsername()
Returns the username of this InfoSource. Returns 'null' when no username has been set yet.


setPassword

public void setPassword(String password)
Sets the password of this InfoSource. Specify 'null' to unset this property.


getPassword

public String getPassword()
Returns the password of this InfoSource. Returns 'null' when no username has been set yet.


setRepositoryID

public void setRepositoryID(String id)
Sets the repository ID of this InfoSource. Specify 'null' to unset this property.


getRepositoryID

public String getRepositoryID()
Returns the repository ID of the Repository connected to. Returns 'null' when no repository ID has been set yet.


getConnection

public org.openrdf.repository.RepositoryConnection getConnection()
                                                          throws org.openrdf.repository.RepositoryException
Specified by:
getConnection in interface org.openrdf.repository.Repository
Throws:
org.openrdf.repository.RepositoryException

getValueFactory

public org.openrdf.model.ValueFactory getValueFactory()
Specified by:
getValueFactory in interface org.openrdf.repository.Repository

isWritable

public boolean isWritable()
                   throws org.openrdf.repository.RepositoryException
Specified by:
isWritable in interface org.openrdf.repository.Repository
Throws:
org.openrdf.repository.RepositoryException

shutDown

public void shutDown()
Specified by:
shutDown in interface org.openrdf.repository.Repository

addDefaultTransformers

public void addDefaultTransformers()
Add default transformers.


addTransformer

public void addTransformer(URITransformer transformer)
Adds a URITransformer to the end of the list of URITransformers.


addTransformer

public void addTransformer(int index,
                           URITransformer transformer)
Adds a URITransformer at the specified index in the list.


removeTransformer

public void removeTransformer(URITransformer transformer)
Removes the first occurrence of the specified URITransformer from the list of URITransformers.


getURITransformers

public List<URITransformer> getURITransformers()
Returns the list of URITransformers.


setURITransformers

public void setURITransformers(List<URITransformer> transformers)
Sets the list of URITransformers.


prepareAccess

public org.openrdf.model.URI prepareAccess(org.openrdf.model.URI uri)
Description copied from interface: InfoSource
Returns a URI (typically representing a file of web page) that can be used to view the contents of the specified URI.

Specified by:
prepareAccess in interface InfoSource
Returns:
The URI that can be opened to see the contents of the file. Typically this URI represents a web page or local file.


Copyright © 1997-2008 Aduna. All Rights Reserved.