@Bindable(prefix="ByAttributeClusteringAlgorithm",
inherit=CommonAttributes.class)
@Label(value="By Attribute Clustering")
public class ByFieldClusteringAlgorithm
extends ProcessingComponentBase
implements IClusteringAlgorithm
Document.SOURCES field is used.| Modifier and Type | Field and Description |
|---|---|
List<Cluster> |
clusters
Clusters created by the algorithm.
|
List<Document> |
documents
Documents to cluster.
|
String |
fieldName
Name of the field to cluster by.
|
| Constructor and Description |
|---|
ByFieldClusteringAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildClusterLabel(Object fieldValue)
Builds cluster label based on the field value.
|
void |
process()
Performs by URL clustering.
|
afterProcessing, beforeProcessing, dispose, getContext, getSharedExecutor, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterProcessing, beforeProcessing, dispose, init@Processing @Input @Internal @Attribute(key="documents", inherit=true) public List<Document> documents
@Processing @Output @Internal @Attribute(key="clusters", inherit=true) public List<Cluster> clusters
@Processing @Input @Attribute @Required @Level(value=BASIC) @Group(value="Fields") @Label(value="Field name") public String fieldName
buildClusterLabel(Object). If the field value is a collection,
the document will be assigned to all clusters corresponding to the values in the
collection. Note that arrays will not be 'unfolded' in this way.public void process()
throws ProcessingException
process in interface IProcessingComponentprocess in class ProcessingComponentBaseProcessingException - when processing failed. If thrown, the
IProcessingComponent.afterProcessing() method will be called and the component will
be ready to accept further requests or to be disposed of. Finally, the
exception will be rethrown from the controller method that caused the
component to perform processing.