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