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 class
StandardReconConfig.ColumnDetail
protected static class
StandardReconConfig.QueryProperty
protected static class
StandardReconConfig.ReconQuery
static class
StandardReconConfig.ReconResult
protected static class
StandardReconConfig.StandardReconJob
-
Field Summary
Fields Modifier and Type Field Description boolean
autoMatch
List<StandardReconConfig.ColumnDetail>
columnDetails
String
identifierSpace
protected static Set<String>
s_stopWords
String
schemaSpace
String
service
String
typeID
String
typeName
-
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)
Recon
computeFeatures(Recon recon, String text)
Recomputes the features associated with this reconciliation object (only if we have at least one candidate).ReconJob
createJob(ColumnModel columnModel, long rowIndex, Row row, String columnName, Cell cell)
Recon
createNewRecon(long historyEntryID)
protected Recon
createReconServiceResults(String text, com.fasterxml.jackson.databind.node.ArrayNode resultsList, long historyEntryID)
ReconJob
createSimpleJob(String query)
boolean
equals(Object other)
int
getBatchSize()
String
getBriefDescription(String columnName)
protected HttpClient
getHttpClient()
String
getMode()
Returns the identifier for the reconciliation mode, as serialized in JSON.ReconType
getReconType()
int
hashCode()
static StandardReconConfig
reconstruct(String json)
protected static double
wordDistance(String s1, String s2)
protected static double
wordDistance(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:
getBatchSize
in classReconConfig
-
getBriefDescription
public String getBriefDescription(String columnName)
- Specified by:
getBriefDescription
in classReconConfig
-
createJob
public ReconJob createJob(ColumnModel columnModel, long rowIndex, Row row, String columnName, Cell cell)
- Specified by:
createJob
in classReconConfig
-
getHttpClient
protected HttpClient getHttpClient()
-
batchRecon
public List<Recon> batchRecon(List<ReconJob> jobs, long historyEntryID)
- Specified by:
batchRecon
in classReconConfig
-
createNewRecon
public Recon createNewRecon(long historyEntryID)
- Specified by:
createNewRecon
in 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:ReconConfig
Returns 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:
getMode
in classReconConfig
-
-