[improvement][chat]Add javadoc to Mapper related classes

This commit is contained in:
jerryjzhang
2023-12-11 18:07:26 +08:00
parent 0c6efada43
commit 3cdfcae01c
10 changed files with 14 additions and 19 deletions

View File

@@ -19,9 +19,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
/**
* base Mapper
*/
@Slf4j
public abstract class BaseMapper implements SchemaMapper {

View File

@@ -19,9 +19,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Base Match Strategy
*/
@Service
@Slf4j
public abstract class BaseMatchStrategy<T> implements MatchStrategy<T> {

View File

@@ -22,7 +22,8 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
/**
* Fuzzy Name Match Strategy
* DatabaseMatchStrategy uses SQL LIKE operator to match schema elements.
* It currently supports fuzzy matching against names and aliases.
*/
@Service
@Slf4j

View File

@@ -15,7 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
/***
* A mapper that recognize elements through embedding.
* A mapper that recognizes schema elements with vector embedding.
*/
@Slf4j
public class EmbeddingMapper extends BaseMapper {

View File

@@ -25,7 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* match strategy implement
* EmbeddingMatchStrategy uses vector database to perform
* similarity search against the embeddings of schema elements.
*/
@Service
@Slf4j

View File

@@ -21,7 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* match strategy implement
* HanlpDictMatchStrategy uses <a href="https://www.hanlp.com/">HanLP</a> to
* match schema elements. It currently supports prefix and suffix matching
* against names, values and aliases.
*/
@Service
@Slf4j

View File

@@ -21,9 +21,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
/***
* A mapper that recognize elements through keyword.
* It includes two recognition strategies: HanlpDictMatchStrategy and DatabaseMatchStrategy.
*
* A mapper that recognizes schema elements with keyword.
* It leverages two matching strategies: HanlpDictMatchStrategy and DatabaseMatchStrategy.
*/
@Slf4j
public class KeywordMapper extends BaseMapper {

View File

@@ -19,10 +19,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Mapper helper
*/
@Data
@Service
@Slf4j

View File

@@ -7,7 +7,8 @@ import java.util.Map;
import java.util.Set;
/**
* match strategy
* MatchStrategy encapsulates a concrete matching algorithm
* executed during query or search process.
*/
public interface MatchStrategy<T> {

View File

@@ -18,7 +18,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* match strategy implement
* SearchMatchStrategy encapsulates a concrete matching algorithm
* executed during search process.
*/
@Service
public class SearchMatchStrategy extends BaseMatchStrategy<HanlpMapResult> {