Class RetrievalFactory
- java.lang.Object
-
- de.uni_trier.wi2.procake.retrieval.RetrievalFactory
-
- All Implemented Interfaces:
Factory
public class RetrievalFactory extends Object implements Factory
This factory creates several retriever instances. SeveralSystemRetrieversare available.- Author:
- Rainer Maximini
- See Also:
SystemRetrievers
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanbind(RetrievalFactoryObject implementation)add a retriever implementation to the retriever factorybooleanbind(Object implementation)Bind an implementation to the factory.static AbstractMACFACRetrievercreateMACFACRetriever(Retriever<DataObject,Query> macRetriever, Retriever<DataObject,Query> facRetriever)Creates a new MAC/FAC retriever that is composed of the given MAC retriever and the given FAC retriever.static List<String>getAvailableRetrieverNames()static Retriever<? extends DataObject,? extends Query>newRetriever(String retrieverName)Creates a new retriever of the specified name.voidreset()This method has to be implemented by every factory in order to allow a proper restart of ProCAKE.static booleanunbind(RetrievalFactoryObject implementation)remove a retriever implementation from the retriever factorybooleanunbind(Object implementation)Unbinds an implementation from the factory.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.uni_trier.wi2.procake.utils.composition.Factory
addParameter, postInit
-
-
-
-
Method Detail
-
bind
public static boolean bind(RetrievalFactoryObject implementation)
add a retriever implementation to the retriever factory- Parameters:
implementation- retriever
-
getAvailableRetrieverNames
public static List<String> getAvailableRetrieverNames()
- Returns:
- Returns a list of the names of all available retrievers.
-
newRetriever
public static Retriever<? extends DataObject,? extends Query> newRetriever(String retrieverName)
Creates a new retriever of the specified name.- Parameters:
retrieverName- The name of the retriever.- Returns:
- Returns a new retriever for the specified name.
-
createMACFACRetriever
public static AbstractMACFACRetriever createMACFACRetriever(Retriever<DataObject,Query> macRetriever, Retriever<DataObject,Query> facRetriever)
Creates a new MAC/FAC retriever that is composed of the given MAC retriever and the given FAC retriever.
-
unbind
public static boolean unbind(RetrievalFactoryObject implementation)
remove a retriever implementation from the retriever factory- Parameters:
implementation- retriever
-
reset
public void reset()
Description copied from interface:FactoryThis method has to be implemented by every factory in order to allow a proper restart of ProCAKE. For example, this method might reset the default factory object or other stateful variables.
-
bind
public boolean bind(Object implementation)
Description copied from interface:FactoryBind an implementation to the factory.- Specified by:
bindin interfaceFactory- Parameters:
implementation- The object to bind.- Returns:
trueif the factory accept the implementation, otherwisefalse.- See Also:
Factory.bind(java.lang.Object)
-
unbind
public boolean unbind(Object implementation)
Description copied from interface:FactoryUnbinds an implementation from the factory.- Specified by:
unbindin interfaceFactory- Parameters:
implementation- The object to unbind.- Returns:
trueif the factory accept the implementation, otherwisefalse.- See Also:
Factory.unbind(java.lang.Object)
-
-