net.ultrametrics.qcvs
Class Repository

java.lang.Object
  |
  +--net.ultrametrics.qcvs.Repository

public class Repository
extends java.lang.Object

A Repository is simply a collection of RcsObjects.

The definition of repository is more flexible than CVS's definition in the following ways.

The specified 'root' does not have to be a CVSROOT, it can be a subtree. You can specify multiple 'roots' which can be different repositories or different segments of the same repository. Repository - n x RcsObject

See Also:
RcsObject

Constructor Summary
Repository()
          Create a new Repository, containing no RCS objects.
Repository(java.util.Collection roots)
          Create a new Repository object, populating it from the RCS objects found in the paths specified in the collection of Strings which specify cvs root path(s).
Repository(java.util.Collection roots, boolean verbose)
           
 
Method Summary
 boolean add(Repository repository)
          Add a repository's objects to the repository.
 boolean addAll(java.util.Collection collection)
          Add a collection of objects to the repository.
 java.util.Set getObjects()
          Retrieve the set of RcsObjects behind this repository.
static void main(java.lang.String[] args)
          Tester.
 boolean remove(Repository repository)
          Remove a repository's objects from the repository.
 boolean removeAll(java.util.Collection collection)
          Remove a collection of objects from the repository.
 int size()
          Retrieve the count of the number of RcsObjects in this repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository()
Create a new Repository, containing no RCS objects.

Repository

public Repository(java.util.Collection roots)
Create a new Repository object, populating it from the RCS objects found in the paths specified in the collection of Strings which specify cvs root path(s).
Parameters:
roots - a collection of directories specifying from where the RCS objects should be loaded.

Repository

public Repository(java.util.Collection roots,
                  boolean verbose)
Parameters:
vebose - whether to toggle verbose output.
See Also:
Repository(Collection roots)
Method Detail

getObjects

public java.util.Set getObjects()
Retrieve the set of RcsObjects behind this repository.
Returns:
the set of RCS objects.

size

public int size()
Retrieve the count of the number of RcsObjects in this repository.
Returns:
the size of the repository.

add

public boolean add(Repository repository)
Add a repository's objects to the repository.
Parameters:
repository - the repository containing the RcsObjects to add.
See Also:
Set.addAll(Collection collection)

addAll

public boolean addAll(java.util.Collection collection)
Add a collection of objects to the repository.
Parameters:
collection - the collection of RcsObjects to add.
See Also:
Set.addAll(Collection collection)

remove

public boolean remove(Repository repository)
Remove a repository's objects from the repository.
Parameters:
repository - the repository containing the RcsObjects to remove.
See Also:
Set.removeAll(Collection collection)

removeAll

public boolean removeAll(java.util.Collection collection)
Remove a collection of objects from the repository.
Parameters:
collection - the collection of RcsObjects to remove.
See Also:
Set.removeAll(Collection collection)

main

public static void main(java.lang.String[] args)
Tester.