com.gisgraphy.helper
Class GisFeatureHelper

java.lang.Object
  extended by com.gisgraphy.helper.GisFeatureHelper
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

@Service
public class GisFeatureHelper
extends Object
implements org.springframework.context.ApplicationContextAware


Field Summary
 ICountryDao countryDao
           
 
Constructor Summary
GisFeatureHelper()
           
 
Method Summary
 Country getCountry(String countryCode)
           
 String getFullyQualifiedName(GisFeature gisFeature)
           
 String getFullyQualifiedName(GisFeature gisFeature, boolean withCountry)
          Returns a name of the form : (adm1Name et adm2Name are printed) Paris, Département de Ville-De-Paris, Ile-De-France, (FR)
static GisFeatureHelper getInstance()
          this method avoid the necessary injection in gisfeature
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

countryDao

public ICountryDao countryDao
Constructor Detail

GisFeatureHelper

public GisFeatureHelper()
Method Detail

getInstance

public static GisFeatureHelper getInstance()
this method avoid the necessary injection in gisfeature


getFullyQualifiedName

public String getFullyQualifiedName(GisFeature gisFeature,
                                    boolean withCountry)
Returns a name of the form : (adm1Name et adm2Name are printed) Paris, Département de Ville-De-Paris, Ile-De-France, (FR)

Parameters:
withCountry - Whether the country information should be added
Returns:
a name with the Administrative division and Country

getFullyQualifiedName

public String getFullyQualifiedName(GisFeature gisFeature)
Returns:
a name with the Administrative division (but without Country)

getCountry

public Country getCountry(String countryCode)
Returns:
the country from the country code. Return null if the country Code is null or if no country is found

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2012. All Rights Reserved.