Class SimilarityModelFactory
java.lang.Object
de.uni_trier.wi2.procake.similarity.SimilarityModelFactory
- All Implemented Interfaces:
Factory
This Factory class provides the implementation to the
SimilarityModel
interfaces.
ProCAKE contains one default SimilarityModel
that can be accessed via
getDefaultSimilarityModel()
.- Author:
- Rainer Maximini, Christian Zeyen
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
bind
(SimilarityModelFactoryObject implementation) boolean
Bind an implementation to the factory.static SimilarityModel
The CAKE system contains one defaultSimilarityModel
that can be accessed via this method.static SimilarityModel
getSimilarityModel
(String name) static String
getSimilarityModelPath
(String name) static Set<SimilarityModel>
static SimilarityModel
newSimilarityModel
(String name) This method creates a new similarity model and may overwrite an existing model with the same name.static SimilarityValuator
static SimilarityValuator
newSimilarityValuator
(SimilarityModel simModel) static SimilarityValuator
newSimilarityValuatorForModel
(String modelName) void
reset()
This method has to be implemented by every factory in order to allow a proper restart of ProCAKE.static boolean
unbind
(SimilarityModelFactoryObject implementation) boolean
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
-
Field Details
-
DEFAULT_SIM_MODEL_NAME
-
-
Method Details
-
bind
-
getDefaultSimilarityModel
The CAKE system contains one defaultSimilarityModel
that can be accessed via this method.- Returns:
- The default
SimilarityModel
instance.
-
getSimilarityModels
- Returns:
- All available similarity models.
-
getSimilarityModelNames
- Returns:
- All available similarity model names.
-
getSimilarityModelPaths
- Returns:
- The model path with the given name.
-
getSimilarityModelPath
- Parameters:
name
- similarity model name defined in composition.xml- Returns:
- The similarity model path.
-
getSimilarityModel
- Parameters:
name
- similarity model name defined in composition.xml- Returns:
- The similarity model
SimilarityModel
with the given name.
-
newSimilarityModel
This method creates a new similarity model and may overwrite an existing model with the same name.- Parameters:
name
- The name of the new similarity model. If name equalsDEFAULT_SIM_MODEL_NAME
, the newSimilarityModel
will be the default Model. It is not possible to go back to the previous model.
-
newSimilarityValuatorForModel
- Returns:
- A
SimilarityValuator
instance for the model of the given nameSimilarityModel
.
-
newSimilarityValuator
- Returns:
- A
SimilarityValuator
instance for the defaultSimilarityModel
.
-
newSimilarityValuator
- Parameters:
simModel
- TheSimilarityModel
that should be used.- Returns:
- A
SimilarityValuator
instance for the givenSimilarityModel
.
-
unbind
-
reset
public void reset()Description copied from interface:Factory
This 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
Description copied from interface:Factory
Bind an implementation to the factory. -
unbind
Description copied from interface:Factory
Unbinds an implementation from the factory.
-