/** * Parse a telephone number return a parsed structure. * * @param telephone_number * is a String containing the telephone # to be parsed * @return a parsed address structure. * @since v1.0 * @exception ParseException * a ParseException when the address is badly formatted. */ public TelephoneNumber parseTelephoneNumber(String telephone_number) throws ParseException { // Bug fix contributed by Will Scullin return new URLParser(telephone_number).parseTelephoneNumber(true); }
/** * Parse and return a structure for a Tel URL. * @return a parsed tel url structure. */ public TelURLImpl telURL( boolean inBrackets ) throws ParseException { lexer.match(TokenTypes.TEL); lexer.match(':'); TelephoneNumber tn = this.parseTelephoneNumber(inBrackets); TelURLImpl telUrl = new TelURLImpl(); telUrl.setTelephoneNumber(tn); return telUrl; }