示例#1
0
 String fillInCustomSearchURL(String text) {
   String url = customProductSearch.replace("%s", text);
   if (rawResult != null) {
     url = url.replace("%f", rawResult.getBarcodeFormat().toString());
   }
   return url;
 }
示例#2
0
 public static ParsedResult parseResult(Result theResult) {
   // This is a bit messy, but given limited options in MIDP / CLDC, this may well be the simplest
   // way to go about this. For example, we have no reflection available, really.
   // Order is important here.
   ParsedResult result;
   if ((result = BookmarkDoCoMoResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = AddressBookDoCoMoResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = EmailDoCoMoResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = AddressBookAUResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = VCardResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = BizcardResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = VEventResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = EmailAddressResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = SMTPResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = TelResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = SMSMMSResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = SMSTOMMSTOResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = GeoResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = WifiResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = URLTOResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = URIResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = ISBNResultParser.parse(theResult)) != null) {
     // We depend on ISBN parsing coming before UPC, as it is a subset.
     return result;
   } else if ((result = ProductResultParser.parse(theResult)) != null) {
     return result;
   } else if ((result = ExpandedProductResultParser.parse(theResult)) != null) {
     return result;
   }
   return new TextParsedResult(theResult.getText(), null);
 }