Instantiation of a Repository

In order to instantiate a repository one has first to instantiate the repository factory, e.g.

RepositoryFactory rf = new RepositoryFactory();

which is loading the file yarep.properties from the classpath. Alternatively one can also specify a properties file, e.g.

RepositoryFactory rf = new RepositoryFactry("my-yarep.properties");

Now one can instantiate a repository either by specifying a repository ID, e.g.

Repository repo = rf.newRepository("my-repo-id");

which is assumed to be registered within the yarep properties file or one can create a repository instance by specifying an ID and an according repository configuration, e.g

Repository repo = rf.newRepository("my-other-repo-id", new File("repo-config.xml"));

whereas the repository configuration file is being resolved according to the classpath if a relative path is being specified.

Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.