gov.llnl.babel.repository
public class RepositoryFactory extends java.lang.Object
RepositoryFactory
is a singleton factory that manages the
creation of repository interfaces based on a repository URI. A URI that
starts with "http:" or "https:" specifies a web repository. A URI that
starts with "file:" creates a file repository. All other URIs are assumed
to be file repositories.Constructor and Description |
---|
RepositoryFactory(Context context)
Create a new instance of the repository factory.
|
Modifier and Type | Method and Description |
---|---|
Repository |
createRepository(java.lang.String uri)
Create a new repository object based on the URI.
|
public RepositoryFactory(Context context)
getInstance
and setInstance
.public Repository createRepository(java.lang.String uri) throws RepositoryException
RepositoryException
is thrown if any
error is detected in creating the repository.RepositoryException