Class UnrecognizedTextParser
java.lang.Object
gov.nyc.doitt.gis.geoclient.parser.regex.AbstractRegexParser
gov.nyc.doitt.gis.geoclient.parser.regex.UnrecognizedTextParser
- All Implemented Interfaces:
Parser
Parser that always matches zero or more characters in the current
Chunk
and marks the TokenType and ChunkType as a (possible) place
name.
This parser is used as a fallback to handle any input that does not match
more specific patterns. It uses a regular expression that matches any string,
including
the empty string, and assigns the TokenType.PLACE and
ChunkType.PLACE
to the resulting match.
Previously, this parser assigned the TokenType#UNRECOGNIZED and
ChunkType#UNRECOGNIZED but this was changed to reflect the fact that
is used for a place search after all other parsers have been tried.
- Since:
- 2.0
- Author:
- mlipper
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidparse(ParseContext parseContext) Constructs a newUnrecognizedTextParserinstance.Methods inherited from class gov.nyc.doitt.gis.geoclient.parser.regex.AbstractRegexParser
getName, handleMatch, newToken, nextChunk, patternNotMatched
-
Constructor Details
-
UnrecognizedTextParser
public UnrecognizedTextParser()
-
-
Method Details
-
parse
Constructs a newUnrecognizedTextParserinstance. This parser uses a regex pattern that matches any input.- Specified by:
parsein interfaceParser- Specified by:
parsein classAbstractRegexParser- Parameters:
parseContext- Current parsing context- See Also:
-