public Object restore ( final Object value ) { if ( value != null && value instanceof String ) { final String sValue = ( String ) value ; if ( sValue . startsWith ( PREFIX ) ) { if ( sValue . startsWith ( PREFIX_BOOLEAN ) ) { return Boolean . parseBoolean ( sValue . substring ( PREFIX_BOOLEAN . length ( ) ) ) ; } else if ( sValue . startsWith ( PREFIX_INT ) ) { return Integer . parseInt ( sValue . substring ( PREFIX_INT . length ( ) ) ) ; } else if ( sValue . startsWith ( PREFIX_LONG ) ) { return Long . parseLong ( sValue . substring ( PREFIX_LONG . length ( ) ) ) ; } else if ( sValue . startsWith ( PREFIX_DATE ) ) { final String d = sValue . substring ( PREFIX_DATE . length ( ) ) ; try { return newSdf ( ) . parse ( d ) ; } catch ( final ParseException e ) { logger . warn ( "Unable to parse stringified date: {}" , d , e ) ; } } else if ( sValue . startsWith ( PREFIX_URI ) ) { final String uri = sValue . substring ( PREFIX_URI . length ( ) ) ; try { return new URI ( uri ) ; } catch ( final URISyntaxException e ) { logger . warn ( "Unable to parse stringified URI: {}" , uri , e ) ; } } else if ( sValue . startsWith ( PREFIX_SB64 ) ) { return serializationHelper . deserializeFromBase64 ( sValue . substring ( PREFIX_SB64 . length ( ) ) ) ; } } } return value ; }
After retrieving the attribute from the attributes map .