public class CollectionFactory extends Object
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()); If the optional constructor parameters types and values are specified, then these will be used to instantiate the innermost class.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger
logger for this class
|
Constructor and Description |
---|
CollectionFactory() |
Modifier and Type | Method and Description |
---|---|
static Collection |
loadCollection(String CollectionName)
Load collection(s) of the specified name.
|
static Collection |
loadCollection(String CollectionName,
Class<?>[] contructorTypes,
Object[] constructorValues)
Load collection(s) of the specified name.
|
static Collection |
loadCollections()
Use the default property trec.collection.class, or it's default value TRECCollection
|
static Collection |
loadCollections(String[] collNames)
Load collection(s) of the specified name.
|
static Collection |
loadCollections(String[] collNames,
Class<?>[] contructorTypes,
Object[] constructorValues)
Load collection(s) of the specified name.
|
protected static String |
normaliseCollectionName(String collectionName)
prepends org.terrier.indexing. to any Collections without a package
|
public static Collection loadCollections()
public static Collection loadCollection(String CollectionName)
public static Collection loadCollection(String CollectionName, Class<?>[] contructorTypes, Object[] constructorValues)
public static Collection loadCollections(String[] collNames, Class<?>[] contructorTypes, Object[] constructorValues)
public static Collection loadCollections(String[] collNames)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow