2 * Copyright 2007 ZXing authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.google.zxing.client.result;
22 public final class AddressBookParsedResult extends ParsedResult {
24 private final String[] names;
25 private final String pronunciation;
26 private final String[] phoneNumbers;
27 private final String[] emails;
28 private final String note;
29 private final String[] addresses;
30 private final String org;
31 private final String birthday;
32 private final String title;
33 private final String url;
35 public AddressBookParsedResult(String[] names,
37 String[] phoneNumbers,
45 super(ParsedResultType.ADDRESSBOOK);
47 this.pronunciation = pronunciation;
48 this.phoneNumbers = phoneNumbers;
51 this.addresses = addresses;
53 this.birthday = birthday;
58 public String[] getNames() {
63 * In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint
64 * is often provided, called furigana, which spells the name phonetically.
66 * @return The pronunciation of the getNames() field, often in hiragana or katakana.
68 public String getPronunciation() {
72 public String[] getPhoneNumbers() {
76 public String[] getEmails() {
80 public String getNote() {
84 public String[] getAddresses() {
88 public String getTitle() {
92 public String getOrg() {
96 public String getURL() {
101 * @return birthday formatted as yyyyMMdd (e.g. 19780917)
103 public String getBirthday() {
107 public String getDisplayResult() {
108 StringBuffer result = new StringBuffer(100);
109 maybeAppend(names, result);
110 maybeAppend(pronunciation, result);
111 maybeAppend(title, result);
112 maybeAppend(org, result);
113 maybeAppend(addresses, result);
114 maybeAppend(phoneNumbers, result);
115 maybeAppend(emails, result);
116 maybeAppend(url, result);
117 maybeAppend(birthday, result);
118 maybeAppend(note, result);
119 return result.toString();