Class LibraryAddressUtils

java.lang.Object
fr.paris.lutece.plugins.address.util.LibraryAddressUtils

public final class LibraryAddressUtils extends Object
Utils methods for library address
  • Field Details

  • Method Details

    • removeMultiSpace

      public static String removeMultiSpace(String strChaine)
      Replace a sequence of space by one space
      Parameters:
      strChaine - the chaine
      Returns:
      the chaine with one space beetween words
    • isTerminateByApostrophe

      public static boolean isTerminateByApostrophe(String strTypeVoie)
      Test strTypeVoie is termitate by a value of list strListValuesTerminator
      Parameters:
      strTypeVoie - the type voie to test
      Returns:
      true if a value of strTypeVoie is terminate by a value of list strListValuesTerminator
    • parseLong

      public static long parseLong(String strValue)
      Parse a long
      Parameters:
      strValue - the value to parse
      Returns:
      the long value of strValue, -1 otherwise.
    • parseLong

      public static long parseLong(String strValue, long nDefaultValue)
      Parse a long
      Parameters:
      strValue - the value to parse
      nDefaultValue - the default value
      Returns:
      the long value of strValue, nDefaultValue otherwise.
    • parseInt

      public static int parseInt(String strValue)
      Parse a long
      Parameters:
      strValue - the value to parse
      Returns:
      the int value of strValue, -1 otherwise.
    • parseInt

      public static int parseInt(String strValue, int nDefaultValue)
      Parse a long
      Parameters:
      strValue - the value to parse
      nDefaultValue - the default value
      Returns:
      the int value of strValue, nDefaultValue otherwise.
    • fillAddressGeolocation

      public static void fillAddressGeolocation(Adresse adresse, String strGeometry)
      Fills the address with x and y geolocation using strGeometry. POINT (123.456789 987.654321) will give x = 123.456789 and y = 987.654321. Set x and y to 0 if x or y is not a number.
      Parameters:
      adresse - the address to fill
      strGeometry - the geometry string
    • normalizeAddress

      public static String normalizeAddress(Adresse adresse)
      String representation of the adresse
      Parameters:
      adresse - the adresse
      Returns:
      the string