Package org.openrefine.model.recon
Class StandardReconConfig
- java.lang.Object
-
- org.openrefine.model.recon.ReconConfig
-
- org.openrefine.model.recon.StandardReconConfig
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataExtensionReconConfig
public class StandardReconConfig extends ReconConfig
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStandardReconConfig.ColumnDetailprotected static classStandardReconConfig.QueryPropertyprotected static classStandardReconConfig.ReconQuerystatic classStandardReconConfig.ReconResultprotected static classStandardReconConfig.StandardReconJob
-
Field Summary
Fields Modifier and Type Field Description booleanautoMatchList<StandardReconConfig.ColumnDetail>columnDetailsStringidentifierSpaceprotected static Set<String>s_stopWordsStringschemaSpaceStringserviceStringtypeIDStringtypeName-
Fields inherited from class org.openrefine.model.recon.ReconConfig
LOGGER, s_opClassToName, s_opNameToClass
-
-
Constructor Summary
Constructors Constructor Description StandardReconConfig(String service, String identifierSpace, String schemaSpace, String typeID, String typeName, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails)StandardReconConfig(String service, String identifierSpace, String schemaSpace, String typeID, String typeName, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails, int limit)StandardReconConfig(String service, String identifierSpace, String schemaSpace, ReconType type, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails, int limit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Recon>batchRecon(List<ReconJob> jobs, long historyEntryID)protected static Set<String>breakWords(String s)ReconcomputeFeatures(Recon recon, String text)Recomputes the features associated with this reconciliation object (only if we have at least one candidate).ReconJobcreateJob(ColumnModel columnModel, long rowIndex, Row row, String columnName, Cell cell)ReconcreateNewRecon(long historyEntryID)protected ReconcreateReconServiceResults(String text, com.fasterxml.jackson.databind.node.ArrayNode resultsList, long historyEntryID)ReconJobcreateSimpleJob(String query)booleanequals(Object other)intgetBatchSize()StringgetBriefDescription(String columnName)protected HttpClientgetHttpClient()StringgetMode()Returns the identifier for the reconciliation mode, as serialized in JSON.ReconTypegetReconType()inthashCode()static StandardReconConfigreconstruct(String json)protected static doublewordDistance(String s1, String s2)protected static doublewordDistance(Set<String> longWords, Set<String> shortWords)-
Methods inherited from class org.openrefine.model.recon.ReconConfig
getClassFromMode, registerReconConfig, save
-
-
-
-
Field Detail
-
service
public final String service
-
identifierSpace
public final String identifierSpace
-
schemaSpace
public final String schemaSpace
-
typeID
public final String typeID
-
typeName
public final String typeName
-
autoMatch
public final boolean autoMatch
-
columnDetails
public final List<StandardReconConfig.ColumnDetail> columnDetails
-
-
Constructor Detail
-
StandardReconConfig
public StandardReconConfig(String service, String identifierSpace, String schemaSpace, ReconType type, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails, int limit)
-
StandardReconConfig
public StandardReconConfig(String service, String identifierSpace, String schemaSpace, String typeID, String typeName, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails)
-
StandardReconConfig
public StandardReconConfig(String service, String identifierSpace, String schemaSpace, String typeID, String typeName, boolean autoMatch, List<StandardReconConfig.ColumnDetail> columnDetails, int limit)
- Parameters:
service-identifierSpace-schemaSpace-typeID-typeName-autoMatch-columnDetails-limit- maximum number of results to return (0 = default)
-
-
Method Detail
-
reconstruct
public static StandardReconConfig reconstruct(String json) throws IOException
- Throws:
IOException
-
getReconType
public ReconType getReconType()
-
getBatchSize
public int getBatchSize()
- Specified by:
getBatchSizein classReconConfig
-
getBriefDescription
public String getBriefDescription(String columnName)
- Specified by:
getBriefDescriptionin classReconConfig
-
createJob
public ReconJob createJob(ColumnModel columnModel, long rowIndex, Row row, String columnName, Cell cell)
- Specified by:
createJobin classReconConfig
-
getHttpClient
protected HttpClient getHttpClient()
-
batchRecon
public List<Recon> batchRecon(List<ReconJob> jobs, long historyEntryID)
- Specified by:
batchReconin classReconConfig
-
createNewRecon
public Recon createNewRecon(long historyEntryID)
- Specified by:
createNewReconin classReconConfig
-
createReconServiceResults
protected Recon createReconServiceResults(String text, com.fasterxml.jackson.databind.node.ArrayNode resultsList, long historyEntryID)
-
computeFeatures
public Recon computeFeatures(Recon recon, String text)
Recomputes the features associated with this reconciliation object (only if we have at least one candidate).- Parameters:
text- the cell value to compare the reconciliation data to
-
getMode
public String getMode()
Description copied from class:ReconConfigReturns the identifier for the reconciliation mode, as serialized in JSON. This is the same identifier that was used to register the registration mode. Jackson already adds the mode during serialization hence the JsonIgnore here.- Specified by:
getModein classReconConfig
-
-