code: public Value createValue(JCRPath value) throws RepositoryException
     {
        if (value == null)
           return null;
        try
        {
           return new PathValue(value.getInternalPath(), locationFactory);
        }
        catch (IOException e)
        {
           throw new RepositoryException("Cannot create PATH Value from JCRPath", e);
        }
     }
docs: Create Value from JCRPath.
  
  @param value
  JCRPath
  @return Value
  @throws RepositoryException
  if error