net.ultrametrics.qcvs
Class Interrogator

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

public class Interrogator
extends java.lang.Object

An object which is capable of interrogating a repository with advanced queries.


Constructor Summary
Interrogator()
          Create a new uninitialized interrogator.
Interrogator(Repository repository, java.util.Collection rootNodes)
          Create a new interrogation of an existing Repository.
 
Method Summary
 boolean add(Repository repository, java.util.Collection rootNodes)
          Add a repository to this interrogation.
 void dumpStatus()
          Convenience method to dump general interrogator statistics and status.
 java.util.Collection getAuthors()
          Get the collection of all authors who have ever modified the repository.
 java.util.Map getByDay()
          Retrieve histogram map of modifications by day.
 java.util.Map getByMonth()
          Retrieve histogram map of modifications by month.
 java.util.Map getByTime()
          Retrieve histogram map of modifications by time.
 java.util.Map getByWeek()
          Retrieve histogram map of modifications by week.
 java.util.Map getByYear()
          Retrieve histogram map of modifications by year.
 java.util.Date getEarliestDate()
          Get the date of the first revision to any object in the repository.
protected  java.util.SortedMap getKeyPositions()
           
 java.util.Date getLatestDate()
          Get the date of the last revision to any object in the repository.
 java.util.SortedSet getNodes()
          Get the file nodes associated with the repositories in this interrogation.
 Repository getRepository()
          Get the repository associated with this interrogation.
 boolean isUpdated()
          Find out if the interrogator is up-to-date.
static void main(java.lang.String[] args)
          Tester.
protected  void position()
          Setup sort order of key categories for positioning on screen.
 boolean remove(Repository repository, java.util.Collection rootNodes)
          Remove a repository from this interrogation.
 int size()
          Retrieve the size of this interrogation's repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interrogator

public Interrogator()
Create a new uninitialized interrogator.

Interrogator

public Interrogator(Repository repository,
                    java.util.Collection rootNodes)
Create a new interrogation of an existing Repository.
Parameters:
repository - the source repository being interrogated.
rootNodes - collection of files from where the repository was loaded.
Method Detail

getRepository

public Repository getRepository()
Get the repository associated with this interrogation.

getNodes

public java.util.SortedSet getNodes()
Get the file nodes associated with the repositories in this interrogation.

isUpdated

public boolean isUpdated()
Find out if the interrogator is up-to-date. Not important to a client, since update() runs automatically, but it is sometimes useful to know in advance if a call to an accessor will require an internal update() and possibly take a long time.

getAuthors

public java.util.Collection getAuthors()
Get the collection of all authors who have ever modified the repository.

getByTime

public java.util.Map getByTime()
Retrieve histogram map of modifications by time.

getByDay

public java.util.Map getByDay()
Retrieve histogram map of modifications by day.

getByWeek

public java.util.Map getByWeek()
Retrieve histogram map of modifications by week.

getByMonth

public java.util.Map getByMonth()
Retrieve histogram map of modifications by month.

getByYear

public java.util.Map getByYear()
Retrieve histogram map of modifications by year.

getEarliestDate

public java.util.Date getEarliestDate()
Get the date of the first revision to any object in the repository.

getLatestDate

public java.util.Date getLatestDate()
Get the date of the last revision to any object in the repository.

getKeyPositions

protected java.util.SortedMap getKeyPositions()

add

public boolean add(Repository repository,
                   java.util.Collection rootNodes)
Add a repository to this interrogation. Leaves existing unique objects intact.

remove

public boolean remove(Repository repository,
                      java.util.Collection rootNodes)
Remove a repository from this interrogation. Leaves objects where the two sets don't intersect intact.

size

public int size()
Retrieve the size of this interrogation's repository.

position

protected void position()
Setup sort order of key categories for positioning on screen.

dumpStatus

public void dumpStatus()
Convenience method to dump general interrogator statistics and status.

main

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