code: static ObjectIdentifier getOID
          (String keyword, int standard, Map<String, String> extraKeywordMap)
              throws IOException {
  
          keyword = keyword.toUpperCase(Locale.ENGLISH);
          if (standard == AVA.RFC2253) {
              if (keyword.startsWith(" ") || keyword.endsWith(" ")) {
                  throw new IOException("Invalid leading or trailing space " +
                          "in keyword \"" + keyword + "\"");
              }
          } else {
              keyword = keyword.trim();
          }
  
          // check user-specified keyword map first, then fallback to built-in
          // map
          String oidString = extraKeywordMap.get(keyword);
          if (oidString == null) {
              AVAKeyword ak = keywordMap.get(keyword);
              if ((ak != null) && ak.isCompliant(standard)) {
                  return ak.oid;
              }
          } else {
              return new ObjectIdentifier(oidString);
          }
  
          // no keyword found or not standard compliant, check if OID string
  
          // RFC1779 requires, DEFAULT allows OID. prefix
          if (standard == AVA.RFC1779) {
              if (keyword.startsWith("OID.") == false) {
                  throw new IOException("Invalid RFC1779 keyword: " + keyword);
              }
              keyword = keyword.substring(4);
          } else if (standard == AVA.DEFAULT) {
              if (keyword.startsWith("OID.")) {
                  keyword = keyword.substring(4);
              }
          }
          boolean number = false;
          if (keyword.length() != 0) {
              char ch = keyword.charAt(0);
              if ((ch >= '0') && (ch <= '9')) {
                  number = true;
              }
          }
          if (number == false) {
              throw new IOException("Invalid keyword \"" + keyword + "\"");
          }
          return new ObjectIdentifier(keyword);
      }
docs: Get an object identifier representing the specified keyword (or
  string encoded object identifier) in the given standard.
  
  @param keywordMap a Map where a keyword String maps to a corresponding
  OID String. Each AVA keyword will be mapped to the corresponding OID.
  If an entry does not exist, it will fallback to the builtin
  keyword/OID mapping.
  @throws IOException If the keyword is not valid in the specified standard
  or the OID String to which a keyword maps to is improperly formatted.