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.slf4j.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 Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow