code: public static JobId parse(final String id) throws JobIdParseException {
      final String[] parts = id.split(":");
      switch (parts.length) {
        case 1:
          return new JobId(parts[0], true);
        case 2:
          return new JobId(parts[0], parts[1]);
        case 3:
          return new JobId(parts[0], parts[1], parts[2]);
        default:
          throw new JobIdParseException("Invalid Job id: " + id);
      }
    }
docs: Parse a job id string.
  
  <p>This parsing method can be used when input is not know to be correct. I.e. when parsing a
  job id supplied by the user in the cli or when parsing a request in the master rest
  interface.
  
  @param id A string representation of the job ID.
  
  @return The JobId object.
  
  @throws JobIdParseException If the ID cannot be parsed.
  @see #fromString(String)