Class YahooGazetteer

  • All Implemented Interfaces:
    Gazetteer

    public class YahooGazetteer
    extends java.lang.Object
    implements Gazetteer
    A gazetteer that uses Yahoo's geocoding service to find locations for requested places.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String GEOCODE_SERVICE  
    • Constructor Summary

      Constructors 
      Constructor Description
      YahooGazetteer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<PointOfInterest> findPlaces​(java.lang.String lookupString)
      Find places identified in a string of free text.
      protected boolean isNumber​(java.lang.String lookupString)  
      protected java.util.ArrayList<PointOfInterest> parseLocationString​(java.lang.String locationString)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GEOCODE_SERVICE

        protected static final java.lang.String GEOCODE_SERVICE
        See Also:
        Constant Field Values
    • Constructor Detail

      • YahooGazetteer

        public YahooGazetteer()
    • Method Detail

      • findPlaces

        public java.util.List<PointOfInterest> findPlaces​(java.lang.String lookupString)
                                                   throws NoItemException,
                                                          ServiceException
        Description copied from interface: Gazetteer
        Find places identified in a string of free text.
        Specified by:
        findPlaces in interface Gazetteer
        Parameters:
        lookupString - a string containing the place description.
        Returns:
        the points-of-interest that match the place description.
        Throws:
        NoItemException - if the place description cannot be matched.
        ServiceException - if the lookup service is not available or invocation of it fails.
      • isNumber

        protected boolean isNumber​(java.lang.String lookupString)