code: public Value loadValue(ValueData data, int type) throws RepositoryException
     {
        try
        {
           switch (type)
           {
              case PropertyType.STRING :
                 return new StringValue(data);
              case PropertyType.BINARY :
                 return new BinaryValue(data, spoolConfig);
              case PropertyType.BOOLEAN :
                 return new BooleanValue(data);
              case PropertyType.LONG :
                 return new LongValue(data);
              case PropertyType.DOUBLE :
                 return new DoubleValue(data);
              case PropertyType.DATE :
                 return new DateValue(data);
              case PropertyType.PATH :
                 return new PathValue(data, locationFactory);
              case PropertyType.NAME :
                 return new NameValue(data, locationFactory);
              case PropertyType.REFERENCE :
                 return new ReferenceValue(data, true);
              case PropertyType.UNDEFINED :
                 return null;
              case ExtendedPropertyType.PERMISSION :
                 return new PermissionValue(data);
              default :
                 throw new ValueFormatException("unknown type " + type);
           }
        }
        catch (IOException e)
        {
           throw new RepositoryException(e);
        }
     }
docs: Creates new Value object using ValueData
  
  @param data
  ValueData
  @param type
  int
  @return Value
  @throws RepositoryException
  if error