Class GeoGazetteerClient


  • public class GeoGazetteerClient
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkAvail()
      Ping lucene-geo-gazetteer API
      java.util.Map<java.lang.String,​java.util.List<Location>> getLocations​(java.util.List<java.lang.String> locations)
      Calls API of lucene-geo-gazetteer to search location name in gazetteer.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeoGazetteerClient

        public GeoGazetteerClient​(java.lang.String url)
        Pass URL on which lucene-geo-gazetteer is available - eg. http://localhost:8765/api/search
        Parameters:
        url -
      • GeoGazetteerClient

        public GeoGazetteerClient​(GeoParserConfig config)
    • Method Detail

      • getLocations

        public java.util.Map<java.lang.String,​java.util.List<Location>> getLocations​(java.util.List<java.lang.String> locations)
        Calls API of lucene-geo-gazetteer to search location name in gazetteer.
        Parameters:
        locations - List of locations to be searched in gazetteer
        Returns:
        Map of input location strings to gazetteer locations
      • checkAvail

        public boolean checkAvail()
        Ping lucene-geo-gazetteer API
        Returns:
        true if API is available else returns false