Class MaxmindLineParser
- java.lang.Object
-
- technology.dice.dicewhere.parsing.LineParser
-
- technology.dice.dicewhere.provider.maxmind.parsing.MaxmindLineParser
-
public class MaxmindLineParser extends LineParser
Parser for any Maxmind database.
Maxmind's databases present the fields in increasing order of granularity. A more precise database will contain all fields of a less precise database, adding the extra precision at the end. This class will parse fields up to the level of postcode, presented by the GeoIP2-City databases.
This parser parses both the Commercial and Lite versions of Maxmind's databases.
-
-
Constructor Summary
Constructors Constructor Description MaxmindLineParser(Map<String,MaxmindLocation> locationDictionary)MaxmindLineParser(Map<String,MaxmindLocation> locationDictionary, Decorator<? extends DecoratorInformation> decorator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Decorator<? extends DecoratorInformation>>getDecorator()protected IpInformationparseLine(RawLine rawLine, boolean retainOriginalLine)-
Methods inherited from class technology.dice.dicewhere.parsing.LineParser
parse
-
-
-
-
Constructor Detail
-
MaxmindLineParser
public MaxmindLineParser(Map<String,MaxmindLocation> locationDictionary, Decorator<? extends DecoratorInformation> decorator)
-
MaxmindLineParser
public MaxmindLineParser(Map<String,MaxmindLocation> locationDictionary)
-
-
Method Detail
-
getDecorator
public Optional<Decorator<? extends DecoratorInformation>> getDecorator()
- Specified by:
getDecoratorin classLineParser
-
parseLine
protected IpInformation parseLine(RawLine rawLine, boolean retainOriginalLine) throws LineParsingException
- Specified by:
parseLinein classLineParser- Throws:
LineParsingException
-
-