public class GeoIPDocumentCreator extends Object
Simple utility class which enables efficient, structured
NutchDocument
building based on input from
GeoIPIndexingFilter
, where configuration is also read.
Based on the nature of the input, this class wraps factory type
implementations for populating NutchDocument
's with the correct NutchField
information.
Constructor and Description |
---|
GeoIPDocumentCreator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static NutchDocument |
createDocFromCityDb(String serverIp,
NutchDocument doc,
DatabaseReader reader) |
static NutchDocument |
createDocFromCityService(String serverIp,
NutchDocument doc,
WebServiceClient client) |
static NutchDocument |
createDocFromConnectionDb(String serverIp,
NutchDocument doc,
DatabaseReader reader) |
static NutchDocument |
createDocFromCountryService(String serverIp,
NutchDocument doc,
WebServiceClient client) |
static NutchDocument |
createDocFromDomainDb(String serverIp,
NutchDocument doc,
DatabaseReader reader) |
static NutchDocument |
createDocFromInsightsService(String serverIp,
NutchDocument doc,
WebServiceClient client) |
static NutchDocument |
createDocFromIspDb(String serverIp,
NutchDocument doc,
DatabaseReader reader) |
public static NutchDocument createDocFromInsightsService(String serverIp, NutchDocument doc, WebServiceClient client) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromCityService(String serverIp, NutchDocument doc, WebServiceClient client) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromCountryService(String serverIp, NutchDocument doc, WebServiceClient client) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromIspDb(String serverIp, NutchDocument doc, DatabaseReader reader) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromDomainDb(String serverIp, NutchDocument doc, DatabaseReader reader) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromConnectionDb(String serverIp, NutchDocument doc, DatabaseReader reader) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
public static NutchDocument createDocFromCityDb(String serverIp, NutchDocument doc, DatabaseReader reader) throws UnknownHostException, IOException, GeoIp2Exception
UnknownHostException
IOException
GeoIp2Exception
Copyright © 2015 The Apache Software Foundation