code: public static Status component(String value) {
          if (value != null && !value.isEmpty()) {
              if ("\\-".equals(value)) {
                  return Status.SINGLE_QUOTED_HYPHEN;
              }
              for (int x = 0; x < value.length(); x++) {
                  char c = value.charAt(x);
                  if (c == '?' && x > 0 && x < value.length() - 1
                          && !((value.charAt(x - 1) == '?' || value.charAt(x - 1) == '*' || value.charAt(x - 1) == '\\')
                          || (x < value.length() - 1 && (value.charAt(x + 1) == '?' || value.charAt(x + 1) == '*')))) {
                      return Status.UNQUOTED_QUESTION_MARK;
                  } else if (Character.isWhitespace(c)) {
                      return Status.WHITESPACE;
                  } else if (c < 32 || c > 127) {
                      return Status.NON_PRINTABLE;
                  } else if (c == '*' && x != 0 && value.charAt(x - 1) == '*') {
                      return Status.ASTERISK_SEQUENCE;
                  } else if (c == '*' && !((x == 0 || x == value.length() - 1)
                          || (x > 0 && '\\' == value.charAt(x - 1)))) {
                      return Status.UNQUOTED_ASTERISK;
                  }
              }
              return Status.VALID;
          }
          return Status.EMPTY;
      }
docs: Validates the component to ensure it meets the CPE 2.3 specification of
  allowed values.
  
  @param value the value to validate
  @return the validation status given value;
  @see us.springett.parsers.cpe.util.Status#isValid()