public abstract class OccurrenceAndWeightBasedDetector extends Object implements AttributeDetector<org.apache.directory.api.ldap.model.entry.Entry>
Constructor and Description |
---|
OccurrenceAndWeightBasedDetector() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
applies(org.apache.directory.api.ldap.model.entry.Entry entry,
String attribute)
Checks whether the provided atribute is present in the entry.s
|
void |
collect(org.apache.directory.api.ldap.model.entry.Entry entry)
Collects the information about the attribute to be detected from the provided entry.
|
Map<String,String> |
detect()
Calculates the attribute value based on the two maps.
|
abstract String |
detectedProperty()
The configuration key being detected.
|
protected Map<String,Integer> |
occurrenceMap() |
protected Map<String,Integer> |
weightsMap() |
protected abstract boolean applies(org.apache.directory.api.ldap.model.entry.Entry entry, String attribute)
entry
- the entry being procesedattribute
- the attribute being detectedpublic abstract String detectedProperty()
public Map<String,String> detect()
detect
in interface AttributeDetector<org.apache.directory.api.ldap.model.entry.Entry>
public void collect(org.apache.directory.api.ldap.model.entry.Entry entry)
collect
in interface AttributeDetector<org.apache.directory.api.ldap.model.entry.Entry>
entry
- a result entry returned by a search operationCopyright © 2022 Apache Software Foundation. All rights reserved.