Class SimilarityModelFactory

    • Field Detail

      • DEFAULT_SIM_MODEL_NAME

        public static String DEFAULT_SIM_MODEL_NAME
    • Method Detail

      • getDefaultSimilarityModel

        public static SimilarityModel getDefaultSimilarityModel()
        The CAKE system contains one default SimilarityModel that can be accessed via this method.
        Returns:
        The default SimilarityModel instance.
      • getSimilarityModels

        public static Set<SimilarityModel> getSimilarityModels()
        Returns:
        All available similarity models.
      • getSimilarityModelNames

        public static Set<String> getSimilarityModelNames()
        Returns:
        All available similarity model names.
      • getSimilarityModelPaths

        public static Set<String> getSimilarityModelPaths()
        Returns:
        The model path with the given name.
      • getSimilarityModel

        public static SimilarityModel getSimilarityModel​(String name)
        Parameters:
        name - similarity model name defined in composition.xml
        Returns:
        The similarity model SimilarityModel with the given name.
      • newSimilarityModel

        public static SimilarityModel newSimilarityModel​(String name)
        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 equals DEFAULT_SIM_MODEL_NAME, the new SimilarityModel will be the default Model. It is not possible to go back to the previous model.
      • 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.
        Specified by:
        reset in interface Factory
      • bind

        public boolean bind​(Object implementation)
        Description copied from interface: Factory
        Bind an implementation to the factory.
        Specified by:
        bind in interface Factory
        Parameters:
        implementation - The object to bind.
        Returns:
        true if the factory accept the implementation, otherwise false .
        See Also:
        Factory.bind(java.lang.Object)
      • unbind

        public boolean unbind​(Object implementation)
        Description copied from interface: Factory
        Unbinds an implementation from the factory.
        Specified by:
        unbind in interface Factory
        Parameters:
        implementation - The object to unbind.
        Returns:
        true if the factory accept the implementation, otherwise false .
        See Also:
        Factory.unbind(java.lang.Object)