-
- All Implemented Interfaces:
-
org.bitlap.geocoding.core.TermIndexVisitor
public class RegionInterpreterVisitor implements TermIndexVisitor
Desc: 基于倒排索引搜索匹配省市区行政区划的访问者 Mail: chk19940609@gmail.com Created by IceMimosa Date: 2017/1/12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRegionInterpreterVisitor.Companion
-
Field Summary
Fields Modifier and Type Field Description private final AddressPersisterpersisterprivate final Booleanstrict
-
Constructor Summary
Constructors Constructor Description RegionInterpreterVisitor(AddressPersister persister, Boolean strict)
-
Method Summary
Modifier and Type Method Description final AddressPersistergetPersister()final BooleangetStrict()UnitstartRound()开始一轮词条匹配。 Booleanvisit(TermIndexEntry entry, String text, Integer pos)匹配到一个索引条目,由访问者确定是否是可接受的匹配项。 索引条目 entry 下的items一定包含一个或多个索引对象 Integerposition()visit 接受某个索引项之后当前匹配的指针位置 UnitendVisit(TermIndexEntry entry, String text, Integer pos)结束索引访问 UnitendRound()结束一轮词条匹配。 BooleanhasResult()是否匹配上了结果 Divisiondevision()获取访问后的对象 IntegermatchCount()IntegerfullMatchCount()IntegerendPosition()获取最终匹配结果的终止位置 Unitreset()状态复位 -
-
Constructor Detail
-
RegionInterpreterVisitor
RegionInterpreterVisitor(AddressPersister persister, Boolean strict)
-
-
Method Detail
-
getPersister
final AddressPersister getPersister()
-
startRound
Unit startRound()
开始一轮词条匹配。
-
visit
Boolean visit(TermIndexEntry entry, String text, Integer pos)
匹配到一个索引条目,由访问者确定是否是可接受的匹配项。 索引条目 entry 下的items一定包含一个或多个索引对象
-
endVisit
Unit endVisit(TermIndexEntry entry, String text, Integer pos)
结束索引访问
-
matchCount
Integer matchCount()
-
fullMatchCount
Integer fullMatchCount()
-
endPosition
Integer endPosition()
获取最终匹配结果的终止位置
-
-
-
-