static String[] matchDoCoMoPrefixedField(String prefix, String rawText, boolean trim) { return matchPrefixedField(prefix, rawText, ';', trim); }
static String matchSingleDoCoMoPrefixedField(String prefix, String rawText, boolean trim) { return matchSinglePrefixedField(prefix, rawText, ';', trim); }
public AddressBookResult(AddressBookParsedResult addressBookParsedResult) { this.names = addressBookParsedResult.getNames(); this.nicknames = addressBookParsedResult.getNicknames(); this.pronunciation = addressBookParsedResult.getPronunciation(); this.phoneNumbers = addressBookParsedResult.getPhoneNumbers(); this.phoneTypes = addressBookParsedResult.getPhoneTypes(); this.emails = addressBookParsedResult.getEmails(); this.emailTypes = addressBookParsedResult.getEmailTypes(); this.instantMessenger = addressBookParsedResult.getInstantMessenger(); this.note = addressBookParsedResult.getNote(); this.addresses = addressBookParsedResult.getAddresses(); this.addressTypes = addressBookParsedResult.getAddressTypes(); this.org = addressBookParsedResult.getOrg(); this.birthday = addressBookParsedResult.getBirthday(); this.title = addressBookParsedResult.getTitle(); this.urls = addressBookParsedResult.getURLs(); this.geo = addressBookParsedResult.getGeo(); }
public SMSResult(SMSParsedResult smsParsedResult) { this.numbers = smsParsedResult.getNumbers(); this.vias = smsParsedResult.getVias(); this.subject = smsParsedResult.getSubject(); this.body = smsParsedResult.getBody(); }
public GeoResult(GeoParsedResult geoParsedResult) { this.latitude = geoParsedResult.getLatitude(); this.longitude = geoParsedResult.getLongitude(); this.altitude = geoParsedResult.getAltitude(); this.query = geoParsedResult.getQuery(); }
public static ParsedResult parseResult(Result rawResult) { if (rawResult == null) return null; return ResultParser.parseResult(rawResult); }
public String toString() { return getDisplayResult(); }
public ProductResult(ProductParsedResult productParsedResult) { this.productID = productParsedResult.getProductID(); this.normalizedProductID = productParsedResult.getNormalizedProductID(); }
public TextResult(TextParsedResult textParsedResult) { this.text = textParsedResult.getText(); this.language = textParsedResult.getLanguage(); }
public ISBNResult(ISBNParsedResult isbnParsedResult) { this.isbn = isbnParsedResult.getISBN(); }
public static WifiParsedResult parse(Result result) { String rawText = result.getText(); if (rawText == null || !rawText.startsWith("WIFI:")) { return null; } // Don't remove leading or trailing whitespace boolean trim = false; String ssid = matchSinglePrefixedField("S:", rawText, ';', trim); String pass = matchSinglePrefixedField("P:", rawText, ';', trim); String type = matchSinglePrefixedField("T:", rawText, ';', trim); return new WifiParsedResult(type, ssid, pass); } }
public static URIParsedResult parse(Result result) { String rawText = result.getText(); // We specifically handle the odd "URL" scheme here for simplicity if (rawText != null && rawText.startsWith("URL:")) { rawText = rawText.substring(4); } if (!isBasicallyValidURI(rawText)) { return null; } return new URIParsedResult(rawText, null); }
public URIParsedResult(String uri, String title) { super(ParsedResultType.URI); this.uri = massageURI(uri); this.title = title; }
/** * @return true if the URI contains suspicious patterns that may suggest it intends to * mislead the user about its true nature. At the moment this looks for the presence * of user/password syntax in the host/authority portion of a URI which may be used * in attempts to make the URI's host appear to be other than it is. Example: * http://yourbank.com@phisher.com This URI connects to phisher.com but may appear * to connect to yourbank.com at first glance. */ public boolean isPossiblyMaliciousURI() { return containsUser(); }
static String matchSingleVCardPrefixedField(String prefix, String rawText, boolean trim) { String[] values = matchVCardPrefixedField(prefix, rawText, trim); return values == null ? null : values[0]; }
static String matchSinglePrefixedField(String prefix, String rawText, char endChar, boolean trim) { String[] matches = matchPrefixedField(prefix, rawText, endChar, trim); return matches == null ? null : matches[0]; }
public String getDisplayResult() { StringBuffer result = new StringBuffer(100); maybeAppend(summary, result); maybeAppend(start, result); maybeAppend(end, result); maybeAppend(location, result); maybeAppend(attendee, result); maybeAppend(description, result); return result.toString(); }
public String getDisplayResult() { StringBuffer result = new StringBuffer(30); maybeAppend(emailAddress, result); maybeAppend(subject, result); maybeAppend(body, result); return result.toString(); }