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.TypeIdResolverBaseRegistry 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 orBinningClustererby implementing a ClusteringDistance orKeyerinstead.- 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.IdgetMechanism()StringidFromValue(Object value)StringidFromValueAndType(Object value, Class<?> suggestedType)static voidregister(String type, Class<? extends ClustererConfig> configClass)com.fasterxml.jackson.databind.JavaTypetypeFromId(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:
typeFromIdin interfacecom.fasterxml.jackson.databind.jsontype.TypeIdResolver- Overrides:
typeFromIdin classcom.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
-