Package org.openrefine.clustering
Class ClustererConfigFactory
- java.lang.Object
-
- com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
- org.openrefine.clustering.ClustererConfigFactory
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsontype.TypeIdResolver
public class ClustererConfigFactory extends com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
Registry where clusterers are registered, to make this extensible. If you want to implement a new clusterer, it is likely that it is actually a binning or distance-based clusterer, so you might be able to reuse the kNNClusterer orBinningClusterer
by implementing a ClusteringDistance orKeyer
instead.- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description ClustererConfigFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.annotation.JsonTypeInfo.Id
getMechanism()
String
idFromValue(Object value)
String
idFromValueAndType(Object value, Class<?> suggestedType)
static void
register(String type, Class<? extends ClustererConfig> configClass)
com.fasterxml.jackson.databind.JavaType
typeFromId(com.fasterxml.jackson.databind.DatabindContext context, String id)
-
-
-
Field Detail
-
registry
protected static Map<String,Class<? extends ClustererConfig>> registry
-
factory
protected com.fasterxml.jackson.databind.type.TypeFactory factory
-
-
Method Detail
-
register
public static void register(String type, Class<? extends ClustererConfig> configClass)
-
getMechanism
public com.fasterxml.jackson.annotation.JsonTypeInfo.Id getMechanism()
-
typeFromId
public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context, String id)
- Specified by:
typeFromId
in interfacecom.fasterxml.jackson.databind.jsontype.TypeIdResolver
- Overrides:
typeFromId
in classcom.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
-