Terrier IR Platform
1.1.1

uk.ac.gla.terrier.indexing
Class CollectionFactory

java.lang.Object
  extended by uk.ac.gla.terrier.indexing.CollectionFactory

public class CollectionFactory
extends java.lang.Object

Implements a factory for Collection objects. Pass the name of the desired Collection(s) to loadCollection() or loadCollections(). loadCollection can take a comma separated list of collections, while loadCollections takes a String array of Collection names, in the same order. The package name uk.ac.gla.terrier.indexing. is prepended to any Collections named without any explicit packages.

The bottom Collection is specified last, and this is loaded first. Ie Collections are loaded right to left. For instance: PassageCollection,TRECCollection would instantiate a PassageCollection which has as its only constructor parameter, a TREC Collection. Ie, the correponding code would be new PassageCollection(new TRECCollection());

Since:
1.1.0, 14/01/2007
Version:
$Revision: 1.3 $
Author:
Craig Macdonald craigm{a.}dcs.gla.ac.uk

Constructor Summary
CollectionFactory()
           
 
Method Summary
static Collection loadCollection(java.lang.String CollectionName)
          Returns null on error
static Collection loadCollections()
          Use the default property trec.collection.class, or it's default value TRECCollection
static Collection loadCollections(java.lang.String[] collNames)
          Returns null on error
static java.lang.String normaliseCollectionName(java.lang.String collectionName)
          prepends uk.ac.gla.terrier.indexing. to any Collections without a package
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionFactory

public CollectionFactory()
Method Detail

loadCollections

public static Collection loadCollections()
Use the default property trec.collection.class, or it's default value TRECCollection


loadCollection

public static Collection loadCollection(java.lang.String CollectionName)
Returns null on error


loadCollections

public static Collection loadCollections(java.lang.String[] collNames)
Returns null on error


normaliseCollectionName

public static java.lang.String normaliseCollectionName(java.lang.String collectionName)
prepends uk.ac.gla.terrier.indexing. to any Collections without a package


Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow