code: public static String getTypeFromRef(String ref) {
          Matcher matcher = match(ref);
          return matcher != null ? matcher.group(1) : null;
      }
docs: Get the type from the specified ref url
  
  @param ref the ref url to extract the type from
  
  @return the extracted type or null if the specified ref was not valid