code: private UserProfile readProfile(String userName, Node profileNode) throws RepositoryException
     {
        UserProfile profile = createUserProfileInstance(userName);
  
        PropertyIterator attributes = profileNode.getProperties();
        while (attributes.hasNext())
        {
           Property prop = attributes.nextProperty();
  
           if (prop.getName().startsWith(ATTRIBUTE_PREFIX))
           {
              String name = prop.getName().substring(ATTRIBUTE_PREFIX.length());
              String value = prop.getString();
  
              profile.setAttribute(name, value);
           }
        }
        return profile;
     }
docs: Read user profile from storage.
  
  @param profileNode
  the node which stores profile attributes as properties with
  prefix {@link #ATTRIBUTE_PREFIX}
  @return {@link UserProfile} instance
  @throws RepositoryException
  if unexpected exception is occurred during reading