Class LibraryAddressUtils
java.lang.Object
fr.paris.lutece.plugins.address.util.LibraryAddressUtils
Utils methods for library address
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfillAddressGeolocation(Address Address, String strGeometry) Fills the address with x and y geolocation using strGeometry.static booleanisTerminateByApostrophe(String strTypeVoie) Test strTypeVoie is termitate by a value of list strListValuesTerminatorstatic StringnormalizeAddress(Address Address) Deprecated.static intParse a longstatic intParse a longstatic longParse a longstatic longParse a longstatic StringremoveMultiSpace(String strChaine) Replace a sequence of space by one space
-
Field Details
-
CONSTANT_COMA
- See Also:
-
CONSTANT_MULTI_SPACE
- See Also:
-
CONSTANT_ONE_SPACE
- See Also:
-
CONSTANT_OPEN_PARENTHESIS
- See Also:
-
CONSTANT_CLOSE_PARENTHESIS
- See Also:
-
VALID_GEOMETRY_REGEX
- See Also:
-
-
Method Details
-
removeMultiSpace
Replace a sequence of space by one space- Parameters:
strChaine- the chaine- Returns:
- the chaine with one space beetween words
-
isTerminateByApostrophe
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
Parse a long- Parameters:
strValue- the value to parse- Returns:
- the long value of
strValue,-1otherwise.
-
parseLong
Parse a long- Parameters:
strValue- the value to parsenDefaultValue- the default value- Returns:
- the long value of
strValue,nDefaultValueotherwise.
-
parseInt
Parse a long- Parameters:
strValue- the value to parse- Returns:
- the int value of
strValue,-1otherwise.
-
parseInt
Parse a long- Parameters:
strValue- the value to parsenDefaultValue- the default value- Returns:
- the int value of
strValue,nDefaultValueotherwise.
-
fillAddressGeolocation
Fills the address with x and y geolocation using strGeometry.POINT (123.456789 987.654321)will givex = 123.456789andy = 987.654321. Set x and y to 0 if x or y is not a number.- Parameters:
Address- the address to fillstrGeometry- the geometry string
-
normalizeAddress
Deprecated.String representation of the Address- Parameters:
Address- the Address- Returns:
- the string
-