code: public static <S extends Storable> OrderedProperty<S> parse(StorableInfo<S> info,
                                                                  String str,
                                                                  Direction defaultDirection)
          throws IllegalArgumentException
      {
          if (info == null || str == null || defaultDirection == null) {
              throw new IllegalArgumentException();
          }
          Direction direction = defaultDirection;
          if (str.length() > 0) {
              if (str.charAt(0) == '+') {
                  direction = Direction.ASCENDING;
                  str = str.substring(1);
              } else if (str.charAt(0) == '-') {
                  direction = Direction.DESCENDING;
                  str = str.substring(1);
              } else if (str.charAt(0) == '~') {
                  direction = Direction.UNSPECIFIED;
                  str = str.substring(1);
              }
          }
          if (direction == null) {
              direction = Direction.ASCENDING;
          }
          return get(ChainedProperty.parse(info, str), direction);
      }
docs: Parses an ordering property, which may start with a '+' or '-' to
  indicate direction. Prefix of '~' indicates unspecified direction.
  
  @param info Info for Storable type containing property
  @param str string to parse
  @param defaultDirection default direction if not specified in
  string. If null, ascending order is defaulted.
  @throws IllegalArgumentException if any required parameter is null or
  string format is incorrect