fr.paris.lutece.plugins.address.util
Class LibraryAddressUtils

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

public final class LibraryAddressUtils
extends java.lang.Object

Utils methods for library address


Field Summary
static java.lang.String CONSTANT_CLOSE_PARENTHESIS
           
static java.lang.String CONSTANT_COMA
           
static java.lang.String CONSTANT_MULTI_SPACE
           
static java.lang.String CONSTANT_ONE_SPACE
           
static java.lang.String CONSTANT_OPEN_PARENTHESIS
           
static java.lang.String VALID_GEOMETRY_REGEX
           
 
Method Summary
static void fillAddressGeolocation(Adresse adresse, java.lang.String strGeometry)
          Fills the address with x and y geolocation using strGeometry.
static boolean isTerminateByApostrophe(java.lang.String strTypeVoie)
          Test strTypeVoie is termitate by a value of list strListValuesTerminator
static java.lang.String normalizeAddress(Adresse adresse)
          String representation of the adresse
static int parseInt(java.lang.String strValue)
          Parse a long
static int parseInt(java.lang.String strValue, int nDefaultValue)
          Parse a long
static long parseLong(java.lang.String strValue)
          Parse a long
static long parseLong(java.lang.String strValue, long nDefaultValue)
          Parse a long
static java.lang.String removeMultiSpace(java.lang.String strChaine)
          Replace a sequence of space by one space
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT_COMA

public static final java.lang.String CONSTANT_COMA
See Also:
Constant Field Values

CONSTANT_MULTI_SPACE

public static final java.lang.String CONSTANT_MULTI_SPACE
See Also:
Constant Field Values

CONSTANT_ONE_SPACE

public static final java.lang.String CONSTANT_ONE_SPACE
See Also:
Constant Field Values

CONSTANT_OPEN_PARENTHESIS

public static final java.lang.String CONSTANT_OPEN_PARENTHESIS
See Also:
Constant Field Values

CONSTANT_CLOSE_PARENTHESIS

public static final java.lang.String CONSTANT_CLOSE_PARENTHESIS
See Also:
Constant Field Values

VALID_GEOMETRY_REGEX

public static final java.lang.String VALID_GEOMETRY_REGEX
See Also:
Constant Field Values
Method Detail

removeMultiSpace

public static java.lang.String removeMultiSpace(java.lang.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(java.lang.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(java.lang.String strValue)
Parse a long

Parameters:
strValue - the value to parse
Returns:
the long value of strValue, -1 otherwise.

parseLong

public static long parseLong(java.lang.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(java.lang.String strValue)
Parse a long

Parameters:
strValue - the value to parse
Returns:
the int value of strValue, -1 otherwise.

parseInt

public static int parseInt(java.lang.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,
                                          java.lang.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

Parameters:
adresse - the address to fill
strGeometry - the geometry string

normalizeAddress

public static java.lang.String normalizeAddress(Adresse adresse)
String representation of the adresse

Parameters:
adresse - the adresse
Returns:
the string


Copyright © 2010 Mairie de Paris. All Rights Reserved.