code: private int getPrincipalType(String principalString) {
          return Integer.parseInt(
                  principalString.substring(0, principalString.indexOf(PRINCIPAL_SEPARATOR)));
      }
docs: Returns the principal type portion of the principal.
  
  @return int
  @param principalString